From 7d66683a2fbefb0dff48bce86e9d332aced6ac95 Mon Sep 17 00:00:00 2001 From: Natasha Moongrave Date: Fri, 6 Feb 2026 12:57:03 +0100 Subject: fixed i3lock.nix --- modules/home/i3wm/nord-blue/i3lock.nix | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) (limited to 'modules/home/i3wm/nord-blue') diff --git a/modules/home/i3wm/nord-blue/i3lock.nix b/modules/home/i3wm/nord-blue/i3lock.nix index 92ef450..3338616 100644 --- a/modules/home/i3wm/nord-blue/i3lock.nix +++ b/modules/home/i3wm/nord-blue/i3lock.nix @@ -1,24 +1,19 @@ { pkgs }: # Wrapper/script for i3-lock to use '~/Pictures/wallpaper.png' as the lock screen -{ - pkgs.writeShellScriptBin "lock-screen" '' - #!/usr/bin/env sh - set -eu - WALL="''${1:-$HOME/Pictures/wallpaper.png}" - TMP="/tmp/lockscreen.png" +pkgs.writeShellScriptBin "lock-screen" '' + #!/usr/bin/env sh + set -eu - # Get current resolution (single-monitor friendly) - RES=$(xrandr | awk '/\*/ {print $1; exit}') + WALL="\$\{1:-$HOME/Pictures/wallpaper.png}" + TMP="/tmp/lockscreen.png" - # Scale like feh --bg-fill - magick "$WALL" \ - -resize "''${RES}^" \ - -gravity center \ - -extent "$RES" \ - "$TMP" + # Get current resolution (single-monitor friendly) + RES=$(xrandr | awk '/\*/ {print $1; exit}') - i3lock -i "$TMP" - ''; -} + # Scale like feh --bg-fill + magick "$WALL" -resize "\$\{RES}^" -gravity center -extent "$RES" "$TMP" + + i3lock -i "$TMP" +'' -- cgit v1.2.3