Refactor theme module

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-07-27 16:23:32 +01:00
parent 4c04dda643
commit 922eb479a0
13 changed files with 871 additions and 903 deletions

View File

@@ -1,6 +1,9 @@
[ ! -L "$CONFIG"/wallpaper ] && ln -sf "$DEFAULT_WALLPAPER" "$CONFIG"/wallpaper
[ ! -f "$CONFIG"/mode ] && echo "$DEFAULT_MODE" > "$CONFIG"/mode
WALLPAPER=""
MODE=""
set_wallpaper() {
if [ -f "$1" ]; then
WALLPAPER="$1"
@@ -35,14 +38,9 @@ finish() {
[ -n "$WALLPAPER" ] && ln -sf "$WALLPAPER" "$CONFIG"/wallpaper
[ -n "$MODE" ] && echo "$MODE" > "$CONFIG"/mode
{
"$SWITCH"
} > /dev/null
"$ACTIVATION" > /dev/null
}
WALLPAPER=""
MODE=""
if [ $# -eq 0 ]; then
finish
else