This commit is contained in:
Stephan Raabe
2024-04-22 15:32:53 +02:00
parent 5da5231276
commit 7093c2651b
5 changed files with 31 additions and 1 deletions
+7
View File
@@ -0,0 +1,7 @@
# -----------------------------------------------------
# Animations
# name "Default"
# -----------------------------------------------------
animations {
enabled = false
}
+1
View File
@@ -31,6 +31,7 @@ bind = $mainMod SHIFT, down, resizeactive, 0 100
bind = $mainMod, G, togglegroup
# Actions
bind = $mainMod SHIFT, A, exec, ~/dotfiles/hypr/scripts/toggle-animations.sh toggle
bind = $mainMod, PRINT, exec, ~/dotfiles/hypr/scripts/screenshot.sh
bind = $mainMod CTRL, Q, exec, wlogout
bind = $mainMod SHIFT, W, exec, ~/dotfiles/hypr/scripts/wallpaper.sh
+1
View File
@@ -35,3 +35,4 @@ env = APPIMAGELAUNCHER_DISABLE,1
exec-once = ~/dotfiles/hypr/scripts/ml4w-welcome-autostart.sh
exec-once = ~/.config/ml4w-hyprland-settings/hyprctl.sh
exec-once = ~/dotfiles/hypr/scripts/eww.sh
exec-once = ~/dotfiles/hypr/scripts/toggle-animations.sh
+19
View File
@@ -0,0 +1,19 @@
#!/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
else
if [ -f $cache_file ] ;then
rm $cache_file
fi
echo "source = ~/dotfiles/hypr/conf/animations/default.conf" > "$HOME/dotfiles/hypr/conf/animation.conf"
fi