From 5efe5f521f41d4b2c6b0def8bb134c8349b96a31 Mon Sep 17 00:00:00 2001 From: Tomas Rivera <137088692+Totorile1@users.noreply.github.com> Date: Sat, 7 Mar 2026 09:29:09 +0100 Subject: [PATCH] worked on ly and hyprland --- hosts/laptop/home.nix | 1 + modules/home-manager/hyprland.nix | 21 +++++++++++++++--- modules/scripts/performance-mode.nix | 33 ++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 modules/scripts/performance-mode.nix diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index 999d34c..5ef0c99 100755 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -69,6 +69,7 @@ home.packages = [ (pkgs.callPackage ../../modules/scripts/gitnotify.nix {}) (pkgs.callPackage ../../modules/scripts/tomato.nix {}) (pkgs.callPackage ../../modules/scripts/librewolfprofiles.nix {}) +(pkgs.callPackage ../../modules/scripts/performance-mode.nix {}) #pkgs pkgs.gruvbox-gtk-theme # # Adds the 'hello' command to your environment. It prints a friendly diff --git a/modules/home-manager/hyprland.nix b/modules/home-manager/hyprland.nix index 187680d..931e1b3 100644 --- a/modules/home-manager/hyprland.nix +++ b/modules/home-manager/hyprland.nix @@ -80,7 +80,7 @@ in # if hyprexpo plugin enabled bind = $mainMod, Space, hyprexpo:expo, toggle #bind = Ctrl+$mainMod, 1, exec, pgrep -x ollama > /dev/null || ollama serve & notify-send -u normal -t 3000 "Running Deepseek-r1 with 1.5b parameters" "" & kitty -e sh -c "ollama run deepseek-r1:1.5b" #bind = Ctrl+$mainMod, 2, exec, pgrep -x ollama > /dev/null || ollama serve & notify-send -u normal -t 3000 "Running Deepseek-r1 with 8b parameters" "" & kitty -e sh -c "ollama run deepseek-r1:8b" - + # exec custom-performance bind = [ #hyprland/utility keybindings @@ -214,7 +214,15 @@ in "[workspace 1 silent] sleep 1 && kitty -o font_size=1 -e sh -c 'cmatrix -br'" ###################### ###################### - ]; + ]; + +# gestures (also keybindings) + gesture = [ + "3, right, move, +col" + "3, left, move, -col" + ]; + + # █░░ ▄▀█ █▄█ █▀█ █░█ ▀█▀ █▀ # █▄▄ █▀█ ░█░ █▄█ █▄█ ░█░ ▄█ @@ -342,7 +350,10 @@ in workspace = [ "1, layout:master" "2, layout:scrolling, layoutopt:direction:right" - "special, layout:monocle" + "name:special, layout:scrolling" + # used for smart gaps along some windowrules + "w[tv1], gapsout:0, gapsin:0" + "f[1], gapsout:0, gapsin:0" ]; @@ -404,6 +415,10 @@ in "float on, match:class ^(eog)$" "float on, size 400 175, match:class ^(custom-librewolfprofiles)$" "float on, size 600 600, match:initial_title ^(custom-pomodoro)$" +"border_size 0, match:float 0, match:workspace w[tv1]" +"rounding 0, match:float 0, match:workspace w[tv1]" +"border_size 0, match:float 0, match:workspace f[1]" +"rounding 0, match:float 0, match:workspace f[1]" ]; # add a float for tomato when in kitty #"plugin:imgborders:noimgborders, tag:noborder" diff --git a/modules/scripts/performance-mode.nix b/modules/scripts/performance-mode.nix new file mode 100644 index 0000000..eb55a35 --- /dev/null +++ b/modules/scripts/performance-mode.nix @@ -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 + ''; +}