Sway : Add reload key.

This commit is contained in:
Dmitry Voronin 2024-08-20 11:27:59 +03:00
parent 9311efa511
commit 0838a84a86
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
2 changed files with 16 additions and 0 deletions

View file

@ -8,6 +8,7 @@ in {
bindsym --to-code ${mod}+l exec 'powerlimit toggle'
bindsym --to-code ${mod}+m exec 'swayscript montoggle'
bindsym --to-code ${mod}+p exec 'powersave toggle'
bindsym --to-code ${mod}+r exec 'swayscript reload'
bindsym --to-code ${mod}+v exec 'swayscript vpntoggle'
bindsym --to-code ${mod}+x exec 'systemctl poweroff -i'
bindsym --to-code ${mod}+z exec 'systemctl suspend -i'

View file

@ -0,0 +1,15 @@
{ ... }: {
text = ''
# Reload.
function reload() {
re() {
swaymsg reload
pkill waybar
swaymsg exec waybar
tmux source-file ~/.config/tmux/tmux.conf
}
_sway_iterate_sockets re
}
'';
}