mirror of
https://github.com/alrayyes/dotfiles/
synced 2023-11-14 15:56:30 +00:00
22 lines
466 B
Plaintext
22 lines
466 B
Plaintext
|
#!/usr/bin/env sh
|
||
|
|
||
|
. ~/.cache/wal/colors.sh
|
||
|
|
||
|
selected=$(systemctl list-unit-files --no-pager --type=service --no-legend | dmenu -nb "$color0" -nf "$color15" -sb "$color1" -sf "$color15" | awk '{print $1;}')
|
||
|
|
||
|
selected=$(echo $selected | awk '{print $1;}')
|
||
|
|
||
|
action=$(echo -e "start\nstop\nrestart" | dmenu)
|
||
|
|
||
|
case "$action" in
|
||
|
"start")
|
||
|
sudo systemctl start $selected
|
||
|
;;
|
||
|
"stop")
|
||
|
sudo systemctl stop $selected
|
||
|
;;
|
||
|
"restart")
|
||
|
sudo systemctl restart $selected
|
||
|
;;
|
||
|
esac
|