mirror of
https://github.com/brunofontes/linuxShortcuts.git
synced 2024-11-23 22:30:51 +00:00
KDE: enforce I am working with pomodoros
This commit is contained in:
parent
f2471555fd
commit
e8ba3582c2
21
KDE/OXO.sh
21
KDE/OXO.sh
@ -1,3 +1,20 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
kactivities-cli --stop-activity `kactivities-cli --list-activities | grep "Main" | cut -d' ' -f2`
|
sleep 30s
|
||||||
notify-send --icon=`kactivities-cli --list-activities | grep "OXO" | cut -d' ' -f4` -a "OXO Innovation" "Main profile closed"
|
while [ 1 = 1 ]; do
|
||||||
|
|
||||||
|
sleep 30s
|
||||||
|
if [ `kactivities-cli --current-activity | grep "Main" | wc -l` -gt 0 ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
tomato=`ps -aux | grep tomatoshell | wc -l`
|
||||||
|
|
||||||
|
# If there are less than 2 instances of tomato, it means it is just grep and not tomato itself
|
||||||
|
if [ $tomato -lt 2 ]; then
|
||||||
|
kactivities-cli --set-current-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" "Start a pomodoro to Work"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# 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"
|
||||||
|
10
KDE/lockOXO.sh
Executable file
10
KDE/lockOXO.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
sleep 5s
|
||||||
|
while [ 1 = 1 ]; do
|
||||||
|
current=`kactivities-cli --current-activity | grep "Main"`
|
||||||
|
if [[ $current ]]; then
|
||||||
|
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"
|
||||||
|
fi
|
||||||
|
sleep 20s
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user