config 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. # i3 config file (v4)
  2. #
  3. # Please see https://i3wm.org/docs/userguide.html for a complete reference!
  4. set $mod Mod4
  5. # Font for window titles. Will also be used by the bar unless a different font
  6. # is used in the bar {} block below.
  7. # font pango:monospace 12
  8. # This font is widely installed, provides lots of unicode glyphs, right-to-left
  9. # text rendering and scalability on retina/hidpi displays (thanks to pango).
  10. font pango:DejaVu Sans Mono 14
  11. # use these keys for focus, movement, and resize directions when reaching for
  12. # the arrows is not convenient
  13. set $up n
  14. set $down t
  15. set $left h
  16. set $right s
  17. # use Mouse+Mod4 to drag floating windows to their wanted position
  18. floating_modifier $mod
  19. # start a terminal
  20. bindsym $mod+Return exec alacritty
  21. # kill focused window
  22. bindsym $mod+Shift+w kill
  23. # start dmenu (a program launcher)
  24. bindsym $mod+Shift+d exec --no-startup-id dmenu_run
  25. # start dmenu for desktop applications
  26. bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
  27. # swap keyboard
  28. bindsym XF86Tools exec --no-startup-id ~/.bin/swapkeyboard
  29. # switch main screen on/off
  30. bindsym XF86Display exec --no-startup-id xrandr --output eDP1 --auto
  31. bindsym $mod+XF86Display exec --no-startup-id xrandr --output eDP1 --off
  32. # VOLUME
  33. # macro adjustement : use dB for more dynamic change
  34. set $vol_big_step 4dB
  35. bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +$vol_big_step
  36. bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -$vol_big_step
  37. # toggle mute
  38. bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle
  39. # fine control while seeing status bar
  40. set $vol_fine_step 1%
  41. bindsym $mod+XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +$vol_fine_step
  42. bindsym $mod+XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -$vol_fine_step
  43. # LUMINOSITY
  44. # total adjustment
  45. bindsym $mod+Shift+XF86MonBrightnessUp exec --no-startup-id xbacklight -set 100
  46. bindsym $mod+Shift+XF86MonBrightnessDown exec --no-startup-id xbacklight -set 1
  47. # macro adjustement
  48. set $lum_big_step 5
  49. bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc $lum_big_step
  50. bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec $lum_big_step
  51. # fine control
  52. set $lum_fine_step 1
  53. bindsym $mod+XF86MonBrightnessUp exec --no-startup-id xbacklight -inc $lum_fine_step
  54. bindsym $mod+XF86MonBrightnessDown exec --no-startup-id xbacklight -dec $lum_fine_step
  55. # change focus
  56. bindsym $mod+$left focus left
  57. bindsym $mod+$down focus down
  58. bindsym $mod+$up focus up
  59. bindsym $mod+$right focus right
  60. # alternatively, you can use the cursor keys:
  61. bindsym $mod+Left focus left
  62. bindsym $mod+Down focus down
  63. bindsym $mod+Up focus up
  64. bindsym $mod+Right focus right
  65. # move focused window
  66. bindsym $mod+Shift+$left move left
  67. bindsym $mod+Shift+$down move down
  68. bindsym $mod+Shift+$up move up
  69. bindsym $mod+Shift+$right move right
  70. # alternatively, you can use the cursor keys:
  71. bindsym $mod+Shift+Left move left
  72. bindsym $mod+Shift+Down move down
  73. bindsym $mod+Shift+Up move up
  74. bindsym $mod+Shift+Right move right
  75. # split in horizontal orientation
  76. bindsym $mod+v split h
  77. # split in vertical orientation
  78. bindsym $mod+minus split v
  79. # enter fullscreen mode for the focused container
  80. bindsym $mod+f fullscreen toggle
  81. # change container layout (stacked, tabbed, toggle split)
  82. bindsym $mod+o layout stacking
  83. bindsym $mod+comma layout tabbed
  84. bindsym $mod+period layout toggle split
  85. # toggle tiling / floating
  86. bindsym $mod+Shift+space floating toggle
  87. # change focus between tiling / floating windows
  88. bindsym $mod+space focus mode_toggle
  89. # focus the parent container
  90. bindsym $mod+a focus parent
  91. # focus the child container
  92. bindsym $mod+e focus child
  93. # move the currently focused window to the scratchpad
  94. bindsym $mod+Shift+semicolon move scratchpad
  95. # Show the next scratchpad window or hide the focused scratchpad window.
  96. bindsym $mod+semicolon scratchpad show
  97. bindsym $mod+k [class="keepassxc"] scratchpad show
  98. bindsym $mod+m [class="Mumble"] scratchpad show
  99. # Workspace bindings
  100. set $work1 g
  101. set $work2 c
  102. set $work3 r
  103. set $work4 l
  104. set $work5 parenleft
  105. set $work6 equal
  106. set $work7 asterisk
  107. set $work8 parenright
  108. set $work9 plus
  109. set $work10 bracketright
  110. # Number keypad bindings
  111. set $KP_0 KP_Insert
  112. set $KP_1 KP_End
  113. set $KP_2 KP_Down
  114. set $KP_3 KP_Next
  115. set $KP_4 KP_Left
  116. set $KP_5 KP_Begin
  117. set $KP_6 KP_Right
  118. set $KP_7 KP_Home
  119. set $KP_8 KP_Up
  120. set $KP_9 KP_Prior
  121. set $KP_Decimal KP_Delete
  122. # switch to workspace
  123. bindsym $mod+$work1 workspace 1
  124. bindsym $mod+$work2 workspace 2
  125. bindsym $mod+$work3 workspace 3
  126. bindsym $mod+$work4 workspace 4
  127. bindsym $mod+$work5 workspace 5
  128. bindsym $mod+$work6 workspace 6
  129. bindsym $mod+$work7 workspace 7
  130. bindsym $mod+$work8 workspace 8
  131. bindsym $mod+$work9 workspace 9
  132. bindsym $mod+$work10 workspace 10
  133. bindsym $mod+Prior workspace prev
  134. bindsym $mod+Next workspace next
  135. # switch to workspace with numpad
  136. bindsym $KP_1 workspace 1
  137. bindsym $KP_2 workspace 2
  138. bindsym $KP_3 workspace 3
  139. bindsym $KP_4 workspace 4
  140. bindsym $KP_5 workspace 5
  141. bindsym $KP_6 workspace 6
  142. bindsym $KP_7 workspace 7
  143. bindsym $KP_8 workspace 8
  144. bindsym $KP_9 workspace 9
  145. bindsym $KP_0 workspace 10
  146. # move focused container to workspace
  147. bindsym $mod+Shift+$work1 move container to workspace 1
  148. bindsym $mod+Shift+$work2 move container to workspace 2
  149. bindsym $mod+Shift+$work3 move container to workspace 3
  150. bindsym $mod+Shift+$work4 move container to workspace 4
  151. bindsym $mod+Shift+$work5 move container to workspace 5
  152. bindsym $mod+Shift+$work6 move container to workspace 6
  153. bindsym $mod+Shift+$work7 move container to workspace 7
  154. bindsym $mod+Shift+$work8 move container to workspace 8
  155. bindsym $mod+Shift+$work9 move container to workspace 9
  156. bindsym $mod+Shift+$work10 move container to workspace 10
  157. bindsym $mod+Shift+Prior move container to workspace prev
  158. bindsym $mod+Shift+Next move container to workspace next
  159. # move focused container to workspace with numpad
  160. bindsym $mod+$KP_1 move container to workspace 1
  161. bindsym $mod+$KP_2 move container to workspace 2
  162. bindsym $mod+$KP_3 move container to workspace 3
  163. bindsym $mod+$KP_4 move container to workspace 4
  164. bindsym $mod+$KP_5 move container to workspace 5
  165. bindsym $mod+$KP_6 move container to workspace 6
  166. bindsym $mod+$KP_7 move container to workspace 7
  167. bindsym $mod+$KP_8 move container to workspace 8
  168. bindsym $mod+$KP_9 move container to workspace 9
  169. bindsym $mod+$KP_0 move container to workspace 10
  170. # reload the configuration file
  171. bindsym $mod+Shift+y reload
  172. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
  173. bindsym $mod+Shift+x restart
  174. # exit i3 (logs you out of your X session)
  175. bindsym $mod+Escape exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
  176. # app shortcuts
  177. bindsym $mod+Ctrl+f exec firefox
  178. bindsym $mod+Ctrl+t exec thunderbird
  179. bindsym $mod+Ctrl+g exec gimp
  180. bindsym $mod+Ctrl+k exec keepassxc
  181. bindsym $mod+Ctrl+a exec atril
  182. bindsym $mod+Ctrl+m exec mumble
  183. bindsym $mod+Ctrl+n exec nautilus
  184. bindsym $mod+Ctrl+r exec flatpak run chat.rocket.RocketChat
  185. # auto set workspace
  186. for_window [class="Firefox"] move container to workspace 1
  187. for_window [class="^Gimp.*"] move container to workspace 2
  188. for_window [class="Thunderbird"] move container to workspace 4
  189. for_window [class="keepassxc"] move scratchpad
  190. for_window [class="Mumble"] move scratchpad
  191. # resize window (you can also use the mouse for that)
  192. mode "resize" {
  193. # These bindings trigger as soon as you enter the resize mode
  194. # Pressing left will shrink the window’s width.
  195. # Pressing right will grow the window’s width.
  196. # Pressing up will shrink the window’s height.
  197. # Pressing down will grow the window’s height.
  198. bindsym $left resize shrink width 10 px or 10 ppt
  199. bindsym $down resize grow height 10 px or 10 ppt
  200. bindsym $up resize shrink height 10 px or 10 ppt
  201. bindsym $right resize grow width 10 px or 10 ppt
  202. # same bindings, but for the arrow keys
  203. bindsym Left resize shrink width 10 px or 10 ppt
  204. bindsym Down resize grow height 10 px or 10 ppt
  205. bindsym Up resize shrink height 10 px or 10 ppt
  206. bindsym Right resize grow width 10 px or 10 ppt
  207. # back to normal: Enter or Escape
  208. bindsym Return mode "default"
  209. bindsym Escape mode "default"
  210. }
  211. bindsym $mod+b mode "resize"
  212. # windows style
  213. hide_edge_borders smart
  214. # Start i3bar to display a workspace bar (plus some system information)
  215. bar {
  216. status_command i3status
  217. mode hide
  218. hidden_state hide
  219. modifier $mod
  220. separator_symbol "·"
  221. }
  222. # Background
  223. exec --no-startup-id feh --bg-fill ~/Pictures/Backgrounds/ubuntu_grey.jpg