Advertisement
Guest User

.i3config

a guest
Feb 21st, 2017
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.93 KB | None | 0 0
  1. # i3 config file (v4)
  2. #
  3. # Please see http://i3wm.org/docs/userguide.html for a complete reference!
  4. #
  5. # This config file uses keycodes (bindsym) and was written for the QWERTY
  6. # layout.
  7. #
  8. # To get a config file with the same key positions, but for your current
  9. # layout, use the i3-config-wizard
  10.  
  11. # Font for window titles. Will also be used by the bar unless a different font
  12. # is used in the bar {} block below.
  13. font pango:monospace 8
  14.  
  15. # This font is widely installed, provides lots of unicode glyphs, right-to-left
  16. # text rendering and scalability on retina/hidpi displays (thanks to pango).
  17. #font pango:DejaVu Sans Mono 8
  18.  
  19. # Before i3 v4.8, we used to recommend this one as the default:
  20. # font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
  21. # The font above is very space-efficient, that is, it looks good, sharp and
  22. # clear in small sizes. However, its unicode glyph coverage is limited, the old
  23. # X core fonts rendering does not support right-to-left and this being a bitmap
  24. # font, it doesn’t scale on retina/hidpi displays.
  25.  
  26. # use these keys for focus, movement, and resize directions when reaching for
  27. # the arrows is not convenient
  28. set $up l
  29. set $down k
  30. set $left j
  31. set $right semicolon
  32.  
  33. set $mod Mod4
  34.  
  35. # use Mouse+$mod to drag floating windows to their wanted position
  36. floating_modifier $mod
  37.  
  38. # Autoexec
  39. exec ~/.i3-autoexec.sh
  40. exec ~/.fehbg
  41.  
  42. # Exec
  43. bindsym $mod+Return exec urxvt
  44. bindsym $mod+b exec firefox
  45. bindsym $mod+m exec urxvt -e 'ncmpcpp'
  46. bindsym $mod+c exec atom
  47. # Volume
  48. bindsym $mod+F8 exec amixer -c 1 sset Master 5%+
  49. bindsym $mod+F7 exec amixer -c 1 sset Master 5%-
  50.  
  51. # kill focused window
  52. bindsym $mod+Shift+q kill
  53.  
  54. # start dmenu (a program launcher)
  55. bindsym $mod+d exec dmenu_run
  56. # There also is the (new) i3-dmenu-desktop which only displays applications
  57. # shipping a .desktop file. It is a wrapper around dmenu, so you need that
  58. # installed.
  59. # bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
  60.  
  61. # change focus
  62. bindsym $mod+$left focus left
  63. bindsym $mod+$down focus down
  64. bindsym $mod+$up focus up
  65. bindsym $mod+$right focus right
  66.  
  67. # alternatively, you can use the cursor keys:
  68. bindsym $mod+Left focus left
  69. bindsym $mod+Down focus down
  70. bindsym $mod+Up focus up
  71. bindsym $mod+Right focus right
  72.  
  73. # move focused window
  74. bindsym $mod+Shift+$left move left
  75. bindsym $mod+Shift+$down move down
  76. bindsym $mod+Shift+$up move up
  77. bindsym $mod+Shift+$right move right
  78.  
  79. # alternatively, you can use the cursor keys:
  80. bindsym $mod+Shift+Left move left
  81. bindsym $mod+Shift+Down move down
  82. bindsym $mod+Shift+Up move up
  83. bindsym $mod+Shift+Right move right
  84.  
  85. # split in horizontal orientation
  86. bindsym $mod+h split h
  87.  
  88. # split in vertical orientation
  89. bindsym $mod+v split v
  90.  
  91. # enter fullscreen mode for the focused container
  92. bindsym $mod+f fullscreen toggle
  93.  
  94. # change container layout (stacked, tabbed, toggle split)
  95. bindsym $mod+s layout stacking
  96. bindsym $mod+w layout tabbed
  97. bindsym $mod+e layout toggle split
  98.  
  99. # toggle tiling / floating
  100. bindsym $mod+Shift+space floating toggle
  101.  
  102. # change focus between tiling / floating windows
  103. bindsym $mod+space focus mode_toggle
  104.  
  105. # focus the parent container
  106. bindsym $mod+a focus parent
  107.  
  108. # focus the child container
  109. #bindsym $mod+d focus child
  110.  
  111. # move the currently focused window to the scratchpad
  112. bindsym $mod+Shift+minus move scratchpad
  113.  
  114. # Show the next scratchpad window or hide the focused scratchpad window.
  115. # If there are multiple scratchpad windows, this command cycles through them.
  116. bindsym $mod+minus scratchpad show
  117.  
  118. # switch to workspace
  119. bindsym $mod+1 workspace main
  120. bindsym $mod+2 workspace term
  121. bindsym $mod+3 workspace www
  122. bindsym $mod+4 workspace code
  123. bindsym $mod+5 workspace chat
  124. bindsym $mod+6 workspace music
  125. bindsym $mod+7 workspace media
  126. bindsym $mod+8 workspace 8
  127. bindsym $mod+9 workspace 9
  128. bindsym $mod+0 workspace 10
  129.  
  130. # move focused container to workspace
  131. bindsym $mod+Shift+1 move container to workspace main
  132. bindsym $mod+Shift+2 move container to workspace term
  133. bindsym $mod+Shift+3 move container to workspace www
  134. bindsym $mod+Shift+4 move container to workspace code
  135. bindsym $mod+Shift+5 move container to workspace chat
  136. bindsym $mod+Shift+6 move container to workspace music
  137. bindsym $mod+Shift+7 move container to workspace media
  138. bindsym $mod+Shift+8 move container to workspace 8
  139. bindsym $mod+Shift+9 move container to workspace 9
  140. bindsym $mod+Shift+0 move container to workspace 10
  141.  
  142. # Workspace assignments
  143. assign [class="^Firefox$"] workspace www
  144. assign [title="^ncmpcpp"] workspace music
  145. assign [class="^URxvt$"] workspace term
  146. assign [class="^feh$"] workspace media
  147. assign [class="^Atom$"] workspace code
  148.  
  149. # Window specific options
  150. for_window [class="^Firefox$"] border none
  151. for_window [class="^URxvt$"] border none
  152. for_window [class="^Atom$"] border none
  153. for_window [class="^Pavucontrol$"] floating
  154. #for_window [class="^feh$"] border none
  155.  
  156. # reload the configuration file
  157. bindsym $mod+Shift+c reload
  158. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
  159. bindsym $mod+Shift+r restart
  160. # exit i3 (logs you out of your X session)
  161. bindsym $mod+Shift+e 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'"
  162.  
  163. # Gaps
  164. gaps inner 0
  165. gaps outer 2
  166. workspace term gaps inner 4
  167. workspace term gaps outer 0
  168. workspace www gaps outer 0
  169. workspace code gaps outer 0
  170. workspace media gaps outer 0
  171.  
  172. set $mode_gaps Gaps: (o) outer, (i) inner
  173. set $mode_gaps_outer Outer: +|-|0
  174. set $mode_gaps_inner Inner: +|-|0
  175. bindsym $mod+Shift+g mode "$mode_gaps"
  176.  
  177. mode "$mode_gaps" {
  178. bindsym o mode "$mode_gaps_outer"
  179. bindsym i mode "$mode_gaps_inner"
  180. bindsym Return mode "default"
  181. bindsym Escape mode "default"
  182. }
  183.  
  184. mode "$mode_gaps_inner" {
  185. bindsym plus gaps inner current plus 5
  186. bindsym minus gaps inner current minus 5
  187. bindsym 0 gaps inner current set 0
  188.  
  189. bindsym Return mode "default"
  190. bindsym Escape mode "default"
  191. }
  192.  
  193. mode "$mode_gaps_outer" {
  194. bindsym plus gaps outer current plus 5
  195. bindsym minus gaps outer current minus 5
  196. bindsym 0 gaps outer current set 0
  197.  
  198. bindsym Return mode "default"
  199. bindsym Escape mode "default"
  200. }
  201.  
  202.  
  203. # resize window (you can also use the mouse for that)
  204. mode "resize" {
  205. # These bindings trigger as soon as you enter the resize mode
  206.  
  207. # Pressing left will shrink the window’s width.
  208. # Pressing right will grow the window’s width.
  209. # Pressing up will shrink the window’s height.
  210. # Pressing down will grow the window’s height.
  211. bindsym $left resize shrink width 10 px or 10 ppt
  212. bindsym $down resize grow height 10 px or 10 ppt
  213. bindsym $up resize shrink height 10 px or 10 ppt
  214. bindsym $right resize grow width 10 px or 10 ppt
  215.  
  216. # same bindings, but for the arrow keys
  217. bindsym Left resize shrink width 10 px or 10 ppt
  218. bindsym Down resize grow height 10 px or 10 ppt
  219. bindsym Up resize shrink height 10 px or 10 ppt
  220. bindsym Right resize grow width 10 px or 10 ppt
  221.  
  222. # back to normal: Enter or Escape
  223. bindsym Return mode "default"
  224. bindsym Escape mode "default"
  225. }
  226.  
  227. bindsym $mod+r mode "resize"
  228.  
  229. # Start i3bar to display a workspace bar (plus the system information i3status
  230. # finds out, if available)
  231. bar {
  232. status_command i3status
  233. }
  234.  
  235. #######################################################################
  236. # automatically start i3-config-wizard to offer the user to create a
  237. # keysym-based config which used their favorite modifier (alt or windows)
  238. #
  239. # i3-config-wizard will not launch if there already is a config file
  240. # in ~/.i3/config.
  241. #
  242. # Please remove the following exec line:
  243. #######################################################################
  244. exec i3-config-wizard
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement