hyprland: add tools

This commit is contained in:
makefu 2024-07-30 22:34:52 +02:00
parent ad5e76819b
commit 36569baaf0
No known key found for this signature in database
GPG key ID: 36F7711F3FC0F225
2 changed files with 91 additions and 61 deletions

View file

@ -7,19 +7,33 @@ in {
./kitty.nix
./passwords.nix
./autostart.nix
./tools.nix
];
# autostart
programs.hyprland.enable = true;
security.pam.services.hyprlock = {};
# security.pam.services.swaylock = {};
programs.hyprland.package = pkgs.hyprland.overrideAttrs {
src = pkgs.fetchFromGitHub {
owner = "hyprwm";
repo = "Hyprland";
fetchSubmodules = true;
rev = "v0.41.1";
hash = "sha256-hLnnNBWP1Qjs1I3fndMgp8rbWJruxdnGTq77A4Rv4R4=";
};
};
programs.hyprland.xwayland.enable = true;
programs.hyprlock.enable = true;
# automatically enabled by programs.hyprlock
# services.hypridle.enable = true;
# security.pam.services.hyprlock = {};
environment.systemPackages = [ pkgs.brightnessctl ];
home-manager.users.${mainUser} = {
home.packages = with pkgs; [
dolphin
wofi
hyprland
hypridle
hyprlock
grimblast # screenshot
];
@ -57,27 +71,36 @@ in {
}
];
};
# programs.swaylock.enable = true;
services.hypridle = {
enable = true;
settings = {
general = {
after_sleep_cmd = "hyprctl dispatch dpms on";
ignore_dbus_inhibit = false;
lock_cmd = "hyprlock";
before_sleep_cmd = "loginctl lock-session";
after_sleep_cmd = "hyprctl dispatch dpms on";
lock_cmd = "pidof hyprlock || hyprlock";
};
listener = [
{
timeout = 10;
on-timeout = "hyprlock";
timeout = 150;
on-timeout = "brightnessctl -sd rgb:kbd_backlight set 0";# turn off keyboard backlight.
on-resume = "brightnessctl -rd rgb:kbd_backlight"; # turn on keyboard backlight.
}
{
timeout = 20;
timeout = 600;
on-timeout = "loginctl lock-session";
}
{
timeout = 630;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
{
timeout = 1800;
on-timeout = "systemctl suspend";
}
];
};
};

View file

@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
home-manager.users.${config.krebs.build.user.name}.xdg.desktopEntries.privatefox = {
name = "Privatefox";
exec = "${pkgs.firefox}/bin/firefox -P Privatefox";
};
}