sisyphus/config/sway/modes

94 lines
2.8 KiB
Text
Raw Normal View History

2022-06-19 23:49:44 +02:00
#
# ~/.config/sway/modes
# Modes for sway
#
set {
$alt Mod1
$flag Mod4
}
# Resizing
bindsym $flag+r mode "resize"
mode "resize" bindsym {
l resize grow width 10 px or 10 ppt
k resize grow height 10 px or 10 ppt
h resize shrink width 10 px or 10 ppt
j resize shrink height 10 px or 10 ppt
Shift+l resize grow width 50 px or 50 ppt
Shift+k resize grow height 50 px or 50 ppt
Shift+h resize shrink width 50 px or 50 ppt
Shift+j resize shrink height 50 px or 50 ppt
Right resize grow width 10 px or 10 ppt
Up resize grow height 10 px or 10 ppt
Left resize shrink width 10 px or 10 ppt
Down resize shrink height 10 px or 10 ppt
Shift+Right resize grow width 50 px or 50 ppt
Shift+Up resize grow height 50 px or 50 ppt
Shift+Left resize shrink width 50 px or 50 ppt
Shift+Down resize shrink height 50 px or 50 ppt
$flag+h move left
$flag+j move down
$flag+k move up
$flag+l move right
$flag+Left move left
$flag+Down move down
$flag+Up move up
$flag+Right move right
Return mode "default"
Escape mode "default"
$flag+r mode "default"
}
# System actions
set $mode_system System (l)ock, (s)leep, (h)ibernate, (r)eboot, (Shift+s)hutdown
bindsym Control+$alt+Delete mode "$mode_system"
mode "$mode_system" bindsym {
l exec swaylock, mode "default"
s exec systemctl suspend, mode "default"
h exec systemctl hibernate, mode "default"
r exec systemctl reboot, mode "default"
Shift+s exec systemctl poweroff -i, mode "default"
2022-06-19 23:49:44 +02:00
Return mode "default"
Escape mode "default"
Control+$alt+Delete mode "default"
}
# Screenshots
set $mode_screenshot Screenshot of (a)rea, current (w)indow, (s)creen - Shift to save
set $save_format ~/Pictures/Screenshots/$(date +%F-%H-%M-%S).png
2022-06-19 23:49:44 +02:00
bindsym Print mode "$mode_screenshot"
mode "$mode_screenshot" bindsym {
a exec grimshot copy area, mode "default"
w exec grimshot --notify copy active, mode "default"
s exec grimshot --notify copy screen, mode "default"
2022-06-19 23:49:44 +02:00
Print exec grimshot --notify save screen $save_format mode "default" # Super fast screens!
Shift+a exec grimshot --notify save area $save_format, mode "default"
Shift+w exec grimshot --notify save active $save_format, mode "default"
Shift+s exec grimshot --notify save screen $save_format, mode "default"
2022-06-19 23:49:44 +02:00
Return mode "default"
Escape mode "default"
}
# Some preferences
set $mode_preferences Toggle (s)unset, (n)otifications, (f)ocus
bindsym $alt+end mode "$mode_preferences"
mode "$mode_preferences" bindsym {
s exec "~/.scripts/wlsunset.sh", mode "default"
n exec "~/.scripts/dnd.sh", mode "default"
f exec "~/.scripts/focus.sh", mode "default"
2022-06-19 23:49:44 +02:00
Return mode "default"
Escape mode "default"
$alt+end mode "default"
}