Improve lockhelper for gunter
This commit is contained in:
@@ -3,7 +3,8 @@ let
|
||||
lockhelper = pkgs.writeShellApplication {
|
||||
name = "lockhelper";
|
||||
runtimeInputs = with pkgs; [
|
||||
grimblast
|
||||
grim
|
||||
jq
|
||||
];
|
||||
text = (builtins.readFile ./lockhelper.sh);
|
||||
};
|
||||
|
@@ -1,6 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
|
||||
grimblast save output /tmp/lock.png || true
|
||||
hyprlock
|
||||
mkdir -p /tmp/lockscreen || true
|
||||
|
||||
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"
|
||||
fi
|
||||
|
||||
unlink "$WALLPAPER_DIR/current" || true
|
||||
unlink "$WALLPAPER_DIR/current.png" || true
|
||||
ln -s "$wallpaper_path" "$WALLPAPER_DIR/current.png"
|
||||
|
||||
for monitor in $(hyprctl monitors | grep 'Monitor' | awk '{ print $2 }'); do
|
||||
|
Reference in New Issue
Block a user