fix: change location of the current theme directory

This commit is contained in:
2026-05-31 10:07:36 -04:00
parent 7d440ffaab
commit 129487342c
3 changed files with 13 additions and 14 deletions
+2 -3
View File
@@ -11,7 +11,7 @@ TOTAL=${#BACKGROUNDS[@]}
if [[ $TOTAL -eq 0 ]]; then
notify-send "No background was found for theme" -t 2000
setsid uwsm app -- swww clear >/dev/null 2>&1 &
setsid uwsm app -- awww clear >/dev/null 2>&1 &
else
# Get current background from symlink
if [[ -L "$CURRENT_BACKGROUND_LINK" ]]; then
@@ -42,6 +42,5 @@ else
# Set new background symlink
ln -nsf "$NEW_BACKGROUND" "$CURRENT_BACKGROUND_LINK"
# Relaunch swaybg
setsid uwsm app -- swww img "$CURRENT_BACKGROUND_LINK" >/dev/null 2>&1 &
setsid uwsm app -- awww img "$CURRENT_BACKGROUND_LINK" >/dev/null 2>&1 &
fi
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash
THEMES_DIR="$HOME/.local/share/themes"
find ${THEMES_DIR}/available -mindepth 1 -maxdepth 1 \( -type d -o -type l \) | sort | while read -r path; do
find ${THEMES_DIR}/available/ -mindepth 1 -maxdepth 1 \( -type d -o -type l \) | sort | while read -r path; do
echo "$(basename "$path" | sed -E 's/(^|-)([a-z])/\1\u\2/g; s/-/ /g')"
done
+10 -10
View File
@@ -29,7 +29,7 @@ fi
ln -nsf "$THEME_PATH" "$CURRENT_THEME_DIR"
# Change gnome modes
if [[ -f ~/.config/omarchy/current/theme/light.mode ]]; then
if [[ -f "$CURRENT_THEME_DIR/light.mode" ]]; then
gsettings set org.gnome.desktop.interface color-scheme "prefer-light"
gsettings set org.gnome.desktop.interface gtk-theme "Adwaita"
else
@@ -38,34 +38,34 @@ else
fi
# Change gnome icon theme color
if [[ -f ~/.config/omarchy/current/theme/icons.theme ]]; then
gsettings set org.gnome.desktop.interface icon-theme "$(<~/.config/omarchy/current/theme/icons.theme)"
if [[ -f "$CURRENT_THEME_DIR/icons.theme" ]]; then
gsettings set org.gnome.desktop.interface icon-theme "$(<$CURRENT_THEME_DIR/icons.theme)"
else
gsettings set org.gnome.desktop.interface icon-theme "Yaru-blue"
fi
# Change Chromium colors
if command -v chromium &>/dev/null; then
if [[ -f ~/.config/omarchy/current/theme/light.mode ]]; then
if [[ -f "$CURRENT_THEME_DIR/light.mode" ]]; then
chromium --no-startup-window --set-color-scheme="light"
else
chromium --no-startup-window --set-color-scheme="dark"
fi
if [[ -f ~/.config/omarchy/current/theme/chromium.theme ]]; then
chromium --no-startup-window --set-theme-color="$(<~/.config/omarchy/current/theme/chromium.theme)"
if [[ -f "$CURRENT_THEME_DIR/chromium.theme" ]]; then
chromium --no-startup-window --set-theme-color="$(<$CURRENT_THEME_DIR/chromium.theme)"
else
# Use a default, neutral grey if theme doesn't have a color
chromium --no-startup-window --set-theme-color="28,32,39"
fi
fi
if [[ ! -f "${CURRENT_THEME_DIR}/ghostty" ]]; then
touch ${CURRENT_THEME_DIR}/ghostty
if [[ ! -f "$CURRENT_THEME_DIR/ghostty" ]]; then
touch "$CURRENT_THEME_DIR/ghostty"
fi
if [[ ! -f "${CURRENT_THEME_DIR}/tmux" ]]; then
touch ${CURRENT_THEME_DIR}/tmux
if [[ ! -f "$CURRENT_THEME_DIR/tmux" ]]; then
touch "$CURRENT_THEME_DIR/tmux"
fi
omarchy-theme-bg-next