fix: change location of the current theme directory
This commit is contained in:
@@ -11,7 +11,7 @@ TOTAL=${#BACKGROUNDS[@]}
|
|||||||
|
|
||||||
if [[ $TOTAL -eq 0 ]]; then
|
if [[ $TOTAL -eq 0 ]]; then
|
||||||
notify-send "No background was found for theme" -t 2000
|
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
|
else
|
||||||
# Get current background from symlink
|
# Get current background from symlink
|
||||||
if [[ -L "$CURRENT_BACKGROUND_LINK" ]]; then
|
if [[ -L "$CURRENT_BACKGROUND_LINK" ]]; then
|
||||||
@@ -42,6 +42,5 @@ else
|
|||||||
# Set new background symlink
|
# Set new background symlink
|
||||||
ln -nsf "$NEW_BACKGROUND" "$CURRENT_BACKGROUND_LINK"
|
ln -nsf "$NEW_BACKGROUND" "$CURRENT_BACKGROUND_LINK"
|
||||||
|
|
||||||
# Relaunch swaybg
|
setsid uwsm app -- awww img "$CURRENT_BACKGROUND_LINK" >/dev/null 2>&1 &
|
||||||
setsid uwsm app -- swww img "$CURRENT_BACKGROUND_LINK" >/dev/null 2>&1 &
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
THEMES_DIR="$HOME/.local/share/themes"
|
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')"
|
echo "$(basename "$path" | sed -E 's/(^|-)([a-z])/\1\u\2/g; s/-/ /g')"
|
||||||
done
|
done
|
||||||
|
|||||||
+10
-10
@@ -29,7 +29,7 @@ fi
|
|||||||
ln -nsf "$THEME_PATH" "$CURRENT_THEME_DIR"
|
ln -nsf "$THEME_PATH" "$CURRENT_THEME_DIR"
|
||||||
|
|
||||||
# Change gnome modes
|
# 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 color-scheme "prefer-light"
|
||||||
gsettings set org.gnome.desktop.interface gtk-theme "Adwaita"
|
gsettings set org.gnome.desktop.interface gtk-theme "Adwaita"
|
||||||
else
|
else
|
||||||
@@ -38,34 +38,34 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Change gnome icon theme color
|
# Change gnome icon theme color
|
||||||
if [[ -f ~/.config/omarchy/current/theme/icons.theme ]]; then
|
if [[ -f "$CURRENT_THEME_DIR/icons.theme" ]]; then
|
||||||
gsettings set org.gnome.desktop.interface icon-theme "$(<~/.config/omarchy/current/theme/icons.theme)"
|
gsettings set org.gnome.desktop.interface icon-theme "$(<$CURRENT_THEME_DIR/icons.theme)"
|
||||||
else
|
else
|
||||||
gsettings set org.gnome.desktop.interface icon-theme "Yaru-blue"
|
gsettings set org.gnome.desktop.interface icon-theme "Yaru-blue"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Change Chromium colors
|
# Change Chromium colors
|
||||||
if command -v chromium &>/dev/null; then
|
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"
|
chromium --no-startup-window --set-color-scheme="light"
|
||||||
else
|
else
|
||||||
chromium --no-startup-window --set-color-scheme="dark"
|
chromium --no-startup-window --set-color-scheme="dark"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -f ~/.config/omarchy/current/theme/chromium.theme ]]; then
|
if [[ -f "$CURRENT_THEME_DIR/chromium.theme" ]]; then
|
||||||
chromium --no-startup-window --set-theme-color="$(<~/.config/omarchy/current/theme/chromium.theme)"
|
chromium --no-startup-window --set-theme-color="$(<$CURRENT_THEME_DIR/chromium.theme)"
|
||||||
else
|
else
|
||||||
# Use a default, neutral grey if theme doesn't have a color
|
# Use a default, neutral grey if theme doesn't have a color
|
||||||
chromium --no-startup-window --set-theme-color="28,32,39"
|
chromium --no-startup-window --set-theme-color="28,32,39"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -f "${CURRENT_THEME_DIR}/ghostty" ]]; then
|
if [[ ! -f "$CURRENT_THEME_DIR/ghostty" ]]; then
|
||||||
touch ${CURRENT_THEME_DIR}/ghostty
|
touch "$CURRENT_THEME_DIR/ghostty"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -f "${CURRENT_THEME_DIR}/tmux" ]]; then
|
if [[ ! -f "$CURRENT_THEME_DIR/tmux" ]]; then
|
||||||
touch ${CURRENT_THEME_DIR}/tmux
|
touch "$CURRENT_THEME_DIR/tmux"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
omarchy-theme-bg-next
|
omarchy-theme-bg-next
|
||||||
|
|||||||
Reference in New Issue
Block a user