From eda5bf9f740b89116ad7a31cdafe5178200e1a9c Mon Sep 17 00:00:00 2001 From: spinach Date: Tue, 13 Jan 2026 18:14:42 -0500 Subject: [PATCH] porting launchers and themes to more general solution, moving away from --- scripts/calc/transparent-text.rasi | 4 ++-- scripts/wallpaper-picker.sh | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100755 scripts/wallpaper-picker.sh diff --git a/scripts/calc/transparent-text.rasi b/scripts/calc/transparent-text.rasi index 700fb03..133fc03 100644 --- a/scripts/calc/transparent-text.rasi +++ b/scripts/calc/transparent-text.rasi @@ -15,8 +15,8 @@ configuration { } /*****----- Global Properties -----*****/ -@import "../../shared/colors.rasi" -@import "../../shared/fonts.rasi" +@import "../../palette/onedark.rasi" +@import "../../base/base.rasi" /*****----- Main Window -----*****/ window { diff --git a/scripts/wallpaper-picker.sh b/scripts/wallpaper-picker.sh new file mode 100755 index 0000000..57364b3 --- /dev/null +++ b/scripts/wallpaper-picker.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +set -euo pipefail + +WALL_DIR="${1:-$HOME/.local/share/wallpapers}" + +# Build list: display text = filename; icon = thumbnail of file; payload = full path +# Use NUL + unit-separator fields per rofi's extended dmenu protocol. +while IFS= read -r -d '' f; do + base="$(basename "$f")" + printf '%s\0icon\x1fthumbnail://%s\0info\x1f%s\n' "$base" "$f" "$f" +done < <(find "$WALL_DIR" -type f \( -iname '*.png' -o -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.webp' \) -print0 | sort -z) + +# Run rofi dmenu, capturing the selected line (which includes the base text)