mirror of
https://github.com/brunofontes/linuxShortcuts.git
synced 2024-11-23 22:30:51 +00:00
30 lines
1.1 KiB
Bash
Executable File
30 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Goes back to Main if tomatoshell is not running
|
|
|
|
[ $(pgrep -f 'OXO.sh' | wc -l) -gt 2 ] && exit
|
|
[ $(pgrep -f 'start-oxo.sh') ] && exit
|
|
sleep 30s
|
|
|
|
while [ 1 = 1 ]; do
|
|
|
|
sleep 30s
|
|
# If activity is not OXO, exit
|
|
if [ `kactivities-cli --current-activity | grep "OXO" | wc -l` = 0 ]; then
|
|
exit 0
|
|
fi
|
|
|
|
# If there are less than 2 instances of tomato, it means it is just grep and not tomato itself
|
|
if [ ! $(pgrep -f /usr/local/bin/pdshell) ]; then
|
|
beep
|
|
echo "Start a pomodoro to work" | festival --tts &
|
|
notify-send --icon=$(getIconFromKDEactivity OXO) -a "OXO Innovation" "Start a pomodoro to Work"
|
|
sleep 2s
|
|
kactivities-cli --set-current-activity $(kactivities-cli --list-activities | grep "Main" | cut -d' ' -f2)
|
|
fi
|
|
done
|
|
|
|
# /bin/terminator -m -T Pomodoro -x tomatoshell --oxo
|
|
# kactivities-cli --stop-activity `kactivities-cli --list-activities | grep "Main" | cut -d' ' -f2`
|
|
# notify-send --icon=`kactivities-cli --list-activities | grep "OXO" | cut -d' ' -f4` -a "OXO Innovation" "Main profile closed"
|