Hyprland-dotfiles/hypr/scripts/toggle-animations.sh

13 lines
391 B
Bash
Raw Normal View History

2024-04-22 09:32:53 -04:00
#!/bin/bash
2024-04-22 09:52:39 -04:00
cache_file="$HOME/.cache/toggle_animation"
if [[ $(cat $HOME/dotfiles/hypr/conf/animation.conf) == *"disabled"* ]]; then
echo ":: Toggle blocked by disabled.conf variation."
2024-04-22 09:32:53 -04:00
else
if [ -f $cache_file ] ;then
2024-04-22 09:52:39 -04:00
hyprctl keyword animations:enabled true
2024-04-22 09:32:53 -04:00
rm $cache_file
2024-04-22 09:52:39 -04:00
else
hyprctl keyword animations:enabled false
touch $cache_file
2024-04-22 09:32:53 -04:00
fi
fi