diff --git a/files/bin/select-screenlayout b/files/bin/select-screenlayout new file mode 100755 index 0000000..3c3a772 --- /dev/null +++ b/files/bin/select-screenlayout @@ -0,0 +1,11 @@ +#!/usr/bin/fish + +function ls-screenlayout + cd ~/.screenlayout + for file in (find ~/.screenlayout -type f -printf '%P\n') + string replace -r '^(.*).sh$' '$1' "$file" + end +end + +set screenlayout (ls-screenlayout | rofi -dmenu -p 'select screenlayout') +~/.screenlayout/$screenlayout.sh diff --git a/tasks/i3.yaml b/tasks/i3.yaml index de3b07c..3600d97 100644 --- a/tasks/i3.yaml +++ b/tasks/i3.yaml @@ -38,9 +38,6 @@ dest: ~/.config/systemd/user/i3wm.service notify: systemd daemon-reload -- name: flush handlers - meta: flush_handlers - - name: i3wm graphical-session service enabled systemd: name: i3wm.service diff --git a/templates/i3/i3.config.j2 b/templates/i3/i3.config.j2 index e2fb119..fd192ba 100644 --- a/templates/i3/i3.config.j2 +++ b/templates/i3/i3.config.j2 @@ -207,6 +207,7 @@ mode "session" { bindsym r reload; exec --no-startup-id ~/.xsession.reload.fish; mode "default"; {{on_focus_workspace}} bindsym R reload; exec --no-startup-id ~/.xsession.reload.fish; mode "default"; {{on_focus_workspace}} bindsym s exec --no-startup-id {{system_suspend_command}}; mode "default"; {{on_focus_workspace}} + bindsym l exec --no-startup-id {{session_lock_command}}; mode "default"; {{on_focus_workspace}} bindcode 49 exec --no-startup-id {{session_lock_command}}; mode "default"; {{on_focus_workspace}} bindsym e exec --no-startup-id {{session_enable_screensaver_command}}; mode "default"; {{on_focus_workspace}} bindsym d exec --no-startup-id {{session_disable_screensaver_command}}; mode "default"; {{on_focus_workspace}} @@ -246,6 +247,7 @@ mode "layout" { bindsym e layout toggle split; mode "default"; bindsym h layout splith; mode "default" bindsym v layout splitv; mode "default" + bindsym m exec --no-startup-id ~/bin/select-screenlayout; {{on_focus_workspace}} bindsym b mode bar