Advertisement
Guest User

i3 Config

a guest
Mar 4th, 2020
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # This file has been auto-generated by i3-config-wizard(1).
  2. # It will not be overwritten, so edit it as you like.
  3. #
  4. # Should you change your keyboard layout some time, delete
  5. # this file and re-run i3-config-wizard(1).
  6. #
  7.  
  8. # i3 config file (v4)
  9. #
  10. # Please see https://i3wm.org/docs/userguide.html for a complete reference!
  11.  
  12. set $mod Mod4
  13. set $shutdown shutdown -h now
  14. set $reboot shutdown -r now
  15. set $term alacritty
  16.  
  17. # Font for window titles. Will also be used by the bar unless a different font
  18. # is used in the bar {} block below.
  19. font pango:FiraCode Nerd Font 12
  20.  
  21. # This font is widely installed, provides lots of unicode glyphs, right-to-left
  22. # text rendering and scalability on retina/hidpi displays (thanks to pango).
  23. #font pango:DejaVu Sans Mono 8
  24.  
  25. # Before i3 v4.8, we used to recommend this one as the default:
  26. # font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
  27. # The font above is very space-efficient, that is, it looks good, sharp and
  28. # clear in small sizes. However, its unicode glyph coverage is limited, the old
  29. # X core fonts rendering does not support right-to-left and this being a bitmap
  30. # font, it doesn’t scale on retina/hidpi displays.
  31.  
  32. # Use Mouse+$mod to drag floating windows to their wanted position
  33. floating_modifier $mod
  34.  
  35. # start a terminal
  36. bindsym $mod+Return exec alacritty
  37.  
  38. # kill focused window
  39. bindsym $mod+Shift+q kill
  40.  
  41. # i3-gaps stuff
  42. gaps inner 10
  43. gaps outer -2
  44. new_window pixel 2
  45. smart_borders on
  46.  
  47. # start dmenu (a program launcher)
  48. bindsym $mod+d exec --no-startup-id dmenu_run -c -l 10
  49.  
  50. # change focus
  51. bindsym $mod+h focus left
  52. bindsym $mod+j focus down
  53. bindsym $mod+k focus up
  54. bindsym $mod+l focus right
  55.  
  56. # move focused window
  57. bindsym $mod+Shift+h move left
  58. bindsym $mod+Shift+j move down
  59. bindsym $mod+Shift+k move up
  60. bindsym $mod+Shift+l move right
  61.  
  62. # split in horizontal orientation
  63. bindsym $mod+o split h;exec notify-send "Split Horizontal" -t 1500
  64.  
  65. # split in vertical orientation
  66. bindsym $mod+v split v;exec notify-send "Split Vertical" -t 1500
  67.  
  68. # enter fullscreen mode for the focused container
  69. bindsym $mod+f fullscreen toggle
  70.  
  71. # change container layout (stacked, tabbed, toggle split)
  72. # bindsym $mod+s layout stacking
  73. # bindsym $mod+w layout tabbed
  74. #bindsym $mod+e layout toggle split
  75.  
  76. # toggle tiling / floating
  77. bindsym $mod+Shift+space floating toggle
  78. floating_minimum_size 2000 x 1600
  79. floating_maximum_size 3840 x 2160
  80.  
  81. # change focus between tiling / floating windows
  82. bindsym $mod+space focus mode_toggle
  83.  
  84. # focus the parent container
  85. #bindsym $mod+a focus parent
  86.  
  87. # focus the child container
  88. #bindsym $mod+c focus child
  89.  
  90. # Define names for default workspaces for which we configure key bindings later on.
  91. # We use variables to avoid repeating the names in multiple places.
  92. set $ws1 "1:"
  93. set $ws2 "2:>_"
  94. set $ws3 "3:"
  95. set $ws4 "4:ﭮ"
  96. set $ws5 "5"
  97.  
  98.  
  99. # switch to workspace
  100. bindsym $mod+1 workspace $ws1
  101. bindsym $mod+2 workspace $ws2
  102. bindsym $mod+3 workspace $ws3
  103. bindsym $mod+4 workspace $ws4
  104. bindsym $mod+5 workspace $ws5
  105.  
  106. # move focused container to workspace
  107. bindsym $mod+Shift+1 move container to workspace $ws1
  108. bindsym $mod+Shift+2 move container to workspace $ws2
  109. bindsym $mod+Shift+3 move container to workspace $ws3
  110. bindsym $mod+Shift+4 move container to workspace $ws4
  111. bindsym $mod+Shift+5 move container to workspace $ws5
  112.  
  113. # assign programs to certain workspaces
  114. assign [class="firefox"] $ws1
  115. assign [class="Alacritty"] $ws2
  116. assign [class="Code"] $ws3
  117. assign [class="discord"] $ws4
  118.  
  119. # reload the configuration file
  120. bindsym $mod+Shift+c reload
  121. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
  122. bindsym $mod+Shift+r restart
  123. # exit i3 (logs you out of your X session)
  124. bindsym $mod+Shift+e exec --no-startup-id prompt "Exit i3?" "i3-msg exit"
  125.  
  126. # resize window (you can also use the mouse for that)
  127. mode "resize" {
  128.         # These bindings trigger as soon as you enter the resize mode
  129.  
  130.         # Pressing left will shrink the window’s width.
  131.         # Pressing right will grow the window’s width.
  132.         # Pressing up will shrink the window’s height.
  133.         # Pressing down will grow the window’s height.
  134.         bindsym h resize shrink width 10 px or 10 ppt
  135.         bindsym j resize grow height 10 px or 10 ppt
  136.         bindsym k resize shrink height 10 px or 10 ppt
  137.         bindsym l resize grow width 10 px or 10 ppt
  138.  
  139.         # back to normal: Enter or Escape or $mod+r
  140.         bindsym Return mode "default"
  141.         bindsym Escape mode "default"
  142.         bindsym $mod+r mode "default"
  143. }
  144.  
  145.  
  146.  
  147. bindsym $mod+r mode "resize"
  148. bindsym --release $mod+Shift+Print exec "flameshot full -c -p ~/Pictures/screenshots"
  149. bindsym --release Print exec "flameshot full -c"
  150. bindsym --release $mod+Print exec "flameshot gui"
  151.  
  152. bindsym --release XF86MonBrightnessUp exec xbacklight -inc 10
  153. bindsym --release XF86MonBrightnessDown exec xbacklight -dec 10
  154.  
  155. bindsym --release $mod+shift+m exec amixer -c 0 set Master 0%
  156. bindsym --release XF86AudioLowerVolume exec amixer -c 0 set Master 5%-
  157. bindsym --release XF86AudioRaiseVolume exec amixer -c 0 set Master 5%+
  158.  
  159. bindsym $mod+Shift+x exec --no-startup-id prompt "Shutdown computer?" "$shutdown"
  160. bindsym $mod+Shift+BackSpace exec --no-startup-id prompt "Reboot computer?" "$reboot"
  161.  
  162.  
  163. focus_follows_mouse no
  164. exec --no-startup-id flameshot
  165. exec --no-startup-id discord
  166. exec_always --no-startup-id feh --bg-scale Backgrounds/bg.jpg
  167. exec_always --no-startup-id picom
  168. exec_always --no-startup-id $HOME/.config/polybar/launch.sh
  169. exec --no-startup-id setxkbmap -option caps:escape
  170. exec --no-startup-id dunst
  171.  
  172. ###################################
  173. # Scratch pads
  174. ###################################
  175. for_window [instance="dropdown"] floating enable
  176. for_window [instance="dropdown"] resize set 2100 1700
  177. for_window [instance="dropdown"] move scratchpad
  178. for_window [instance="dropdown"] border pixel 5
  179. exec --no-startup-id $term --class dropdown
  180. bindsym $mod+i [instance="dropdown"] scratchpad show; [instance="dropdown"] move position center
  181.  
  182. for_window [instance="music"] floating enable
  183. for_window [instance="music"] resize set 2800 1700
  184. for_window [instance="music"] move scratchpad
  185. for_window [instance="music"] border pixel 5
  186. exec --no-startup-id $term --class music -e spt
  187. bindsym $mod+s [instance="music"] scratchpad show; [instance="music"] move position center
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement