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