config 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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 8
  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 8
  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 i3-sensible-terminal
  21. # kill focused window
  22. bindsym $mod+Shift+w kill
  23. # start dmenu (a program launcher)
  24. bindsym $mod+d exec dmenu_run
  25. # There also is the (new) i3-dmenu-desktop which only displays applications
  26. # shipping a .desktop file. It is a wrapper around dmenu, so you need that
  27. # installed.
  28. # bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
  29. # change focus
  30. bindsym $mod+$left focus left
  31. bindsym $mod+$down focus down
  32. bindsym $mod+$up focus up
  33. bindsym $mod+$right focus right
  34. # alternatively, you can use the cursor keys:
  35. bindsym $mod+Left focus left
  36. bindsym $mod+Down focus down
  37. bindsym $mod+Up focus up
  38. bindsym $mod+Right focus right
  39. # move focused window
  40. bindsym $mod+Shift+$left move left
  41. bindsym $mod+Shift+$down move down
  42. bindsym $mod+Shift+$up move up
  43. bindsym $mod+Shift+$right move right
  44. # alternatively, you can use the cursor keys:
  45. bindsym $mod+Shift+Left move left
  46. bindsym $mod+Shift+Down move down
  47. bindsym $mod+Shift+Up move up
  48. bindsym $mod+Shift+Right move right
  49. # split in horizontal orientation
  50. bindsym $mod+v split h
  51. # split in vertical orientation
  52. bindsym $mod+minus split v
  53. # enter fullscreen mode for the focused container
  54. bindsym $mod+f fullscreen toggle
  55. # change container layout (stacked, tabbed, toggle split)
  56. bindsym $mod+o layout stacking
  57. bindsym $mod+comma layout tabbed
  58. bindsym $mod+period layout toggle split
  59. # toggle tiling / floating
  60. bindsym $mod+Shift+space floating toggle
  61. # change focus between tiling / floating windows
  62. bindsym $mod+space focus mode_toggle
  63. # focus the parent container
  64. bindsym $mod+a focus parent
  65. # focus the child container
  66. bindsym $mod+e focus child
  67. # move the currently focused window to the scratchpad
  68. bindsym $mod+Shift+semicolon move scratchpad
  69. # Show the next scratchpad window or hide the focused scratchpad window.
  70. # If there are multiple scratchpad windows, this command cycles through them.
  71. bindsym $mod+semicolon scratchpad show
  72. # Workspace bindings
  73. set $work1 g
  74. set $work2 c
  75. set $work3 r
  76. set $work4 l
  77. set $work5 parenleft
  78. set $work6 equal
  79. set $work7 asterisk
  80. set $work8 parenright
  81. set $work9 plus
  82. set $work10 bracketright
  83. # Number keypad bindings
  84. set $KP_0 KP_Insert
  85. set $KP_1 KP_End
  86. set $KP_2 KP_Down
  87. set $KP_3 KP_Next
  88. set $KP_4 KP_Left
  89. set $KP_5 KP_Begin
  90. set $KP_6 KP_Right
  91. set $KP_7 KP_Home
  92. set $KP_8 KP_Up
  93. set $KP_9 KP_Prior
  94. set $KP_Decimal KP_Delete
  95. # switch to workspace
  96. bindsym $mod+$work1 workspace 1
  97. bindsym $mod+$work2 workspace 2
  98. bindsym $mod+$work3 workspace 3
  99. bindsym $mod+$work4 workspace 4
  100. bindsym $mod+$work5 workspace 5
  101. bindsym $mod+$work6 workspace 6
  102. bindsym $mod+$work7 workspace 7
  103. bindsym $mod+$work8 workspace 8
  104. bindsym $mod+$work9 workspace 9
  105. bindsym $mod+$work10 workspace 10
  106. # switch to workspace with numpad
  107. bindsym $mod+$KP_1 workspace 1
  108. bindsym $mod+$KP_2 workspace 2
  109. bindsym $mod+$KP_3 workspace 3
  110. bindsym $mod+$KP_4 workspace 4
  111. bindsym $mod+$KP_5 workspace 5
  112. bindsym $mod+$KP_6 workspace 6
  113. bindsym $mod+$KP_7 workspace 7
  114. bindsym $mod+$KP_8 workspace 8
  115. bindsym $mod+$KP_9 workspace 9
  116. bindsym $mod+$KP_0 workspace 10
  117. # move focused container to workspace
  118. bindsym $mod+Shift+$work1 move container to workspace 1
  119. bindsym $mod+Shift+$work2 move container to workspace 2
  120. bindsym $mod+Shift+$work3 move container to workspace 3
  121. bindsym $mod+Shift+$work4 move container to workspace 4
  122. bindsym $mod+Shift+$work5 move container to workspace 5
  123. bindsym $mod+Shift+$work6 move container to workspace 6
  124. bindsym $mod+Shift+$work7 move container to workspace 7
  125. bindsym $mod+Shift+$work8 move container to workspace 8
  126. bindsym $mod+Shift+$work9 move container to workspace 9
  127. bindsym $mod+Shift+$work10 move container to workspace 10
  128. # move focused container to workspace with numpad
  129. bindsym $mod+Shift+$KP_1 move container to workspace 1
  130. bindsym $mod+Shift+$KP_2 move container to workspace 2
  131. bindsym $mod+Shift+$KP_3 move container to workspace 3
  132. bindsym $mod+Shift+$KP_4 move container to workspace 4
  133. bindsym $mod+Shift+$KP_5 move container to workspace 5
  134. bindsym $mod+Shift+$KP_6 move container to workspace 6
  135. bindsym $mod+Shift+$KP_7 move container to workspace 7
  136. bindsym $mod+Shift+$KP_8 move container to workspace 8
  137. bindsym $mod+Shift+$KP_9 move container to workspace 9
  138. bindsym $mod+Shift+$KP_0 move container to workspace 10
  139. # reload the configuration file
  140. bindsym $mod+Shift+y reload
  141. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
  142. bindsym $mod+Shift+x restart
  143. # exit i3 (logs you out of your X session)
  144. 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'"
  145. # resize window (you can also use the mouse for that)
  146. mode "resize" {
  147. # These bindings trigger as soon as you enter the resize mode
  148. # Pressing left will shrink the window’s width.
  149. # Pressing right will grow the window’s width.
  150. # Pressing up will shrink the window’s height.
  151. # Pressing down will grow the window’s height.
  152. bindsym $left resize shrink width 10 px or 10 ppt
  153. bindsym $down resize grow height 10 px or 10 ppt
  154. bindsym $up resize shrink height 10 px or 10 ppt
  155. bindsym $right resize grow width 10 px or 10 ppt
  156. # same bindings, but for the arrow keys
  157. bindsym Left resize shrink width 10 px or 10 ppt
  158. bindsym Down resize grow height 10 px or 10 ppt
  159. bindsym Up resize shrink height 10 px or 10 ppt
  160. bindsym Right resize grow width 10 px or 10 ppt
  161. # back to normal: Enter or Escape
  162. bindsym Return mode "default"
  163. bindsym Escape mode "default"
  164. }
  165. bindsym $mod+b mode "resize"
  166. # Start i3bar to display a workspace bar (plus the system information i3status
  167. # finds out, if available)
  168. bar {
  169. status_command i3status
  170. }