mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
- Format all shell scripts using [shfmt] (https://github.com/mvdan/sh). Options used: * `-bn`: binary ops like && and | may start a line * `-sr`: redirect operators will be followed by a space * `-ci`: indent switch cases * `-i 4`: indent 4 spaces * `-s`: simplify the code * `-p`: parse for posix compliance - Add Github action to lint changes to scripts and enforce formatting going forward Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
12 lines
548 B
Bash
Executable File
12 lines
548 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# If transmission-daemon is running, will ask to kill, else will ask to start.
|
|
|
|
if pidof transmission-daemon > /dev/null; then
|
|
[ "$(printf 'No\nYes' | dmenu -i -p "Turn off transmission-daemon?")" = "Yes" ] && killall transmission-da && notify-send "transmission-daemon disabled."
|
|
else
|
|
ifinstalled transmission-cli || exit
|
|
[ "$(printf 'No\nYes' | dmenu -i -p "Turn on transmission daemon?")" = "Yes" ] && transmission-daemon && notify-send "tranmission-daemon enabled."
|
|
fi
|
|
sleep 3 && pkill -RTMIN+7 "${STATUSBAR:-dwmblocks}"
|