mirror of
https://github.com/basecamp/omarchy.git
synced 2025-07-27 04:09:23 +00:00
Use current directory for gathering
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
THEMES_DIR="$HOME/.config/omarchy/themes/"
|
||||
CURRENT_THEME_LINK="$HOME/.config/omarchy/current-theme"
|
||||
CURRENT_THEME_LINK="$HOME/.config/omarchy/current/theme"
|
||||
|
||||
THEMES=($(find "$THEMES_DIR" -mindepth 1 | sort))
|
||||
TOTAL=${#THEMES[@]}
|
||||
@ -28,17 +28,15 @@ NEXT_INDEX=$(((INDEX + 1) % TOTAL))
|
||||
NEW_THEME=${THEMES[$NEXT_INDEX]}
|
||||
NEW_THEME_NAME=$(basename "$NEW_THEME")
|
||||
|
||||
# Install theme backgrounds
|
||||
source ~/.config/omarchy/current-theme/backgrounds.sh
|
||||
ln -nsf ~/.config/omarchy/backgrounds/$NEW_THEME_NAME ~/.config/omarchy/current-backgrounds
|
||||
|
||||
# Set new theme
|
||||
ln -nsf $NEW_THEME ~/.config/omarchy/current-theme
|
||||
# Set current theme
|
||||
ln -nsf "$HOME/.config/omarchy/backgrounds/$NEW_THEME_NAME" "$HOME/.config/omarchy/current/backgrounds"
|
||||
ln -nsf "$NEW_THEME" "$HOME/.config/omarchy/current/theme"
|
||||
|
||||
# Touch alacritty config to pickup the changed theme
|
||||
touch ~/.config/alacritty/alacritty.toml
|
||||
touch "$HOME/.config/alacritty/alacritty.toml"
|
||||
|
||||
# Restart apps for new theme
|
||||
pkill waybar
|
||||
setsid waybar &
|
||||
# Restart waybar for new theme
|
||||
pkill waybar && setsid waybar
|
||||
|
||||
# Pick new background from theme set
|
||||
swaybg-next
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
# Cycles through the background images available
|
||||
|
||||
BACKGROUNDS_DIR="$HOME/.config/omarchy/current-backgrounds/"
|
||||
CURRENT_BACKGROUND_LINK="$HOME/.config/omarchy/current-background"
|
||||
BACKGROUNDS_DIR="$HOME/.config/omarchy/current/backgrounds/"
|
||||
CURRENT_BACKGROUND_LINK="$HOME/.config/omarchy/current/background"
|
||||
|
||||
BACKGROUNDS=($(find "$BACKGROUNDS_DIR" -type f | sort))
|
||||
TOTAL=${#BACKGROUNDS[@]}
|
||||
|
@ -1,4 +1,4 @@
|
||||
general.import = [ "~/.config/omarchy/current-theme/alacritty.toml" ]
|
||||
general.import = [ "~/.config/omarchy/current/theme/alacritty.toml" ]
|
||||
|
||||
[env]
|
||||
TERM = "xterm-256color"
|
||||
|
@ -27,4 +27,4 @@
|
||||
color: #a6adc8;
|
||||
}
|
||||
|
||||
@import "../omarchy/current-theme/swaync.css";
|
||||
@import "../omarchy/current/theme/swaync.css";
|
||||
|
@ -35,4 +35,4 @@ tooltip label {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
@import "../omarchy/current-theme/waybar.css";
|
||||
@import "../omarchy/current/theme/waybar.css";
|
||||
|
@ -10,11 +10,12 @@ mkdir -p ~/.config/omarchy/themes
|
||||
for f in ~/.local/share/omarchy/themes/*; do ln -s "$f" ~/.config/omarchy/themes/; done
|
||||
|
||||
# Set initial theme
|
||||
ln -snf ~/.config/omarchy/themes/tokyo-night ~/.config/omarchy/current-theme
|
||||
mkdir -p ~/.config/omarchy/current
|
||||
ln -snf ~/.config/omarchy/themes/tokyo-night ~/.config/omarchy/current/theme
|
||||
source ~/.local/share/omarchy/themes/tokyo-night/backgrounds.sh
|
||||
ln -snf ~/.config/omarchy/backgrounds/tokyo-night ~/.config/omarchy/current-backgrounds
|
||||
ln -snf ~/.config/omarchy/backgrounds/tokyo-night ~/.config/omarchy/current/backgrounds
|
||||
|
||||
# Set specific app links for current theme
|
||||
ln -snf ~/.config/omarchy/current-theme/wofi.css ~/.config/wofi/style.css
|
||||
ln -snf ~/.config/omarchy/current-theme/neovim.lua ~/.config/nvim/lua/plugins/theme.lua
|
||||
ln -snf ~/.config/omarchy/current-theme/btop.theme ~/.config/btop/themes/current.theme
|
||||
ln -snf ~/.config/omarchy/current/theme/wofi.css ~/.config/wofi/style.css
|
||||
ln -snf ~/.config/omarchy/current/theme/neovim.lua ~/.config/nvim/lua/plugins/theme.lua
|
||||
ln -snf ~/.config/omarchy/current/theme/btop.theme ~/.config/btop/themes/current.theme
|
||||
|
Reference in New Issue
Block a user