#!/bin/zsh -x EXECUTED=0 before_executed() { bspc desktop -f "$PRIMARY_WORKSPACE" xdotool mousemove 800 450 } after_executed() { EXECUTED=1 } set_sound() { cvol Spotify "$1"% if [[ -n "$2" ]]; then pulsemixer --set-volume "$2" fi } set_sound 100 75 # Recurring Tasks Case case $(task "$1" export | jq -r '.[0].parent') in "9d130a7c-6b6a-4a11-a571-d0178f5b8efb") before_executed vivaldi-stable --app=https://www.monkeytype.com --profile-directory="Default" set_sound 100 after_executed ;; "395f46a2-041c-4e0a-96dc-8c1757d79b48") before_executed thunderbird >> /dev/null 2>&1 & disown set_sound 70 after_executed ;; "dc88bc6c-9018-4e6d-aa87-b545969e6b72") before_executed genymotion >> /dev/null 2>&1 & disown after_executed ;; "5ccc0f95-3596-4991-a3fb-6d76778ed6dd") before_executed anki >> /dev/null 2>&1 & disown set_sound 85 after_executed ;; "e491559e-8812-402a-9192-05d7ce93c627") before_executed ksudoku >> /dev/null 2>&1 & disown set_sound 100 75 after_executed ;; "11e575f1-de86-4f71-a522-9a2f75477de9") obs-new_diary -y backup_con >> /dev/null 2>&1 & disown after_executed ;; "534895c6-f264-4353-904a-679318b3b968") before_executed vivaldi --new-window https://loritta.website/br/daily https://top.gg/bot/loritta/vote https://apolobot.com/dashboard/daily --profile-directory="Default" after_executed ;; "5ad9400e-df1b-49be-b565-1bd7ddb1c000") before_executed vivaldi --new-window https://www.instagram.com/direct/inbox/ --profile-directory="Default" vivaldi --new-window https://www.instagram.com/direct/inbox/ https://web.whatsapp.com/ --profile-directory="Profile 1" after_executed ;; #"d525acb2-e118-461a-a472-b7d6d45644b4") #before_executed #bash -c "sleep 10 && yes | pwf" & disown #after_executed #;; esac # Mother Task Case case $(task "$1" export | jq -r '.[0].MOTHER') in "88e174db-6ec1-400f-b9da-ce951628322c") before_executed vivaldi-stable --app=https://www.duolingo.com/learn --profile-directory="Default" lay dvorak set_sound 70 100 after_executed ;; esac # Info Relationship Case case $(task "$1" export | jq -r '.[0].INFORELAT') in "4ea8d410-7eea-481f-b90e-11745d942567") before_executed vivaldi-stable --app=https://www.duolingo.com/learn --profile-directory="Default" lay dvorak set_sound 70 100 after_executed ;; esac # Projects Case case $(task "$1" export | jq -r '.[0].project') in "CerebralLine.Reading") set_sound 50 vivaldi-stable https://eggsy.xyz/projects/premid/custom-status/ --profile-directory="Default" after_executed ;; "Lazer.Watch") set_sound 100 audiorelay > /dev/null 2>&1 & disown remotemouse > /dev/null 2>&1 & disown after_executed esac # Tags Case TAGS=$(task "$1" export | jq -r '.[0].tags') case "${TAGS[*]}" in *"Workout"*) ;; esac # Task UUID Case case $(task "$1" export | jq -r '.[0].uuid') in "100372a8-5ca2-493a-b6f3-4b74195c8848") before_executed vivaldi-stable --app=https://chess.com --profile-directory="Default" after_executed ;; esac # Check if some script was executed if [[ $EXECUTED -eq 0 ]]; then pulsemixer --set-volume 80 cvol spotify 100% exit fi notify-send -u critical "$(task "$2" export | jq -r '.[0].description')"