#!/bin/sh
|
|
|
|
|
|
killprogs() {
|
|
pkill -x udisks-glue
|
|
pkill -x panel
|
|
pkill -x redshift
|
|
}
|
|
|
|
logout() {
|
|
pkill dwm
|
|
}
|
|
|
|
DMENU='dmenu -z 1900 -x 10 -y 10 -i'
|
|
|
|
items="dwm
|
|
dwmblocks
|
|
mconnect
|
|
dunst
|
|
clipmenud
|
|
quark"
|
|
|
|
# Open menu
|
|
selection=$(printf '%s' "$items" | $DMENU)
|
|
|
|
case $selection in
|
|
dwm)
|
|
touch /home/yigit/.cache/dwm-restart
|
|
logout
|
|
;;
|
|
dwmblocks)
|
|
kill -9 $(pidof dwmblocks)
|
|
dwmblocks > /tmp/dwmblocks.out 2> /tmp/dwmblocks.err &
|
|
;;
|
|
mconnect)
|
|
kill -9 $(pidof mconnect)
|
|
(cd ~/Downloads/mconnect; mconnect -d > /tmp/mconnect 2> /tmp/mconnect.err &)
|
|
;;
|
|
clipmenud)
|
|
pkill -f clipmenud
|
|
clipmenud > /tmp/clipmenud.out 2> /tmp/clipmenud.err &
|
|
;;
|
|
dunst)
|
|
kill -9 $(pidof dunst)
|
|
dunst &
|
|
;;
|
|
devmon)
|
|
pkill -f devmon
|
|
~/.scripts/devmon --exec-on-drive "/sbin/notify-send ' Drive Mounted' '%l (%f) at %d '" \
|
|
--exec-on-remove "/sbin/notify-send ' Drive Removed' '%l (%f) from %d '" \
|
|
--exec-on-unmount "/sbin/notify-send ' Drive Unmounted' '%l (%f) from %d '" &
|
|
;;
|
|
quark)
|
|
sudo systemctl restart quark
|
|
;;
|
|
esac
|
|
|
|
exit
|