i3: Add shortcuts for screenconfigs

This commit is contained in:
Hannes Körber
2021-01-27 15:51:37 +01:00
parent 735568adfa
commit 9ac25a152d
3 changed files with 10 additions and 2 deletions

View File

@@ -30,6 +30,8 @@ screen:
9: DisplayPort-0
0: DisplayPort-0
screencfgs: []
workspace:
environment:

View File

@@ -47,6 +47,10 @@ workspace:
9: music
10: pim
screencfgs:
- name: three-screens
key: F3
environment:
MACHINE_TYPE: "laptop"
MACHINE_HAS_KEEPASSX: "true"

View File

@@ -212,8 +212,10 @@ assign [class="^Wine$"] $workspace10
bindsym F2 exec --no-startup-id ~/.i3/scripts/screenmenu
bindsym $mod+F1 exec --no-startup-id ~/.i3/scripts/i3exit lock
bindsym $mod+F2 exec --no-startup-id screencfg ~/.screencfg/all.yml ; exec systemctl --user restart keyboard.service
bindsym $mod+F3 exec --no-startup-id screencfg ~/.screencfg/laptop.yml ; exec systemctl --user restart keyboard.service
bindsym $mod+F2 exec --no-startup-id screencfg ~/.screencfg/{{ ansible_hostname }}/default.yml ; exec systemctl --user restart keyboard.service
{% for screencfg in machine.screencfgs -%}
bindsym $mod+{{ screencfg.key }} exec --no-startup-id screencfg ~/.screencfg/{{ ansible_hostname }}/{{ screencfg.name }}.yml ; exec systemctl --user restart keyboard.service
{% endfor -%}
bindsym $mod+F4 exec --no-startup-id ~/.i3/scripts/i3exit suspend
bindsym $mod+Home exec --no-startup-id ~/.i3/scripts/shutdown-menu