~kris/dots

srice

ref: 0e7f2c2785a36c2c4d5f7214411d3746a1667303 srice/.local/bin/misc/td-toggle -rwxr-xr-x 556 bytes
0e7f2c27 — Kris Yotam xprofile: bump laptop HiDPI to 180 and scale cursor for M1 Pro retina 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
#!/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 -l 2 -p "Turn off transmission-daemon?")" = "Yes" ] && killall transmission-daemon && notify-send "transmission-daemon disabled."
else
	ifinstalled transmission-cli || exit
	[ "$(printf "No\\nYes" | dmenu -i -l 2 -p "Turn on transmission daemon?")" = "Yes" ] && transmission-daemon && notify-send "transmission-daemon enabled."
fi
sleep 3 && pkill -RTMIN+7 "${STATUSBAR:-dwmblocks}"