swaylock and swayidle
This commit is contained in:
parent
cd2c8228a8
commit
6cc4642526
4 changed files with 57 additions and 4 deletions
|
@ -1,5 +1,12 @@
|
|||
{ lib, config, pkgs, ... }: let
|
||||
inherit (lib) mkIf mkMerge;
|
||||
holo = pkgs.writeShellApplication {
|
||||
name = "holo";
|
||||
runtimeInputs = [ pkgs.steam pkgs.gamescope ];
|
||||
text = ''
|
||||
gamescope -f -h 1504 -w 2256 -r 60 -F fsr -e -- steam
|
||||
'';
|
||||
};
|
||||
in mkIf config.withGames (mkMerge [
|
||||
(mkIf config.withImpermanence {
|
||||
environment.persistence."/persist".users.${config.username}= {
|
||||
|
@ -15,8 +22,9 @@ in mkIf config.withGames (mkMerge [
|
|||
programs.gamemode.enable = true;
|
||||
|
||||
home-manager.users.${config.username} = {
|
||||
home.packages = with pkgs; [
|
||||
prismlauncher
|
||||
home.packages = [
|
||||
pkgs.prismlauncher
|
||||
holo
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -13,8 +13,7 @@
|
|||
|
||||
services.logind = {
|
||||
powerKey = "poweroff";
|
||||
powerKeyLongPress = "reboot";
|
||||
lidSwitch = "poweroff";
|
||||
lidSwitch = "suspend";
|
||||
};
|
||||
|
||||
home-manager.users.${config.username} = {
|
||||
|
@ -38,6 +37,19 @@
|
|||
style = builtins.readFile(./waybar.conf.css);
|
||||
};
|
||||
|
||||
programs.swaylock = {
|
||||
enable = true;
|
||||
package = pkgs.swaylock-effects;
|
||||
settings = import ./swaylock.conf.nix { lib = lib; config = config; };
|
||||
};
|
||||
|
||||
programs.swayidle = {
|
||||
enable = true;
|
||||
events = [
|
||||
{ event = "before-sleep"; command = "${pkgs.swaylock}/bin/swaylock"; }
|
||||
];
|
||||
};
|
||||
|
||||
services.mako = {
|
||||
enable = true;
|
||||
defaultTimeout = 5000;
|
||||
|
|
|
@ -146,6 +146,7 @@
|
|||
"Mod+Shift+Ctrl+S".action.screenshot-window = [];
|
||||
"Print".action.screenshot-screen = [];
|
||||
|
||||
"Mod+Shift+L".action.spawn = "swaylock";
|
||||
"Mod+Shift+Q".action.quit = [];
|
||||
};
|
||||
}
|
||||
|
|
32
modules/niri/swaylock.conf.nix
Normal file
32
modules/niri/swaylock.conf.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{ lib, config, ... }: {
|
||||
ignore-empty-password = true;
|
||||
screenshots = true;
|
||||
clock = true;
|
||||
submit-on-touch = true;
|
||||
indicator = true;
|
||||
indicator-caps-lock = true;
|
||||
indicator-radius = 100;
|
||||
indicator-thickness = 4;
|
||||
inside-color = lib.strings.concatStrings [ config.theme.overlay "aa" ];
|
||||
inside-clear-color = lib.strings.concatStrings [ config.theme.subtle "aa" ];
|
||||
inside-caps-lock-color = lib.strings.concatStrings [ config.theme.rose "aa" ];
|
||||
inside-ver-color = lib.strings.concatStrings [ config.theme.foam "aa" ];
|
||||
inside-wrong-color = lib.strings.concatStrings [ config.theme.love "aa" ];
|
||||
line-uses-inside = true;
|
||||
ring-color = config.theme.surface;
|
||||
ring-clear-color = config.theme.muted;
|
||||
ring-caps-lock-color = config.theme.gold;
|
||||
ring-ver-color = config.theme.pine;
|
||||
ring-wrong-color = config.theme.love;
|
||||
seperator-color = config.theme.base;
|
||||
key-hl-color = config.theme.iris;
|
||||
bs-hl-color = config.theme.love;
|
||||
caps-lock-key-hl-color = config.theme.iris;
|
||||
caps-lock-bs-hl-color = config.theme.love;
|
||||
text-color = config.theme.text;
|
||||
text-clear-color = config.theme.text;
|
||||
text-caps-lock-color = config.theme.text;
|
||||
text-ver-color = config.theme.text;
|
||||
text-wrong-color = config.theme.text;
|
||||
effect-blur = "30x10";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue