home,swaylock: wrapper -> home-manager options
This commit is contained in:
parent
d683d4bb53
commit
eae9f55a99
5 changed files with 46 additions and 9 deletions
|
@ -4,6 +4,7 @@
|
|||
./rofi.nix
|
||||
./sway.nix
|
||||
./swayidle.nix
|
||||
./swaylock.nix
|
||||
./udiskie.nix
|
||||
./waybar.nix
|
||||
];
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
pavucontrol
|
||||
wl-clipboard
|
||||
cliphist
|
||||
swaylock-effects
|
||||
grim
|
||||
slurp
|
||||
swappy
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
{pkgs, ...}: {
|
||||
imports = [
|
||||
./swaylock.nix
|
||||
];
|
||||
|
||||
services = {
|
||||
swayidle = let
|
||||
lockCommand = "${pkgs.swaylock-effects}/bin/swaylock --screenshots --clock --indicator --line-color cdd6f4ff --text-color cdd6f4ff --inside-color 1e1e2eff --ring-color 313244ff --line-ver-color cdd6f4ff --text-ver-color cdd6f4ff --inside-ver-color 1e1e2eff --ring-ver-color 313244ff --line-clear-color cdd6f4ff --text-clear-color cdd6f4ff --inside-clear-color 1e1e2eff --ring-clear-color 313244ff --line-clear-color cdd6f4ff --text-wrong-color 313244ff --inside-wrong-color f38ba8ff --ring-wrong-color 313244ff --key-hl-color cba6f7ff --effect-blur 7x5 --effect-vignette 0.5:0.5 --fade-in 0.2";
|
||||
in {
|
||||
swayidle = {
|
||||
enable = true;
|
||||
timeouts = [
|
||||
{
|
||||
|
@ -18,11 +20,11 @@
|
|||
events = [
|
||||
{
|
||||
event = "lock";
|
||||
command = lockCommand;
|
||||
command = "swaylock";
|
||||
} # loginctl lock-session
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = lockCommand;
|
||||
command = "swaylock";
|
||||
} # systemctl syspend
|
||||
];
|
||||
};
|
||||
|
|
38
users/guanranwang/home-manager/nixos/wm/swaylock.nix
Normal file
38
users/guanranwang/home-manager/nixos/wm/swaylock.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{pkgs, ...}: {
|
||||
programs.swaylock = {
|
||||
enable = true;
|
||||
package = pkgs.swaylock-effects;
|
||||
settings = {
|
||||
screenshots = true;
|
||||
clock = true;
|
||||
indicator = true;
|
||||
|
||||
# i forgot which colorscheme is this
|
||||
# TODO: switch to tokyonight
|
||||
line-color = "cdd6f4ff";
|
||||
text-color = "cdd6f4ff";
|
||||
inside-color = "1e1e2eff";
|
||||
ring-color = "313244ff";
|
||||
|
||||
line-ver-color = "cdd6f4ff";
|
||||
text-ver-color = "cdd6f4ff";
|
||||
inside-ver-color = "1e1e2eff";
|
||||
ring-ver-color = "313244ff";
|
||||
|
||||
line-clear-color = "cdd6f4ff";
|
||||
text-clear-color = "cdd6f4ff";
|
||||
inside-clear-color = "1e1e2eff";
|
||||
ring-clear-color = "313244ff";
|
||||
|
||||
line-wrong-color = "cdd6f4ff";
|
||||
text-wrong-color = "313244ff";
|
||||
inside-wrong-color = "f38ba8ff";
|
||||
ring-wrong-color = "313244ff";
|
||||
|
||||
key-hl-color = "cba6f7ff";
|
||||
effect-blur = "7x5";
|
||||
effect-vignette = "0.5:0.5";
|
||||
fade-in = 0.2;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
pidof swaylock || swaylock --screenshots --clock --indicator --line-color cdd6f4ff --text-color cdd6f4ff --inside-color 1e1e2eff --ring-color 313244ff --line-ver-color cdd6f4ff --text-ver-color cdd6f4ff --inside-ver-color 1e1e2eff --ring-ver-color 313244ff --line-clear-color cdd6f4ff --text-clear-color cdd6f4ff --inside-clear-color 1e1e2eff --ring-clear-color 313244ff --line-clear-color cdd6f4ff --text-wrong-color 313244ff --inside-wrong-color f38ba8ff --ring-wrong-color 313244ff --key-hl-color cba6f7ff --effect-blur 7x5 --effect-vignette 0.5:0.5 --fade-in 0.2
|
Loading…
Reference in a new issue