Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

35 lines
545 B

#!/bin/sh
function menu {
dmenu -i -l 20 $@
}
function refresh {
echo "refresh"
}
current=$(hamster current)
# choose an action
if [ "No activity" = "$current" ]; then
action="start"
else
action=$(echo -e -n "start\nstop $current" | menu -p Action)
fi
[ -z "$action" ] && exit 1
case "$action" in
start)
activity=$(hamster activities | menu -p Start)
[ -z "$activity" ] && exit 1
hamster start $activity
notify-send "Started $activity"
refresh
;;
stop*)
hamster stop
notify-send "Stopped $current"
refresh
;;
esac