updated wallpaper switcher to now also automatically switch DMS config, so it works with the DMS pre-made themes.

This commit is contained in:
2026-06-01 13:25:24 +02:00
parent 3629c8633c
commit 377d065240
35 changed files with 1312 additions and 123 deletions
+7
View File
@@ -0,0 +1,7 @@
Theme_Category:dynamic
Theme_Name:dynamic
Generic_Color:dynamic
Matugen:vibrant
Mode:dark
Preset:-
@@ -0,0 +1,7 @@
Theme_Category:registry
Theme_Name:custom
Generic_Color:dynamic
Matugen:vibrant
Mode:light
Preset:catppuccin
@@ -0,0 +1,6 @@
Theme_Category:registry
Generic_Color:custom
Matugen:tonal-spot
Mode:dark
Preset:catppuccin
+6
View File
@@ -0,0 +1,6 @@
Theme_Category:generic
Generic_Color:coral
Matugen:vibrant
Mode:light
Preset:-
+7
View File
@@ -0,0 +1,7 @@
Theme_Category:dynamic
Theme_Name:dynamic
Generic_Color:dynamic
Matugen:vibrant
Mode:dark
Preset:-
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

+7
View File
@@ -0,0 +1,7 @@
Theme_Category:dynamic
Theme_Name:dynamic
Generic_Color:dynamic
Matugen:fruit-salad
Mode:light
Preset:-
@@ -0,0 +1,7 @@
Theme_Category:registry
Theme_Name:custom
Generic_Color:custom
Matugen:vibrant
Mode:dark
Preset:everforest
+6
View File
@@ -0,0 +1,6 @@
Theme_Category: # color = generic, auto = dynamic, preset = registry
Generic_Color: # blue, purple, green, orange, red, cyan, pink, amber, coral, white. put dynamic for dynamic and custom for presets.
Matugen: # tonal-spot, vibrant, content, expressive, fidelity, fruit-salad, monochrome, neutral, rainbow
Mode: # light or dark
Preset: # run ls ~/.config/DankMaterialShell/themes, use the folder names directly.
+7
View File
@@ -0,0 +1,7 @@
Theme_Category:registry
Theme_Name:custom
Generic_Color:custom
Matugen:vibrant
Mode:dark
Preset:flexoki
+7
View File
@@ -0,0 +1,7 @@
Theme_Category:dynamic
Theme_Name:dynamic
Generic_Color:dynamic
Matugen:vibrant
Mode:dark
Preset:-
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

@@ -0,0 +1,7 @@
Theme_Category:registry
Theme_Name:custom
Generic_Color:custom
Matugen:vibrant
Mode:dark
Preset:kanagawaWl
@@ -0,0 +1,7 @@
Theme_Category:registry
Theme_Name:custom
Generic_Color:custom
Matugen:vibrant
Mode:light
Preset:kanagawaWl
+7
View File
@@ -0,0 +1,7 @@
Theme_Category:registry
Theme_Name:custom
Generic_Color:custom
Matugen:vibrant
Mode:dark
Preset:gruvboxMaterial
@@ -0,0 +1,7 @@
Theme_Category:dynamic
Theme_Name:dynamic
Generic_Color:dynamic
Matugen:vibrant
Mode:dark
Preset:-
+7
View File
@@ -0,0 +1,7 @@
Theme_Category:dynamic
Theme_Name:dynamic
Generic_Color:dynamic
Matugen:vibrant
Mode:dark
Preset:-
@@ -0,0 +1,7 @@
Theme_Category:dynamic
Theme_Name:dynamic
Generic_Color:dynamic
Matugen:vibrant
Mode:dark
Preset:-
+7
View File
@@ -0,0 +1,7 @@
Theme_Category:dynamic
Theme_Name:dynamic
Generic_Color:dynamic
Matugen:vibrant
Mode:dark
Preset:-
+7
View File
@@ -0,0 +1,7 @@
Theme_Category:dynamic
Theme_Name:dynamic
Generic_Color:dynamic
Matugen:tonal-spot
Mode:dark
Preset:-
+7
View File
@@ -0,0 +1,7 @@
Theme_Category:registry
Theme_Name:custom
Generic_Color:custom
Matugen:vibrant
Mode:dark
Preset:nord
+7
View File
@@ -0,0 +1,7 @@
Theme_Category:registry
Theme_Name:custom
Generic_Color:custom
Matugen:vibrant
Mode:dark
Preset:retrobox
+7
View File
@@ -0,0 +1,7 @@
Theme_Category:dynamic
Theme_Name:dynamic
Generic_Color:dynamic
Matugen:vibrant
Mode:dark
Preset:-
@@ -0,0 +1,7 @@
Theme_Category:registry
Theme_Name:custom
Generic_Color:custom
Matugen:vibrant
Mode:light
Preset:rosePine
+39 -1
View File
@@ -14,7 +14,45 @@ if [[ $SELECTED == "" ]]; then
fi
echo "user selected $SELECTED"
dms ipc call wallpaper set "$WP_DIR/$SELECTED/$(ls -1 "$WP_DIR/$SELECTED" | head -n 1)"
dms ipc call wallpaper set "$WP_DIR/$SELECTED/$(ls -1 "$WP_DIR/$SELECTED" | grep -v ".conf" | head -n 1)"
sleep 0.5
dms ipc call wallpaper next
dms ipc call wallpaper prev
## todo: add other settings
# fetch info from file
GenericColor=$(cat "$WP_DIR/$SELECTED/wallpaper.conf" | grep -e "Generic_Color:" | cut -d: -f2)
ThemeCategory=$(cat "$WP_DIR/$SELECTED/wallpaper.conf" | grep -e "Theme_Category:" | cut -d: -f2)
Matugen=$(cat "$WP_DIR/$SELECTED/wallpaper.conf" | grep -e "Matugen:" | cut -d: -f2)
Mode=$(cat "$WP_DIR/$SELECTED/wallpaper.conf" | grep -e "Mode:" | cut -d: -f2)
Preset=$(cat "$WP_DIR/$SELECTED/wallpaper.conf" | grep -e "Preset:" | cut -d: -f2)
echo "color: $GenericColor, category: $ThemeCategory, matugen: $Matugen, mode: $Mode, preset: $Preset"
# theme type (generic, auto, browse)
#generic is registry
dms ipc call settings set currentThemeCategory $ThemeCategory
# auto > matugen template
dms ipc call settings set matugenScheme scheme-$Matugen
# dark/light mode
dms ipc call theme $Mode
# generic > color
dms ipc call settings set currentThemeName $GenericColor
# browse > preset
dms ipc call settings set customThemeFile "/home/$(whoami)/.config/DankMaterialShell/themes/$Preset/theme.json"
sleep 0.5
dms kill
mmsg dispatch spawn_shell,dms run
sleep 4
dms ipc call theme toggle
dms ipc call theme toggle
dms ipc call theme $Mode
sleep 3
mmsg dispatch reload_config
notify-send "theme $SELECTED applied" "you may have to manually reload ghostty (ctrl+r)"
#read -n 1
+7
View File
@@ -0,0 +1,7 @@
Theme_Category:dynamic
Theme_Name:dynamic
Generic_Color:dynamic
Matugen:vibrant
Mode:dark
Preset:-
+7
View File
@@ -0,0 +1,7 @@
Theme_Category:dynamic
Theme_Name:dynamic
Generic_Color:dynamic
Matugen:vibrant
Mode:dark
Preset:-
@@ -0,0 +1,7 @@
Theme_Category:registry
Theme_Name:custom
Generic_Color:custom
Matugen:vibrant
Mode:dark
Preset:tokyoNightNightMoon
@@ -0,0 +1,7 @@
Theme_Category:dynamic
Theme_Name:dynamic
Generic_Color:dynamic
Matugen:neutral
Mode:dark
Preset:-
+7
View File
@@ -0,0 +1,7 @@
Theme_Category:dynamic
Theme_Name:dynamic
Generic_Color:dynamic
Matugen:vibrant
Mode:dark
Preset:-