smol misc stuff
This commit is contained in:
parent
fa4b18658d
commit
776dcac4af
3 changed files with 36 additions and 12 deletions
40
bin/toggle
40
bin/toggle
|
@ -1,16 +1,34 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ -z "`pgrep -x $1`" ]; then
|
if [ "$1" = "-s" ]; then
|
||||||
$@ &
|
if [ "`systemctl is-active $2`" = "active" ]; then
|
||||||
if [ "$1" = mpd ]; then
|
systemctl stop $2
|
||||||
sleep 1
|
notify-send $2 "process now stopped"
|
||||||
mpd-mpris &
|
else
|
||||||
mpd-rpc --no-idle --dont-broadcast-the-paused-state &
|
systemctl start $2
|
||||||
mpdscribble &
|
notify-send $2 "process now active"
|
||||||
#those tho will kill themselves when mpd gets killed so we're good
|
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
|
fi
|
||||||
notify-send $1 "is now enabled"
|
|
||||||
else
|
else
|
||||||
notify-send $1 "is now disabled"
|
if [ -z "`pgrep -x $1`" ]; then
|
||||||
pkill $1
|
$@ &
|
||||||
|
if [ "$1" = mpd ]; then
|
||||||
|
sleep 1
|
||||||
|
#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
|
||||||
|
notify-send $1 "is now disabled"
|
||||||
|
pkill $1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -41,7 +41,7 @@ discard_colors_if_item_is_selected = "yes"
|
||||||
mpd_host = localhost
|
mpd_host = localhost
|
||||||
mpd_port = 6600
|
mpd_port = 6600
|
||||||
mpd_connection_timeout = 5
|
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)"
|
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
|
toggle picom --experimental-backends
|
||||||
super + ctrl + alt + m
|
super + ctrl + alt + m
|
||||||
toggle mpd #(!)The toggle script has custom behaviour for mpd so it also starts `mpd-rpc` and `mpd-mpris`
|
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
|
# MISC
|
||||||
|
|
Loading…
Reference in a new issue