You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

412 lines
11KB

  1. {{ ansible_managed | comment }}
  2. # i3 config file (v4)
  3. #
  4. # Please see http://i3wm.org/docs/userguide.html for a complete reference!
  5. {% set workspace_switcher = "exec fish -c \"i3-msg workspace (i3-msg -t get_workspaces | jq --raw-output '.[]|select(.num == -1).name' | rofi -dmenu -p workspace )\"" %}
  6. {% set on_focus_workspace = "exec --no-startup-id " + eralitex_directory + "/bin/on-focus-workspace" %}
  7. ### Font
  8. font pango:Terminus 14px
  9. ### Modifier Key
  10. set $mod Mod4
  11. set $plexmod Mod3
  12. # Use Mouse+$mod to drag floating windows to their wanted position
  13. floating_modifier $mod
  14. ### key patterns
  15. set $up l
  16. set $down k
  17. set $left j
  18. set $right odiaeresis
  19. ### default/local mode
  20. ## special keys
  21. bindsym XF86Sleep exec {{eralitex_lock_command}}
  22. bindsym XF86Mail exec {{eralitex_mail_command}}
  23. bindsym XF86HomePage exec {{eralitex_browser}}
  24. bindsym XF86Calculator exec {{eralitex_calculator_command}}
  25. ## Special modes
  26. bindsym $mod+t mode timer
  27. bindsym $mod+s mode session
  28. bindsym $mod+c mode clipboard
  29. bindcode $mod+49 mode "remote"
  30. ## Applications
  31. bindsym $mod+Return exec "{{eralitex_terminal}}"
  32. bindsym $mod+b exec "{{eralitex_browser}}"
  33. bindsym $mod+d exec rofi -show drun -show-icons
  34. bindsym $mod+e exec rofi -show run
  35. bindsym $mod+a mode "apps"
  36. bindsym $mod+space exec "{{eralitex_directory}}/bin/on-space-shortcut"
  37. ## Workspaces
  38. bindsym $mod+w {{workspace_switcher}}
  39. {% for ws in eralitex_numbered_workspace_keymaps %}
  40. bindsym $mod+{{ws.keysym}} workspace "{{ws.workspace}}"
  41. {% endfor %}
  42. # focus workspace
  43. bindsym $mod+Prior workspace next
  44. bindsym $mod+Next workspace prev
  45. bindsym $mod+ssharp scratchpad show
  46. bindsym $mod+g sticky toggle
  47. ## Layout
  48. bindsym $mod+y mode "layout"
  49. bindsym $mod+h split h
  50. bindsym $mod+v split v
  51. ## Focus
  52. bindsym $mod+Left focus left
  53. bindsym $mod+$left focus left
  54. bindsym $mod+Down focus down
  55. bindsym $mod+$down focus down
  56. bindsym $mod+Up focus up
  57. bindsym $mod+$up focus up
  58. bindsym $mod+Right focus right
  59. bindsym $mod+$right focus right
  60. bindsym $mod+p focus parent
  61. # change focus between tiling / floating windows
  62. bindsym $mod+Tab focus mode_toggle
  63. ## Window
  64. # The middle button over a titlebar kills the window
  65. bindsym --release button2 kill
  66. # The middle button and a modifer over any part of the window kills the window
  67. bindsym --whole-window $mod+button2 kill
  68. bindsym $mod+BackSpace kill
  69. bindsym $mod+q kill
  70. bindsym $mod+f fullscreen
  71. bindsym $mod+z floating toggle
  72. bindsym $mod+m mode move
  73. bindsym $mod+r mode resize
  74. bindsym $mod+x exec xkill
  75. # points
  76. bindsym $mod+minus exec {{points_down_command}}
  77. bindsym $mod+plus exec {{points_up_command}}
  78. # unlearn
  79. #exec {{points_down_command}}
  80. ## stuff that is available in default and remote mode
  81. {% macro overall() %}
  82. {% if item == "desktop" %}
  83. bindsym $plexmod+space exec "{{eralitex_directory}}/bin/on-space-shortcut"
  84. bindsym $plexmod+BackSpace kill
  85. bindsym $plexmod+w {{workspace_switcher}}
  86. {% for ws in eralitex_numbered_workspace_keymaps %}
  87. bindsym $plexmod+{{ws.keysym}} workspace "{{ws.workspace}}"
  88. {% endfor %}
  89. {% for ws in eralitex_letter_workspace_keymaps %}
  90. bindsym $plexmod+{{ws.keysym}} workspace "{{ws.workspace}}"
  91. {% endfor %}
  92. # focus workspace
  93. bindsym $plexmod+Prior workspace next
  94. bindsym $plexmod+Next workspace prev
  95. {% endif %}
  96. # focus output
  97. bindsym $plexmod+Shift+p focus output primary
  98. bindsym $plexmod+Shift+o exec fish -c "i3-msg focus output ( i3-msg -t get_outputs | jq --raw-output '.[]|select(.active == true).name' | rofi -dmenu -p 'focus output' )"
  99. bindsym $plexmod+Left focus output left
  100. bindsym $plexmod+Down focus output down
  101. bindsym $plexmod+Up focus output up
  102. bindsym $plexmod+Right focus output right
  103. # Special modes
  104. bindsym $plexmod+s mode session
  105. bindsym $plexmod+t mode timer
  106. {% endmacro %}
  107. {{ overall() }}
  108. ### remote mode
  109. mode "remote" {
  110. bindcode $mod+9 mode "default"
  111. bindsym XF86Sleep exec {{eralitex_lock_command}}
  112. # The middle button over a titlebar kills the window
  113. bindsym --release button2 kill
  114. {{ overall() }}
  115. }
  116. ### Applications mode
  117. mode "apps" {
  118. {% for a in eralitex_applications | dict2items %}
  119. bindsym {{a.key}} exec {{a.value}}; mode "default"
  120. {% endfor %}
  121. bindsym Escape mode "default"
  122. }
  123. ### Session
  124. mode "session" {
  125. bindsym q exit
  126. bindsym r reload; exec --no-startup-id {{eralitex_directory}}/{{item}}/reload; mode "default"; {{on_focus_workspace}}
  127. bindsym s exec --no-startup-id {{eralitex_lock_command}}; exec --no-startup-{{eralitex_suspend_command}}; mode "default"; {{on_focus_workspace}}
  128. bindsym x exec --no-startup-id {{eralitex_lock_command}}; mode "default"; {{on_focus_workspace}}
  129. bindsym e exec --no-startup-id {{eralitex_enable_screensaver_command}}; mode "default"; {{on_focus_workspace}}
  130. bindsym d exec --no-startup-id {{eralitex_disable_screensaver_command}}; mode "default"; {{on_focus_workspace}}
  131. bindsym b exec --no-startup-id xsetroot -solid black; mode "default"; {{on_focus_workspace}}
  132. bindsym Shift+R exec --no-startup-id {{eralitex_reboot_command}}; mode "default"; {{on_focus_workspace}}
  133. bindsym Shift+P exec --no-startup-id {{eralitex_poweroff_command}}; mode "default"; {{on_focus_workspace}}
  134. # back to normal: Escape
  135. bindsym Escape mode "default"; {{on_focus_workspace}}
  136. }
  137. ### Timer
  138. mode "timer" {
  139. bindsym a exec "{{eralitex_directory}}/bin/timer activity"; mode "default"; {{on_focus_workspace}}
  140. bindsym e exec "{{eralitex_directory}}/bin/timer end"; mode "default"; {{on_focus_workspace}}
  141. bindsym u exec "{{eralitex_directory}}/bin/timer update"; mode "default"; {{on_focus_workspace}}
  142. # back to normal: Escape
  143. bindsym Escape mode "default"; {{on_focus_workspace}}
  144. }
  145. ### Clipboard
  146. mode "clipboard" {
  147. # back to normal: Escape
  148. bindsym Escape mode "default"
  149. }
  150. ### Layout
  151. # set default layout to tabbed
  152. workspace_layout tabbed
  153. mode "layout" {
  154. bindsym s layout stacking; mode "default";
  155. bindsym t layout tabbed; mode "default";
  156. bindsym e layout toggle split; mode "default";
  157. bindsym h layout splith; mode "default"
  158. bindsym v layout splitv; mode "default"
  159. bindsym b mode bar
  160. # back to normal: Escape
  161. bindsym Escape mode "default"
  162. }
  163. mode "bar" {
  164. bindsym h bar mode hide; mode "default"
  165. bindsym d bar mode dock; mode "default"
  166. # back to normal: Escape
  167. bindsym Escape mode "default"
  168. }
  169. ### Move mode
  170. mode "move" {
  171. # move window
  172. bindsym Left move left
  173. bindsym $left move left
  174. bindsym Down move down
  175. bindsym $down move down
  176. bindsym Up move up
  177. bindsym $up move up
  178. bindsym Right move right
  179. bindsym $right move right
  180. # move window to workspace
  181. {% for ws in eralitex_numbered_workspace_keymaps %}
  182. bindsym {{ws.keysym}} move container to workspace "{{ws.workspace}}"; mode "default"
  183. {% endfor %}
  184. bindsym w exec fish -c "i3-msg move container to workspace (i3-msg -t get_workspaces | jq --raw-output '.[]|select(.num == -1).name' | rofi -dmenu -p 'move to workspace' )"; mode "default"
  185. bindsym ssharp move scratchpad
  186. # move workspace to output
  187. bindsym Shift+Left move workspace to output left
  188. bindsym Shift+$left move workspace to output left
  189. bindsym Shift+Down move workspace to output down
  190. bindsym Shift+$down move workspace to output down
  191. bindsym Shift+Up move workspace to output up
  192. bindsym Shift+$up move workspace to output up
  193. bindsym Shift+Right move workspace to output right
  194. bindsym Shift+$right move workspace to output right
  195. bindsym o exec fish -c "i3-msg move workspace to output ( i3-msg -t get_outputs | jq --raw-output '.[]|select(.active == true).name' | rofi -dmenu -p 'move workspace to output' )"; mode "default"
  196. bindsym p move workspace to output primary; mode "default"
  197. # back to normal: Escape
  198. bindsym Escape mode "default"
  199. }
  200. ### Resize window mode
  201. # resize window (you can also use the mouse for that)
  202. mode "resize" {
  203. # These bindings trigger as soon as you enter the resize mode
  204. # Pressing left will shrink the window’s width.
  205. bindsym Left resize shrink width 10 px or 10 ppt
  206. bindsym $left resize shrink width 10 px or 10 ppt
  207. # Pressing down will grow the window’s height.
  208. bindsym Down resize grow height 10 px or 10 ppt
  209. bindsym $down resize grow height 10 px or 10 ppt
  210. # Pressing up will shrink the window’s height.
  211. bindsym Up resize shrink height 10 px or 10 ppt
  212. bindsym $up resize shrink height 10 px or 10 ppt
  213. # Pressing right will grow the window’s width.
  214. bindsym Right resize grow width 10 px or 10 ppt
  215. bindsym $right resize grow width 10 px or 10 ppt
  216. bindsym 1 resize set 10 ppt 10 ppt; mode "default"
  217. bindsym 2 resize set 20 ppt 20 ppt; mode "default"
  218. bindsym 3 resize set 30 ppt 30 ppt; mode "default"
  219. bindsym 4 resize set 40 ppt 40 ppt; mode "default"
  220. bindsym 5 resize set 50 ppt 50 ppt; mode "default"
  221. bindsym 6 resize set 60 ppt 60 ppt; mode "default"
  222. bindsym 7 resize set 70 ppt 70 ppt; mode "default"
  223. bindsym 8 resize set 80 ppt 80 ppt; mode "default"
  224. bindsym 9 resize set 90 ppt 90 ppt; mode "default"
  225. bindsym 0 resize set 100 ppt 100 ppt; mode "default"
  226. bindsym v resize set 640 480; mode "default"
  227. bindsym y resize set 870 628; mode "default"
  228. # back to normal: Escape
  229. bindsym Escape mode "default"
  230. }
  231. ### Bar
  232. bar {
  233. position top
  234. strip_workspace_numbers yes
  235. tray_output primary
  236. status_command "i3blocks -c {{eralitex_directory}}/{{item}}/i3blocks.config"
  237. colors {
  238. background #000000
  239. statusline #ffffff
  240. separator #666666
  241. # <colorclass> <border> <background> <text>
  242. {% if item == "desktop" %}
  243. # lila: Farbton 274
  244. focused_workspace #774C99 #552877 #ffffff
  245. {% endif %}
  246. {% if item == "vdesk" %}
  247. # grün: Farbton 110
  248. focused_workspace #4D994C #357728 #ffffff
  249. {% endif %}
  250. {% if item == "presentation" %}
  251. # gelb: Farbton 60
  252. focused_workspace #99994C #777728 #ffffff
  253. {% endif %}
  254. active_workspace #333333 #696969 #ffffff
  255. inactive_workspace #333333 #222222 #888888
  256. urgent_workspace #2f343a #900000 #ffffff
  257. binding_mode #2f343a #900000 #ffffff
  258. }
  259. }
  260. ### Design
  261. # class border backgr. text indicator child_border
  262. {% if item == "desktop" %}
  263. # lila: Farbton 274
  264. client.focused #784C99 #552877 #ffffff #9E2EF4 #552877
  265. {% endif %}
  266. {% if item == "vdesk" %}
  267. # grün: Farbton 110
  268. client.focused #59994C #357728 #ffffff #4FF42E #357728
  269. {% endif %}
  270. {% if item == "presentation" %}
  271. # gelb: Farbton 60
  272. client.focused #99994C #777728 #ffffff #F4F42E #777728
  273. {% endif %}
  274. client.focused_inactive #333333 #6A6A6A #ffffff #505050 #6A6A6A
  275. client.unfocused #333333 #222222 #888888 #2E2E2E #222222
  276. client.urgent #2f343a #900000 #ffffff #900000 #900000
  277. client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
  278. client.background #ffffff
  279. default_border normal
  280. hide_edge_borders both
  281. default_floating_border normal
  282. ### general settings
  283. focus_on_window_activation urgent
  284. ### Application specific rule
  285. for_window [class="^Vncviewer$"] border none
  286. for_window [window_role="^About$"] floating enable
  287. for_window [class="^Pavu"] floating enable
  288. for_window [class="^Paman$"] floating enable
  289. for_window [class="^Blueman"] floating enable
  290. for_window [class="^URxvt$" title="^tmux-workspace$"] border none
  291. ### Autostart
  292. exec "{{eralitex_terminal}}"
  293. {% if item == "desktop" %}
  294. exec --no-startup-id "{{eralitex_directory}}/bin/i3-watchers"
  295. {% endif %}
  296. ### free keys
  297. # $mod+i
  298. # $mod+j
  299. # $mod+k
  300. # $mod+l
  301. # $mod+n
  302. # $mod+o
  303. # $mod+u
  304. # $mod+adiaeresis
  305. # $mod+odiaeresis
  306. # $mod+udiaeresis
  307. # $mod+comma
  308. # $mod+period
  309. # $mod+numbersign
  310. # $mod+Home
  311. # $mod+End
  312. # $mod+Pause
  313. # $mod+Delete
  314. # $mod+Insert
  315. # $mod+Print
  316. # $mod+Scroll_Lock
  317. # $mod+less