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
|
./rofi.nix
|
||||||
./sway.nix
|
./sway.nix
|
||||||
./swayidle.nix
|
./swayidle.nix
|
||||||
|
./swaylock.nix
|
||||||
./udiskie.nix
|
./udiskie.nix
|
||||||
./waybar.nix
|
./waybar.nix
|
||||||
];
|
];
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
pavucontrol
|
pavucontrol
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
cliphist
|
cliphist
|
||||||
swaylock-effects
|
|
||||||
grim
|
grim
|
||||||
slurp
|
slurp
|
||||||
swappy
|
swappy
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
{pkgs, ...}: {
|
{pkgs, ...}: {
|
||||||
|
imports = [
|
||||||
|
./swaylock.nix
|
||||||
|
];
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
swayidle = let
|
swayidle = {
|
||||||
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 {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
timeouts = [
|
timeouts = [
|
||||||
{
|
{
|
||||||
|
@ -18,11 +20,11 @@
|
||||||
events = [
|
events = [
|
||||||
{
|
{
|
||||||
event = "lock";
|
event = "lock";
|
||||||
command = lockCommand;
|
command = "swaylock";
|
||||||
} # loginctl lock-session
|
} # loginctl lock-session
|
||||||
{
|
{
|
||||||
event = "before-sleep";
|
event = "before-sleep";
|
||||||
command = lockCommand;
|
command = "swaylock";
|
||||||
} # systemctl syspend
|
} # 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