Improve lockhelper for gunter
This commit is contained in:
parent
d5855878d3
commit
eb0c53d8e2
@ -1,12 +1,12 @@
|
|||||||
general {
|
general {
|
||||||
lock_cmd = hyprlock # dbus/sysd lock command (loginctl lock-session)
|
lock_cmd = hyprlock # dbus/sysd lock command (loginctl lock-session)
|
||||||
# unlock_cmd = notify-send "unlock!" # same as above, but unlock
|
# unlock_cmd = notify-send "unlock!" # same as above, but unlock
|
||||||
before_sleep_cmd = hyprlock # command ran before sleep
|
before_sleep_cmd = lockhelper # command ran before sleep
|
||||||
# after_sleep_cmd = # command ran after sleep
|
# after_sleep_cmd = # command ran after sleep
|
||||||
ignore_dbus_inhibit = false # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam)
|
ignore_dbus_inhibit = false # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam)
|
||||||
}
|
}
|
||||||
|
|
||||||
listener {
|
listener {
|
||||||
timeout = 240 # in seconds
|
timeout = 240 # in seconds
|
||||||
on-timeout = hyprlock # command to run when timeout has passed
|
on-timeout = lockhelper # command to run when timeout has passed
|
||||||
}
|
}
|
||||||
|
@ -132,7 +132,7 @@
|
|||||||
"$mainMod,Return,exec,$term"
|
"$mainMod,Return,exec,$term"
|
||||||
|
|
||||||
# hyprlock
|
# hyprlock
|
||||||
"$shiftMainMod,l,exec,hyprlock"
|
"$shiftMainMod,l,exec,lockhelper"
|
||||||
|
|
||||||
# rofi
|
# rofi
|
||||||
"$mainMod,D,exec,rofi-launcher"
|
"$mainMod,D,exec,rofi-launcher"
|
||||||
|
@ -1,7 +1,35 @@
|
|||||||
# BACKGROUND
|
# BACKGROUND
|
||||||
background {
|
background {
|
||||||
monitor =
|
monitor = DP-5
|
||||||
path = ~/wallpapers/current
|
path = /tmp/lockscreen/DP-5.png
|
||||||
|
blur_passes = 3
|
||||||
|
contrast = 0.8916
|
||||||
|
brightness = 0.8172
|
||||||
|
vibrancy = 0.1696
|
||||||
|
vibrancy_darkness = 0.0
|
||||||
|
}
|
||||||
|
|
||||||
|
background {
|
||||||
|
monitor = DP-6
|
||||||
|
path = /tmp/lockscreen/DP-6.png
|
||||||
|
blur_passes = 3
|
||||||
|
contrast = 0.8916
|
||||||
|
brightness = 0.8172
|
||||||
|
vibrancy = 0.1696
|
||||||
|
vibrancy_darkness = 0.0
|
||||||
|
}
|
||||||
|
background {
|
||||||
|
monitor = DP-7
|
||||||
|
path = /tmp/lockscreen/DP-7.png
|
||||||
|
blur_passes = 3
|
||||||
|
contrast = 0.8916
|
||||||
|
brightness = 0.8172
|
||||||
|
vibrancy = 0.1696
|
||||||
|
vibrancy_darkness = 0.0
|
||||||
|
}
|
||||||
|
background {
|
||||||
|
monitor = DP-8
|
||||||
|
path = /tmp/lockscreen/DP-8.png
|
||||||
blur_passes = 3
|
blur_passes = 3
|
||||||
contrast = 0.8916
|
contrast = 0.8916
|
||||||
brightness = 0.8172
|
brightness = 0.8172
|
||||||
|
@ -3,7 +3,8 @@ let
|
|||||||
lockhelper = pkgs.writeShellApplication {
|
lockhelper = pkgs.writeShellApplication {
|
||||||
name = "lockhelper";
|
name = "lockhelper";
|
||||||
runtimeInputs = with pkgs; [
|
runtimeInputs = with pkgs; [
|
||||||
grimblast
|
grim
|
||||||
|
jq
|
||||||
];
|
];
|
||||||
text = (builtins.readFile ./lockhelper.sh);
|
text = (builtins.readFile ./lockhelper.sh);
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
grimblast save output /tmp/lock.png || true
|
mkdir -p /tmp/lockscreen || true
|
||||||
hyprlock
|
|
||||||
|
|
||||||
|
monitors=$(hyprctl monitors -j | jq -r '.[] | select( .name | contains ("DP")) | .name')
|
||||||
|
|
||||||
|
while IFS= read -r m; do
|
||||||
|
grim -o "$m" "/tmp/lockscreen/$m.png" || true
|
||||||
|
done <<< "$monitors"
|
||||||
|
hyprlock
|
||||||
|
@ -39,7 +39,7 @@ if command -v wal &> /dev/null; then
|
|||||||
wal -i "$wallpaper_path"
|
wal -i "$wallpaper_path"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
unlink "$WALLPAPER_DIR/current" || true
|
unlink "$WALLPAPER_DIR/current.png" || true
|
||||||
ln -s "$wallpaper_path" "$WALLPAPER_DIR/current.png"
|
ln -s "$wallpaper_path" "$WALLPAPER_DIR/current.png"
|
||||||
|
|
||||||
for monitor in $(hyprctl monitors | grep 'Monitor' | awk '{ print $2 }'); do
|
for monitor in $(hyprctl monitors | grep 'Monitor' | awk '{ print $2 }'); do
|
||||||
|
Loading…
Reference in New Issue
Block a user