btw i use nix
1
2bindsym $mod+Shift+r exec swaymsg reload
3
4bindsym $mod+q exec dunstctl close
5bindsym $mod+Shift+q exec dunstctl action
6bindsym $mod+Control+q exec dunstctl history-pop
7
8bindsym $mod+Shift+v exec clipman pick -t wofi -T-i
9bindsym $mod+Control+v exec wl-copy "$(clipman pick -t STDOUT | head -n 1)"
10bindsym $mod+Shift+Control+v exec wtype "$(clipman pick -t STDOUT | head -n 1)"
11
12set $mode_idle idle
13mode "$mode_idle" {
14 bindsym i exec $SCRIPT_DIR/swayidle_inhibit.sh; mode "default"; exec notify-send "idle"
15 bindsym d exec $SCRIPT_DIR/swayidle_dpms.sh; mode "default"; exec notify-send "dpms"
16 bindsym l exec $SCRIPT_DIR/swayidle_lock.sh; mode "default"; exec notify-send "lock"
17 bindsym s exec $SCRIPT_DIR/swayidle_suspend.sh; mode "default"; exec notify-send "suspend"
18 bindsym Shift+l exec $SCRIPT_DIR/swayidle_lock_no_dpms.sh; mode "default"; exec notify-send "lock no dpms"
19
20 bindsym Return mode "default"; exec notify-send "default"
21 bindsym Escape mode "default"; exec notify-send "default"
22}
23bindsym $mod+u mode "$mode_idle"; exec notify-send "Idle i/d/l/s/L"
24
25bindsym Print exec grim -g "$($SCRIPT_DIR/slurp_point.sh)" - | wl-copy
26set $mode_capture capture
27mode "$mode_capture" {
28 bindsym q exec dunstctl close
29
30 bindsym c exec grim -g "$($SCRIPT_DIR/slurp_point.sh)" - | wl-copy; mode "default";
31 bindsym e exec grim -g "$($SCRIPT_DIR/slurp_point.sh)" - | swappy -f -; mode "default;
32 bindsym f exec grim -g "$($SCRIPT_DIR/slurp_point.sh)"\
33 $XDG_PICTURES_DIR/"$(date '+%Y-%m-%d %H.%M.%S')".png; mode "default";
34
35 bindsym Shift+c exec grim - | wl-copy; mode "default"; exec notify-send "copied"
36 bindsym Shift+e exec grim - | swappy -f -; mode "default"; exec notify-send "saved"
37 bindsym Shift+f exec grim $XDG_PICTURES_DIR/"$(date '+%Y-%m-%d %H.%M.%S')".png;\
38 mode "default"; exec notify-send "saved to file"
39
40 bindsym v exec wf-recorder\
41 -a="$(pactl info | sed -En 's/Default Sink: (.*)/\1/p').monitor"\
42 -o $(@wmmsg@ -t get_outputs | jq -r '.[] | select(.type=="output" and .focused).name')\
43 -f $XDG_VIDEOS_DIR/"$(date '+%Y-%m-%d %H.%M')".mp4;\
44 mode "default";
45
46 bindsym Shift+v exec pkill -SIGINT wf-recorder; exec notify-send "stop recording"
47
48 bindsym Return mode "default"; exec notify-send "default"
49 bindsym Escape mode "default"; exec notify-send "default"
50}
51bindsym $mod+Print mode "$mode_capture"; exec notify-send "Capture (c)opy/(e)dit/(f)file c/e/f selection C/E/F output (v)ideo"
52bindsym $mod+Shift+Print exec pkill -SIGINT wf-recorder; exec notify-send "stop recording"
53
54# workaround for https://github.com/alacritty/alacritty/issues/2734
55bindsym $mod+$alt+Return exec WAYLAND_DISPLAY= $term
56
57# input from yad anywhere (allowing use of fctix)
58# TODO get better bindings
59bindsym $mod+$alt+space exec yad --entry --text input | wl-copy
60bindsym $mod+$alt+Shift+space exec yad --entry --text input | xargs wtype
61
62set $mode_passthrough passthrough
63mode "$mode_passthrough" {
64 bindsym $mod+Delete mode "default"; exec notify-send "passthrough"
65}
66bindsym $mod+Delete mode "$mode_passthrough"; exec notify-send "passthrough"
67
68# for when latop output is disabled on resume
69bindsym $mod+Control+p output * enable; output * dpms on
70bindsym $mod+Shift+p exec @wmmsg@ output "$($SCRIPT_DIR/get_focused_output.sh)" disable