Compare commits
1 Commits
a558a6584a
...
6303b471e4
Author | SHA1 | Date |
---|---|---|
coolneng | 6303b471e4 |
|
@ -5,6 +5,7 @@ select_action() {
|
||||||
"System resources usage"
|
"System resources usage"
|
||||||
"Connectivity test"
|
"Connectivity test"
|
||||||
"Kill emacs"
|
"Kill emacs"
|
||||||
|
"Sync doom emacs"
|
||||||
)
|
)
|
||||||
action=$(printf '%s\n' "${action_content[@]}" | rofi -no-auto-select -i "$@" -dmenu -p "Choose an action")
|
action=$(printf '%s\n' "${action_content[@]}" | rofi -no-auto-select -i "$@" -dmenu -p "Choose an action")
|
||||||
execute_action "$action"
|
execute_action "$action"
|
||||||
|
@ -14,11 +15,16 @@ launch_kitty() {
|
||||||
bash -c "kitty --class popup -- $1"
|
bash -c "kitty --class popup -- $1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
execute_command() {
|
||||||
|
bash -c "$1"
|
||||||
|
}
|
||||||
|
|
||||||
execute_action() {
|
execute_action() {
|
||||||
case "$1" in
|
case "$1" in
|
||||||
"System resources usage") launch_kitty "htop" ;;
|
"System resources usage") launch_kitty "htop" ;;
|
||||||
"Connectivity test") launch_kitty "ping -c 2 freebsd.org" ;;
|
"Connectivity test") launch_kitty "ping -c 2 freebsd.org" ;;
|
||||||
"Kill emacs") launch_kitty "pkill emacs" ;;
|
"Kill emacs") execute_command "pkill emacs" ;;
|
||||||
|
"Sync doom emacs") execute_command "$HOME/.emacs.d/bin/doom sync > /tmp/script-test" ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue