\ i3 - /g/pasta 2.4
From Sinc, 5 Years ago, written in Plain Text.
Embed
  1. # i3 config file (v4)
  2. #
  3. # Please see http://i3wm.org/docs/userguide.html for a complete reference!
  4.  
  5. # Bind mod key
  6. set $mod Mod4
  7.  
  8. # autostart programs
  9. # exec --no-startup-id feh --bg-scale "/path/to/background"
  10. exec --no-startup-id dmenu_run
  11.  
  12. # Hide window titles on startup
  13. for_window [class="^.*"] border pixel 0
  14.  
  15. # Font for window titles. Will also be used by the bar unless a different font
  16. # is used in the bar {} block below. ISO 10646 = Unicode
  17. font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
  18.  
  19. # Use Mouse+$mod to drag floating windows to their wanted position
  20. floating_modifier $mod
  21.  
  22. # adjust volume
  23. bindsym XF86AudioRaiseVolume exec amixer -q set Master 5%+ unmute
  24. bindsym XF86AudioLowerVolume exec amixer -q set Master 5%- unmute
  25. bindsym XF86AudioMute exec amixer -q set Master toggle
  26.  
  27. # scrot via printscreen
  28. bindcode 107 exec scrot '%Y%m%d-%H:%M:%S_$wx$h_scrot.png' -e 'mv $f ~/Screenshots/'
  29.  
  30. # hide window borders
  31. hide_edge_borders both
  32.  
  33. # start a terminal
  34. bindsym $mod+Return exec terminator
  35.  
  36. # kill focused window
  37. bindsym $mod+q kill
  38.  
  39. # open programs in specific workspaces
  40. assign [class="Chromium"] 2
  41. assign [class="Hexchat"] 3
  42. assign [class="Gimp-2.8"] 4
  43.  
  44. # execute programs
  45. bindsym $mod+i bar mode toggle
  46. bindsym $mod+Shift+q exec xkill
  47. bindsym $mod+e exec thunar
  48. bindsym $mod+w exec chromium
  49. bindsym $mod+h exec hexchat
  50. bindsym $mod+n exec gksudo -u root gedit
  51. bindsym $mod+l exec i3lock -i "/path/to/image"
  52.  
  53. # switch workspaces with XF86Forward and XF86Back
  54. # bindcode 166 workspace prev
  55. # bindcode 167 workspace next
  56.  
  57. # enter fullscreen mode for the focused container
  58. bindsym $mod+f fullscreen
  59.  
  60. # toggle tiling / floating
  61. bindsym $mod+Shift+space floating toggle
  62.  
  63. # change focus between tiling / floating windows
  64. bindsym $mod+space focus mode_toggle
  65.  
  66. # focus the parent container
  67. bindsym $mod+a focus parent
  68.  
  69. # focus the child container
  70. #bindsym $mod+d focus child
  71.  
  72. # switch to workspace
  73. bindsym $mod+1 workspace 1
  74. bindsym $mod+2 workspace 2
  75. bindsym $mod+3 workspace 3
  76. bindsym $mod+4 workspace 4
  77. bindsym $mod+5 workspace 5
  78. bindsym $mod+6 workspace 6
  79. bindsym $mod+7 workspace 7
  80. bindsym $mod+8 workspace 8
  81. bindsym $mod+9 workspace 9
  82. bindsym $mod+0 workspace 10
  83.  
  84. # move focused container to workspace
  85. bindsym $mod+Shift+1 move container to workspace 1
  86. bindsym $mod+Shift+2 move container to workspace 2
  87. bindsym $mod+Shift+3 move container to workspace 3
  88. bindsym $mod+Shift+4 move container to workspace 4
  89. bindsym $mod+Shift+5 move container to workspace 5
  90. bindsym $mod+Shift+6 move container to workspace 6
  91. bindsym $mod+Shift+7 move container to workspace 7
  92. bindsym $mod+Shift+8 move container to workspace 8
  93. bindsym $mod+Shift+9 move container to workspace 9
  94. bindsym $mod+Shift+0 move container to workspace 10
  95.  
  96. # reload the configuration file
  97. bindsym $mod+Shift+c reload
  98.  
  99. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
  100. bindsym $mod+Shift+r restart
  101.  
  102. # exit i3 (logs you out of your X session)
  103. bindsym $mod+Alt+q 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'"
  104.  
  105. # resize window (you can also use the mouse for that)
  106. mode "resize" {
  107.         # These bindings trigger as soon as you enter the resize mode
  108.  
  109.         # Pressing left will shrink the window’s width.
  110.         # Pressing right will grow the window’s width.
  111.         # Pressing up will shrink the window’s height.
  112.         # Pressing down will grow the window’s height.
  113.         bindsym j resize shrink width 10 px or 10 ppt
  114.         bindsym k resize grow height 10 px or 10 ppt
  115.         bindsym l resize shrink height 10 px or 10 ppt
  116.         bindsym semicolon resize grow width 10 px or 10 ppt
  117.  
  118.         # same bindings, but for the arrow keys
  119.         bindsym Left resize shrink width 10 px or 10 ppt
  120.         bindsym Down resize grow height 10 px or 10 ppt
  121.         bindsym Up resize shrink height 10 px or 10 ppt
  122.         bindsym Right resize grow width 10 px or 10 ppt
  123.  
  124.         # back to normal: Enter or Escape
  125.         bindsym Return mode "default"
  126.         bindsym Escape mode "default"
  127. }
  128.  
  129. bindsym $mod+r mode "resize"
  130.  
  131. # start i3bar and i3status
  132. bar {
  133.         status_command i3status
  134. }
  135.