From c6a24f17c7adaedd3a1d6f71667acbe55974198e Mon Sep 17 00:00:00 2001 From: Guizmo Date: Tue, 5 Mar 2024 20:03:53 +0100 Subject: [PATCH] Update performance Add waybar disable / enable animation --- .config/hypr/scripts/performance | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.config/hypr/scripts/performance b/.config/hypr/scripts/performance index 5c9cbd94..9d90908a 100755 --- a/.config/hypr/scripts/performance +++ b/.config/hypr/scripts/performance @@ -1,6 +1,19 @@ #!/usr/bin/env sh HYPRGAMEMODE=$(hyprctl getoption animations:enabled | awk 'NR==2{print $2}') + +# Waybar performance +FILE="$HOME/.config/waybar/style.css" + +sed -i 's/\/\* \(.*animation:.*\) \*\//\1/g' $FILE +if [ "$HYPRGAMEMODE" = 1 ]; then + sed -i 's/^\(.*animation:.*\)$/\/\* \1 \*\//g' $FILE +fi + +killall waybar +waybar > /dev/null 2>&1 & + +# Hyprland performance if [ "$HYPRGAMEMODE" = 1 ]; then hyprctl --batch "\ keyword animations:enabled 0;\ @@ -13,4 +26,4 @@ if [ "$HYPRGAMEMODE" = 1 ]; then exit fi -hyprctl reload +hyprctl reload > /dev/null 2>&1 &