mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-12 02:28:37 +02:00
worked on ly and hyprland
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
# used for the terminal autostart. Needs to get cleared and recall fastfetch so that the bar from oh-my-zsh get resized
|
||||
|
||||
{ writeShellApplication, hyprland, gawk, libnotify, ... }:
|
||||
|
||||
writeShellApplication {
|
||||
name = "custom-performance";
|
||||
runtimeInputs = [
|
||||
"hyprland"
|
||||
"gawk"
|
||||
"libnotify"
|
||||
];
|
||||
text = ''
|
||||
HYPRGAMEMODE=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}')
|
||||
if [ "$HYPRGAMEMODE" = 1 ] ; then
|
||||
hyprctl --batch "\
|
||||
keyword animations:enabled 0;\
|
||||
keyword animation borderangle,0; \
|
||||
keyword decoration:shadow:enabled 0;\
|
||||
keyword decoration:blur:enabled 0;\
|
||||
keyword decoration:fullscreen_opacity 1;\
|
||||
keyword general:gaps_in 0;\
|
||||
keyword general:gaps_out 0;\
|
||||
keyword general:border_size 1;\
|
||||
keyword decoration:rounding 0"
|
||||
notify-send -u critical -t 5000 "Performance mode [ON]"
|
||||
exit
|
||||
else
|
||||
notify-send -u critical -t 5000 "Performance mode [OFF]"
|
||||
hyprctl reload
|
||||
exit 0
|
||||
fi
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user