config 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  1. # This file has been auto-generated by i3-config-wizard(1).
  2. # It will not be overwritten, so edit it as you like.
  3. #
  4. # Should you change your keyboard layout some time, delete
  5. # this file and re-run i3-config-wizard(1).
  6. #
  7. # i3 config file (v4)
  8. #
  9. # Please see http://i3wm.org/docs/userguide.html for a complete reference!
  10. set $mod Mod1
  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. # This font is widely installed, provides lots of unicode glyphs, right-to-left
  14. # text rendering and scalability on retina/hidpi displays (thanks to pango).
  15. font pango:DejaVu Sans Mono 8
  16. # Before i3 v4.8, we used to recommend this one as the default:
  17. # font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
  18. # The font above is very space-efficient, that is, it looks good, sharp and
  19. # clear in small sizes. However, its unicode glyph coverage is limited, the old
  20. # X core fonts rendering does not support right-to-left and this being a bitmap
  21. # font, it doesn’t scale on retina/hidpi displays.
  22. # Use Mouse+$mod to drag floating windows to their wanted position
  23. floating_modifier $mod
  24. # start a terminal in the domain of the currently active window
  25. bindsym $mod+Return exec qubes-i3-sensible-terminal
  26. # kill focused window
  27. bindsym $mod+Shift+q kill
  28. # start dmenu (a program launcher)
  29. bindsym $mod+d exec --no-startup-id i3-dmenu-desktop --dmenu="dmenu -nb #d2d2d2 -nf #000000 -sb #63a0ff"
  30. # change focus
  31. #bindsym $mod+j focus left
  32. #bindsym $mod+k focus down
  33. #bindsym $mod+l focus up
  34. #bindsym $mod+semicolon focus right
  35. # alternatively, you can use the cursor keys:
  36. bindsym $mod+Left focus left
  37. bindsym $mod+Down focus down
  38. bindsym $mod+Up focus up
  39. bindsym $mod+Right focus right
  40. # move focused window
  41. #bindsym $mod+Shift+j move left
  42. #bindsym $mod+Shift+k move down
  43. #bindsym $mod+Shift+l move up
  44. #bindsym $mod+Shift+semicolon move right
  45. # alternatively, you can use the cursor keys:
  46. bindsym $mod+Shift+Left move left
  47. bindsym $mod+Shift+Down move down
  48. bindsym $mod+Shift+Up move up
  49. bindsym $mod+Shift+Right move right
  50. # split in horizontal orientation
  51. bindsym $mod+h split h
  52. # split in vertical orientation
  53. bindsym $mod+v split v
  54. # enter fullscreen mode for the focused container
  55. bindsym $mod+f fullscreen
  56. # change container layout (stacked, tabbed, toggle split)
  57. bindsym $mod+s layout stacking
  58. bindsym $mod+w layout tabbed
  59. bindsym $mod+e layout toggle split
  60. # toggle tiling / floating
  61. bindsym $mod+Shift+space floating toggle
  62. # change focus between tiling / floating windows
  63. bindsym $mod+space focus mode_toggle
  64. # focus the parent container
  65. bindsym $mod+a focus parent
  66. # focus the child container
  67. #bindsym $mod+d focus child
  68. # cycle through active workspaces
  69. bindsym $mod+Tab workspace next
  70. # switch to workspace
  71. bindsym $mod+1 workspace 1
  72. bindsym $mod+2 workspace 2
  73. bindsym $mod+3 workspace 3
  74. bindsym $mod+4 workspace 4
  75. bindsym $mod+5 workspace 5
  76. bindsym $mod+6 workspace 6
  77. bindsym $mod+7 workspace 7
  78. bindsym $mod+8 workspace 8
  79. bindsym $mod+9 workspace 9
  80. bindsym $mod+0 workspace 10
  81. # move focused container to workspace
  82. bindsym $mod+Shift+1 move container to workspace 1
  83. bindsym $mod+Shift+2 move container to workspace 2
  84. bindsym $mod+Shift+3 move container to workspace 3
  85. bindsym $mod+Shift+4 move container to workspace 4
  86. bindsym $mod+Shift+5 move container to workspace 5
  87. bindsym $mod+Shift+6 move container to workspace 6
  88. bindsym $mod+Shift+7 move container to workspace 7
  89. bindsym $mod+Shift+8 move container to workspace 8
  90. bindsym $mod+Shift+9 move container to workspace 9
  91. bindsym $mod+Shift+0 move container to workspace 10
  92. # reload the configuration file
  93. bindsym $mod+Shift+c reload
  94. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
  95. bindsym $mod+Shift+r restart
  96. # exit i3 (logs you out of your X session)
  97. 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'"
  98. # resize window (you can also use the mouse for that)
  99. mode "resize" {
  100. # These bindings trigger as soon as you enter the resize mode
  101. # Pressing left will shrink the window’s width.
  102. # Pressing right will grow the window’s width.
  103. # Pressing up will shrink the window’s height.
  104. # Pressing down will grow the window’s height.
  105. # bindsym j resize shrink width 10 px or 10 ppt
  106. # bindsym k resize grow height 10 px or 10 ppt
  107. # bindsym l resize shrink height 10 px or 10 ppt
  108. # bindsym semicolon resize grow width 10 px or 10 ppt
  109. # same bindings, but for the arrow keys
  110. bindsym Left resize shrink width 10 px or 10 ppt
  111. bindsym Down resize grow height 10 px or 10 ppt
  112. bindsym Up resize shrink height 10 px or 10 ppt
  113. bindsym Right resize grow width 10 px or 10 ppt
  114. # back to normal: Enter or Escape
  115. bindsym Return mode "default"
  116. bindsym Escape mode "default"
  117. }
  118. bindsym $mod+r mode "resize"
  119. # Start i3bar to display a workspace bar (plus the system information i3status
  120. # finds out, if available)
  121. bar {
  122. status_command qubes-i3status
  123. colors {
  124. background #d2d2d2
  125. statusline #00000
  126. #class #border #backgr #text
  127. focused_workspace #4c7899 #63a0ff #000000
  128. active_workspace #333333 #5f676a #ffffff
  129. inactive_workspace #222222 #333333 #888888
  130. urgent_workspace #BD2727 #E79E27 #000000
  131. }
  132. }
  133. # Use a screen locker. Top right corner will inhibit screensaver.
  134. # Relies on the script i3-lock
  135. exec --no-startup-id "xautolock -time 3 -locker 'i3-blur' -notify 30 -notifier \"notify-send -t 2000 'Locking screen in 30 seconds'\""
  136. # Make sure all xdg autostart entries are started, this is (among other things)
  137. # necessary to make sure transient vm's come up
  138. exec --no-startup-id qubes-i3-xdg-autostart
  139. ###################################################
  140. #### MY OWN COMMANDS ####
  141. ###################################################
  142. ## LOOK AND FEEL ##
  143. #Bind workspaces to the right display. Odd workspaces are on the laptop one, even workspaces on the external display.
  144. #Use xrandr --display :0| grep "connected" to get output display names.
  145. workspace 1 output eDP1
  146. workspace 3 output eDP1
  147. workspace 5 output eDP1
  148. workspace 7 output eDP1
  149. workspace 9 output eDP1
  150. workspace 2 output DP1-3
  151. workspace 4 output DP1-3
  152. workspace 6 output DP1-3
  153. workspace 8 output DP1-3
  154. workspace 10 output DP1-3
  155. #Screen toggle
  156. #Relies on the script i3-xrandr-toggle
  157. bindsym $mod+F8 exec i3-xrandr-toggle
  158. #Disable screensaver and power management
  159. #Relies on the script i3-screensaver-toggle
  160. bindsym $mod+F7 exec i3-screensaver-toggle
  161. #Set background
  162. #Relies on the package feh
  163. exec ~/.fehbg
  164. #Lock screen
  165. #Relies on the script i3-lock
  166. bindsym $mod+l exec i3-blur
  167. #Volume control
  168. #Relies on the script i3-volume-toggle
  169. bindsym XF86AudioLowerVolume exec i3-volume-toggle down
  170. bindsym XF86AudioRaiseVolume exec i3-volume-toggle up
  171. bindsym XF86AudioMute exec i3-volume-toggle toggle
  172. #Brightness control
  173. #Relies on the script i3-brightness-toggle
  174. bindsym XF86MonBrightnessDown exec i3-brightness-toggle down
  175. bindsym XF86MonBrightnessUp exec i3-brightness-toggle up
  176. #Assignments
  177. ##assign [class="personal:tilda"] 2
  178. ## VM-RELATED ENVIRONMENTS ##
  179. #System (shutdown,restart, etc)
  180. #Relies on the script i3-exit
  181. set $system System: [q] Qubes-manager [l] lock [e] logout [s] suspend [h] hibernate [r] reboot [Shift+s] shutdown
  182. bindcode 135 mode "$system"
  183. mode "$system" {
  184. bindsym q exec qubes-manager; mode "default"
  185. bindsym l exec --no-startup-id i3-exit lock; mode "default"
  186. bindsym e exec --no-startup-id i3-exit logout; mode "default"
  187. bindsym s exec --no-startup-id i3-exit suspend; mode "default"
  188. bindsym h exec --no-startup-id i3-exit hibernate; mode "default"
  189. bindsym r exec i3-exit reboot; mode "default"
  190. bindsym Shift+s exec i3-exit shutdown; mode "default"
  191. bindsym Escape mode "default"
  192. bindsym Return mode "default"
  193. }
  194. #Dom0
  195. set $dom0 Dom0: [n] File Manager [t] Terminal [q] Qubes Manager
  196. bindsym $mod+u mode "$dom0"
  197. mode "$dom0" {
  198. #bindsym n exec qvm-run -q --tray -a personal -- 'qubes-desktop-run /usr/share/applications/org.gnome.Nautilus.desktop'; mode "default"
  199. bindsym n exec dolphin; mode "default"
  200. bindsym t exec konsole; mode "default"
  201. bindsym q exec qubes-manager; mode "default"
  202. bindsym Escape mode "default"
  203. bindsym Return mode "default"
  204. }
  205. #Personal
  206. set $personal Personal: [n] File Manager [f] Firefox [t] Terminal [q] Shutdown
  207. bindsym $mod+bracketleft mode "$personal"
  208. mode "$personal" {
  209. bindsym n exec qvm-run -q --tray -a personal -- 'qubes-desktop-run /usr/share/applications/org.gnome.Nautilus.desktop'; mode "default"
  210. bindsym f exec qvm-run -q --tray -a personal -- 'qubes-desktop-run /usr/share/applications/firefox.desktop'; mode "default"
  211. bindsym t exec qvm-run -q --tray -a personal -- 'qubes-desktop-run /usr/share/applications/org.gnome.Terminal.desktop'; mode "default"
  212. bindsym q exec qvm-shutdown personal; mode "default"
  213. bindsym Escape mode "default"
  214. bindsym Return mode "default"
  215. }
  216. #Work
  217. set $work Work: [n] File Manager [l] TeXstudio [t] Terminal [q] Shutdown
  218. bindsym $mod+apostrophe mode "$work"
  219. mode "$work" {
  220. bindsym n exec qvm-run -q --tray -a work -- 'qubes-desktop-run /usr/share/applications/org.gnome.Nautilus.desktop'; mode "default"
  221. #bindsym f exec qvm-run -q --tray -a work -- 'qubes-desktop-run /usr/share/applications/firefox.desktop'; mode "default"
  222. bindsym t exec qvm-run -q --tray -a work -- 'qubes-desktop-run /usr/share/applications/org.gnome.Terminal.desktop'; mode "default"
  223. bindsym l exec qvm-run -q --tray -a work -- 'qubes-desktop-run /usr/share/applications/texstudio.desktop'; mode "default"
  224. bindsym q exec qvm-shutdown work; mode "default"
  225. bindsym Escape mode "default"
  226. bindsym Return mode "default"
  227. }
  228. #WorkPub
  229. set $work-pub Work-Pub: [n] File Manager [f] Firefox [l] TeXstudio [m] Mendeley [t] Terminal [q] Shutdown
  230. bindsym $mod+bracketright mode "$work-pub"
  231. mode "$work-pub" {
  232. bindsym n exec qvm-run -q --tray -a work-pub -- 'qubes-desktop-run /usr/share/applications/org.gnome.Nautilus.desktop'; mode "default"
  233. bindsym f exec qvm-run -q --tray -a work-pub -- 'qubes-desktop-run /usr/share/applications/firefox.desktop'; mode "default"
  234. bindsym t exec qvm-run -q --tray -a work-pub -- 'qubes-desktop-run /usr/share/applications/org.gnome.Terminal.desktop'; mode "default"
  235. bindsym l exec qvm-run -q --tray -a work-pub -- 'qubes-desktop-run /usr/share/applications/texstudio.desktop'; mode "default"
  236. bindsym q exec qvm-shutdown work-pub; mode "default"
  237. bindsym m exec qvm-run -q --tray -a work-pub -- '~/Mendeley/bin/mendeleydesktop'; mode "default"
  238. bindsym Escape mode "default"
  239. bindsym Return mode "default"
  240. }
  241. #Untrusted
  242. set $untrusted Untrusted: [n] File Manager [f] Firefox [k] Kodi Media Center [t] Terminal [q] Shutdown
  243. bindsym $mod+numbersign mode "$untrusted"
  244. mode "$untrusted" {
  245. bindsym n exec qvm-run -q --tray -a untrusted -- 'qubes-desktop-run /usr/share/applications/org.gnome.Nautilus.desktop'; mode "default"
  246. bindsym f exec qvm-run -q --tray -a untrusted -- 'qubes-desktop-run /usr/share/applications/firefox.desktop'; mode "default"
  247. bindsym t exec qvm-run -q --tray -a untrusted -- 'qubes-desktop-run /usr/share/applications/org.gnome.Terminal.desktop'; mode "default"
  248. bindsym c exec qvm-run -q --tray -a untrusted -- 'qubes-desktop-run /usr/share/applications/google-chrome.desktop'; mode "default"
  249. bindsym k exec qvm-run -q --tray -a untrusted -- 'qubes-desktop-run /usr/share/applications/kodi.desktop'; mode "default"
  250. bindsym q exec qvm-shutdown untrusted; mode "default"
  251. bindsym Escape mode "default"
  252. bindsym Return mode "default"
  253. }
  254. #Quit
  255. set $quit Quit Menu: [p] Personal [w] Work-Pub [W] Work [u] Untrusted [s] Shopping [b] Banking [v] Vault [a] Anon-Whonix [S] Sys-Whonix
  256. bindsym $mod+q mode "$quit"
  257. mode "$quit" {
  258. bindsym p exec qvm-shutdown personal; mode "default"
  259. bindsym w exec qvm-shutdown work-pub; mode "default"
  260. bindsym Shift+w exec qvm-shutdown work; mode "default"
  261. bindsym u exec qvm-shutdown untrusted; mode "default"
  262. bindsym s exec qvm-shutdown shopping; mode "default"
  263. bindsym b exec qvm-shutdown banking; mode "default"
  264. bindsym v exec qvm-shutdown vault; mode "default"
  265. bindsym a exec qvm-shutdown anon-whonix; mode "default"
  266. bindsym Shift+s exec qvm-shutdown sys-whonix; mode "default"
  267. bindsym Escape mode "default"
  268. bindsym Return mode "default"
  269. }
  270. ########################
  271. ## SAVED ENVIRONMENTS ##
  272. ########################
  273. #The following mode relies on the script i3-layout-loader
  274. set $layout Load Layouts: [p] Personal [w] Work [b] Internet Browsing [u] Update
  275. bindsym $mod+m mode "$layout"
  276. mode "$layout" {
  277. bindsym p exec i3-layout-loader personal; mode "default"
  278. bindsym w exec i3-layout-loader work; mode "default"
  279. bindsym b exec i3-layout-loader browsing; mode "default"
  280. bindsym u exec i3-layout-loader update; mode "default"
  281. bindsym Escape mode "default"
  282. bindsym Return mode "default"
  283. }