Swap swaylock for hyprlock

Add hyprlock config file based on https://github.com/NikSneMC/hyprlock
This commit is contained in:
Evie Litherland-Smith 2024-03-04 13:35:26 +00:00
parent 495f748274
commit 415fbdd795
2 changed files with 80 additions and 10 deletions

View file

@ -11,7 +11,6 @@
../default.nix
../email/default.nix
../password-store/default.nix
../swaylock/default.nix
../waybar/default.nix
../rofi/default.nix
../swaync/default.nix
@ -67,10 +66,6 @@
name = "Catppuccin-${catppuccinVariant}-${size}-${accent}-Dark";
};
};
xdg.configFile."hypr/hyprpaper.conf".text = ''
preload = ${config.stylix.image}
wallpaper = ,${config.stylix.image}
'';
systemd.user.services.hyprpaper = {
Unit = {
Description = "Hyprland wallpaper utility";
@ -259,7 +254,7 @@
btm_args = "--autohide_time --battery --celsius --enable_cache_memory --enable_gpu_memory --group --hide_avg_cpu --hide_table_gap --retention=3m --show_table_scroll_position";
in [
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
"SUPER, F1, exec, ${swaylock.package}/bin/swaylock --screenshots --clock --indicator --grace-no-mouse"
"SUPER, F1, exec, ${pkgs.hyprlock}/bin/hyprlock"
"SUPER, Q, killactive,"
"SUPER SHIFT, Q, exec, pkill rofi || ${rofi.finalPackage}/bin/rofi -show powermenu -modi powermenu:${pkgs.rofi-power-menu}/bin/rofi-power-menu"
"SUPER, V, togglefloating"
@ -355,4 +350,82 @@
exec-once = ${pkgs.git}/bin/git -C ${config.xdg.configHome}/emacs pull --ff-only
'';
};
xdg.configFile = {
"hypr/hyprpaper.conf".text = ''
preload = ${config.stylix.image}
wallpaper = ,${config.stylix.image}
'';
"hypr/hyprlock.conf".text = with config.lib.stylix.colors; let
font = config.stylix.fonts.sansSerif.name;
accent = config.lib.stylix.colors.${accentColour};
in ''
# GENERAL
general {
disable_loading_bar = true
}
# BACKGROUND
background {
monitor =
path = screenshot
blur_passes = 3
color = 0xff${base00}
}
# TIME
label {
monitor =
text = cmd[update:30000] echo "$(date +"%R")"
color = 0xff${base05}
font_size = 90
font_family = ${font}
position = -30, 0
halign = right
valign = top
}
# DATE
label {
monitor =
text = cmd[update:43200000] echo "$(date +"%A,%e %B %Y")"
color = 0xff${base05}
font_size = 25
font_family = ${font}
position = -30, -150
halign = right
valign = top
}
# USER
label {
monitor =
text = Logging in as <span foreground="##${accent}">$USER</span>
color = 0xff${base05}
font_size = 25
font_family = ${font}
position = 0, 50
halign = center
valign = center
}
# INPUT FIELD
input-field {
monitor =
size = 300, 60
outline_thickness = 2
dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.2 # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true
outer_color = 0xff${accent}
inner_color = 0xff${base00}
font_color = 0xff${base05}
fade_on_empty = false
placeholder_text = <i><span foreground="##${base04}">Input Password...</span></i>
hide_input = false
position = 0, -50
halign = center
valign = center
}
'';
};
}

View file

@ -28,10 +28,7 @@
streamlink
];
};
security.pam.services = {
swaylock = {};
hyprlock = {};
};
security.pam.services.hyprlock = {};
services = {
xserver.enable = false;
blueman.enable = true;