system/hm/modules/hypr.nix

274 lines
7.8 KiB
Nix
Raw Normal View History

2024-11-01 12:04:24 -04:00
{ pkgs, config, lib, ... }:
{
programs.hyprlock = {
enable = true;
# settings = {
# text_color = "rgba(FFFFFFFF)";
# entry_background_color = "rgba(33333311)";
# entry_border_color = "rgba(3B3B3B55)";
# entry_color = "rgba(FFFFFFFF)";
# font_family = "Rubik Light";
# font_family_clock = "Rubik Light";
# font_material_symbols = "Material Symbols Rounded";
# background = {
# # color = r"gba(0D0D17FF)";
# color = "rgba(000000FF)";
# # path = "{{ SWWW_WALL }}";
# path = "${config.home.homeDirectory}/.local/share/wallpapers/northern-lights-arctic-circle-norway-07.jpg";
# blur_size = 5;
# blur_passes = 4;
# };
# input-field = {
# monitor = "";
# size = "250, 50";
# outline_thickness = 2;
# dots_size = 0.1;
# dots_spacing = 0.3;
# outer_color = "${entry_border_color}";
# inner_color = "${entry_background_color}";
# font_color = "${entry_color}";
# # fade_on_empty = true,\;
# position = "0, 20";
# halign = "center";
# valign = "center";
# };
# label = { # Clock
# monitor = "";
# text = "${TIME12}";
# shadow_passes = 1;
# shadow_boost = 0.5;
# color = "${text_color}";
# font_size = 65;
# font_family = "${font_family_clock}";
# position = "0, 300";
# halign = "center";
# valign = "center";
# };
# label = { # Greeting
# monitor = "";
# text = "hi $USER !!!";
# shadow_passes = 1;
# shadow_boost = 0.5;
# color = "$[text_color]";
# font_size = 20;
# font_family = "${font_family}";
# position = "0, 240";
# halign = "center";
# valign = "center";
# };
# label = { # lock icon
# monitor = "";
# text = "lock";
# shadow_passes = 1;
# shadow_boost = 0.5;
# color = "${text_color}";
# font_size = 21;
# font_family = "${font_material_symbols}";
# position = "0, 65";
# halign = "center";
# valign = "bottom";
# };
# label = { # "locked" text
# monitor = "";
# text = "locked";
# shadow_passes = 1;
# shadow_boost = 0.5;
# color = "${text_color}";
# font_size = 14;
# font_family = "${font_family}";
# position = "0, 45";
# halign = "center";
# valign = "bottom";
# };
# label = { # Status
# monitor = "";
# text = "";
# shadow_passes = 1;
# shadow_boost = 0.5;
# color = "${text_color}";
# font_size = 14;
# font_family = "${font_family}";
# position = "30, -30";
# halign = "left";
# valign = "top";
# };
# };
};
services.hypridle = {
enable = true;
settings = {
# $lock_cmd = pidof hyprlock || hyprlock
# $suspend_cmd = pidof steam || systemctl suspend || loginctl suspend # fuck nvidia
general = {
lock_cmd = "pidof hyprlock || hyprlock";
before_sleep_cmd = "loginctl lock-session";
};
listener = [
{
timeout = 5400;
on-timeout = "loginctl lock-session";
}
{
timeout = 7200;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
{
timeout = 10800;
on-timeout = "pidof steam || systemctl suspend || loginctl suspend";
}
];
};
};
services.hyprpaper = {
enable = true;
settings = {
splash = true;
preload = [
"${config.home.homeDirectory}/Pictures/bg-left.png"
"${config.home.homeDirectory}/Pictures/bg-center.png"
"${config.home.homeDirectory}/Pictures/bg-right.png"
"${config.home.homeDirectory}/.local/share/wallpapers/Nordic-mountain-wallpaper.jpg"
"${config.home.homeDirectory}/.local/share/wallpapers/Nordic-mountain.jpg"
"${config.home.homeDirectory}/.local/share/wallpapers/northern-lights-arctic-circle-norway-07.jpg"
"${config.home.homeDirectory}/.local/share/wallpapers/canoe-3840x2160-scandinavia-europe-5k-18949.jpg"
];
wallpaper = [
"DP-3,~/.local/share/wallpapers/Nordic-mountain-wallpaper.jpg"
"DP-5,~/.local/share/wallpapers/northern-lights-arctic-circle-norway-07.jpg"
"DP-6,~/.local/share/wallpapers/canoe-3840x2160-scandinavia-europe-5k-18949.jpg"
];
};
};
programs.wlogout = {
enable = true;
layout = [
{
2025-04-16 13:59:06 -04:00
label = "lock - l";
2024-11-01 12:04:24 -04:00
action = "pkill hyprlock && loginctl lock-session";
text = "Lock";
keybind = "l";
circular = false;
}
{
2025-04-16 13:59:06 -04:00
label = "hibernate - h";
2024-11-01 12:04:24 -04:00
action = "systemctl hibernate";
text = "Hibernate";
keybind = "h";
circular = false;
}
{
2025-04-16 13:59:06 -04:00
label = "logout - e";
action = "${config.home.homeDirectory}/bin/hypr-logout.sh";
# action = "loginctl terminate-session $XDG_SESSION_ID";
2024-11-01 12:04:24 -04:00
text = "Logout";
keybind = "e";
circular = false;
}
{
2025-04-16 13:59:06 -04:00
label = "shutdown - s";
2024-11-01 12:04:24 -04:00
action = "systemctl poweroff";
text = "Shutdown";
keybind = "s";
circular = false;
}
{
2025-04-16 13:59:06 -04:00
label = "suspend - u";
2024-11-01 12:04:24 -04:00
action = "systemctl suspend";
text = "Suspend";
keybind = "u";
circular = false;
}
{
2025-04-16 13:59:06 -04:00
label = "reboot - r";
2024-11-01 12:04:24 -04:00
action = "systemctl reboot";
text = "Reboot";
keybind = "r";
circular = false;
}
];
style = ''
* {
background-image: none;
}
window {
background: #4C566A;
}
button {
color: #D8DEE9;
font-size: 16px;
background-color: #81A1C1;
border-style: none;
background-repeat: no-repeat;
background-position: center;
background-size: 35%;
border-radius:30px;
margin: 182px 5px;
text-shadow: 0px 0px;
box-shadow: 0px 0px;
}
button:focus, button:active, button:hover {
color: #ECEFF4;
background-color: #5E81AC;
outline-style: none;
}
#lock {
2024-11-29 18:31:17 -05:00
background-image: image(url("${config.home.homeDirectory}/.local/share/wlogout/assets/lock.svg"));
2024-11-01 12:04:24 -04:00
}
#logout {
2024-11-29 18:31:17 -05:00
background-image: image(url("${config.home.homeDirectory}/.local/share/wlogout/assets/logout.svg"));
2024-11-01 12:04:24 -04:00
}
#suspend {
2024-11-29 18:31:17 -05:00
background-image: image(url("${config.home.homeDirectory}/.local/share/wlogout/assets/suspend.svg"));
2024-11-01 12:04:24 -04:00
}
#hibernate {
2024-11-29 18:31:17 -05:00
background-image: image(url("${config.home.homeDirectory}/.local/share/wlogout/assets/hibernate.svg"));
2024-11-01 12:04:24 -04:00
}
#shutdown {
2024-11-29 18:31:17 -05:00
background-image: image(url("${config.home.homeDirectory}/.local/share/wlogout/assets/shutdown.svg"));
2024-11-01 12:04:24 -04:00
}
#reboot {
2024-11-29 18:31:17 -05:00
background-image: image(url("${config.home.homeDirectory}/.local/share/wlogout/assets/reboot.svg"));
2024-11-01 12:04:24 -04:00
}
'';
};
services.swayosd = {
enable = true;
display = "DP-4";
};
services.mako.enable = true;
imports = [
(import ../../pkgs/wm/hyprland/hyprland.nix { inherit pkgs config; })
(import ../../pkgs/wm/waybar/waybar.nix { inherit config; pkgs = pkgs; })
(import ../../pkgs/wm/mako/mako.nix { config = config; pkgs = pkgs; lib=lib; })
];
}