From ac41c900664332838a53d93b523678af3d2e7b57 Mon Sep 17 00:00:00 2001 From: sudacode Date: Tue, 17 Mar 2026 22:00:05 -0700 Subject: [PATCH] update --- .claude/settings.json##os.Linux | 9 +- .codex/config.toml##os.Linux | 9 + .config/SubMiner/config.jsonc##os.Linux | 7 +- .config/btop/btop.conf | 41 ++++- .config/hypr/hyprlock.conf | 2 +- .config/mpv-modules/ModernZ | 2 +- .config/mpv-modules/mpv-anilist-updater | 2 +- .config/mpv/mpv.conf##default | 12 +- .config/mpv/mpv.conf##os.Darwin | 15 +- .config/swaync/style.css | 15 +- .../waybar/catppuccin-macchiato/config.jsonc | 2 +- .config/waybar/scripts/wttr.sh | 168 +++++++++++++++++- projects/scripts/songinfo.sh | 6 +- projects/scripts/waybar/reload-waybar | 4 +- 14 files changed, 275 insertions(+), 19 deletions(-) mode change 120000 => 100755 .config/waybar/scripts/wttr.sh diff --git a/.claude/settings.json##os.Linux b/.claude/settings.json##os.Linux index 171e120..687350d 100644 --- a/.claude/settings.json##os.Linux +++ b/.claude/settings.json##os.Linux @@ -10,7 +10,14 @@ "Read(~/.zshrc)", "Bash(git * main)", "Bash(ls *)", - "Bash(pnpm build *)" + "Bash(pnpm build *)", + "Bash(subminer stats:*)", + "Bash(identify /home/sudacode/projects/japanese/SubMiner/docs-site/public/screenshots/stats-trends.png)", + "mcp__plugin_playwright_playwright__browser_resize", + "mcp__plugin_playwright_playwright__browser_click", + "mcp__plugin_playwright_playwright__browser_take_screenshot", + "mcp__plugin_playwright_playwright__browser_close", + "Bash(bun run:*)" ], "deny": [ "Bash(curl *)", diff --git a/.codex/config.toml##os.Linux b/.codex/config.toml##os.Linux index e6a99ae..e4e1693 100644 --- a/.codex/config.toml##os.Linux +++ b/.codex/config.toml##os.Linux @@ -123,6 +123,15 @@ trust_level = "trusted" [projects."/home/sudacode/.config/git"] trust_level = "trusted" +[projects."/home/sudacode/.config/rofi"] +trust_level = "trusted" + +[projects."/home/sudacode/.config/swaync"] +trust_level = "trusted" + +[projects."/home/sudacode/.config/ranger"] +trust_level = "trusted" + [notice.model_migrations] "gpt-5.3-codex" = "gpt-5.4" diff --git a/.config/SubMiner/config.jsonc##os.Linux b/.config/SubMiner/config.jsonc##os.Linux index e8595d6..a2a6a30 100644 --- a/.config/SubMiner/config.jsonc##os.Linux +++ b/.config/SubMiner/config.jsonc##os.Linux @@ -93,12 +93,15 @@ "overwriteImage": true, "mediaInsertMode": "append", "highlightWord": true, - "notificationType": "system", + "notificationType": "both", "showNotificationOnUpdate": true, "autoUpdateNewCards": true, }, "knownWords": { - "decks": ["Minecraft", "Kaishi 1.5k"], + "decks": { + "Minecraft": ["Expression", "Reading"], + "Kaishi 1.5k": ["Word", "Word Reading"] + }, "highlightEnabled": true, "refreshMinutes": 60, "matchMode": "headword", diff --git a/.config/btop/btop.conf b/.config/btop/btop.conf index e4bb161..66b81e6 100644 --- a/.config/btop/btop.conf +++ b/.config/btop/btop.conf @@ -2,7 +2,7 @@ #* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes. #* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes" -color_theme = "/Users/sudacode/.config/btop/themes/catppuccin_macchiato.theme" +color_theme = "/home/sudacode/.config/btop/themes/catppuccin_macchiato.theme" #* If the theme set background should be shown, set to False if you want terminal background transparency. theme_background = true @@ -40,6 +40,9 @@ graph_symbol = "braille" # Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". graph_symbol_cpu = "default" +# Graph symbol to use for graphs in gpu box, "default", "braille", "block" or "tty". +graph_symbol_gpu = "default" + # Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". graph_symbol_mem = "default" @@ -103,6 +106,9 @@ cpu_graph_upper = "Auto" #* Select from a list of detected attributes from the options menu. cpu_graph_lower = "Auto" +#* If gpu info should be shown in the cpu box. Available values = "Auto", "On" and "Off". +show_gpu_info = "Auto" + #* Toggles if the lower CPU graph should be inverted. cpu_invert_lower = true @@ -142,6 +148,9 @@ base_10_sizes = false #* Show CPU frequency. show_cpu_freq = true +#* How to calculate CPU frequency, available values: "first", "range", "lowest", "highest" and "average". +freq_mode = "first" + #* Draw a clock at top of screen, formatting according to strftime, empty string to disable. #* Special formatting: /host = hostname | /user = username | /uptime = system uptime clock_format = "%X" @@ -231,3 +240,33 @@ log_level = "WARNING" #* Automatically save current settings to config file on exit. save_config_on_exit = true + +#* Measure PCIe throughput on NVIDIA cards, may impact performance on certain cards. +nvml_measure_pcie_speeds = true + +#* Measure PCIe throughput on AMD cards, may impact performance on certain cards. +rsmi_measure_pcie_speeds = true + +#* Horizontally mirror the GPU graph. +gpu_mirror_graph = true + +#* Set which GPU vendors to show. Available values are "nvidia amd intel" +shown_gpus = "nvidia amd intel" + +#* Custom gpu0 model name, empty string to disable. +custom_gpu_name0 = "" + +#* Custom gpu1 model name, empty string to disable. +custom_gpu_name1 = "" + +#* Custom gpu2 model name, empty string to disable. +custom_gpu_name2 = "" + +#* Custom gpu3 model name, empty string to disable. +custom_gpu_name3 = "" + +#* Custom gpu4 model name, empty string to disable. +custom_gpu_name4 = "" + +#* Custom gpu5 model name, empty string to disable. +custom_gpu_name5 = "" diff --git a/.config/hypr/hyprlock.conf b/.config/hypr/hyprlock.conf index 5a8836e..1866b2f 100644 --- a/.config/hypr/hyprlock.conf +++ b/.config/hypr/hyprlock.conf @@ -9,7 +9,7 @@ # you can get started by copying this config to ~/.config/hypr/hyprlock.conf # -$font = Monospace +$font = Manrope ExtraLight general { hide_cursor = false diff --git a/.config/mpv-modules/ModernZ b/.config/mpv-modules/ModernZ index d917f6e..74885f5 160000 --- a/.config/mpv-modules/ModernZ +++ b/.config/mpv-modules/ModernZ @@ -1 +1 @@ -Subproject commit d917f6e253f22fcd0369751fc740816538ad729c +Subproject commit 74885f5deca861bc913fb4be79001282ade60a2b diff --git a/.config/mpv-modules/mpv-anilist-updater b/.config/mpv-modules/mpv-anilist-updater index ace1f74..2177ee4 160000 --- a/.config/mpv-modules/mpv-anilist-updater +++ b/.config/mpv-modules/mpv-anilist-updater @@ -1 +1 @@ -Subproject commit ace1f74822384d64be96cd5e94950980b1189bfd +Subproject commit 2177ee4711e396cf9b86f5d379109fc16bfa8434 diff --git a/.config/mpv/mpv.conf##default b/.config/mpv/mpv.conf##default index 219fa75..0ab77b9 100644 --- a/.config/mpv/mpv.conf##default +++ b/.config/mpv/mpv.conf##default @@ -130,13 +130,23 @@ scale=ewa_lanczos target-peak=800 [hdr] -target-colorspace-hint=yes +profile-desc=HDR content +profile-cond=get("video-params/gamma", "") == "pq" or get("video-params/gamma", "") == "hlg" +profile-restore=copy tone-mapping-param=0.5 tone-mapping-max-boost=2.0 allow-delayed-peak-detect=yes # For SDR content on HDR display (or vice versa) icc-profile-auto=yes +[sdr] +profile-desc=SDR content +profile-cond=get("video-params/gamma", "") ~= "pq" and get("video-params/gamma", "") ~= "hlg" +profile-restore=copy +# put SDR-only tweaks here +deband=yes +target-colorspace-hint=auto + [svp] interpolation=no input-ipc-server=/tmp/mpvsocket diff --git a/.config/mpv/mpv.conf##os.Darwin b/.config/mpv/mpv.conf##os.Darwin index 48d8e93..b936c0a 100644 --- a/.config/mpv/mpv.conf##os.Darwin +++ b/.config/mpv/mpv.conf##os.Darwin @@ -157,14 +157,25 @@ scale=ewa_lanczos target-peak=800 # hdr-tone-mapping=bt.2390 -# HDR profile [hdr] -target-colorspace-hint=yes +profile-desc=HDR content +profile-cond=get("video-params/gamma", "") == "pq" or get("video-params/gamma", "") == "hlg" +profile-restore=copy tone-mapping-param=0.5 tone-mapping-max-boost=2.0 allow-delayed-peak-detect=yes +# For SDR content on HDR display (or vice versa) icc-profile-auto=yes +[sdr] +profile-desc=SDR content +profile-cond=get("video-params/gamma", "") ~= "pq" and get("video-params/gamma", "") ~= "hlg" +profile-restore=copy +# put SDR-only tweaks here +deband=yes +target-colorspace-hint=auto + + # SVP compatibility profile [svp] interpolation=no diff --git a/.config/swaync/style.css b/.config/swaync/style.css index bd44c1f..0bd8d3c 100644 --- a/.config/swaync/style.css +++ b/.config/swaync/style.css @@ -493,6 +493,17 @@ slider { padding-bottom: 1rem; } -.image { - padding-right: 0.5rem; +.notification-default-action .notification-content .image, +.notification .notification-content .image { + -gtk-icon-size: 64px; + min-width: 64px; + min-height: 64px; + margin-right: 8px; +} + +.notification-default-action .notification-content .app-icon, +.notification .notification-content .app-icon { + -gtk-icon-size: 24px; + min-width: 24px; + min-height: 24px; } diff --git a/.config/waybar/catppuccin-macchiato/config.jsonc b/.config/waybar/catppuccin-macchiato/config.jsonc index 3e5dab2..97eedd1 100644 --- a/.config/waybar/catppuccin-macchiato/config.jsonc +++ b/.config/waybar/catppuccin-macchiato/config.jsonc @@ -273,7 +273,7 @@ "format": "{}", "max-length": 35, "on-click": "mpc toggle", - "on-click-right": "ghostty --initial-command=ncmpcpp", + "on-click-right": "ghostty --initial-command=rmpc", "on-scroll-down": "mpc volume -5", "on-scroll-up": "mpc volume +5", "hide-empty-text": true, diff --git a/.config/waybar/scripts/wttr.sh b/.config/waybar/scripts/wttr.sh deleted file mode 120000 index 7aaf903..0000000 --- a/.config/waybar/scripts/wttr.sh +++ /dev/null @@ -1 +0,0 @@ -../../../projects/scripts/waybar/wttr.sh \ No newline at end of file diff --git a/.config/waybar/scripts/wttr.sh b/.config/waybar/scripts/wttr.sh new file mode 100755 index 0000000..da67c44 --- /dev/null +++ b/.config/waybar/scripts/wttr.sh @@ -0,0 +1,167 @@ +#!/usr/bin/env bash + +set -euo pipefail + +location_input="${1:-Los_Angeles}" +location_query="${location_input//_/ }" +cache_dir="${XDG_CACHE_HOME:-$HOME/.cache}/waybar" +cache_key="${location_input//[^[:alnum:]_.-]/_}" +geo_cache_file="$cache_dir/weather-geo-${cache_key}.json" +weather_cache_file="$cache_dir/weather-${cache_key}.json" + +json_escape() { + jq -Rsa . +} + +emit_json() { + local text="$1" + local tooltip="$2" + + printf '{"text":%s,"tooltip":%s}\n' \ + "$(printf '%s' "$text" | json_escape)" \ + "$(printf '%s' "$tooltip" | json_escape)" +} + +emit_cached_or_error() { + if [[ -f "$weather_cache_file" ]]; then + cat "$weather_cache_file" + return + fi + + emit_json "weather unavailable" "weather service unavailable" +} + +url_encode() { + jq -rn --arg value "$1" '$value | @uri' +} + +weather_icon() { + local code="$1" + local is_day="$2" + + case "$code" in + 0) [[ "$is_day" == "1" ]] && printf '☀' || printf '☾' ;; + 1 | 2) [[ "$is_day" == "1" ]] && printf '⛅' || printf '☁' ;; + 3) printf '☁' ;; + 45 | 48) printf '🌫' ;; + 51 | 53 | 55 | 56 | 57) printf '🌦' ;; + 61 | 63 | 65 | 66 | 67 | 80 | 81 | 82) printf '🌧' ;; + 71 | 73 | 75 | 77 | 85 | 86) printf '🌨' ;; + 95 | 96 | 99) printf '⛈' ;; + *) printf '☁' ;; + esac +} + +weather_description() { + case "$1" in + 0) printf 'Clear sky' ;; + 1) printf 'Mainly clear' ;; + 2) printf 'Partly cloudy' ;; + 3) printf 'Overcast' ;; + 45 | 48) printf 'Fog' ;; + 51) printf 'Light drizzle' ;; + 53) printf 'Drizzle' ;; + 55) printf 'Dense drizzle' ;; + 56 | 57) printf 'Freezing drizzle' ;; + 61) printf 'Slight rain' ;; + 63) printf 'Rain' ;; + 65) printf 'Heavy rain' ;; + 66 | 67) printf 'Freezing rain' ;; + 71) printf 'Slight snow' ;; + 73) printf 'Snow' ;; + 75) printf 'Heavy snow' ;; + 77) printf 'Snow grains' ;; + 80) printf 'Rain showers' ;; + 81) printf 'Rain showers' ;; + 82) printf 'Heavy rain showers' ;; + 85 | 86) printf 'Snow showers' ;; + 95) printf 'Thunderstorm' ;; + 96 | 99) printf 'Thunderstorm with hail' ;; + *) printf 'Weather unavailable' ;; + esac +} + +load_geocode() { + if [[ -f "$geo_cache_file" ]]; then + cat "$geo_cache_file" + return + fi + + local encoded_query response + encoded_query="$(url_encode "$location_query")" + response="$( + curl \ + --silent \ + --show-error \ + --fail \ + --max-time 10 \ + "https://geocoding-api.open-meteo.com/v1/search?name=${encoded_query}&count=1&language=en&format=json" 2>/dev/null || true + )" + + if jq -e '.results[0] | .name and .latitude and .longitude and .timezone' >/dev/null <<<"$response"; then + jq -c '.results[0] | {name, admin1, country, latitude, longitude, timezone}' <<<"$response" | tee "$geo_cache_file" + return + fi + + return 1 +} + +fetch_weather() { + local latitude="$1" + local longitude="$2" + local timezone="$3" + + curl \ + --silent \ + --show-error \ + --fail \ + --max-time 10 \ + "https://api.open-meteo.com/v1/forecast?latitude=${latitude}&longitude=${longitude}¤t=temperature_2m,relative_humidity_2m,apparent_temperature,weather_code,wind_speed_10m,is_day&timezone=$(url_encode "$timezone")" 2>/dev/null || true +} + +format_weather() { + local place_json="$1" + local weather_json="$2" + local name region place code is_day icon description temperature feels_like humidity wind text tooltip + + name="$(jq -r '.name' <<<"$place_json")" + region="$(jq -r '.admin1 // empty' <<<"$place_json")" + place="$name" + if [[ -n "$region" ]]; then + place+=", $region" + fi + + code="$(jq -r '.current.weather_code' <<<"$weather_json")" + is_day="$(jq -r '.current.is_day' <<<"$weather_json")" + icon="$(weather_icon "$code" "$is_day")" + description="$(weather_description "$code")" + temperature="$(jq -r '.current.temperature_2m | round | "\(.)"' <<<"$weather_json")" + feels_like="$(jq -r '.current.apparent_temperature | round | "\(.)"' <<<"$weather_json")" + humidity="$(jq -r '.current.relative_humidity_2m | round | "\(.)"' <<<"$weather_json")" + wind="$(jq -r '.current.wind_speed_10m | round | "\(.)"' <<<"$weather_json")" + + text="${icon} ${temperature}°C" + tooltip="${place}: ${description}. Feels like ${feels_like}°C, humidity ${humidity}%, wind ${wind} km/h" + + emit_json "$text" "$tooltip" +} + +mkdir -p "$cache_dir" + +if ! place_json="$(load_geocode)"; then + emit_cached_or_error + exit 0 +fi + +latitude="$(jq -r '.latitude' <<<"$place_json")" +longitude="$(jq -r '.longitude' <<<"$place_json")" +timezone="$(jq -r '.timezone' <<<"$place_json")" + +weather_json="$(fetch_weather "$latitude" "$longitude" "$timezone")" + +if jq -e '.current | .temperature_2m and .relative_humidity_2m and .apparent_temperature and .weather_code and .wind_speed_10m and .is_day' >/dev/null <<<"$weather_json"; then + format_weather "$place_json" "$weather_json" | tee "$weather_cache_file" + exit 0 +fi + +emit_cached_or_error diff --git a/projects/scripts/songinfo.sh b/projects/scripts/songinfo.sh index 7239765..fa8b22f 100755 --- a/projects/scripts/songinfo.sh +++ b/projects/scripts/songinfo.sh @@ -1,7 +1,7 @@ -#!/bin/sh +#!/usr/bin/env bash -music_dir="/jellyfin/music" -previewdir="$XDG_CONFIG_HOME/ncmpcpp/previews" +music_dir="/truenas/jellyfin/music" +previewdir="${XDG_CONFIG_HOME:-$HOME/.config}/ncmpcpp/previews" filename="$(mpc --format "$music_dir"/%file% current)" previewname="$previewdir/$(mpc --format %album% current | base64).png" diff --git a/projects/scripts/waybar/reload-waybar b/projects/scripts/waybar/reload-waybar index 1a2b717..9fa2b99 100755 --- a/projects/scripts/waybar/reload-waybar +++ b/projects/scripts/waybar/reload-waybar @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash if pgrep -af "waybar -c /home/sudacode/.config/waybar/catppuccin-macchiato/config-battery.jsonc -s /home/sudacode/.config/waybar/catppuccin-macchiato/style.css" || pgrep -af "waybar -c /home/sudacode/.config/waybar/catppuccin-macchiato/config.jsonc -s /home/sudacode/.config/waybar/catppuccin-macchiato/style.css"; then @@ -9,7 +9,7 @@ fi BASE_DIR="$HOME/.config/waybar/catppuccin-macchiato" NODE_NAME="$(hyprctl systeminfo | grep -i "node name" | sed 's/Node name: //')" -if [[ "$NODE_NAME" = "sc-arch" ]]; then +if [[ "$NODE_NAME" = "sc-arch" || "$NODE_NAME" = "cachypc" ]]; then CONFIG="$BASE_DIR/config.jsonc" else CONFIG="$BASE_DIR/config-laptop.jsonc"