[hyprland] switched from swaylock to hyprlock

This commit is contained in:
Simon Cornet 2024-03-29 22:45:12 +01:00
parent 36c974d08e
commit 6fc8077a97
5 changed files with 95 additions and 56 deletions

View File

@ -1,54 +0,0 @@
#!/usr/bin/env zsh
# get active monitors
active_monitors=($(hyprctl monitors | grep -i monitor | awk '{print $2}'))
home_dir=$(xdg-user-dir)
# create blurred images per active screen
for monitor in ${active_monitors}
do
# variables
image=/tmp/swaylock_$monitor.png
image_blur=/tmp/swaylock_blur_$monitor.png
lockargs=($lockargs --image $monitor:$image_blur)
# create image
grim -o $monitor $image
# create blurred image
convert $image -blur 0x5 $image_blur
done
# lock the screen using the newly created image
swaylock \
--scaling center \
--hide-keyboard-layout \
--indicator-radius 100 \
--indicator-thickness 5 \
--ring-color 285577ff \
--ring-ver-color 89b4fa \
--ring-wrong-color f38ba8 \
--ring-clear-color a6e3a1 \
--key-hl-color 1e1e2e \
--bs-hl-color eba0ac \
--text-color 11111b \
--text-caps-lock-color 11111b \
--line-color 00000000 \
--line-ver-color 00000000 \
--line-wrong-color 00000000 \
--line-clear-color 00000000 \
--separator-color 00000000 \
--inside-color 285577ff \
--inside-ver-color 89b4fa\
--inside-wrong-color f38ba8 \
--inside-clear-color a6e3a1 \
--color 1e1e2e80 \
$lockargs
# cleanup
rm -f /tmp/swaylock*.png

View File

@ -8,5 +8,6 @@
./hyprland-graphics.nix
./hyprland-input.nix
./hyprland-window_rules.nix
./hyprlock.nix
];
}

View File

@ -19,6 +19,7 @@
bind = $mainMod, F, fullscreen
bind = $mainMod, J, togglesplit
bind = $mainMod, K, exec, alacritty --class scratchbox
bind = $mainMod, L, exec, hyprlock
bind = $mainMod, M, exit,
bind = $mainMod, N, exec, alacritty --class nmtui --command ~/.dotfiles/apps/hyprland/nmtui.sh
bind = $mainMod, P, pseudo
@ -29,7 +30,6 @@
bind = $mainMod, V, togglefloating
# manage lockscreen
bind = $mainMod, L, exec, ~/.dotfiles/apps/swaylock/lock.sh
bindl = ,switch:on:Lid Switch, exec, ~/.dotfiles/apps/swaylock/lock.sh
# focus bindings

View File

@ -0,0 +1,92 @@
{ config, ... }:
{
# include hyprland configs
home.file.".config/hypr/hyprlock.conf".text = ''
# general
general {
no_fade_in = false
no_fade_out = false
}
# background
background {
monitor =
path = $HOME/Pictures/wallpaper.png
}
# password input
input-field {
monitor =
dots_center = true
dots_size = 0.2
dots_spacing = 0.64
fade_on_empty = true
hide_input = false
placeholder_text = <i> 1 2 3 4 5 ... </i>
position = 0, 150
size = 250, 50
outline_thickness = 3
font_color = rgb(250, 179, 135)
inner_color = rgb(12, 12, 12)
outer_color = rgb(71, 80, 201)
halign = center
valign = bottom
}
# time
label {
monitor =
text = cmd[update:1000] echo "<b><big> $(date +"%H:%M:%S") </big></b>"
position = 0, 20
color = rgb(250, 179, 135)
font_size = 64
font_family = JetBrains Mono Nerd Font 10
halign = center
valign = center
}
# user
label {
monitor =
text = cmd[update:1000] echo "$(date +%A) $(date +%d) $(date +%B)"
position = 0, 0
color = rgb(250, 179, 135)
font_size = 20
font_family = JetBrains Mono Nerd Font 10
halign = center
valign = center
}
# unlock
label {
monitor =
text = 👤 siempie
position = 0, 120
color = rgb(137, 180, 250)
font_size = 14
font_family = JetBrains Mono Nerd Font 10
halign = center
valign = bottom
}
'';
}

View File

@ -25,6 +25,7 @@
brightnessctl
grim
unstable.grimblast
unstable.hyprlock
imagemagick
jq
lxappearance-gtk2
@ -32,7 +33,6 @@
slurp
socat
swaybg
swaylock
waybar
wofi
xfce.xfce4-settings