aboutsummaryrefslogtreecommitdiff
path: root/nixos
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2026-01-06 22:31:45 +0100
committerMartin Fischer <martin@push-f.com>2026-01-06 22:31:45 +0100
commitd788e8e4eea02ba6a7ebdec54aa9120b82d05410 (patch)
treec2c68d918dfa8f437595242e5b678ef8edfdcef6 /nixos
parent8faef8c3c14bd99a3335dd78d253bebe83b48027 (diff)
chore: remove no longer used set-wallpaper script
Diffstat (limited to 'nixos')
-rw-r--r--nixos/profiles/workstation/graphical.nix3
-rw-r--r--nixos/profiles/workstation/scripts/set-wallpaper20
2 files changed, 0 insertions, 23 deletions
diff --git a/nixos/profiles/workstation/graphical.nix b/nixos/profiles/workstation/graphical.nix
index 1cbb9de..3100e8a 100644
--- a/nixos/profiles/workstation/graphical.nix
+++ b/nixos/profiles/workstation/graphical.nix
@@ -52,15 +52,12 @@
wl-clipboard # for wl-copy and wl-paste
grim
libnotify # for notify-send
- imagemagick # dependency of set-wallpaper
# When I ssh into a server my terminal changes to a host-specific background color via
# a LocalCommand configured in ~/.ssh/config and a ZSH function to reset the color on exit.
(writeShellScriptBin "set-bg" (builtins.readFile ./scripts/set-bg))
(writeShellScriptBin "reset-bg" (builtins.readFile ./scripts/reset-bg))
- (writeShellScriptBin "set-wallpaper" (builtins.readFile ./scripts/set-wallpaper))
-
# graphical tools
foot
imv
diff --git a/nixos/profiles/workstation/scripts/set-wallpaper b/nixos/profiles/workstation/scripts/set-wallpaper
deleted file mode 100644
index 2bfdf0d..0000000
--- a/nixos/profiles/workstation/scripts/set-wallpaper
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env bash
-# Sets the text read from stdin as the Sway wallpaper.
-
-TEXT=$(< /dev/stdin)
-TEMPDIR=$(mktemp -d)
-FONT_SIZE=18
-
-swaymsg -t get_outputs | jq -r '.[] | "\(.name) \(.rect.width) \(.rect.height)"'\
-| while read -r name width height; do
- file="$TEMPDIR/${name}".png
- offset=$(($height / 20))
- width=$(($width - $offset))
- height=$(($height - $offset))
- magick -size ${width}x$height xc:black -font "DejaVu-Sans-Mono" -pointsize $FONT_SIZE -fill white \
- -annotate +0+15 "$TEXT" $file
- sway output "$name" bg $file center
-done
-
-sleep 0.1 # sway reads the wallpaper in a different process, so wait a bit
-rm -r "$TEMPDIR"