From 15bab3fbe8182051be00c893c628c8555a753e0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Tue, 7 Apr 2026 07:14:00 +0300 Subject: [PATCH] feat: wallust-based GTK and QT dynamic theming --- .config/fish/config.fish | 7 + .config/fish/fish_variables | 2 +- .config/gtk-3.0/settings.ini | 18 ++ .config/gtk-4.0/settings.ini | 8 + .config/hypr/hyprlock.conf | 2 +- .config/hypr/hyprpaper.conf | 2 +- .config/mimeapps.list | 1 + .config/qt5ct/qt5ct.conf | 31 +++ .config/qt6ct/qt6ct.conf | 4 +- .config/scripts/hyprland/wallpaper_picker.sh | 4 +- .config/scripts/shared/qt_colors.sh | 51 ++++ .config/scripts/shared/song_detail.sh | 254 +++++++++---------- .config/scripts/shared/wallust_run.sh | 35 --- .config/wallust/templates/gtk3.css | 94 +++++++ .config/wallust/templates/gtk4.css | 46 ++++ .config/wallust/templates/qt5ct-wallust.conf | 4 + .config/wallust/templates/qt6ct-wallust.conf | 4 + .config/wallust/wallust.toml | 59 +++++ .config/waybar/config | 1 - .config/waybar/style.css | 9 +- .gitignore | 7 + 21 files changed, 463 insertions(+), 180 deletions(-) create mode 100644 .config/gtk-3.0/settings.ini create mode 100644 .config/gtk-4.0/settings.ini create mode 100644 .config/qt5ct/qt5ct.conf create mode 100755 .config/scripts/shared/qt_colors.sh delete mode 100755 .config/scripts/shared/wallust_run.sh create mode 100644 .config/wallust/templates/gtk3.css create mode 100644 .config/wallust/templates/gtk4.css create mode 100644 .config/wallust/templates/qt5ct-wallust.conf create mode 100644 .config/wallust/templates/qt6ct-wallust.conf create mode 100644 .config/wallust/wallust.toml diff --git a/.config/fish/config.fish b/.config/fish/config.fish index dc4fb44..589261f 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -14,3 +14,10 @@ zoxide init fish | source # opencode fish_add_path /home/tahinli/.opencode/bin + +# surrealdb +fish_add_path /home/tahinli/.surrealdb + +# bun +set --export BUN_INSTALL "$HOME/.bun" +set --export PATH $BUN_INSTALL/bin $PATH diff --git a/.config/fish/fish_variables b/.config/fish/fish_variables index 57dac05..09401b4 100644 --- a/.config/fish/fish_variables +++ b/.config/fish/fish_variables @@ -40,4 +40,4 @@ SETUVAR fish_pager_color_selected_background:\x2d\x2dbackground\x3dE6B450 SETUVAR fish_pager_color_selected_completion:\x1d SETUVAR fish_pager_color_selected_description:\x1d SETUVAR fish_pager_color_selected_prefix:\x1d -SETUVAR fish_user_paths:/home/tahinli/\x2eopencode/bin +SETUVAR fish_user_paths:/home/tahinli/\x2esurrealdb\x1e/home/tahinli/\x2eopencode/bin diff --git a/.config/gtk-3.0/settings.ini b/.config/gtk-3.0/settings.ini new file mode 100644 index 0000000..3a954c3 --- /dev/null +++ b/.config/gtk-3.0/settings.ini @@ -0,0 +1,18 @@ +[Settings] +gtk-theme-name=Adwaita-dark +gtk-icon-theme-name=Papirus-Dark +gtk-font-name=Adwaita Sans 11 +gtk-cursor-theme-name=default +gtk-cursor-theme-size=24 +gtk-toolbar-style=GTK_TOOLBAR_ICONS +gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR +gtk-button-images=1 +gtk-menu-images=1 +gtk-enable-event-sounds=1 +gtk-enable-input-feedback-sounds=0 +gtk-xft-antialias=1 +gtk-xft-hinting=1 +gtk-xft-hintstyle=hintslight +gtk-xft-rgba=rgb +gtk-application-prefer-dark-theme=1 +gtk-decoration-layout=: diff --git a/.config/gtk-4.0/settings.ini b/.config/gtk-4.0/settings.ini new file mode 100644 index 0000000..7ad9018 --- /dev/null +++ b/.config/gtk-4.0/settings.ini @@ -0,0 +1,8 @@ +[Settings] +gtk-theme-name=Adwaita-dark +gtk-icon-theme-name=Papirus-Dark +gtk-font-name=Adwaita Sans 11 +gtk-cursor-theme-name=default +gtk-cursor-theme-size=24 +gtk-application-prefer-dark-theme=1 +gtk-decoration-layout=: diff --git a/.config/hypr/hyprlock.conf b/.config/hypr/hyprlock.conf index cdb98ae..fe901e9 100644 --- a/.config/hypr/hyprlock.conf +++ b/.config/hypr/hyprlock.conf @@ -3,7 +3,7 @@ # Background image background { - path = ~/Pictures/ryunosuke-kikuno-VXp-9HwN1eg-unsplash.jpg + path = ~/Pictures/Wallpapers/ryunosuke-kikuno-VXp-9HwN1eg-unsplash.jpg } # Date label - displays current date in center diff --git a/.config/hypr/hyprpaper.conf b/.config/hypr/hyprpaper.conf index c9f3890..90bee80 100644 --- a/.config/hypr/hyprpaper.conf +++ b/.config/hypr/hyprpaper.conf @@ -2,6 +2,6 @@ splash = false wallpaper { monitor = - path = /home/tahinli/Pictures/Wallpapers/josh-hild-RR7j6oX_3lk-unsplash.jpg + path = /home/tahinli/Pictures/Wallpapers/nikhil-kumar-JdPHvI7VF0o-unsplash.jpg fit_mode = cover } diff --git a/.config/mimeapps.list b/.config/mimeapps.list index 5263ffe..91a84b2 100644 --- a/.config/mimeapps.list +++ b/.config/mimeapps.list @@ -57,6 +57,7 @@ text/x-rust=com.system76.CosmicEdit.desktop application/x-shellscript=com.system76.CosmicEdit.desktop application/x-python=com.system76.CosmicEdit.desktop x-scheme-handler/claude-cli=claude-code-url-handler.desktop +x-scheme-handler/surrealist=surrealist.desktop [Added Associations] video/mp4=org.gnome.Showtime.desktop; diff --git a/.config/qt5ct/qt5ct.conf b/.config/qt5ct/qt5ct.conf new file mode 100644 index 0000000..f86d841 --- /dev/null +++ b/.config/qt5ct/qt5ct.conf @@ -0,0 +1,31 @@ +[Appearance] +color_scheme_path=/home/tahinli/.config/qt5ct/colors/wallust.conf +custom_palette=true +standard_dialogs=gtk3 +style=Fusion + +[Fonts] +fixed="Noto Sans Arabic,12,-1,5,50,0,0,0,0,0" +general="Noto Sans Arabic,12,-1,5,50,0,0,0,0,0" + +[Interface] +activate_item_on_single_click=1 +buttonbox_layout=0 +cursor_flash_time=1000 +dialog_buttons_have_icons=1 +double_click_interval=400 +gui_effects=@Invalid() +keyboard_scheme=2 +menus_have_icons=true +show_shortcuts_in_context_menus=true +stylesheets=@Invalid() +toolbutton_style=4 +underline_shortcut=1 +wheel_scroll_lines=3 + +[SettingsWindow] +geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\n\0\0\0\0\0\0\0\r\xae\0\0\x3\xfd\0\0\n\0\0\0\0\0\0\0\r\xb5\0\0\x4\x1\0\0\0\0\x2\0\0\0\a\x80\0\0\n\0\0\0\0\0\0\0\r\xae\0\0\x3\xfd) + +[Troubleshooting] +force_raster_widgets=1 +ignored_applications=@Invalid() diff --git a/.config/qt6ct/qt6ct.conf b/.config/qt6ct/qt6ct.conf index da14c2f..c716718 100644 --- a/.config/qt6ct/qt6ct.conf +++ b/.config/qt6ct/qt6ct.conf @@ -1,5 +1,5 @@ [Appearance] -color_scheme_path=/usr/share/qt6ct/colors/waves.conf +color_scheme_path=/home/tahinli/.config/qt6ct/colors/wallust.conf custom_palette=true standard_dialogs=default style=Fusion @@ -24,7 +24,7 @@ underline_shortcut=1 wheel_scroll_lines=3 [SettingsWindow] -geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\ag\0\0\x3\xfd\0\0\0\0\0\0\0\0\0\0\ag\0\0\x3\xfd\0\0\0\0\x2\0\0\0\a\x80\0\0\0\0\0\0\0\0\0\0\ag\0\0\x3\xfd) +geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\n\0\0\0\0\0\0\0\r\xae\0\0\x3\xfd\0\0\n\0\0\0\0\0\0\0\r\xae\0\0\x3\xfd\0\0\0\0\x2\0\0\0\a\x80\0\0\n\0\0\0\0\0\0\0\r\xae\0\0\x3\xfd) [Troubleshooting] force_raster_widgets=1 diff --git a/.config/scripts/hyprland/wallpaper_picker.sh b/.config/scripts/hyprland/wallpaper_picker.sh index 0fa6e2d..ade14ce 100755 --- a/.config/scripts/hyprland/wallpaper_picker.sh +++ b/.config/scripts/hyprland/wallpaper_picker.sh @@ -60,12 +60,12 @@ wallpaper { EOF pkill hyprpaper -killall waybar 2>/dev/null # Run hyprpaper and wallust in parallel hyprpaper &disown -wallust run -q "$WALLPAPER" & +wallust run -qs "$WALLPAPER" & wait +killall waybar 2>/dev/null waybar &disown notify-send "Wallpaper Picker" "Applied: $SELECTED" diff --git a/.config/scripts/shared/qt_colors.sh b/.config/scripts/shared/qt_colors.sh new file mode 100755 index 0000000..728397b --- /dev/null +++ b/.config/scripts/shared/qt_colors.sh @@ -0,0 +1,51 @@ +#!/bin/bash +# Compute mixed surface colors for QT to match GTK mix(background, color1, ratio) + +for conf in ~/.config/qt5ct/colors/wallust.conf ~/.config/qt6ct/colors/wallust.conf; do + [ -f "$conf" ] || continue + + # Convert #RRGGBB to #ffRRGGBB + sed -i 's/#\([0-9A-Fa-f]\{6\}\)/#ff\1/g' "$conf" + + # Extract background (pos 4) and color1 (pos 1) from active_colors + IFS=',' read -ra COLS <<< "$(grep '^active_colors=' "$conf" | cut -d'=' -f2)" + BG="${COLS[4]// /}" # Dark role = background + C1="${COLS[1]// /}" # Button role = color1 + + BG="${BG/#\#ff/}" + C1="${C1/#\#ff/}" + + # Compute mix(bg, c1, ratio) for surface colors + SURFACE=$(python3 -c " +bg='$BG'; c1='$C1' +for f in [0.35, 0.45]: + r=int(int(bg[0:2],16)*(1-f)+int(c1[0:2],16)*f) + g=int(int(bg[2:4],16)*(1-f)+int(c1[2:4],16)*f) + b=int(int(bg[4:6],16)*(1-f)+int(c1[4:6],16)*f) + print(f'{r:02X}{g:02X}{b:02X}') +") + MIXED=$(echo "$SURFACE" | head -1) + MIXED_BTN=$(echo "$SURFACE" | tail -1) + + # Replace surface roles: Base(9), Window(10), AlternateBase(16), ToolTipBase(17) with MIXED + # Replace Button(1) with MIXED_BTN + python3 -c " +import re +mixed, mixed_btn = '#ff$MIXED', '#ff$MIXED_BTN' +c1 = '#ff$C1' +with open('$conf') as f: lines = f.readlines() +out = [] +for line in lines: + if '=' not in line or line.startswith('['): + out.append(line); continue + key, vals = line.strip().split('=', 1) + cols = [v.strip() for v in vals.split(',')] + for i in [9, 10, 16, 17]: + if i < len(cols) and cols[i] == c1: + cols[i] = mixed + if 1 < len(cols) and cols[1] == c1: + cols[1] = mixed_btn + out.append(key + '=' + ', '.join(cols) + '\n') +with open('$conf', 'w') as f: f.writelines(out) +" +done diff --git a/.config/scripts/shared/song_detail.sh b/.config/scripts/shared/song_detail.sh index 7f74854..461975f 100755 --- a/.config/scripts/shared/song_detail.sh +++ b/.config/scripts/shared/song_detail.sh @@ -1,142 +1,130 @@ #!/bin/bash # Get current playing song from playerctl with sticky player preference -if command -v playerctl &> /dev/null; then - # Check if any player is running - if playerctl status &> /dev/null; then - player_list=$(playerctl -l 2>/dev/null) - - if [[ -z "$player_list" ]]; then - echo "" - exit 0 - fi - - PREFERRED_FILE="/tmp/playerctl_preferred_player" - - # Find first Playing and first Paused player - best_playing="" - best_paused="" - while IFS= read -r player; do - player_status=$(playerctl -p "$player" status 2>/dev/null) - if [[ "$player_status" == "Playing" && -z "$best_playing" ]]; then - best_playing="$player" - elif [[ "$player_status" == "Paused" && -z "$best_paused" ]]; then - best_paused="$player" - fi - done <<< "$player_list" - - # Sticky player logic: prefer current player to avoid flickering +if ! command -v playerctl &> /dev/null; then + echo "" + exit 0 +fi + +player_list=$(playerctl -l 2>/dev/null) +if [[ -z "$player_list" ]]; then + echo "" + exit 0 +fi + +PREFERRED_FILE="/tmp/playerctl_preferred_player" + +# Find first Playing and first Paused player +best_playing="" +best_paused="" +while IFS= read -r player; do + player_status=$(playerctl -p "$player" status 2>/dev/null) + if [[ "$player_status" == "Playing" && -z "$best_playing" ]]; then + best_playing="$player" + elif [[ "$player_status" == "Paused" && -z "$best_paused" ]]; then + best_paused="$player" + fi +done <<< "$player_list" + +# Sticky player logic: prefer current player to avoid flickering +preferred="" +if [[ -f "$PREFERRED_FILE" ]]; then + preferred=$(cat "$PREFERRED_FILE") + pref_status=$(playerctl -p "$preferred" status 2>/dev/null) + if [[ "$pref_status" != "Playing" && "$pref_status" != "Paused" ]]; then preferred="" - if [[ -f "$PREFERRED_FILE" ]]; then - preferred=$(cat "$PREFERRED_FILE") - pref_status=$(playerctl -p "$preferred" status 2>/dev/null) - # Drop preferred if it's gone or stopped - if [[ "$pref_status" != "Playing" && "$pref_status" != "Paused" ]]; then - preferred="" - fi - fi - - # Choose player: - # - If preferred is still Playing, keep it (prevents flickering) - # - If preferred is Paused but something else is Playing, switch - # - Otherwise fall back to best available - chosen="" - if [[ -n "$preferred" ]]; then - pref_status=$(playerctl -p "$preferred" status 2>/dev/null) - if [[ "$pref_status" == "Playing" ]]; then - chosen="$preferred" - elif [[ -n "$best_playing" ]]; then - chosen="$best_playing" - else - chosen="$preferred" - fi - else - chosen="${best_playing:-$best_paused}" - fi - - if [[ -z "$chosen" ]]; then - echo "" - exit 0 - fi - - echo "$chosen" > "$PREFERRED_FILE" - - most_recent_player="$chosen" - status=$(playerctl -p "$most_recent_player" status 2>/dev/null) - - # Exit if media is stopped - if [[ "$status" == "Stopped" ]]; then - echo "" - exit 0 - fi - - artist=$(playerctl -p "$most_recent_player" metadata artist 2>/dev/null) - title=$(playerctl -p "$most_recent_player" metadata title 2>/dev/null) - duration_us=$(playerctl -p "$most_recent_player" metadata mpris:length 2>/dev/null) - - # Define cache file for paused position - POSITION_CACHE="/tmp/playerctl_position_cache_${most_recent_player}" - - # Set icon based on playback status - if [[ "$status" == "Playing" ]]; then - icon="▶" - else - icon="⏸" - fi - - # Convert duration from microseconds to MM:SS format - if [[ -n "$duration_us" ]]; then - duration_sec=$((duration_us / 1000000)) - minutes=$((duration_sec / 60)) - seconds=$((duration_sec % 60)) - duration=$(printf "%02d:%02d" $minutes $seconds) - else - duration="" - fi - - # Get current position with caching logic - position="" - position_us=$(playerctl -p "$most_recent_player" position 2>/dev/null) - - if [[ "$status" == "Playing" ]]; then - # When playing, get live position and cache it - if [[ -n "$position_us" ]]; then - position_sec=$(printf "%.0f" "$position_us") - pos_minutes=$((position_sec / 60)) - pos_seconds=$((position_sec % 60)) - position=$(printf "%02d:%02d" $pos_minutes $pos_seconds) - # Cache the position for when paused - echo "$position" > "$POSITION_CACHE" - fi - else - # When paused, use cached position if available - if [[ -f "$POSITION_CACHE" ]]; then - position=$(cat "$POSITION_CACHE") - fi - fi - - # Escape special characters for waybar markup compatibility - artist_escaped="${artist//&/&}" - title_escaped="${title//&/&}" - - if [[ -n "$artist" && -n "$title" && -n "$duration" && -n "$position" ]]; then - echo "$icon $artist_escaped - $title_escaped ($position / $duration)" - elif [[ -n "$artist" && -n "$title" && -n "$duration" ]]; then - echo "$icon $artist_escaped - $title_escaped ($duration)" - elif [[ -n "$title" && -n "$duration" && -n "$position" ]]; then - echo "$icon $title_escaped ($position / $duration)" - elif [[ -n "$title" && -n "$duration" ]]; then - echo "$icon $title_escaped ($duration)" - elif [[ -n "$artist" && -n "$title" ]]; then - echo "$icon $artist_escaped - $title_escaped" - elif [[ -n "$title" ]]; then - echo "$icon $title_escaped" - else - echo "$icon Something's Playing" - fi + pref_status="" + fi +fi + +# Choose player: +# - If preferred is still Playing, keep it +# - If preferred is Paused but something else is Playing, switch +# - Otherwise fall back to best available +chosen="" +if [[ -n "$preferred" ]]; then + if [[ "$pref_status" == "Playing" ]]; then + chosen="$preferred" + elif [[ -n "$best_playing" ]]; then + chosen="$best_playing" else - echo "" + chosen="$preferred" fi else + chosen="${best_playing:-$best_paused}" +fi + +if [[ -z "$chosen" ]]; then + echo "" + exit 0 +fi + +echo "$chosen" > "$PREFERRED_FILE" + +# Fetch ALL metadata in a single playerctl call +info=$(playerctl -p "$chosen" metadata --format '{{status}} {{artist}} {{title}} {{mpris:length}} {{position}}' 2>/dev/null) + +if [[ -z "$info" ]]; then echo "" + exit 0 +fi + +IFS=$'\t' read -r status artist title duration_us position_us <<< "$info" + +if [[ "$status" == "Stopped" ]]; then + echo "" + exit 0 +fi + +# Set icon based on playback status +if [[ "$status" == "Playing" ]]; then + icon="▶" +else + icon="⏸" +fi + +# Convert duration from microseconds to MM:SS +duration="" +if [[ -n "$duration_us" && "$duration_us" -gt 0 ]] 2>/dev/null; then + duration_sec=$((duration_us / 1000000)) + minutes=$((duration_sec / 60)) + seconds=$((duration_sec % 60)) + duration=$(printf "%02d:%02d" $minutes $seconds) +fi + +# Get position with caching for paused state +POSITION_CACHE="/tmp/playerctl_position_cache_${chosen}" +position="" +if [[ "$status" == "Playing" ]]; then + if [[ -n "$position_us" && "$position_us" -gt 0 ]] 2>/dev/null; then + position_sec=$((position_us / 1000000)) + pos_minutes=$((position_sec / 60)) + pos_seconds=$((position_sec % 60)) + position=$(printf "%02d:%02d" $pos_minutes $pos_seconds) + echo "$position" > "$POSITION_CACHE" + fi +else + if [[ -f "$POSITION_CACHE" ]]; then + position=$(cat "$POSITION_CACHE") + fi +fi + +# Escape ampersands for waybar markup +artist="${artist//&/&}" +title="${title//&/&}" + +if [[ -n "$artist" && -n "$title" && -n "$duration" && -n "$position" ]]; then + echo "$icon $artist - $title ($position / $duration)" +elif [[ -n "$artist" && -n "$title" && -n "$duration" ]]; then + echo "$icon $artist - $title ($duration)" +elif [[ -n "$title" && -n "$duration" && -n "$position" ]]; then + echo "$icon $title ($position / $duration)" +elif [[ -n "$title" && -n "$duration" ]]; then + echo "$icon $title ($duration)" +elif [[ -n "$artist" && -n "$title" ]]; then + echo "$icon $artist - $title" +elif [[ -n "$title" ]]; then + echo "$icon $title" +else + echo "$icon Something's Playing" fi diff --git a/.config/scripts/shared/wallust_run.sh b/.config/scripts/shared/wallust_run.sh deleted file mode 100755 index 4f3f974..0000000 --- a/.config/scripts/shared/wallust_run.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# Runs wallust and adjusts waybar transparency based on wallpaper top strip brightness - -if [ -z "$1" ]; then - echo "Usage: wallust_run.sh " - exit 1 -fi - -# Run wallust to generate colors -wallust run "$1" - -# Read the generated background color from style.css -BG=$(grep -oP 'alpha\(#\K[0-9A-Fa-f]{6}' ~/.config/waybar/style.css | head -1) - -if [ -z "$BG" ]; then - exit 0 -fi - -# Analyze the TOP STRIP of the wallpaper (top 5%) where waybar actually sits -# Crop top strip, scale to 1x1 pixel, get average brightness -TOP_BRIGHTNESS=$(magick "$1" -gravity North -crop 100%x5%+0+0 -resize 1x1! -format "%[fx:round((0.299*r + 0.587*g + 0.114*b) * 255)]" info:) - -# Map brightness to alpha: -# Dark top area (0) -> low alpha (0.2) = more transparent -# Light top area (255) -> high alpha (0.75) = more opaque, keep text readable -ALPHA=$(awk "BEGIN { printf \"%.2f\", 0.45 + ($TOP_BRIGHTNESS / 255.0) * 0.45 }") - -# Replace the alpha value in style.css -sed -i "s/alpha(#${BG}, [0-9.]*)/alpha(#${BG}, ${ALPHA})/" ~/.config/waybar/style.css - -# Restart waybar -killall waybar 2>/dev/null -waybar &disown - -echo "Top strip brightness: ${TOP_BRIGHTNESS}/255 | Alpha: ${ALPHA}" diff --git a/.config/wallust/templates/gtk3.css b/.config/wallust/templates/gtk3.css new file mode 100644 index 0000000..6b7023e --- /dev/null +++ b/.config/wallust/templates/gtk3.css @@ -0,0 +1,94 @@ +/* Generated by wallust */ + +* { + color: {{foreground}}; +} + +.background, +window, +dialog, +paned, +filechooser, +placessidebar, +placessidebar row, +list, +list row, +.view, +treeview.view, +row, +cell, +frame, +scrolledwindow { + background-color: mix({{background}}, {{color1}}, 0.35); + color: {{foreground}}; +} + +treeview.view:selected, +.view:selected, +row:selected, +list row:selected, +placessidebar row:selected { + background-color: {{color4}}; + color: {{color15}}; +} + +toolbar, +toolbar button { + background-color: mix({{background}}, {{color1}}, 0.4); + background-image: none; + color: {{foreground}}; +} + +menubar { + background-color: mix({{background}}, {{color1}}, 0.35); + color: {{foreground}}; +} + +headerbar, +headerbar:not(:backdrop), +headerbar:backdrop { + background-color: mix({{background}}, {{color1}}, 0.35); + background-image: none; + color: {{foreground}}; +} + +entry { + background-color: mix({{background}}, {{color1}}, 0.3); + color: {{foreground}}; +} + +button { + background-color: mix({{background}}, {{color1}}, 0.4); + color: {{foreground}}; +} + +button:hover { + background-color: mix({{background}}, {{color1}}, 0.5); +} + +button:active, +button:checked { + background-color: {{color4}}; + color: {{color15}}; +} + +selection, +*:selected { + background-color: {{color4}}; + color: {{color15}}; +} + +tooltip { + background-color: mix({{background}}, {{color1}}, 0.4); + color: {{foreground}}; +} + +menu { + background-color: mix({{background}}, {{color1}}, 0.4); + color: {{foreground}}; +} + +menuitem:hover { + background-color: {{color4}}; + color: {{color15}}; +} diff --git a/.config/wallust/templates/gtk4.css b/.config/wallust/templates/gtk4.css new file mode 100644 index 0000000..673f417 --- /dev/null +++ b/.config/wallust/templates/gtk4.css @@ -0,0 +1,46 @@ +/* Generated by wallust */ +@define-color accent_bg_color {{color4}}; +@define-color accent_fg_color {{color15}}; +@define-color accent_color {{color4}}; + +@define-color destructive_bg_color {{color1}}; +@define-color destructive_fg_color {{color15}}; +@define-color destructive_color {{color1}}; + +@define-color success_bg_color {{color2}}; +@define-color success_fg_color {{color15}}; +@define-color success_color {{color2}}; + +@define-color warning_bg_color {{color3}}; +@define-color warning_fg_color {{background}}; +@define-color warning_color {{color3}}; + +@define-color error_bg_color {{color1}}; +@define-color error_fg_color {{color15}}; +@define-color error_color {{color1}}; + +@define-color window_bg_color mix({{background}}, {{color1}}, 0.35); +@define-color window_fg_color {{foreground}}; + +@define-color view_bg_color mix({{background}}, {{color1}}, 0.3); +@define-color view_fg_color {{foreground}}; + +@define-color headerbar_bg_color mix({{background}}, {{color1}}, 0.4); +@define-color headerbar_fg_color {{foreground}}; +@define-color headerbar_backdrop_color mix({{background}}, {{color1}}, 0.35); + +@define-color card_bg_color mix({{background}}, {{color1}}, 0.45); +@define-color card_fg_color {{foreground}}; + +@define-color dialog_bg_color mix({{background}}, {{color1}}, 0.38); +@define-color dialog_fg_color {{foreground}}; + +@define-color popover_bg_color mix({{background}}, {{color1}}, 0.4); +@define-color popover_fg_color {{foreground}}; + +@define-color sidebar_bg_color mix({{background}}, {{color1}}, 0.32); +@define-color sidebar_fg_color {{foreground}}; +@define-color sidebar_backdrop_color mix({{background}}, {{color1}}, 0.3); + +@define-color shade_color rgba(0, 0, 0, 0.36); +@define-color scrollbar_outline_color rgba(0, 0, 0, 0.5); diff --git a/.config/wallust/templates/qt5ct-wallust.conf b/.config/wallust/templates/qt5ct-wallust.conf new file mode 100644 index 0000000..d1fc79e --- /dev/null +++ b/.config/wallust/templates/qt5ct-wallust.conf @@ -0,0 +1,4 @@ +[ColorScheme] +active_colors={{foreground}}, {{color1}}, {{color7}}, {{color3}}, {{background}}, {{color8}}, {{foreground}}, {{color7}}, {{foreground}}, {{color1}}, {{color1}}, {{background}}, {{color4}}, {{color15}}, {{color6}}, {{color5}}, {{color1}}, {{color1}}, {{foreground}}, {{color8}}, {{color4}} +disabled_colors={{color8}}, {{color1}}, {{color7}}, {{color3}}, {{background}}, {{color8}}, {{color8}}, {{color8}}, {{color8}}, {{color1}}, {{color1}}, {{background}}, {{color1}}, {{color8}}, {{color6}}, {{color5}}, {{color1}}, {{color1}}, {{foreground}}, {{color8}}, {{color4}} +inactive_colors={{foreground}}, {{color1}}, {{color7}}, {{color3}}, {{background}}, {{color8}}, {{foreground}}, {{color7}}, {{foreground}}, {{color1}}, {{color1}}, {{background}}, {{color1}}, {{foreground}}, {{color6}}, {{color5}}, {{color1}}, {{color1}}, {{foreground}}, {{color8}}, {{color4}} diff --git a/.config/wallust/templates/qt6ct-wallust.conf b/.config/wallust/templates/qt6ct-wallust.conf new file mode 100644 index 0000000..d1fc79e --- /dev/null +++ b/.config/wallust/templates/qt6ct-wallust.conf @@ -0,0 +1,4 @@ +[ColorScheme] +active_colors={{foreground}}, {{color1}}, {{color7}}, {{color3}}, {{background}}, {{color8}}, {{foreground}}, {{color7}}, {{foreground}}, {{color1}}, {{color1}}, {{background}}, {{color4}}, {{color15}}, {{color6}}, {{color5}}, {{color1}}, {{color1}}, {{foreground}}, {{color8}}, {{color4}} +disabled_colors={{color8}}, {{color1}}, {{color7}}, {{color3}}, {{background}}, {{color8}}, {{color8}}, {{color8}}, {{color8}}, {{color1}}, {{color1}}, {{background}}, {{color1}}, {{color8}}, {{color6}}, {{color5}}, {{color1}}, {{color1}}, {{foreground}}, {{color8}}, {{color4}} +inactive_colors={{foreground}}, {{color1}}, {{color7}}, {{color3}}, {{background}}, {{color8}}, {{foreground}}, {{color7}}, {{foreground}}, {{color1}}, {{color1}}, {{background}}, {{color1}}, {{foreground}}, {{color6}}, {{color5}}, {{color1}}, {{color1}}, {{foreground}}, {{color8}}, {{color4}} diff --git a/.config/wallust/wallust.toml b/.config/wallust/wallust.toml new file mode 100644 index 0000000..c478297 --- /dev/null +++ b/.config/wallust/wallust.toml @@ -0,0 +1,59 @@ +# wallust v3.5 +# +# You can copy this file to ~/.config/wallust/wallust.toml (keep in mind is a sample config) + +# SIMPLE TUTORIAL, or `man wallust.5`: +# https://explosion-mental.codeberg.page/wallust/ +# +# If comming from v2: https://explosion-mental.codeberg.page/wallust/v3.html#wallusttoml + +# Global section - values below can be overwritten by command line flags + +# How the image is parse, in order to get the colors: +# full - resized - wal - thumb - fastresize - kmeans +backend = "fastresize" + +# What color space to use to produce and select the most prominent colors: +# lab - labmixed - lch - lchmixed - salience +color_space = "salience" + +# Use the most prominent colors in a way that makes sense, a scheme color palette: +# dark - dark16 - darkcomp - darkcomp16 +# light - light16 - lightcomp - lightcomp16 +# harddark - harddark16 - harddarkcomp - harddarkcomp16 +# softdark - softdark16 - softdarkcomp - softdarkcomp16 +# softlight - softlight16 - softlightcomp - softlightcomp16 +# saliencedark - saliencedarkbalanced - saliencedarkdistributed - saliencedarklow (each has the 16 variations) +# salienceligh - saliencelightbalanced - saliencelightdistributed - saliencelightlow (each has the 16 variations) +palette = "saliencedarkbalanced" + +# Ensures a "readable contrast" (OPTIONAL, disabled by default) +# Should only be enabled when you notice an unreadable contrast frequently happening +# with your images. The reference color for the contrast is the background color. +#check_contrast = true + +# Color saturation, between [1% and 100%] (OPTIONAL, disabled by default) +# usually something higher than 50 increases the saturation and below +# decreases it (on a scheme with strong and vivid colors) +#saturation = 35 + +# Alpha value for templating, by default 100 (no other use whatsoever) +#alpha = 100 + +# Disables hooks completly +#no_hooks = true + +[templates] +# NOTE: prefer '' over "" for paths, avoids escaping. +# template: A RELATIVE path that points to `~/.config/wallust/template` (depends on platform) +# target: ABSOLUTE path in which to place a file with generated templated values. +# ¡ If either one is a directory, then both SHOULD be one. ! +# zathura = { template = 'zathura', target = '~/.config/zathura/zathurarc' } +gtk4 = { template = 'gtk4.css', target = '~/.config/gtk-4.0/gtk.css' } +gtk4dark = { template = 'gtk4.css', target = '~/.config/gtk-4.0/gtk-dark.css' } +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""" diff --git a/.config/waybar/config b/.config/waybar/config index 56b3b2a..32f537a 100644 --- a/.config/waybar/config +++ b/.config/waybar/config @@ -80,7 +80,6 @@ "custom/music": { "format": "{}", "exec": "bash ~/.config/scripts/shared/song_detail.sh", - "exec-if": "playerctl status &> /dev/null", "interval": 1, "on-click": "playerctl play-pause", "on-click-right": "bash ~/.config/scripts/shared/show_cover.sh", diff --git a/.config/waybar/style.css b/.config/waybar/style.css index 174eb1a..8d4e86d 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -1,11 +1,11 @@ #waybar { color: #ffffff; - background-color: alpha(#020503, 0.8); + background-color: alpha(#000000, 0.8); border-radius: 1px; } #idle_inhibitor.activated { - background-color: #B33625; + background-color: #e06c75; } * { @@ -15,6 +15,7 @@ #workspaces button { color: #ffffff; + background-color: transparent; } #workspaces button.active { @@ -22,7 +23,7 @@ } #custom-music { - color: #ffffff; + color: inherit; margin: 0 10px; background-color: transparent; border: none; @@ -31,7 +32,7 @@ } #custom-tray-toggle { - color: #ffffff; + color: inherit; padding: 0 6px; } diff --git a/.gitignore b/.gitignore index 48dabb8..b6017eb 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,8 @@ .config/nvim/lazy-lock.json + +# Wallust generated files +.config/qt5ct/colors/ +.config/qt6ct/colors/ +.config/gtk-3.0/gtk.css +.config/gtk-4.0/gtk.css +.config/gtk-4.0/gtk-dark.css