From 91b2031b7f863450768eb43ae9bc690f8168e7c7 Mon Sep 17 00:00:00 2001 From: Natasha Moongrave Date: Fri, 6 Feb 2026 12:51:16 +0100 Subject: fixed the lock screen wrapper script to be in line with the other wrappers/scripts --- modules/home/i3wm/nord-blue/i3lock.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 modules/home/i3wm/nord-blue/i3lock.nix (limited to 'modules/home/i3wm/nord-blue/i3lock.nix') diff --git a/modules/home/i3wm/nord-blue/i3lock.nix b/modules/home/i3wm/nord-blue/i3lock.nix new file mode 100644 index 0000000..9fc9738 --- /dev/null +++ b/modules/home/i3wm/nord-blue/i3lock.nix @@ -0,0 +1,23 @@ +{ pkgs }: + +{ + pkgs.writeShellScriptBin "lock-screen" '' + #!/usr/bin/env sh + set -eu + + WALL="''${1:-$HOME/Pictures/wallpaper.png}" + TMP="/tmp/lockscreen.png" + + # Get current resolution (single-monitor friendly) + RES=$(xrandr | awk '/\*/ {print $1; exit}') + + # Scale like feh --bg-fill + magick "$WALL" \ + -resize "''${RES}^" \ + -gravity center \ + -extent "$RES" \ + "$TMP" + + i3lock -i "$TMP" + ''; +} -- cgit v1.2.3