Added niri and waybar
This commit is contained in:
29
bin/fuzzel-powermenu
Executable file
29
bin/fuzzel-powermenu
Executable file
@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#source ~/.dotfiles/nfrc.sh
|
||||
|
||||
cmd="fuzzel --minimal-lines --dmenu --hide-prompt "
|
||||
|
||||
action=$(printf "Sleep\0icon\x1fsystem-suspend\nReboot\0icon\x1fsystem-reboot\nShutdown\0icon\x1fsystem-shutdown\nExit Niri\0icon\x1fsystem-log-out\nCancel" | $cmd --index)
|
||||
|
||||
command=""
|
||||
|
||||
case "$action" in
|
||||
0)
|
||||
command="systemctl suspend"
|
||||
;;
|
||||
1)
|
||||
command="systemctl reboot"
|
||||
;;
|
||||
2)
|
||||
command="systemctl poweroff"
|
||||
;;
|
||||
3)
|
||||
command="niri msg action quit --skip-confirmation"
|
||||
;;
|
||||
4)
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
|
||||
$command
|
||||
27
bin/fuzzel-tscale
Executable file
27
bin/fuzzel-tscale
Executable file
@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#source ~/.dotfiles/nfrc.sh
|
||||
|
||||
cmd="fuzzel --minimal-lines --dmenu --hide-prompt"
|
||||
exitnode=$(tailscale status --json | jq .ExitNodeStatus)
|
||||
|
||||
action=1
|
||||
[ "$exitnode" = "null" ] && action=0
|
||||
|
||||
#action=$(printf "Connect exit node\nDisconnect" | $cmd --index)
|
||||
|
||||
|
||||
case "$action" in
|
||||
0)
|
||||
echo '{"text": "connecting...", "class":"action"}'
|
||||
endpoint=$(tailscale status | grep "exit node" | awk '{print $2}' | $cmd)
|
||||
[ -z "$endpoint" ] && exit
|
||||
tailscale set --exit-node="$endpoint"
|
||||
tailscale up
|
||||
;;
|
||||
1)
|
||||
echo '{"text": "disconnecting...", "class": "action"}'
|
||||
tailscale set --exit-node=
|
||||
tailscale up
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user