smol misc stuff
This commit is contained in:
parent
fa4b18658d
commit
776dcac4af
3 changed files with 36 additions and 12 deletions
24
bin/toggle
24
bin/toggle
|
@ -1,16 +1,34 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ -z "`pgrep -x $1`" ]; then
|
||||
if [ "$1" = "-s" ]; then
|
||||
if [ "`systemctl is-active $2`" = "active" ]; then
|
||||
systemctl stop $2
|
||||
notify-send $2 "process now stopped"
|
||||
else
|
||||
systemctl start $2
|
||||
notify-send $2 "process now active"
|
||||
fi
|
||||
elif [ "$1" = "-su" ]; then
|
||||
if [ "`systemctl --user is-active $2`" = "active" ]; then
|
||||
systemctl --user stop $2
|
||||
notify-send $2 "process now stopped"
|
||||
else
|
||||
systemctl --user start $2
|
||||
notify-send $2 "process now active"
|
||||
fi
|
||||
else
|
||||
if [ -z "`pgrep -x $1`" ]; then
|
||||
$@ &
|
||||
if [ "$1" = mpd ]; then
|
||||
sleep 1
|
||||
mpd-mpris &
|
||||
#mpd-mpris &
|
||||
mpd-rpc --no-idle --dont-broadcast-the-paused-state &
|
||||
mpdscribble &
|
||||
#those tho will kill themselves when mpd gets killed so we're good
|
||||
fi
|
||||
notify-send $1 "is now enabled"
|
||||
else
|
||||
else
|
||||
notify-send $1 "is now disabled"
|
||||
pkill $1
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -41,7 +41,7 @@ discard_colors_if_item_is_selected = "yes"
|
|||
mpd_host = localhost
|
||||
mpd_port = 6600
|
||||
mpd_connection_timeout = 5
|
||||
mpd_music_dir = /run/media/vibbe/WAD/Music
|
||||
mpd_music_dir = /mnt/wad/Music
|
||||
|
||||
execute_on_song_change = notify-send "Now Playing" "$(mpc --format '%title% \n %artist% - %album%' current)"
|
||||
|
||||
|
|
|
@ -48,6 +48,12 @@ super + ctrl + alt + p
|
|||
toggle picom --experimental-backends
|
||||
super + ctrl + alt + m
|
||||
toggle mpd #(!)The toggle script has custom behaviour for mpd so it also starts `mpd-rpc` and `mpd-mpris`
|
||||
super + ctrl + alt + v
|
||||
toggle -s vncserver@:1
|
||||
super + ctrl + alt + t
|
||||
toggle -su opentabletdriver
|
||||
super + ctrl + alt + b
|
||||
toggle -s bluetooth
|
||||
|
||||
###
|
||||
# MISC
|
||||
|
|
Loading…
Reference in a new issue