linuxShortcuts/KDE/lockOXO.sh

19 lines
550 B
Bash
Raw Permalink Normal View History

2022-10-07 11:40:50 +00:00
#!/bin/bash
# Goes back to OXO acitivity when working
[ $(pgrep -f 'lockOXO.sh' | wc -l) -gt 2 ] && exit 0
sleep 20s
while true; do
current=`kactivities-cli --current-activity | grep "Main"`
if [[ $current ]]; then
2022-10-07 11:40:50 +00:00
beep
echo "Closing activity..." | festival --tts &
notify-send --icon=$(getIconFromKDEactivity OXO) -a "OXO Innovation" "Closing main screen..."
sleep 2s
kactivities-cli --set-current-activity `kactivities-cli --list-activities | grep "OXO" | cut -d' ' -f2`
fi
2022-10-07 11:40:50 +00:00
sleep 30s
done