summaryrefslogtreecommitdiff
path: root/modules/home/i3wm/nord-blue/scripts.nix
diff options
context:
space:
mode:
authorNatasha Moongrave <natasha@256phi.eu>2026-02-03 18:51:30 +0100
committerNatasha Moongrave <natasha@256phi.eu>2026-02-03 18:51:30 +0100
commit3a88f3e7fdd9aa41e44f4407d21679b9116155d5 (patch)
tree7497d7afe87e2a6d637a40ff754c64419b1762a7 /modules/home/i3wm/nord-blue/scripts.nix
parent19f5b3cdca2630e343e525f26dfe36a31460e6d0 (diff)
added default keybinds for i3 and i3 stuff
Diffstat (limited to 'modules/home/i3wm/nord-blue/scripts.nix')
-rw-r--r--modules/home/i3wm/nord-blue/scripts.nix24
1 files changed, 24 insertions, 0 deletions
diff --git a/modules/home/i3wm/nord-blue/scripts.nix b/modules/home/i3wm/nord-blue/scripts.nix
new file mode 100644
index 0000000..7dbfd19
--- /dev/null
+++ b/modules/home/i3wm/nord-blue/scripts.nix
@@ -0,0 +1,24 @@
+{ pkgs, ... }:
+
+{
+ (pkgs.writeShellScriptBin "lock-screen" ''
+ #!/usr/bin/env sh
+ set -eu
+
+ WALL="${1:-$HOME/Pictures/wallpaper.jpg}"
+ TMP="/tmp/lockscreen.png"
+
+ # Get current resolution (single-monitor friendly)
+ RES=$(xrandr | awk '/\*/ {print $1; exit}')
+
+ # Scale like feh --bg-fill
+ convert "$WALL" \
+ -resize "${RES}^" \
+ -gravity center \
+ -extent "$RES" \
+ "$TMP"
+
+ i3lock -i "$TMP"
+
+ '')
+} \ No newline at end of file