Updates
This commit is contained in:
@@ -1,19 +1,13 @@
|
||||
#!/bin/bash
|
||||
cache_file="$HOME/.cache/current_animation"
|
||||
if [[ "$1" == "toggle" ]]; then
|
||||
if [[ ! $(cat $HOME/dotfiles/hypr/conf/animation.conf) == *"disabled"* ]]; then
|
||||
if [ ! -f $cache_file ] ;then
|
||||
touch $cache_file
|
||||
echo $(cat $HOME/dotfiles/hypr/conf/animation.conf) > "$cache_file"
|
||||
echo "source = ~/dotfiles/hypr/conf/animations/disabled.conf" > "$HOME/dotfiles/hypr/conf/animation.conf"
|
||||
else
|
||||
echo $(cat "$cache_file") > "$HOME/dotfiles/hypr/conf/animation.conf"
|
||||
rm $cache_file
|
||||
fi
|
||||
fi
|
||||
cache_file="$HOME/.cache/toggle_animation"
|
||||
if [[ $(cat $HOME/dotfiles/hypr/conf/animation.conf) == *"disabled"* ]]; then
|
||||
echo ":: Toggle blocked by disabled.conf variation."
|
||||
else
|
||||
if [ -f $cache_file ] ;then
|
||||
hyprctl keyword animations:enabled true
|
||||
rm $cache_file
|
||||
else
|
||||
hyprctl keyword animations:enabled false
|
||||
touch $cache_file
|
||||
fi
|
||||
echo "source = ~/dotfiles/hypr/conf/animations/default.conf" > "$HOME/dotfiles/hypr/conf/animation.conf"
|
||||
fi
|
||||
Reference in New Issue
Block a user