Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
Dieses Repo ist archiviert. Du kannst Dateien sehen und es klonen, kannst aber nicht pushen oder Issues/Pull-Requests öffnen.

425 Zeilen
12KB

  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 ~/bin/on-focus-workspace" %}
  7. ### Font
  8. #font pango:DejaVu Sans Mono 12
  9. #font pango:DejaVu Sans Mono, Terminus Bold Semi-Condensed 11
  10. #font pango:Droid Sans Mono Dotted 12
  11. #font pango:DroidSansMono 13
  12. #font pango:Sans 13
  13. #font pango:hermit 12
  14. #font pango:Inconsolata 14
  15. font pango:monospace 10
  16. #font pango:SourceCodePro-SemiBold 11
  17. #font pango:Source Code Pro for Powerline, FontAwesome Regular, Icons 9
  18. #font pango:Terminus 14px
  19. #font pango:UbuntuMono-regular 12
  20. ### Modifier Key
  21. set $mod Mod4
  22. set $plexmod Mod3
  23. # Use Mouse+$mod to drag floating windows to their wanted position
  24. floating_modifier $mod
  25. ### key patterns
  26. set $up l
  27. set $down k
  28. set $left j
  29. set $right odiaeresis
  30. ### default/local mode
  31. ## special keys
  32. bindsym XF86Sleep exec {{session_lock_command}}
  33. bindsym XF86Mail exec {{mail_command}}
  34. bindsym XF86HomePage exec {{default_browser}}
  35. bindsym XF86Calculator exec {{calculator_command}}
  36. ## Special modes
  37. bindsym $mod+t mode timer
  38. bindsym $mod+s mode session
  39. bindsym $mod+c mode clipboard
  40. bindcode $mod+49 mode "remote"
  41. ## Activity
  42. bindsym $mod+less exec "~/bin/timer select_activity"
  43. ## Applications
  44. bindsym $mod+Return exec "{{default_terminal}}"
  45. bindsym $mod+b exec "{{default_browser}}"
  46. bindsym $mod+d exec rofi -show drun -show-icons
  47. bindsym $mod+e exec rofi -show run
  48. bindsym $mod+a mode "apps"
  49. bindsym $mod+space exec "~/bin/on-space-shortcut"
  50. ## Workspaces
  51. bindsym $mod+w {{workspace_switcher}}
  52. {% for ws in i3_number_workspace_keymaps %}
  53. bindsym $mod+{{ws.keysym}} workspace "{{ws.workspace}}"
  54. {% endfor %}
  55. # focus workspace
  56. bindsym $mod+Prior workspace next
  57. bindsym $mod+Next workspace prev
  58. bindsym $mod+ssharp scratchpad show
  59. bindsym $mod+g sticky toggle
  60. ## Layout
  61. bindsym $mod+y mode "layout"
  62. bindsym $mod+h split h
  63. bindsym $mod+v split v
  64. ## Focus
  65. bindsym $mod+Left focus left
  66. bindsym $mod+$left focus left
  67. bindsym $mod+Down focus down
  68. bindsym $mod+$down focus down
  69. bindsym $mod+Up focus up
  70. bindsym $mod+$up focus up
  71. bindsym $mod+Right focus right
  72. bindsym $mod+$right focus right
  73. bindsym $mod+p focus parent
  74. # change focus between tiling / floating windows
  75. bindsym $mod+Tab focus mode_toggle
  76. ## Window
  77. # The middle button over a titlebar kills the window
  78. bindsym --release button2 kill
  79. # The middle button and a modifer over any part of the window kills the window
  80. bindsym --whole-window $mod+button2 kill
  81. bindsym $mod+BackSpace kill
  82. bindsym $mod+q kill
  83. bindsym $mod+f fullscreen
  84. bindsym $mod+z floating toggle
  85. bindsym $mod+m mode move
  86. bindsym $mod+r mode resize
  87. bindsym $mod+x exec xkill
  88. # points
  89. bindsym $mod+minus exec {{points_down_command}}
  90. bindsym $mod+plus exec {{points_up_command}}
  91. bindsym $mod+KP_Subtract exec {{points_down_command}}
  92. bindsym $mod+KP_Add exec {{points_up_command}}
  93. # free keys
  94. # $mod+i
  95. # $mod+j
  96. # $mod+k
  97. # $mod+l
  98. # $mod+n
  99. # $mod+o
  100. # $mod+u
  101. # $mod+adiaeresis
  102. # $mod+odiaeresis
  103. # $mod+udiaeresis
  104. # $mod+comma
  105. # $mod+period
  106. # $mod+numbersign
  107. # $mod+Home
  108. # $mod+End
  109. # $mod+Pause
  110. # $mod+Delete
  111. # $mod+Insert
  112. # $mod+Print
  113. # $mod+Scroll_Lock
  114. ## unlearn
  115. #exec {{points_down_command}}
  116. ## stuff that is available in default and remote mode
  117. {% macro overall() %}
  118. {% if home_profile == "desktop" %}
  119. bindsym $plexmod+space exec ~/bin/on-space-shortcut
  120. bindsym $plexmod+BackSpace kill
  121. bindsym $plexmod+Tab {{workspace_switcher}}
  122. {% for ws in i3_number_workspace_keymaps %}
  123. bindsym $plexmod+{{ws.keysym}} workspace "{{ws.workspace}}"
  124. {% endfor %}
  125. {% for ws in i3_letter_workspace_keymaps %}
  126. bindsym $plexmod+{{ws.keysym}} workspace "{{ws.workspace}}"
  127. {% endfor %}
  128. # focus workspace
  129. bindsym $plexmod+Prior workspace next
  130. bindsym $plexmod+Next workspace prev
  131. {% endif %}
  132. # focus output
  133. bindsym $plexmod+Shift+p focus output primary
  134. 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' )"
  135. bindsym $plexmod+Left focus output left
  136. bindsym $plexmod+Down focus output down
  137. bindsym $plexmod+Up focus output up
  138. bindsym $plexmod+Right focus output right
  139. # Special modes
  140. bindcode $plexmod+49 mode "session"
  141. # activity
  142. bindsym $plexmod+less exec "~/bin/timer select_activity"
  143. {% endmacro %}
  144. {{ overall() }}
  145. ### remote mode
  146. mode "remote" {
  147. bindcode $mod+9 mode "default"
  148. bindsym XF86Sleep exec {{session_lock_command}}
  149. # The middle button over a titlebar kills the window
  150. bindsym --release button2 kill
  151. {{ overall() }}
  152. }
  153. ### Applications mode
  154. mode "apps" {
  155. {% for a in application_shortcuts | dict2items %}
  156. bindsym {{a.key}} exec {{a.value}}; mode "default"
  157. {% endfor %}
  158. bindsym Escape mode "default"
  159. }
  160. ### Session
  161. mode "session" {
  162. bindsym q exit
  163. bindsym r reload; exec --no-startup-id ~/.xsession.reload.fish; mode "default"; {{on_focus_workspace}}
  164. bindsym R reload; exec --no-startup-id ~/.xsession.reload.fish; mode "default"; {{on_focus_workspace}}
  165. bindsym s exec --no-startup-id {{system_suspend_command}}; mode "default"; {{on_focus_workspace}}
  166. bindcode 49 exec --no-startup-id {{session_lock_command}}; mode "default"; {{on_focus_workspace}}
  167. bindsym e exec --no-startup-id {{session_enable_screensaver_command}}; mode "default"; {{on_focus_workspace}}
  168. bindsym d exec --no-startup-id {{session_disable_screensaver_command}}; mode "default"; {{on_focus_workspace}}
  169. bindsym b exec --no-startup-id xsetroot -solid black; mode "default"; {{on_focus_workspace}}
  170. bindsym Shift+R exec --no-startup-id {{system_reboot_command}}; mode "default"; {{on_focus_workspace}}
  171. bindsym Shift+P exec --no-startup-id {{system_poweroff_command}}; mode "default"; {{on_focus_workspace}}
  172. # back to normal: Escape
  173. bindsym Escape mode "default"; {{on_focus_workspace}}
  174. }
  175. ### Timer
  176. mode "timer" {
  177. bindsym a exec "~/bin/timer select_activity"; mode "default"; {{on_focus_workspace}}
  178. bindsym e exec "~/bin/timer end_activity"; mode "default"; {{on_focus_workspace}}
  179. bindsym u exec "~/bin/timer uniklinik"; mode "default"; {{on_focus_workspace}}
  180. # back to normal: Escape
  181. bindsym Escape mode "default"; {{on_focus_workspace}}
  182. }
  183. ### Clipboard
  184. mode "clipboard" {
  185. # back to normal: Escape
  186. bindsym Escape mode "default"
  187. }
  188. ### Layout
  189. # set default layout to tabbed
  190. workspace_layout tabbed
  191. mode "layout" {
  192. bindsym s layout stacking; mode "default";
  193. bindsym t layout tabbed; mode "default";
  194. bindsym e layout toggle split; mode "default";
  195. bindsym h layout splith; mode "default"
  196. bindsym v layout splitv; mode "default"
  197. bindsym b mode bar
  198. # back to normal: Escape
  199. bindsym Escape mode "default"
  200. }
  201. mode "bar" {
  202. bindsym h bar mode hide; mode "default"
  203. bindsym d bar mode dock; mode "default"
  204. # back to normal: Escape
  205. bindsym Escape mode "default"
  206. }
  207. ### Move mode
  208. mode "move" {
  209. # move window
  210. bindsym Left move left
  211. bindsym $left move left
  212. bindsym Down move down
  213. bindsym $down move down
  214. bindsym Up move up
  215. bindsym $up move up
  216. bindsym Right move right
  217. bindsym $right move right
  218. # move window to workspace
  219. {% for ws in i3_number_workspace_keymaps %}
  220. bindsym {{ws.keysym}} move container to workspace "{{ws.workspace}}"; mode "default"
  221. {% endfor %}
  222. 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"
  223. bindsym ssharp move scratchpad
  224. # move workspace to output
  225. bindsym Shift+Left move workspace to output left
  226. bindsym Shift+$left move workspace to output left
  227. bindsym Shift+Down move workspace to output down
  228. bindsym Shift+$down move workspace to output down
  229. bindsym Shift+Up move workspace to output up
  230. bindsym Shift+$up move workspace to output up
  231. bindsym Shift+Right move workspace to output right
  232. bindsym Shift+$right move workspace to output right
  233. 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"
  234. bindsym p move workspace to output primary; mode "default"
  235. # back to normal: Escape
  236. bindsym Escape mode "default"
  237. }
  238. ### Resize window mode
  239. # resize window (you can also use the mouse for that)
  240. mode "resize" {
  241. # These bindings trigger as soon as you enter the resize mode
  242. # Pressing left will shrink the window’s width.
  243. bindsym Left resize shrink width 10 px or 10 ppt
  244. bindsym $left resize shrink width 10 px or 10 ppt
  245. # Pressing down will grow the window’s height.
  246. bindsym Down resize grow height 10 px or 10 ppt
  247. bindsym $down resize grow height 10 px or 10 ppt
  248. # Pressing up will shrink the window’s height.
  249. bindsym Up resize shrink height 10 px or 10 ppt
  250. bindsym $up resize shrink height 10 px or 10 ppt
  251. # Pressing right will grow the window’s width.
  252. bindsym Right resize grow width 10 px or 10 ppt
  253. bindsym $right resize grow width 10 px or 10 ppt
  254. bindsym 1 resize set 10 ppt 10 ppt; mode "default"
  255. bindsym 2 resize set 20 ppt 20 ppt; mode "default"
  256. bindsym 3 resize set 30 ppt 30 ppt; mode "default"
  257. bindsym 4 resize set 40 ppt 40 ppt; mode "default"
  258. bindsym 5 resize set 50 ppt 50 ppt; mode "default"
  259. bindsym 6 resize set 60 ppt 60 ppt; mode "default"
  260. bindsym 7 resize set 70 ppt 70 ppt; mode "default"
  261. bindsym 8 resize set 80 ppt 80 ppt; mode "default"
  262. bindsym 9 resize set 90 ppt 90 ppt; mode "default"
  263. bindsym 0 resize set 100 ppt 100 ppt; mode "default"
  264. bindsym v resize set 640 480; mode "default"
  265. bindsym y resize set 870 628; mode "default"
  266. # back to normal: Escape
  267. bindsym Escape mode "default"
  268. }
  269. ### Bar
  270. bar {
  271. {% if i3_hide_bar %}
  272. mode invisible
  273. hidden_state hide
  274. {% endif %}
  275. position top
  276. strip_workspace_numbers yes
  277. tray_output primary
  278. status_command i3blocks
  279. colors {
  280. background #000000
  281. statusline #ffffff
  282. separator #666666
  283. # <colorclass> <border> <background> <text>
  284. focused_workspace {{home_base_color_hue|hsv2rgb(50,60)}} {{home_base_color_hue|hsv2rgb(66,47)}} #ffffff
  285. active_workspace #333333 #696969 #ffffff
  286. inactive_workspace #333333 #222222 #888888
  287. urgent_workspace #2f343a #900000 #ffffff
  288. binding_mode #2f343a #900000 #ffffff
  289. }
  290. }
  291. ### Design
  292. # class border backgr. text indicator child_border
  293. client.focused {{home_base_color_hue|hsv2rgb(50,60)}} {{home_base_color_hue|hsv2rgb(66,47)}} #ffffff {{home_base_color_hue|hsv2rgb(81,91)}} {{home_base_color_hue|hsv2rgb(66,47)}}
  294. client.focused_inactive #333333 #6A6A6A #ffffff #505050 #6A6A6A
  295. client.unfocused #333333 #222222 #888888 #2E2E2E #222222
  296. client.urgent #2f343a #900000 #ffffff #900000 #900000
  297. client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
  298. client.background #ffffff
  299. {% if not i3_hide_border_one_window %}
  300. default_border normal
  301. hide_edge_borders both
  302. {% else %}
  303. default_border none
  304. hide_edge_borders smart
  305. {% endif %}
  306. default_floating_border normal
  307. ### general settings
  308. focus_on_window_activation urgent
  309. ### Application specific rule
  310. for_window [class="^(?:Tiger)?V[Nn][Cc] ?[Vv]iewer$"] border none
  311. for_window [window_role="^About$"] floating enable
  312. for_window [class="^Pavu"] floating enable
  313. for_window [class="^Paman$"] floating enable
  314. for_window [class="^Blueman"] floating enable
  315. for_window [class="^URxvt$" title="^tmux-workspace$"] border none
  316. ### assign apps to workspaces
  317. assign [class="^netzdrive$"] → netzdrive
  318. assign [class="^TelegramDesktop$"] → tg
  319. assign [class="^Signal$"] → signal
  320. assign [class="^Element$"] → matrix
  321. assign [class="^thunderbird$"] → mail
  322. # vncviewer workspaces
  323. {% for workspace in workspaces|dict2items|json_query("[?value.type=='vncviewer'].key") %}
  324. {% set ws = workspaces[workspace] %}
  325. assign [class="^(?:Tiger)?V[Nn][Cc] ?[Vv]iewer$" title="^{{ws.host}}:{{ws.display|default(home_vncserver_display_number)}}"] → {{workspace}}
  326. {% endfor %}
  327. ### Autostart.display|default(home_vncserver_display_number)
  328. #exec "{{default_terminal}}"
  329. exec --no-startup-id "~/bin/i3-watchers"