diff --git a/bin/omarchy-theme-next b/bin/omarchy-theme-next new file mode 100755 index 0000000..05ddeae --- /dev/null +++ b/bin/omarchy-theme-next @@ -0,0 +1,27 @@ +#!/bin/bash + +THEMES_DIR="$HOME/.config/omarchy/themes/" +NEXT_THEME_FILE="$HOME/.cache/next_theme_index" + +THEMES=($(find "$THEMES_DIR" -mindepth 1 | sort)) +TOTAL=${#THEMES[@]} + +if [[ ! -f "$NEXT_THEME_FILE" ]]; then + INDEX=0 +else + INDEX=$(<"$NEXT_THEME_FILE") +fi + +# Save next index (wrap around) +echo "$(((INDEX + 1) % TOTAL))" >"$NEXT_THEME_FILE" + +# Set new theme +NEW_THEME=${THEMES[$INDEX]} +ln -nsf $NEW_THEME ~/.config/omarchy/current-theme + +# Install theme backgrounds +source ~/.config/omarchy/current-theme/backgrounds.sh + +# Restart apps for new theme +pkill -SIGRTMIN+10 waybar +swaybg-next diff --git a/bin/swaybg-next b/bin/swaybg-next index 5f6b87c..9f69c1b 100755 --- a/bin/swaybg-next +++ b/bin/swaybg-next @@ -2,7 +2,7 @@ # Cycles through the background images available -BACKGROUNDS_DIR="$HOME/.local/share/backgrounds" +BACKGROUNDS_DIR="$HOME/.config/omarchy/current-backgrounds/" NEXT_BACKGROUND_FILE="$HOME/.cache/next_background_index" BACKGROUNDS=($(find "$BACKGROUNDS_DIR" -type f | sort)) @@ -15,7 +15,7 @@ else fi # Save next index (wrap around) -echo "$(( (INDEX + 1) % TOTAL ))" > "$NEXT_BACKGROUND_FILE" +echo "$(((INDEX + 1) % TOTAL))" >"$NEXT_BACKGROUND_FILE" # Launch swaybg pkill -x swaybg diff --git a/config/alacritty/alacritty.toml b/config/alacritty/alacritty.toml index b511fa4..e9f556f 100644 --- a/config/alacritty/alacritty.toml +++ b/config/alacritty/alacritty.toml @@ -1,3 +1,5 @@ +general.import = [ "~/.config/omarchy/current-theme/alacritty.toml" ] + [env] TERM = "xterm-256color" @@ -17,34 +19,3 @@ opacity = 0.98 bindings = [ { key = "F11", action = "ToggleFullscreen" } ] - -[colors] -[colors.primary] -background = '#1a1b26' -foreground = '#a9b1d6' - -# Normal colors -[colors.normal] -black = '#32344a' -red = '#f7768e' -green = '#9ece6a' -yellow = '#e0af68' -blue = '#7aa2f7' -magenta = '#ad8ee6' -cyan = '#449dab' -white = '#787c99' - -# Bright colors -[colors.bright] -black = '#444b6a' -red = '#ff7a93' -green = '#b9f27c' -yellow = '#ff9e64' -blue = '#7da6ff' -magenta = '#bb9af7' -cyan = '#0db9d7' -white = '#acb0d0' - -[colors.selection] -background = '#7aa2f7' - diff --git a/config/swaync/style.css b/config/swaync/style.css index 06009ef..5939af5 100644 --- a/config/swaync/style.css +++ b/config/swaync/style.css @@ -26,3 +26,5 @@ .body { color: #a6adc8; } + +@import "../omarchy/current-theme/swaync.css"; diff --git a/config/waybar/style.css b/config/waybar/style.css index 1f6f2ff..9fb8e8f 100644 --- a/config/waybar/style.css +++ b/config/waybar/style.css @@ -4,8 +4,6 @@ min-height: 0; font-family: CaskaydiaMono Nerd Font; font-size: 12px; - color: #cdd6f4; - background-color: #1a1b26; } #workspaces { @@ -29,7 +27,6 @@ margin-right: 13px; } - tooltip { padding: 2px; } @@ -37,3 +34,5 @@ tooltip { tooltip label { padding: 2px; } + +@import "../omarchy/current-theme/waybar.css"; diff --git a/config/wofi/style.css b/config/wofi/style.css deleted file mode 100644 index e64548a..0000000 --- a/config/wofi/style.css +++ /dev/null @@ -1,73 +0,0 @@ -@define-color mauve #cba6f7; -@define-color text #cdd6f4; -@define-color base #1e1e2e; - -* { - font-family: 'CaskaydiaMono Nerd Font', monospace; - font-size: 18px; -} - -window { - margin: 0px; - padding: 20px; - background-color: @base; - opacity: 0.95; -} - -#inner-box { - margin: 0; - padding: 0; - border: none; - background-color: @base; -} - -#outer-box { - margin: 0; - padding: 20px; - border: none; - background-color: @base; -} - -#scroll { - margin: 0; - padding: 0; - border: none; - background-color: @base; -} - -#input { - margin: 0; - padding: 10px; - border: none; - background-color: @base; - color: @text; -} - -#input:focus { - outline: none; - box-shadow: none; - border: none; -} - -#text { - margin: 5px; - border: none; - color: @text; -} - -#entry { - background-color: @base; -} - -#entry:selected { - outline: none; - border: none; -} - -#entry:selected #text { - color: @mauve; -} - -#entry image { - -gtk-icon-transform: scale(0.7); -} diff --git a/config/wofi/style.css b/config/wofi/style.css new file mode 120000 index 0000000..dddac32 --- /dev/null +++ b/config/wofi/style.css @@ -0,0 +1 @@ +/home/dhh/.config/omarchy/current-theme/wofi.css \ No newline at end of file diff --git a/install/backgrounds.sh b/install/backgrounds.sh deleted file mode 100644 index 2b047ec..0000000 --- a/install/backgrounds.sh +++ /dev/null @@ -1,4 +0,0 @@ -mkdir -p ~/.local/share/backgrounds -gum spin --title "Downloading background image..." -- curl -sL -o ~/.local/share/backgrounds/1-Milad-Fakurian-Abstract-Purple-Blue.jpg https://images.unsplash.com/photo-1620207418302-439b387441b0 -gum spin --title "Downloading background image..." -- curl -sL -o ~/.local/share/backgrounds/2-Pawel-Czerwinski-Abstract-Purple-Blue.jpg https://images.unsplash.com/photo-1651870364199-fc5f9f46ac85 -gum spin --title "Downloading background image..." -- curl -sL -o ~/.local/share/backgrounds/3-Jr-Korpa-Abstract-Purple-Blue.jpg https://images.unsplash.com/flagged/photo-1567400358593-9e6382752ea2 diff --git a/install/theme.sh b/install/theme.sh index 37a0d0c..3bc4263 100644 --- a/install/theme.sh +++ b/install/theme.sh @@ -4,3 +4,16 @@ sudo pacman -S --noconfirm kvantum-qt5 # Prefer dark mode everything sudo pacman -S --noconfirm gnome-themes-extra # Adds Adwaita-dark theme gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' + +# Setup theme links +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 +source ~/.local/share/omarchy/themes/tokyo-night/backgrounds.sh +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 diff --git a/themes/catppuccin/alacritty.toml b/themes/catppuccin/alacritty.toml new file mode 100644 index 0000000..bfa455a --- /dev/null +++ b/themes/catppuccin/alacritty.toml @@ -0,0 +1,76 @@ +[colors.primary] +background = "#24273a" +foreground = "#cad3f5" +dim_foreground = "#8087a2" +bright_foreground = "#cad3f5" + +[colors.cursor] +text = "#24273a" +cursor = "#f4dbd6" + +[colors.vi_mode_cursor] +text = "#24273a" +cursor = "#b7bdf8" + +[colors.search.matches] +foreground = "#24273a" +background = "#a5adcb" + +[colors.search.focused_match] +foreground = "#24273a" +background = "#a6da95" + +[colors.footer_bar] +foreground = "#24273a" +background = "#a5adcb" + +[colors.hints.start] +foreground = "#24273a" +background = "#eed49f" + +[colors.hints.end] +foreground = "#24273a" +background = "#a5adcb" + +[colors.selection] +text = "#24273a" +background = "#f4dbd6" + +[colors.normal] +black = "#494d64" +red = "#ed8796" +green = "#a6da95" +yellow = "#eed49f" +blue = "#8aadf4" +magenta = "#f5bde6" +cyan = "#8bd5ca" +white = "#b8c0e0" + +[colors.bright] +black = "#5b6078" +red = "#ed8796" +green = "#a6da95" +yellow = "#eed49f" +blue = "#8aadf4" +magenta = "#f5bde6" +cyan = "#8bd5ca" +white = "#a5adcb" + +[colors.dim] +black = "#494d64" +red = "#ed8796" +green = "#a6da95" +yellow = "#eed49f" +blue = "#8aadf4" +magenta = "#f5bde6" +cyan = "#8bd5ca" +white = "#b8c0e0" + +[[colors.indexed_colors]] +index = 16 +color = "#f5a97f" + +[[colors.indexed_colors]] +index = 17 +color = "#f4dbd6" + diff --git a/themes/catppuccin/backgrounds.sh b/themes/catppuccin/backgrounds.sh new file mode 100644 index 0000000..544fbb1 --- /dev/null +++ b/themes/catppuccin/backgrounds.sh @@ -0,0 +1,8 @@ +BACKGROUNDS_DIR=~/.config/omarchy/backgrounds/catppucin + +if [[ -z $BACKGROUNDS_DIR ]]; then + mkdir -p $BACKGROUNDS_DIR + gum spin --title "Downloading background image..." -- curl -sL -o $BACKGROUNDS_DIR/1-Milad-Fakurian-Abstract-Purple-Blue.jpg https://images.unsplash.com/photo-1620207418302-439b387441b0 + gum spin --title "Downloading background image..." -- curl -sL -o $BACKGROUNDS_DIR/2-Pawel-Czerwinski-Abstract-Purple-Blue.jpg https://images.unsplash.com/photo-1651870364199-fc5f9f46ac85 + gum spin --title "Downloading background image..." -- curl -sL -o $BACKGROUNDS_DIR/3-Jr-Korpa-Abstract-Purple-Blue.jpg https://images.unsplash.com/flagged/photo-1567400358593-9e6382752ea2 +fi diff --git a/themes/catppuccin/neovim.lua b/themes/catppuccin/neovim.lua new file mode 100644 index 0000000..dbe34f5 --- /dev/null +++ b/themes/catppuccin/neovim.lua @@ -0,0 +1,8 @@ +return { + { + "LazyVim/LazyVim", + opts = { + colorscheme = "catppuccin", + }, + }, +} diff --git a/themes/catppuccin/swaync.css b/themes/catppuccin/swaync.css new file mode 100644 index 0000000..a736454 --- /dev/null +++ b/themes/catppuccin/swaync.css @@ -0,0 +1,10 @@ +.notification { + color: #cdd6f4; + background-color: rgba(26, 27, 38, 0.95); + border: 2px solid #313244; +} + +.body { + color: #a6adc8; +} + diff --git a/themes/catppuccin/waybar.css b/themes/catppuccin/waybar.css new file mode 100644 index 0000000..e19e988 --- /dev/null +++ b/themes/catppuccin/waybar.css @@ -0,0 +1,5 @@ +* { + color: #cdd6f4; + background-color: #1a1b26; +} + diff --git a/themes/catppuccin/wofi.css b/themes/catppuccin/wofi.css new file mode 100644 index 0000000..89a9022 --- /dev/null +++ b/themes/catppuccin/wofi.css @@ -0,0 +1,73 @@ +@define-color selected-text #cba6f7; +@define-color text #cdd6f4; +@define-color base #1e1e2e; + +* { + font-family: 'CaskaydiaMono Nerd Font', monospace; + font-size: 18px; +} + +window { + margin: 0px; + padding: 20px; + background-color: @base; + opacity: 0.95; +} + +#inner-box { + margin: 0; + padding: 0; + border: none; + background-color: @base; +} + +#outer-box { + margin: 0; + padding: 20px; + border: none; + background-color: @base; +} + +#scroll { + margin: 0; + padding: 0; + border: none; + background-color: @base; +} + +#input { + margin: 0; + padding: 10px; + border: none; + background-color: @base; + color: @text; +} + +#input:focus { + outline: none; + box-shadow: none; + border: none; +} + +#text { + margin: 5px; + border: none; + color: @text; +} + +#entry { + background-color: @base; +} + +#entry:selected { + outline: none; + border: none; +} + +#entry:selected #text { + color: @selected-text; +} + +#entry image { + -gtk-icon-transform: scale(0.7); +} diff --git a/themes/tokyo-night/alacritty.toml b/themes/tokyo-night/alacritty.toml new file mode 100644 index 0000000..19c1e22 --- /dev/null +++ b/themes/tokyo-night/alacritty.toml @@ -0,0 +1,29 @@ +[colors] +[colors.primary] +background = '#1a1b26' +foreground = '#a9b1d6' + +# Normal colors +[colors.normal] +black = '#32344a' +red = '#f7768e' +green = '#9ece6a' +yellow = '#e0af68' +blue = '#7aa2f7' +magenta = '#ad8ee6' +cyan = '#449dab' +white = '#787c99' + +# Bright colors +[colors.bright] +black = '#444b6a' +red = '#ff7a93' +green = '#b9f27c' +yellow = '#ff9e64' +blue = '#7da6ff' +magenta = '#bb9af7' +cyan = '#0db9d7' +white = '#acb0d0' + +[colors.selection] +background = '#7aa2f7' diff --git a/themes/tokyo-night/backgrounds.sh b/themes/tokyo-night/backgrounds.sh new file mode 100644 index 0000000..12e0f47 --- /dev/null +++ b/themes/tokyo-night/backgrounds.sh @@ -0,0 +1,8 @@ +BACKGROUNDS_DIR=~/.config/omarchy/backgrounds/tokyo-night + +if [[ -z $BACKGROUNDS_DIR ]]; then + mkdir -p $BACKGROUNDS_DIR + gum spin --title "Downloading background image..." -- curl -sL -o $BACKGROUNDS_DIR/1-Milad-Fakurian-Abstract-Purple-Blue.jpg https://images.unsplash.com/photo-1620207418302-439b387441b0 + gum spin --title "Downloading background image..." -- curl -sL -o $BACKGROUNDS_DIR/2-Pawel-Czerwinski-Abstract-Purple-Blue.jpg https://images.unsplash.com/photo-1651870364199-fc5f9f46ac85 + gum spin --title "Downloading background image..." -- curl -sL -o $BACKGROUNDS_DIR/3-Jr-Korpa-Abstract-Purple-Blue.jpg https://images.unsplash.com/flagged/photo-1567400358593-9e6382752ea2 +fi diff --git a/themes/tokyo-night/neovim.lua b/themes/tokyo-night/neovim.lua new file mode 100644 index 0000000..dad2d30 --- /dev/null +++ b/themes/tokyo-night/neovim.lua @@ -0,0 +1,8 @@ +return { + { + "LazyVim/LazyVim", + opts = { + colorscheme = "tokyonight", + }, + }, +} diff --git a/themes/tokyo-night/swaync.css b/themes/tokyo-night/swaync.css new file mode 100644 index 0000000..a736454 --- /dev/null +++ b/themes/tokyo-night/swaync.css @@ -0,0 +1,10 @@ +.notification { + color: #cdd6f4; + background-color: rgba(26, 27, 38, 0.95); + border: 2px solid #313244; +} + +.body { + color: #a6adc8; +} + diff --git a/themes/tokyo-night/waybar.css b/themes/tokyo-night/waybar.css new file mode 100644 index 0000000..e19e988 --- /dev/null +++ b/themes/tokyo-night/waybar.css @@ -0,0 +1,5 @@ +* { + color: #cdd6f4; + background-color: #1a1b26; +} + diff --git a/themes/tokyo-night/wofi.css b/themes/tokyo-night/wofi.css new file mode 100644 index 0000000..89a9022 --- /dev/null +++ b/themes/tokyo-night/wofi.css @@ -0,0 +1,73 @@ +@define-color selected-text #cba6f7; +@define-color text #cdd6f4; +@define-color base #1e1e2e; + +* { + font-family: 'CaskaydiaMono Nerd Font', monospace; + font-size: 18px; +} + +window { + margin: 0px; + padding: 20px; + background-color: @base; + opacity: 0.95; +} + +#inner-box { + margin: 0; + padding: 0; + border: none; + background-color: @base; +} + +#outer-box { + margin: 0; + padding: 20px; + border: none; + background-color: @base; +} + +#scroll { + margin: 0; + padding: 0; + border: none; + background-color: @base; +} + +#input { + margin: 0; + padding: 10px; + border: none; + background-color: @base; + color: @text; +} + +#input:focus { + outline: none; + box-shadow: none; + border: none; +} + +#text { + margin: 5px; + border: none; + color: @text; +} + +#entry { + background-color: @base; +} + +#entry:selected { + outline: none; + border: none; +} + +#entry:selected #text { + color: @selected-text; +} + +#entry image { + -gtk-icon-transform: scale(0.7); +}