update youtubeBlocker script

This commit is contained in:
RafayAhmad7548 2026-04-10 21:23:42 +05:00
parent 8137ce7e25
commit 555c2dd4e2
Signed by: RafayAhmad
SSH key fingerprint: SHA256:WURX8viobA1uawb4dWM3LqYrY+XPcZcXhAXAlrYdhtE
3 changed files with 3 additions and 2 deletions

BIN
scripts/discipline.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

BIN
scripts/getbacktowork.mp3 Normal file

Binary file not shown.

View file

@ -12,9 +12,10 @@ handle() {
case $1 in case $1 in
activewindow*) activewindow*)
echo $1 echo $1
if [[ $1 == *YouTube* ]] && ! is_valid_youtube_time; then if [[ $1 == *YouTube* || $1 == *Instagram* ]]; then
hyprctl dispatch killactive hyprctl dispatch killactive
notify-send "ENOUGH, LOCK IN" notify-send "ENOUGH, LOCK IN" "GET BACK TO WORK" -u critical -i $HOME/dotfiles/scripts/discipline.png
mpv $HOME/dotfiles/scripts/getbacktowork.mp3
fi fi
esac esac
} }