fun with tmux send-keys

This commit is contained in:
Solomon Laing 2025-06-19 19:19:53 +09:30
parent f419a671a7
commit ff4319686c
3 changed files with 17 additions and 1 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
value=${1-$(echo -e "" | dmenu -bw 0 -i -p "Set vol to what?")} value=${1-$(echo -e "" | dmenu -i -p "Set vol to what?")}
wpctl set-volume @DEFAULT_AUDIO_SINK@ "$value%" wpctl set-volume @DEFAULT_AUDIO_SINK@ "$value%"

13
.local/bin/ssh-send Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
host=$1
shift
tmux neww -n "$host"
tmux send-keys -t "$host" "ssh $host
"
tmux send-keys -t "$host" "$@
"

3
.local/bin/upgrade-vm Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
ssh-send $1 "sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && sudo apt clean && echo 'FINISHED UPGRADE!'"