From 9e0f37accddf2cb898f06968fe21676df484ff48 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Sat, 27 May 2023 01:18:11 +0200 Subject: [PATCH] add hostname to background image --- nixos/components/gui/home-manager/i3.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/nixos/components/gui/home-manager/i3.nix b/nixos/components/gui/home-manager/i3.nix index 4173fb3..ee22744 100644 --- a/nixos/components/gui/home-manager/i3.nix +++ b/nixos/components/gui/home-manager/i3.nix @@ -31,9 +31,13 @@ let ${pkgs.coreutils-full}/bin/head -n 1 | \ ${pkgs.gawk}/bin/awk -F 'x' '{print "--width="$1" --height="$2}' | \ ${pkgs.findutils}/bin/xargs \ - ${pkgs.polygon-art.polygon-art}/bin/rings \ - /dev/shm/background.png && \ - ${pkgs.feh}/bin/feh --bg-scale /dev/shm/background.png + ${pkgs.polygon-art.polygon-art}/bin/rings \ + /dev/shm/background.png && \ + ${pkgs.imagemagick}/bin/convert /dev/shm/background.png \ + -font ${pkgs.ubuntu_font_family}/share/fonts/ubuntu/UbuntuMono-B.ttf \ + -gravity Center -pointsize 30 -annotate 0 '${config.networking.hostName}' \ + /dev/shm/background_with_text.png && \ + ${pkgs.feh}/bin/feh --bg-scale /dev/shm/background_with_text.png ''; in