deleted: ../apps-list-zero.md
new file: DankMaterialShell/.changelog-1.4 new file: DankMaterialShell/.firstlaunch new file: DankMaterialShell/firefox.css new file: DankMaterialShell/plugins/cavaVisualizer new file: DankMaterialShell/plugins/dankAudioVisualizer new file: DankMaterialShell/plugins/desktopCommand new file: DankMaterialShell/settings.json new file: DankMaterialShell/themes/peaceAndQuiet/preview-blue-dark.svg new file: DankMaterialShell/themes/peaceAndQuiet/preview-blue-light.svg new file: DankMaterialShell/themes/peaceAndQuiet/preview-blue.svg new file: DankMaterialShell/themes/peaceAndQuiet/preview-cyan-dark.svg new file: DankMaterialShell/themes/peaceAndQuiet/preview-cyan-light.svg new file: DankMaterialShell/themes/peaceAndQuiet/preview-cyan.svg new file: DankMaterialShell/themes/peaceAndQuiet/preview-dark.svg new file: DankMaterialShell/themes/peaceAndQuiet/preview-lavender-dark.svg new file: DankMaterialShell/themes/peaceAndQuiet/preview-lavender-light.svg new file: DankMaterialShell/themes/peaceAndQuiet/preview-lavender.svg new file: DankMaterialShell/themes/peaceAndQuiet/preview-light.svg new file: DankMaterialShell/themes/peaceAndQuiet/preview-mint-dark.svg new file: DankMaterialShell/themes/peaceAndQuiet/preview-mint-light.svg new file: DankMaterialShell/themes/peaceAndQuiet/preview-mint.svg new file: DankMaterialShell/themes/peaceAndQuiet/preview-pink-dark.svg new file: DankMaterialShell/themes/peaceAndQuiet/preview-pink-light.svg new file: DankMaterialShell/themes/peaceAndQuiet/preview-pink.svg new file: DankMaterialShell/themes/peaceAndQuiet/preview-salmon-dark.svg new file: DankMaterialShell/themes/peaceAndQuiet/preview-salmon-light.svg new file: DankMaterialShell/themes/peaceAndQuiet/preview-salmon.svg new file: DankMaterialShell/themes/peaceAndQuiet/theme.json new file: DankMaterialShell/themes/zzz/theme.json new file: DankMaterialShell/themes/zzz/theme1.json new file: DankMaterialShell/zen.css new file: Kvantum/KvLibadwaitaDark#/KvLibadwaitaDark#.kvconfig new file: Kvantum/kvantum.kvconfig new file: aichat/config.yaml modified: btop/btop.conf new file: btop/themes/noctalia.theme new file: calcurse/conf new file: calcurse/keys new file: cava/config new file: cava/shaders/bar_spectrum.frag new file: cava/shaders/eye_of_phi.frag new file: cava/shaders/northern_lights.frag new file: cava/shaders/pass_through.vert new file: cava/shaders/spectrogram.frag new file: cava/shaders/winamp_line_style_spectrum.frag new file: cava/themes/solarized_dark new file: cava/themes/tricolor new file: fastfetch/0.01.jsonc new file: fastfetch/0.02.jsonc new file: fastfetch/color.jsonc new file: fastfetch/setts/all.jsonc new file: fastfetch/setts/archey.jsonc new file: fastfetch/setts/ci.jsonc new file: fastfetch/setts/examples/10.jsonc new file: fastfetch/setts/examples/11.jsonc new file: fastfetch/setts/examples/12.jsonc new file: fastfetch/setts/examples/13.jsonc new file: fastfetch/setts/examples/14.jsonc new file: fastfetch/setts/examples/15.jsonc new file: fastfetch/setts/examples/16.jsonc new file: fastfetch/setts/examples/17.jsonc new file: fastfetch/setts/examples/18.jsonc new file: fastfetch/setts/examples/19.jsonc new file: fastfetch/setts/examples/2.jsonc new file: fastfetch/setts/examples/20.jsonc new file: fastfetch/setts/examples/21.jsonc new file: fastfetch/setts/examples/22.jsonc new file: fastfetch/setts/examples/23.jsonc new file: fastfetch/setts/examples/24.jsonc new file: fastfetch/setts/examples/25.jsonc new file: fastfetch/setts/examples/26.jsonc new file: fastfetch/setts/examples/27.jsonc new file: fastfetch/setts/examples/28.jsonc new file: fastfetch/setts/examples/29.jsonc new file: fastfetch/setts/examples/3.jsonc new file: fastfetch/setts/examples/30.jsonc new file: fastfetch/setts/examples/4.jsonc new file: fastfetch/setts/examples/5.jsonc new file: fastfetch/setts/examples/6.jsonc new file: fastfetch/setts/examples/7.jsonc new file: fastfetch/setts/examples/8.jsonc new file: fastfetch/setts/examples/9.jsonc new file: fastfetch/setts/neofetch.jsonc new file: fastfetch/setts/paleofetch.jsonc new file: fastfetch/setts/screenfetch.jsonc modified: fish/config.fish modified: fish/fish_variables new file: fish/fish_variables2DWmNcGa9T new file: fish/functions/ffcolor.fish modified: fish/functions/fish_prompt.fish.bak new file: fish/functions/lt.fish modified: fish/functions/p.fish new file: fish/functions/tide/configure/icons.fish new file: fish/functions/vpn-debug.fish modified: fish/functions/vpn.fish new file: foot/dank-colors.ini modified: foot/foot.ini new file: fsel/config.toml modified: fuzzel/fuzzel.ini modified: hyprwave/config.conf new file: hyprwhspr/config.json new file: hyprwhspr/mic_osd.pid new file: i3/config new file: ironbar/config.json new file: ironbar/schema-v0.18.0.json new file: ironbar/scripts/pomo new file: ironbar/scripts/walker.sh new file: ironbar/style.css new file: keymap.xkb new file: kitty/dank-tabs.conf new file: kitty/dank-theme.conf new file: matugen/config.toml new file: matugen/custom3.json modified: mimeapps.list modified: mpDris2/mpDris2.conf new file: niri/animation.kdl new file: niri/bak.config.kdl new file: niri/binds.kdl new file: niri/caps modified: niri/config.kdl new file: niri/config.kdl.backup1776208575 new file: niri/config.kdl.backup1776211503 new file: niri/config.kdl.backup1776211623 new file: niri/dms/alttab.kdl new file: niri/dms/binds.kdl new file: niri/dms/colors.kdl new file: niri/dms/cursor.kdl new file: niri/dms/layout.kdl new file: niri/dms/outputs.kdl new file: niri/dms/profiles/profile_1776211496314_g03e3q.kdl new file: niri/dms/windowrules.kdl new file: niri/dms/wpblur.kdl new file: niri/emoji.png new file: niri/executable_caps new file: niri/input.kdl new file: niri/ironbar-toggle.sh new file: niri/layer-rule.kdl new file: niri/layout.kdl new file: niri/lock.sh new file: niri/noctalia-toggle.sh new file: niri/output-pc.kdl new file: niri/spawn-at-startup.kdl new file: niri/window-rule.kdl new file: nix/nix.conf modified: nvim/lazy-lock.json modified: nvim/lazyvim.json new file: nvim/lua/plugins/dankcolors.lua new file: nvim/lua/plugins/gpanders-nvim-parinfer.lua new file: nvim/lua/plugins/tokyo-night.lua new file: nvim/lua/tokyonight.nvim new file: nwg-look/config new file: omarchy/current/background new file: omarchy/hooks/theme-set new file: omarchy/hooks/theme-set.d/00-fish.sh new file: omarchy/hooks/theme-set.d/00-fzf.sh new file: omarchy/hooks/theme-set.d/10-discord.sh new file: omarchy/hooks/theme-set.d/10-gtk.sh new file: omarchy/hooks/theme-set.d/10-qt6ct.sh new file: omarchy/hooks/theme-set.d/10-spotify.sh new file: omarchy/hooks/theme-set.d/10-superfile.sh new file: omarchy/hooks/theme-set.d/10-vicinae.sh new file: omarchy/hooks/theme-set.d/15-typora.sh new file: omarchy/hooks/theme-set.d/20-nwg-dock-hyprland.sh new file: omarchy/hooks/theme-set.d/20-zed.sh new file: omarchy/hooks/theme-set.d/30-cursor.sh new file: omarchy/hooks/theme-set.d/30-vscode.sh new file: omarchy/hooks/theme-set.d/30-windsurf.sh new file: omarchy/hooks/theme-set.d/40-cava.sh new file: omarchy/hooks/theme-set.d/40-firefox.sh new file: omarchy/hooks/theme-set.d/40-steam.sh new file: omarchy/hooks/theme-set.d/40-zen.sh new file: omarchy/hooks/theme-set.d/50-heroic.sh new file: omarchy/themes/aether new file: pomo/config.json new file: scripts/niri/caps new file: scripts/niri/ru.png new file: scripts/niri/us.png new file: starship.toml modified: swaync/config.json new file: swaync/config_1.json modified: swaync/style.css new file: swaync/style_1.css new file: systemd/user/default.target.wants/mpDris2.service new file: systemd/user/default.target.wants/mpd.service new file: systemd/user/default.target.wants/mpris-proxy.service new file: systemd/user/default.target.wants/openrazer-daemon.service new file: systemd/user/default.target.wants/pipewire-pulse.service new file: systemd/user/default.target.wants/pipewire.service new file: systemd/user/default.target.wants/ydotool.service new file: systemd/user/elephant.service new file: systemd/user/gnome-session.target.wants/gnome-remote-desktop.service new file: systemd/user/graphical-session.target.wants/elephant.service new file: systemd/user/graphical-session.target.wants/hyprwhspr.service new file: systemd/user/hyprwhspr.service new file: systemd/user/sockets.target.wants/mpd.socket new file: systemd/user/sockets.target.wants/pipewire-pulse.socket new file: systemd/user/sockets.target.wants/pipewire.socket new file: tofi/config new file: user-dirs.conf renamed: ../user-dirs.dirs -> user-dirs.dirs new file: user-dirs.locale modified: walker/config.toml new file: wl-kbptr/config new file: xdg-desktop-portal/portals.conf new file: xsettingsd/xsettingsd.conf new file: yt-dlp/config new file: zathura/zathurarc renamed: ../zram-generator.conf -> zram-generator.conf modified: ../copy.sh deleted: ../nix-packages.md new file: ../nix-pkgs.txt deleted: ../pacman-packages.md renamed: ../apps-list.md -> ../pkgs.txt renamed: ../services.md -> ../services.txt
This commit is contained in:
parent
2a13fe3170
commit
6604f0b324
215 changed files with 25265 additions and 3898 deletions
162
config/omarchy/hooks/theme-set
Executable file
162
config/omarchy/hooks/theme-set
Executable file
|
|
@ -0,0 +1,162 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Omarchy 3.3+ uses colors.toml as the source of truth for theme colors.
|
||||
# Previously we read from alacritty.toml, but that file is now generated
|
||||
# from templates and may contain unrendered {{ placeholders }}.
|
||||
input_file="$HOME/.config/omarchy/current/theme/colors.toml"
|
||||
|
||||
if [[ ! -f "$input_file" ]]; then
|
||||
error "colors.toml not found at $input_file. Ensure your theme is compatible with Omarchy 3.3+ and includes colors.toml."
|
||||
fi
|
||||
|
||||
# Extract color value from colors.toml (flat key=value format)
|
||||
extract_color() {
|
||||
local color_name="$1"
|
||||
awk -v color="$color_name" '
|
||||
$1 == color && /=/ {
|
||||
if (match($0, /#([0-9a-fA-F]{6})/)) {
|
||||
print substr($0, RSTART + 1, 6)
|
||||
exit
|
||||
}
|
||||
}
|
||||
' "$input_file"
|
||||
}
|
||||
|
||||
success() {
|
||||
echo -e "\e[32m[SUCCESS]\e[0m $1"
|
||||
}
|
||||
|
||||
skipped() {
|
||||
echo -e "\033[0;34m[SKIPPED]\e[0m $1 not found. Skipping.."
|
||||
exit 0
|
||||
}
|
||||
|
||||
warning() {
|
||||
echo -e "\033[0;33m[WARNING]\e[0m $1"
|
||||
}
|
||||
|
||||
error() {
|
||||
echo -e "\e[31m[ERROR]\e[0m $1"
|
||||
exit 1
|
||||
}
|
||||
|
||||
export -f success warning error skipped
|
||||
|
||||
hex2rgb() {
|
||||
hex_input=$1
|
||||
r=$((16#${hex_input:0:2}))
|
||||
g=$((16#${hex_input:2:2}))
|
||||
b=$((16#${hex_input:4:2}))
|
||||
echo "$r, $g, $b"
|
||||
}
|
||||
|
||||
rgb2hex() {
|
||||
r=$1
|
||||
g=$2
|
||||
b=$3
|
||||
printf "%02x%02x%02x" $r $g $b
|
||||
}
|
||||
|
||||
change_shade() {
|
||||
local hex_color=$1
|
||||
local shade=$2
|
||||
hex_input=$1
|
||||
r=$((16#${hex_input:0:2}))
|
||||
g=$((16#${hex_input:2:2}))
|
||||
b=$((16#${hex_input:4:2}))
|
||||
|
||||
r=$((r + shade))
|
||||
g=$((g + shade))
|
||||
b=$((b + shade))
|
||||
|
||||
rgb2hex $r $g $b
|
||||
}
|
||||
|
||||
restart_scripts=()
|
||||
restart_file=$(mktemp)
|
||||
export restart_file
|
||||
require_restart() {
|
||||
echo "$1" >> "$restart_file"
|
||||
}
|
||||
|
||||
export -f rgb2hex hex2rgb change_shade require_restart
|
||||
|
||||
# Extract colors from colors.toml (Omarchy 3.3+ format)
|
||||
primary_foreground=$(extract_color "foreground")
|
||||
primary_background=$(extract_color "background")
|
||||
cursor_color=$(extract_color "cursor")
|
||||
selection_foreground=$(extract_color "selection_foreground")
|
||||
selection_background=$(extract_color "selection_background")
|
||||
normal_black=$(extract_color "color0")
|
||||
normal_red=$(extract_color "color1")
|
||||
normal_green=$(extract_color "color2")
|
||||
normal_yellow=$(extract_color "color3")
|
||||
normal_blue=$(extract_color "color4")
|
||||
normal_magenta=$(extract_color "color5")
|
||||
normal_cyan=$(extract_color "color6")
|
||||
normal_white=$(extract_color "color7")
|
||||
bright_black=$(extract_color "color8")
|
||||
bright_red=$(extract_color "color9")
|
||||
bright_green=$(extract_color "color10")
|
||||
bright_yellow=$(extract_color "color11")
|
||||
bright_blue=$(extract_color "color12")
|
||||
bright_magenta=$(extract_color "color13")
|
||||
bright_cyan=$(extract_color "color14")
|
||||
bright_white=$(extract_color "color15")
|
||||
|
||||
export primary_background primary_foreground cursor_color selection_foreground selection_background
|
||||
export normal_black normal_red normal_green normal_yellow normal_blue normal_magenta normal_cyan normal_white
|
||||
export bright_black bright_red bright_green bright_yellow bright_blue bright_magenta bright_cyan bright_white
|
||||
|
||||
rgb_primary_foreground=$(hex2rgb $primary_foreground)
|
||||
rgb_primary_background=$(hex2rgb $primary_background)
|
||||
rgb_normal_black=$(hex2rgb $normal_black)
|
||||
rgb_normal_red=$(hex2rgb $normal_red)
|
||||
rgb_normal_green=$(hex2rgb $normal_green)
|
||||
rgb_normal_yellow=$(hex2rgb $normal_yellow)
|
||||
rgb_normal_blue=$(hex2rgb $normal_blue)
|
||||
rgb_normal_magenta=$(hex2rgb $normal_magenta)
|
||||
rgb_normal_cyan=$(hex2rgb $normal_cyan)
|
||||
rgb_normal_white=$(hex2rgb $normal_white)
|
||||
rgb_bright_black=$(hex2rgb $bright_black)
|
||||
rgb_bright_red=$(hex2rgb $bright_red)
|
||||
rgb_bright_green=$(hex2rgb $bright_green)
|
||||
rgb_bright_yellow=$(hex2rgb $bright_yellow)
|
||||
rgb_bright_blue=$(hex2rgb $bright_blue)
|
||||
rgb_bright_magenta=$(hex2rgb $bright_magenta)
|
||||
rgb_bright_cyan=$(hex2rgb $bright_cyan)
|
||||
rgb_bright_white=$(hex2rgb $bright_white)
|
||||
|
||||
export rgb_primary_foreground rgb_primary_background
|
||||
export rgb_normal_black rgb_normal_red rgb_normal_green rgb_normal_yellow rgb_normal_blue rgb_normal_magenta rgb_normal_cyan rgb_normal_white
|
||||
export rgb_bright_black rgb_bright_red rgb_bright_green rgb_bright_yellow rgb_bright_blue rgb_bright_magenta rgb_bright_cyan rgb_bright_white
|
||||
|
||||
if [[ -d ~/.config/omarchy/hooks/theme-set.d ]]; then
|
||||
for hook in ~/.config/omarchy/hooks/theme-set.d/*.sh; do
|
||||
if [[ -f "$hook" && -x "$hook" ]]; then
|
||||
if ! "$hook" "$@"; then
|
||||
error "Hook $(basename "$hook") failed!" >&2
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -f "$restart_file" ]]; then
|
||||
mapfile -t restart_scripts < "$restart_file"
|
||||
rm "$restart_file"
|
||||
fi
|
||||
if [[ ${#restart_scripts[@]} -gt 0 ]]; then
|
||||
running=()
|
||||
for app in "${restart_scripts[@]}"; do
|
||||
if pgrep -x "$app" > /dev/null; then
|
||||
running+=("${app^}")
|
||||
fi
|
||||
done
|
||||
if [[ ${#running[@]} -gt 0 ]]; then
|
||||
apps=""
|
||||
for app in "${running[@]}"; do
|
||||
apps+="- $app"$'\n'
|
||||
done
|
||||
notify-send "Omarchy Theme Hook" "The following apps require a restart to apply theme:\n\n$apps"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue