Advertisement
Guest User

i3-config

a guest
May 4th, 2018
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 9.65 KB | None | 0 0
  1. # i3 config file (v4)
  2. #
  3. # Please see https://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.  
  12. # Font for window titles. Will also be used by the bar unless a different font
  13. # is used in the bar {} block below.
  14. #font pango:monospace 8
  15.  
  16. # This font is widely installed, provides lots of unicode glyphs, right-to-left
  17. # text rendering and scalability on retina/hidpi displays (thanks to pango).
  18. #font pango:DejaVu Sans Mono 8
  19. font pango:Sans Bold 9
  20.  
  21. # Before i3 v4.8, we used to recommend this one as the default:
  22. # font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
  23. # The font above is very space-efficient, that is, it looks good, sharp and
  24. # clear in small sizes. However, its unicode glyph coverage is limited, the old
  25. # X core fonts rendering does not support right-to-left and this being a bitmap
  26. # font, it doesn't scale on retina/hidpi displays.
  27.  
  28. # use these keys for focus, movement, and resize directions when reaching for
  29. # the arrows is not convenient
  30. set $up l
  31. set $down k
  32. set $left j
  33. set $right semicolon
  34.  
  35. # use Mouse+Mod1 to drag floating windows to their wanted position
  36. floating_modifier Mod1
  37.  
  38. # start a terminal
  39. #bindsym Mod1+Return exec terminator
  40. bindsym Mod1+Return execi3-sensible-terminal
  41.  
  42. # kill focused window
  43. bindsym Mod1+q kill
  44.  
  45. # start dmenu (a program launcher)
  46. bindsym Mod1+d exec dmenu_run
  47. # There also is the (new) i3-dmenu-desktop which only displays applications
  48. # shipping a .desktop file. It is a wrapper around dmenu, so you need that
  49. # installed.
  50. # bindsym Mod1+d exec --no-startup-id i3-dmenu-desktop
  51.  
  52. # change focus
  53. bindsym Mod1+$left focus left
  54. bindsym Mod1+$down focus down
  55. bindsym Mod1+$up focus up
  56. bindsym Mod1+$right focus right
  57.  
  58. # alternatively, you can use the cursor keys:
  59. bindsym Mod1+Left focus left
  60. bindsym Mod1+Down focus down
  61. bindsym Mod1+Up focus up
  62. bindsym Mod1+Right focus right
  63.  
  64. # move focused window
  65. bindsym Mod1+Shift+$left move left
  66. bindsym Mod1+Shift+$down move down
  67. bindsym Mod1+Shift+$up move up
  68. bindsym Mod1+Shift+$right move right
  69.  
  70. # alternatively, you can use the cursor keys:
  71. bindsym Mod1+Shift+Left move left
  72. bindsym Mod1+Shift+Down move down
  73. bindsym Mod1+Shift+Up move up
  74. bindsym Mod1+Shift+Right move right
  75.  
  76. # split in horizontal orientation
  77. bindsym Mod1+h split h
  78.  
  79. # split in vertical orientation
  80. bindsym Mod1+v split v
  81.  
  82. # enter fullscreen mode for the focused container
  83. bindsym Mod1+f fullscreen toggle
  84.  
  85. # change container layout (stacked, tabbed, toggle split)
  86. bindsym Mod1+s layout stacking
  87. bindsym Mod1+w layout tabbed
  88. bindsym Mod1+e layout toggle split
  89.  
  90. # toggle tiling / floating
  91. bindsym Mod1+Shift+space floating toggle
  92.  
  93. # change focus between tiling / floating windows
  94. bindsym Mod1+space focus mode_toggle
  95.  
  96. # focus the parent container
  97. bindsym Mod1+a focus parent
  98.  
  99. # focus the child container
  100. #bindsym Mod1+z focus child
  101.  
  102. # move the currently focused window to the scratchpad
  103. bindsym Mod1+Shift+minus move scratchpad
  104.  
  105. # Show the next scratchpad window or hide the focused scratchpad window.
  106. # If there are multiple scratchpad windows, this command cycles through them.
  107. bindsym Mod1+minus scratchpad show
  108.  
  109. # Define names for default workspaces for which we configure key bindings later on.
  110. # We use variables to avoid repeating the names in multiple places.
  111. set $ws1 "1: Web"
  112. set $ws2 "2: Edit"
  113. set $ws3 "3: Term"
  114. set $ws4 "4: Media"
  115. set $ws5 "5: Mail"
  116. set $ws6 "6: VM"
  117. set $ws7 "7: Xephyr"
  118. set $ws8 "8: Torrent"
  119. set $ws9 "9"
  120. set $ws10 "10"
  121.  
  122.  
  123. # switch to workspace
  124. bindsym Mod1+1 workspace $ws1
  125. bindsym Mod1+2 workspace $ws2
  126. bindsym Mod1+3 workspace $ws3
  127. bindsym Mod1+4 workspace $ws4
  128. bindsym Mod1+5 workspace $ws5
  129. bindsym Mod1+6 workspace $ws6
  130. bindsym Mod1+7 workspace $ws7
  131. bindsym Mod1+8 workspace $ws8
  132. bindsym Mod1+9 workspace $ws9
  133. bindsym Mod1+0 workspace $ws10
  134.  
  135. # move focused container to workspace
  136. bindsym Mod1+Shift+1 move container to workspace $ws1
  137. bindsym Mod1+Shift+2 move container to workspace $ws2
  138. bindsym Mod1+Shift+3 move container to workspace $ws3
  139. bindsym Mod1+Shift+4 move container to workspace $ws4
  140. bindsym Mod1+Shift+5 move container to workspace $ws5
  141. bindsym Mod1+Shift+6 move container to workspace $ws6
  142. bindsym Mod1+Shift+7 move container to workspace $ws7
  143. bindsym Mod1+Shift+8 move container to workspace $ws8
  144. bindsym Mod1+Shift+9 move container to workspace $ws9
  145. bindsym Mod1+Shift+0 move container to workspace $ws10
  146.  
  147. # reload the configuration file
  148. bindsym Mod1+Shift+c reload
  149. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
  150. bindsym Mod1+Shift+r restart
  151. # exit i3 (logs you out of your X session)
  152. bindsym Mod1+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'"
  153.  
  154. # resize window (you can also use the mouse for that)
  155. mode "resize" {
  156.         # These bindings trigger as soon as you enter the resize mode
  157.  
  158.         # Pressing left will shrink the window’s width.
  159.         # Pressing right will grow the window’s width.
  160.         # Pressing up will shrink the window’s height.
  161.         # Pressing down will grow the window’s height.
  162.         bindsym $left       resize shrink width 10 px or 10 ppt
  163.         bindsym $down       resize grow height 10 px or 10 ppt
  164.         bindsym $up         resize shrink height 10 px or 10 ppt
  165.         bindsym $right      resize grow width 10 px or 10 ppt
  166.  
  167.         # same bindings, but for the arrow keys
  168.         bindsym Left        resize shrink width 10 px or 10 ppt
  169.         bindsym Down        resize grow height 10 px or 10 ppt
  170.         bindsym Up          resize shrink height 10 px or 10 ppt
  171.         bindsym Right       resize grow width 10 px or 10 ppt
  172.  
  173.         # back to normal: Enter or Escape or Mod1+r
  174.         bindsym Return mode "default"
  175.         bindsym Escape mode "default"
  176.         bindsym Mod1+r mode "default"
  177. }
  178.  
  179. bindsym Mod1+r mode "resize"
  180.  
  181. # Start i3bar to display a workspace bar (plus the system information i3status
  182. # finds out, if available)
  183. bar {
  184. #        status_command i3blocks
  185. #        mode hide
  186. #        hidden_state hide
  187. #        modifier Mod1
  188.         status_command i3status
  189.         position top
  190. }
  191.  
  192. #######################################################################
  193. # automatically start i3-config-wizard to offer the user to create a
  194. # keysym-based config which used their favorite modifier (alt or windows)
  195. #
  196. # i3-config-wizard will not launch if there already is a config file
  197. # in ~/.i3/config.
  198. #
  199. # Please remove the following exec line:
  200. #######################################################################
  201. exec i3-config-wizard
  202.  
  203. ############################################## Custom - added by me ################################
  204. focus_follows_mouse no
  205. popup_during_fullscreen leave_fullscreen
  206.  
  207. # Pulse Audio controls
  208. bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 1 +5% #increase sound volume
  209. bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 1 -5% #decrease sound volume
  210. bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 1 toggle # mute sound
  211.  
  212. # Sreen brightness controls
  213. bindsym XF86MonBrightnessUp exec xbacklight -inc 20 # increase screen brightness
  214. bindsym XF86MonBrightnessDown exec xbacklight -dec 20 # decrease screen brightness
  215.  
  216. # Touchpad controls
  217. #bindsym XF86TouchpadToggle exec /some/path/toggletouchpad.sh # toggle touchpad
  218.  
  219. # Media player controls
  220. bindsym XF86AudioPlay exec playerctl play
  221. bindsym XF86AudioPause exec playerctl pause
  222. bindsym XF86AudioNext exec playerctl next
  223. bindsym XF86AudioPrev exec playerctl previous
  224.  
  225. #bindsym $mod+x [urgent=latest] focus
  226.  
  227. bindsym Mod1+Ctrl+Right workspace next_on_output
  228. bindsym Mod1+Ctrl+Left workspace prev_on_output
  229. bindsym Mod1+Ctrl+$right workspace next_on_output
  230. bindsym Mod1+Ctrl+$left workspace prev_on_output
  231. bindsym Mod1+Escape exec "i3lock -i /home/wolverine/locking.png"
  232. #bindsym Mod4+s exec "shutdown 0"
  233. #bindsym Mod4+r exec reboot
  234. bindsym Shift+Print exec "gnome-screenshot -a"
  235. bindsym Print exec "gnome-screenshot"
  236. bindsym Mod4+e exec "subl3 ~/.config/i3/config"
  237.  
  238.  
  239. ########### Assign ############
  240. assign [class="Firefox"] $ws1
  241. for_window [class="Firefox"] focus
  242. assign [class="Subl3"] $ws2
  243. for_window [class="Subl3"] focus
  244. assign [class="Gedit"] $ws2
  245. assign [class="vlc"] $ws4
  246. #assign [class="Spotify"] $ws4
  247. #assign [class="Chromium"] $ws4
  248. assign [class="Musixmatch"] $ws4
  249. #assign [class="VirtualBox Machine"] $ws6
  250. for_window [class="VirtualBox Manager"] focus
  251. assign [class="VirtualBox Manager"] $ws6
  252. assign [class="Thunderbird"] $ws5
  253. for_window [class="Thunderbird"] focus
  254. assign [class="Xephyr"] $ws7
  255. for_window [class="Xephyr"] floating disable
  256.  
  257. for_window [class="Pavucontrol"] floating enable
  258. for_window [class="Gnome-system-monitor"] floating enable
  259. for_window [class="deepin-system-monitor"] floating enable
  260. for_window [class="Gnome-calculator"] floating enable
  261. assign [class="Transmission-gtk"] $ws8
  262. for_window [class="Transmission-gtk"] focus
  263. #for_window [class="Transmission-gtk"] floating enable
  264.  
  265.  
  266. ########### Start-Up ############
  267. exec --no-startup-id nm-applet
  268. exec --no-startup-id thunderbird
  269. exec --no-startup-id albert
  270. exec_always "setxkbmap -layout us,gr,es"
  271. exec_always "setxkbmap -option 'grp:shifts_toggle'"
  272. exec xautolock -detectsleep -time 10 -locker "i3lock -i /home/wolverine/locking.png"
  273. #exec xautolock -detectsleep -time 1 -locker autolock.sh -notify 30 -notifier autolock.sh
  274. exec "syndaemon -i 0.5 -t -K -R -d"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement