add wallpaper and enable hypridle

current_state
Christian Ott 1 year ago
parent 72b3c77574
commit 2a3ca89e60
  1. BIN
      backgrounds/island_1.jpg
  2. BIN
      backgrounds/island_2.jpg
  3. BIN
      backgrounds/island_3.jpg
  4. 64
      hyperland/default.nix

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

@ -32,17 +32,32 @@ in
networkmanagerapplet networkmanagerapplet
grim grim
grimblast grimblast
hyprpaper
# (pkgs.waybar.overrideAttrs (oldAttrs: { # (pkgs.waybar.overrideAttrs (oldAttrs: {
# mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; # mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
# })) # }))
]; ];
services.hyprpaper = {
enable = true;
settings = {
ipc = false;
splash = true;
splash_offset = 5;
splash_color = "rgb(ebdbb8)";
preload = [ "$HOME/.nixos-config/backgrounds/island_1.jpg" ];
wallpaper = [ ",$HOME/.nixos-config/backgrounds/island_1.jpg" ];
};
};
programs.hyprlock = { programs.hyprlock = {
enable = true; enable = true;
settings = { settings = {
background = { background = {
monitor = ""; monitor = "";
# path = screenshot # path = screenshot
path = "$HOME/.nixos-config/backgrounds/island_2.jpg";
color = "rgba(152, 179, 166, 0.9)"; color = "rgba(152, 179, 166, 0.9)";
blur_passes = 1; blur_passes = 1;
@ -113,6 +128,53 @@ in
}; };
}; };
services.hypridle = {
enable = true;
settings = {
general = {
before_sleep_cmd = "loginctl lock-session";
lock_cmd = "${pkgs.procps}/bin/pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock";
# unlock_cmd = "loginctl unlock-session";
after_sleep_cmd = "hyprctl dispatch dpms on && notify-send \"Back from idle.\" \"Welcome back!\"";
};
listener = [
{
timeout = 5;
on-timeout = "pidof hyprlock && hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
{
timeout = 150; # 2.5min.
on-timeout = "light -O && light -S 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor.
on-resume = "light -I"; # monitor backlight restore.
}
{
timeout = 300;
on-timeout = "playerctl pause";
}
{
timeout = 270;
on-timeout = "notify-send \"Idle\" \"You're idle... locking in 30s.\"";
}
{
timeout = 300; # 5min
on-timeout = "loginctl lock-session"; # lock screen when timeout has passed
}
{
timeout = 330; # 5.5min
on-timeout = "hyprctl dispatch dpms off"; # screen off when timeout has passed
on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired.
}
{
timeout = 1800; # 30min
on-timeout = "systemctl suspend"; # suspend pc
}
];
};
};
wayland.windowManager.hyprland.enable = true; wayland.windowManager.hyprland.enable = true;
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
monitor=[ monitor=[
@ -132,6 +194,8 @@ in
"${pkgs.networkmanagerapplet}/bin/nm-applet --sm-disable --indicator" "${pkgs.networkmanagerapplet}/bin/nm-applet --sm-disable --indicator"
"blueman-applet" "blueman-applet"
"${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1" "${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1"
"systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
"systemctl --user start hyprpaper.service" # they are enabled, but don't start because they try to start before WAYLAND_DISPLAY is set
]; ];

Loading…
Cancel
Save

Powered by TurnKey Linux.