1
0
Fork 0

sway: add additional menu scripts

main
urosm 2024-09-13 20:35:04 +02:00
parent 732cf0b2c3
commit a0b6f992d1
1 changed files with 5 additions and 1 deletions

View File

@ -32,6 +32,8 @@ set $wsp 9:p:rdp
set $session_mode "session: (r)eload (l)ock (q)uit (s)uspend (h)ibernate re(b)oot (p)oweroff"
set $layout_mode "layout: split(h) split(v) (s)tacking (t)abbed"
set $find_exclude_expr \( -path "$HOME/.cache" -o -path "$HOME/.mozilla" -o -path "$HOME/.thunderbird" -o -name .git \)
# commands
set $swaylock swaylock -f \
--color=$black \
@ -130,13 +132,15 @@ bindsym $mod+shift+g sticky toggle
bindsym --to-code {
$mod+return exec footclient
$mod+space exec fuzzel
$mod+slash exec xdg-open "$(find * -type f | fuzzel -dp'open > ')"
$mod+home exec footclient nmtui connect
$mod+shift+home exec footclient nmtui
$mod+end exec devmon -c
$mod+n exec makoctl dismiss
$mod+shift+n exec makoctl restore
print exec grim - | wl-copy
$mod+slash exec find "$HOME" $find_exclude_expr -prune -o -print | fuzzel -dp'open > ' | xargs -r xdg-open
$mod+question exec find "$HOME" $find_exclude_expr -prune -o -type f -print0 | xargs -0r grep -in "$(wl-paste)" 2>/dev/null | awk -F: '{ printf("%8s %-62s\t%-80s\\n","+"$2,"\\""$1"\\"",$3) }' | fuzzel -dw160 -p"open > " | cut -f1 | xargs -r "$TERMINAL" "$EDITOR"
$mod+apostrophe exec swaymsg -t get_tree | jq -r 'recurse(.nodes[]) | select(.nodes==[] and .type=="con" and .focused==false) | (.id|tostring) + "\t" + .name' | fuzzel -dp'focus > ' | cut -f1 | xargs -rI{} swaymsg [con_id={}] focus
}
# exec (laptop)