aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhum Maitra <theahummaitra@gmail.com>2026-01-04 03:53:41 +0530
committerGitHub <noreply@github.com>2026-01-03 17:23:41 -0500
commite504f6c1c50bd2037bea9b3b48e2e0b06b304c34 (patch)
treecf74780f8dae78161af1a25abc1d04e43ec6f3fd
parented13a23db110ecea04e00cdfb985789461f7a9a1 (diff)
feat: Add Wallust based global Theme Switcher (#905)
* fix: Add Theme Switcher script * feat: Add theme switcher shortcut * enhancement: simplify the program, fix spelling mistakes, add safety mechanism
-rw-r--r--config/hypr/configs/Keybinds.conf7
-rw-r--r--config/hypr/scripts/ThemeChanger.sh27
2 files changed, 31 insertions, 3 deletions
diff --git a/config/hypr/configs/Keybinds.conf b/config/hypr/configs/Keybinds.conf
index 91eb66e2..dea22719 100644
--- a/config/hypr/configs/Keybinds.conf
+++ b/config/hypr/configs/Keybinds.conf
@@ -23,6 +23,7 @@ bindd = $mainMod, Return, Open terminal, exec, $term
bindd = $mainMod, E, file manager, exec, $files
# FEATURES / EXTRAS
+bindd = $mainMod, T, Global theme switcher using Wallust, exec, $scriptsDir/ThemeChanger.sh #Global theme switcher
bindd = $mainMod, H, help / cheat sheet, exec, $scriptsDir/KeyHints.sh
bindd = $mainMod ALT, R, refresh bar and menus, exec, $scriptsDir/Refresh.sh
bindd = $mainMod ALT, E, emoji menu, exec, $scriptsDir/RofiEmoji.sh
@@ -43,7 +44,7 @@ bindd = $mainMod SHIFT, Return, DropDown terminal, exec, $scriptsDir/Droptermina
# Desktop zooming or magnifier
bindd = $mainMod ALT, mouse_down, zoom in, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor * 2.0}')"
-bindd = $mainMod ALT, mouse_up, zoom out, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor / 2.0}')"
+bindd = $mainMod ALT, mouse_up, zoom out, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor / 2.0}')"
# Waybar / Bar related
bindd = $mainMod CTRL ALT, B, toggle waybar on/off, exec, pkill -SIGUSR1 waybar
@@ -164,7 +165,7 @@ bindd = $mainMod CTRL, K, Move left into group, moveintogroup, l # Move active w
bindd = $mainMod CTRL, L, Move Right into group, moveintogroup, r # Move active window right into a group
bindd = $mainMod CTRL, H, Move active out of group, moveoutofgroup # Move active window out of group
-# Try to dynamically move in grouped window and when ungrouped
+# Try to dynamically move in grouped window and when ungrouped
# Not working for me DW 11/26/25 PR: https://github.com/JaKooLit/Hyprland-Dots/pull/872
#bindd = $mainMod, right, focus right, exec, bash -c 'if hyprctl activewindow -j | jq -e "((.grouped | type) == \"boolean\") or (.address == (.grouped[-1] // empty))" >/dev/null 2>&1; then hyprctl dispatch movefocus r; else hyprctl dispatch changegroupactive f; fi'
#bindd = $mainMod, left, focus left, exec, bash -c 'if hyprctl activewindow -j | jq -e "((.grouped | type) == \"boolean\") or (.address == (.grouped[0] // empty))" >/dev/null 2>&1; then hyprctl dispatch movefocus l; else hyprctl dispatch changegroupactive b; fi'
@@ -185,7 +186,7 @@ bindd = $mainMod, U, toggle special workspace, togglespecialworkspace,
# The following mappings use the key codes to better support various keyboard layouts
# 1 is code:10, 2 is code 11, etc
-# Switch workspaces with mainMod + [0-9]
+# Switch workspaces with mainMod + [0-9]
bindd = $mainMod, code:10, workspace 1, workspace, 1 # NOTE: code:10 = key 1
bindd = $mainMod, code:11, workspace 2, workspace, 2 # NOTE: code:11 = key 2
bindd = $mainMod, code:12, workspace 3, workspace, 3 # NOTE: code:12 = key 3
diff --git a/config/hypr/scripts/ThemeChanger.sh b/config/hypr/scripts/ThemeChanger.sh
new file mode 100644
index 00000000..15534258
--- /dev/null
+++ b/config/hypr/scripts/ThemeChanger.sh
@@ -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