diff --git a/homeManagerModules/desktop/hypr/hypridle/default.nix b/homeManagerModules/desktop/hypr/hypridle/default.nix deleted file mode 100644 index 3f6984aa..00000000 --- a/homeManagerModules/desktop/hypr/hypridle/default.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ - pkgs, - lib, - config, - osConfig, - inputs, - ... -}: { - options = { - alyraffauf.desktop.hyprland.hypridle.enable = - lib.mkEnableOption "Enable hypridle."; - }; - - config = lib.mkIf config.alyraffauf.desktop.hyprland.hypridle.enable { - # Packages that should be installed to the user profile. - home.packages = with pkgs; [inputs.nixpkgsUnstable.legacyPackages."${pkgs.system}".hypridle]; - - xdg.configFile."hypr/hypridle.conf".text = '' - general { - lock_cmd = pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock # avoid starting multiple hyprlock instances. - before_sleep_cmd = ${pkgs.systemd}/bin/loginctl lock-session # lock before suspend. - after_sleep_cmd = ${config.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display. - } - - listener { - timeout = 300 # 5min. - on-timeout = ${pkgs.brightnessctl}/bin/brightnessctl -s set 10 # set monitor backlight to minimum, avoid 0 on OLED monitor. - on-resume = ${pkgs.brightnessctl}/bin/brightnessctl -r # monitor backlight restor. - } - - # turn off keyboard backlight, uncomment this section if have keyboard backlight. - #listener { - # timeout = 150 # 2.5min. - # on-timeout = ${pkgs.brightnessctl}/bin/brightnessctl -sd rgb:kbd_backlight set 0 # turn off keyboard backlight. - # on-resume = ${pkgs.brightnessctl}/bin/brightnessctl -rd rgb:kbd_backlight # turn on keyboard backlight. - #} - - listener { - timeout = 300 # 5min - on-timeout = ${pkgs.systemd}/bin/loginctl lock-session # lock screen when timeout has passed - } - - listener { - timeout = 330 # 5.5min - on-timeout = ${config.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch dpms off # screen off when timeout has passed - on-resume = ${config.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired. - } - - listener { - timeout = 900 # 15min - on-timeout = ${ - if osConfig.networking.hostName == "mauville" - then "" - else "${pkgs.systemd}/bin/systemctl suspend" - } # suspend pc unless on mauville - } - ''; - }; -} diff --git a/homeManagerModules/desktop/hypr/hyprlock/default.nix b/homeManagerModules/desktop/hypr/hyprlock/default.nix deleted file mode 100644 index 856fd635..00000000 --- a/homeManagerModules/desktop/hypr/hyprlock/default.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - pkgs, - lib, - config, - inputs, - ... -}: { - options = { - alyraffauf.desktop.hyprland.hyprlock.enable = - lib.mkEnableOption "Enables hyprlock."; - }; - - config = lib.mkIf config.alyraffauf.desktop.hyprland.hyprlock.enable { - # Packages that should be installed to the user profile. - home.packages = with pkgs; [inputs.nixpkgsUnstable.legacyPackages."${pkgs.system}".hyprlock]; - - xdg.configFile."hypr/hyprlock.conf".source = ./hyprlock.conf; - }; -} diff --git a/homeManagerModules/desktop/hypr/hyprlock/hyprlock.conf b/homeManagerModules/desktop/hypr/hyprlock/hyprlock.conf deleted file mode 100644 index 3b7977d3..00000000 --- a/homeManagerModules/desktop/hypr/hyprlock/hyprlock.conf +++ /dev/null @@ -1,54 +0,0 @@ -general { - grace = 5 - -} - -background { - monitor = - color = rgba(ca9ee6cc) - path = screenshot - blur_passes = 3 - blur_size = 8 -} - -input-field { - monitor = - size = 300, 75 - outline_thickness = 2 - dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8 - dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0 - dots_center = false - dots_rounding = -1 # -1 default circle, -2 follow input-field rounding - outer_color = rgb(48, 52, 70) - inner_color = rgb(250, 250, 250) - font_color = rgb(48, 52, 70) - fade_on_empty = false - fade_timeout = 1000 # Milliseconds before fade_on_empty is triggered. - placeholder_text = ... # Text rendered in the input box when it's empty. - hide_input = false - rounding = -1 # -1 means complete rounding (circle/oval) - check_color = rgb(204, 136, 34) - fail_color = rgb(204, 34, 34) # if authentication failed, changes outer_color and fail message color - fail_text = $FAIL ($ATTEMPTS) # can be set to empty - fail_transition = 300 # transition time in ms between normal outer_color and fail_color - capslock_color = -1 - numlock_color = -1 - bothlock_color = -1 # when both locks are active. -1 means don't change outer color (same for above) - invert_numlock = false # change color if numlock is off - - position = 0, 0 - halign = center - valign = center -} - -label { - monitor = - text = wb $USER 󱠡 - color = rgb(250, 250, 250) - font_size = 25 - font_family = NotoSans Nerd Font - - position = 0, 80 - halign = center - valign = center -} \ No newline at end of file diff --git a/homeManagerModules/desktop/hypr/hyprshade/default.nix b/homeManagerModules/desktop/hypr/hyprshade/default.nix deleted file mode 100644 index 7630d923..00000000 --- a/homeManagerModules/desktop/hypr/hyprshade/default.nix +++ /dev/null @@ -1,69 +0,0 @@ -{ - pkgs, - lib, - config, - inputs, - ... -}: { - options = { - alyraffauf.desktop.hyprland.hyprshade.enable = - lib.mkEnableOption "Enables hyprshade with blue light filter."; - }; - - config = lib.mkIf config.alyraffauf.desktop.hyprland.hyprshade.enable { - # Packages that should be installed to the user profile. - home.packages = with pkgs; [inputs.nixpkgsUnstable.legacyPackages."${pkgs.system}".hyprshade]; - - xdg.configFile."hypr/shaders/custom-blue-light-filter.glsl".text = '' - // from https://github.com/hyprwm/Hyprland/issues/1140#issuecomment-1335128437 - - precision highp float; - varying vec2 v_texcoord; - uniform sampler2D tex; - - const float temperature = 4500.0; - const float temperatureStrength = 1.0; - - #define WithQuickAndDirtyLuminancePreservation - const float LuminancePreservationFactor = 1.0; - - // function from https://www.shadertoy.com/view/4sc3D7 - // valid from 1000 to 40000 K (and additionally 0 for pure full white) - vec3 colorTemperatureToRGB(const in float temperature) { - // values from: http://blenderartists.org/forum/showthread.php?270332-OSL-Goodness&p=2268693&viewfull=1#post2268693 - mat3 m = (temperature <= 6500.0) ? mat3(vec3(0.0, -2902.1955373783176, -8257.7997278925690), - vec3(0.0, 1669.5803561666639, 2575.2827530017594), - vec3(1.0, 1.3302673723350029, 1.8993753891711275)) - : mat3(vec3(1745.0425298314172, 1216.6168361476490, -8257.7997278925690), - vec3(-2666.3474220535695, -2173.1012343082230, 2575.2827530017594), - vec3(0.55995389139931482, 0.70381203140554553, 1.8993753891711275)); - return mix(clamp(vec3(m[0] / (vec3(clamp(temperature, 1000.0, 40000.0)) + m[1]) + m[2]), vec3(0.0), vec3(1.0)), - vec3(1.0), smoothstep(1000.0, 0.0, temperature)); - } - - void main() { - vec4 pixColor = texture2D(tex, v_texcoord); - - // RGB - vec3 color = vec3(pixColor[0], pixColor[1], pixColor[2]); - - #ifdef WithQuickAndDirtyLuminancePreservation - color *= mix(1.0, dot(color, vec3(0.2126, 0.7152, 0.0722)) / max(dot(color, vec3(0.2126, 0.7152, 0.0722)), 1e-5), - LuminancePreservationFactor); - #endif - - color = mix(color, color * colorTemperatureToRGB(temperature), temperatureStrength); - - vec4 outCol = vec4(color, pixColor[3]); - - gl_FragColor = outCol; - } - ''; - xdg.configFile."hypr/hyprshade.toml".text = '' - [[shades]] - name = "custom-blue-light-filter" - start_time = 19:00:00 - end_time = 06:00:00 - ''; - }; -}