diff --git a/.config/hypr/hyprpaper.conf b/.config/hypr/hyprpaper.conf index 90bee80..fee07f4 100644 --- a/.config/hypr/hyprpaper.conf +++ b/.config/hypr/hyprpaper.conf @@ -2,6 +2,6 @@ splash = false wallpaper { monitor = - path = /home/tahinli/Pictures/Wallpapers/nikhil-kumar-JdPHvI7VF0o-unsplash.jpg + path = /home/tahinli/Pictures/Wallpapers/franck-ridel-VXZy1mljRfk-unsplash.jpg fit_mode = cover } diff --git a/.config/scripts/shared/qt_colors.sh b/.config/scripts/shared/theme_colors.sh similarity index 65% rename from .config/scripts/shared/qt_colors.sh rename to .config/scripts/shared/theme_colors.sh index 728397b..2a4c375 100755 --- a/.config/scripts/shared/qt_colors.sh +++ b/.config/scripts/shared/theme_colors.sh @@ -1,5 +1,30 @@ #!/bin/bash -# Compute mixed surface colors for QT to match GTK mix(background, color1, ratio) +# Post-process wallust-generated theme files: +# - GTK 3/4: resolve mix(#hex, #hex, ratio) to pre-computed hex values +# - QT 5/6: convert colors and compute mixed surface colors + +# Resolve mix() in GTK CSS files +for css in ~/.config/gtk-4.0/gtk.css ~/.config/gtk-4.0/gtk-dark.css ~/.config/gtk-3.0/gtk.css; do + [ -f "$css" ] || continue + python3 -c " +import re +def mix(c1, c2, f): + r = int(int(c1[1:3],16)*(1-f) + int(c2[1:3],16)*f) + g = int(int(c1[3:5],16)*(1-f) + int(c2[3:5],16)*f) + b = int(int(c1[5:7],16)*(1-f) + int(c2[5:7],16)*f) + return f'#{r:02x}{g:02x}{b:02x}' + +with open('$css') as f: + content = f.read() +content = re.sub( + r'mix\(\s*(#[0-9A-Fa-f]{6})\s*,\s*(#[0-9A-Fa-f]{6})\s*,\s*([0-9.]+)\s*\)', + lambda m: mix(m.group(1), m.group(2), float(m.group(3))), + content +) +with open('$css', 'w') as f: + f.write(content) +" +done for conf in ~/.config/qt5ct/colors/wallust.conf ~/.config/qt6ct/colors/wallust.conf; do [ -f "$conf" ] || continue diff --git a/.config/wallust/templates/gtk4.css b/.config/wallust/templates/gtk4.css index 673f417..6b3a113 100644 --- a/.config/wallust/templates/gtk4.css +++ b/.config/wallust/templates/gtk4.css @@ -44,3 +44,54 @@ @define-color shade_color rgba(0, 0, 0, 0.36); @define-color scrollbar_outline_color rgba(0, 0, 0, 0.5); + +window.background { + background-color: mix({{background}}, {{color1}}, 0.35); + color: {{foreground}}; +} + +headerbar { + background-color: mix({{background}}, {{color1}}, 0.4); + background-image: none; + color: {{foreground}}; +} + +.view, list, row, treeview { + background-color: mix({{background}}, {{color1}}, 0.3); + color: {{foreground}}; +} + +.card { + background-color: mix({{background}}, {{color1}}, 0.45); + color: {{foreground}}; +} + +.navigation-sidebar { + background-color: mix({{background}}, {{color1}}, 0.32); + color: {{foreground}}; +} + +popover contents { + background-color: mix({{background}}, {{color1}}, 0.4); + color: {{foreground}}; +} + +row:selected { + background-color: {{color4}}; + color: {{color15}}; +} + +button.suggested-action { + background-color: {{color4}}; + color: {{color15}}; +} + +button.destructive-action { + background-color: {{color1}}; + color: {{color15}}; +} + +entry { + background-color: mix({{background}}, {{color1}}, 0.3); + color: {{foreground}}; +} diff --git a/.config/wallust/wallust.toml b/.config/wallust/wallust.toml index c478297..17f9a8c 100644 --- a/.config/wallust/wallust.toml +++ b/.config/wallust/wallust.toml @@ -55,5 +55,5 @@ gtk3 = { template = 'gtk3.css', target = '~/.config/gtk-3.0/gtk.css' } qt5ct = { template = 'qt5ct-wallust.conf', target = '~/.config/qt5ct/colors/wallust.conf' } qt6ct = { template = 'qt6ct-wallust.conf', target = '~/.config/qt6ct/colors/wallust.conf' } [hooks] -# Convert colors and compute mixed surface colors for QT -qt_colors = """~/.config/scripts/shared/qt_colors.sh""" +# Resolve mix() and compute surface colors for GTK and QT +theme_colors = """~/.config/scripts/shared/theme_colors.sh"""