Skip to content

Commit

Permalink
feat: switch to swaylock
Browse files Browse the repository at this point in the history
  • Loading branch information
sioodmy committed Aug 30, 2024
1 parent 7a5fa0c commit 00fcf0d
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 24 deletions.
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion system/wayland/desktop/wrapped.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ in [
wrappers = {
foot = import ./wrapped/foot {inherit inputs pkgs colors;};

waylock = import ./wrapped/waylock {inherit pkgs colors;};
swaylock = import ./wrapped/swaylock {inherit pkgs colors;};
mako = import ./wrapped/mako {inherit pkgs colors;};
};
}
Expand Down
2 changes: 1 addition & 1 deletion system/wayland/desktop/wrapped/river/binds.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"Super+Shift Return spawn ${pkgs.foot}/bin/footclient"
"None XF86Favorites spawn infoscript"
"None XF86Keyboard spawn tofi-emoji"
"None XF86Display spawn waylock"
"None XF86Display spawn swaylock"
"Super Space spawn 'tofi-drun | xargs -0 riverctl spawn'"
"Super+Shift S spawn '${getExe pkgs.slurp} | ${getExe pkgs.grim} -g - - | ${pkgs.wl-clipboard}/bin/wl-copy'"

Expand Down
7 changes: 3 additions & 4 deletions system/wayland/desktop/wrapped/river/init.nix
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,10 @@ in
kanshi &
${getExe pkgs.swayidle} \
timeout 130 ${idle "brightnessctl s 5%"} \
timeout 135 ${idle "waylock"} \
timeout 135 ${idle "swaylock --grace 5"} \
timeout 600 ${idle "systemctl suspend"} \
before-sleep ${idle "waylock"} \
lock "waylock" &
before-sleep ${idle "swaylock"} \
lock "swaylock" &
# your eyes and your sleep schedule will thank you
${getExe pkgs.wlsunset} -l 50.2597 -L 19.0211 &
Expand Down
51 changes: 51 additions & 0 deletions system/wayland/desktop/wrapped/swaylock/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
pkgs,
colors,
...
}: let
inside = colors.base01;
outside = colors.base01;
ring = colors.base05;
text = colors.base05;
positive = colors.base0B;
negative = colors.base08;

settings = {
color = outside;
scaling = "fill";
inside-color = inside;
inside-clear-color = inside;
inside-caps-lock-color = inside;
inside-ver-color = inside;
inside-wrong-color = inside;
key-hl-color = positive;
layout-bg-color = inside;
layout-border-color = ring;
layout-text-color = text;
ring-color = ring;
ring-clear-color = negative;
ring-caps-lock-color = ring;
ring-ver-color = positive;
ring-wrong-color = negative;
separator-color = "00000000";
text-color = text;
text-clear-color = text;
text-caps-lock-color = text;
text-ver-color = text;
text-wrong-color = text;
effect-blur = "3x3";
font-size = 24;
indicator-radius = 120;
indicator-thickness = 15;
};

extraFlags = [
"-n"
"-S"
"--clock"
"--indicator"
];
in {
basePackage = pkgs.swaylock-effects;
flags = builtins.concatLists (builtins.map (key: ["--${key}" (builtins.toString settings.${key})]) (builtins.attrNames settings)) ++ extraFlags;
}
15 changes: 0 additions & 15 deletions system/wayland/desktop/wrapped/waylock/default.nix

This file was deleted.

0 comments on commit 00fcf0d

Please sign in to comment.