aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/ThemeChanger.sh.ori
diff options
context:
space:
mode:
authorDon Williams <don.e.williams@gmail.com>2026-01-06 22:35:58 -0500
committerDon Williams <don.e.williams@gmail.com>2026-01-06 22:35:58 -0500
commitf5e75aa7d630e170b777a06aea05feb5680ef019 (patch)
treee23f8e88921e3c74282f5922bfe839905df5d561 /config/hypr/scripts/ThemeChanger.sh.ori
parent32e564b0334d9a5e89b347d93972669d3e93f830 (diff)
Improved error and dependency checking
Cancel behavior under set -e: rofi returns non‑zero on Escape/cancel. Added dependency checksf wallust/rofi/notify-send aren’t installed Combine the two sed calls into one. Error handling always send a “changed” notification even if wallust theme fails. Check the exit status and notify on failure. On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: config/hypr/scripts/ThemeChanger.sh new file: config/hypr/scripts/ThemeChanger.sh.ori
Diffstat (limited to 'config/hypr/scripts/ThemeChanger.sh.ori')
-rwxr-xr-xconfig/hypr/scripts/ThemeChanger.sh.ori27
1 files changed, 27 insertions, 0 deletions
diff --git a/config/hypr/scripts/ThemeChanger.sh.ori b/config/hypr/scripts/ThemeChanger.sh.ori
new file mode 100755
index 00000000..15534258
--- /dev/null
+++ b/config/hypr/scripts/ThemeChanger.sh.ori
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+# SPDX-FileCopyrightText: 2025-present Ahum Maitra theahummaitra@gmail.com
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# Repository url : https://github.com/TheAhumMaitra/cautious-waddle
+
+# User choice
+choice=$(wallust theme list \
+ | sed '1d' \
+ | sed 's/^- //' \
+ | rofi -dmenu -p "Select Global Theme")
+
+# If user requested to exit, then exit
+[[ -z "$choice" ]] && exit 0
+
+# Apply the theme
+wallust theme "$choice"
+
+# Inform user about theme changed
+notify-send "Global theme changed" "Global Theme selected $choice"
+
+# Give warning to user for Waybar theme refresh
+notify-send "Press SUPER+ALT+R to Refresh Waybar Theme"
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage