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