From 77d812e3beacc8c26825901e1705bcb450a680ae Mon Sep 17 00:00:00 2001 From: Hannes Date: Tue, 26 May 2026 17:12:08 +0200 Subject: [PATCH] some minor updates --- config/monitor.conf | 1 + config/theme.conf | 5 ++-- hyprlock.conf | 10 ++++---- hyprpaper.conf | 2 +- scripts/writing/tmdb.sh | 51 ++++++++++++++++++++++++++++++++++++++++- 5 files changed, 60 insertions(+), 9 deletions(-) diff --git a/config/monitor.conf b/config/monitor.conf index d340ac9..6216b35 100644 --- a/config/monitor.conf +++ b/config/monitor.conf @@ -40,6 +40,7 @@ monitorv2 { monitor = desc:LG Electronics LG ULTRAFINE 503NTKF3L437, 3840x2160@60, 0x-2160, 1, transform, 2, bitdepth, 10, cm, wide monitor = desc:LG Electronics LG ULTRAGEAR 107MAKR2RE65, 1920x1080@144, -1920x-1080, 1, transform, 2 +# monitor = desc:LG Electronics LG ULTRAGEAR 107MAKR2RE65, 3840x2160@60, -3840x-2160, 1, transform, 2 monitor = desc:Dell Inc. DELL P2419H D4CN3Q2, 1920x1080@60, -1920x-2160, 1 diff --git a/config/theme.conf b/config/theme.conf index e7ca6bb..f5f178d 100644 --- a/config/theme.conf +++ b/config/theme.conf @@ -48,8 +48,9 @@ general { decoration { rounding = 5 - active_opacity = 0.92 - inactive_opacity = 0.92 + active_opacity = 1 + # inactive_opacity = 0.75 + inactive_opacity = 1 fullscreen_opacity = 1 blur { enabled = false diff --git a/hyprlock.conf b/hyprlock.conf index 2904d20..b6f8c9e 100755 --- a/hyprlock.conf +++ b/hyprlock.conf @@ -15,7 +15,7 @@ background { label { monitor = text = cmd[update:1000] echo "$(date +"%H:%M")" - color = 0xFFbac3ff + color = 0xFFceca75 font_size = 80 font_family = JetBrains Mono ExtraBold position = 0, 140 @@ -27,7 +27,7 @@ label { label { monitor = text = - PAIN IS REAL, BUT SO IS HOPE - - color = 0xFFe5bad8 + color = 0xFFa5d0bb font_size = 12 font_family = JetBrains Mono ExtraLight position = 0, 80 @@ -39,7 +39,7 @@ label { label { monitor = text = Heya $USER :3 - color = 0xFFbac3ff + color = 0xFFceca75 font_size = 20 font_family = JetBrains Mono Light position = 0, 0 @@ -55,8 +55,8 @@ input-field { dots_size = 0.2 dots_spacing = 0.4 dots_center = true - inner_color = 0xFF394379 - font_color = 0xFFbac3ff + inner_color = 0xFF4b4900 + font_color = 0xFFceca75 fade_on_empty = false placeholder_text = unlock the magic... fail_color = 0xFFffb4ab diff --git a/hyprpaper.conf b/hyprpaper.conf index 0dd0731..d1c1ea8 100755 --- a/hyprpaper.conf +++ b/hyprpaper.conf @@ -1,5 +1,5 @@ wallpaper { monitor = * - path = /home/honney/Pictures/Wallpapers/snow_mountain_dark.png + path = /home/honney/Pictures/Wallpapers/japan_old_emperor_stream_with_bridge.png fit_mode = cover } \ No newline at end of file diff --git a/scripts/writing/tmdb.sh b/scripts/writing/tmdb.sh index 44db940..270c2b2 100755 --- a/scripts/writing/tmdb.sh +++ b/scripts/writing/tmdb.sh @@ -1,2 +1,51 @@ #!/bin/bash -wtype " () [tmdb-]" + +tmdbid() { + local q url + + # encode query safely + q=$(printf '%s' "$*" | jq -sRr @uri) + + url="https://www.themoviedb.org/search/movie?query=$q" + + curl -sL -A 'Mozilla/5.0' "$url" \ + | grep -oE '/movie/[0-9]+' \ + | head -1 \ + | cut -d/ -f3 +} + +clean_title() { + local s="$1" + + # remove (year) style parentheses + s=$(echo "$s" | sed -E 's/ *\([0-9]{4}\)//') + + # umlaut replacement + s="${s//ä/ae}"; s="${s//ö/oe}"; s="${s//ü/ue}" + s="${s//Ä/Ae}"; s="${s//Ö/Oe}"; s="${s//Ü/Ue}" + + # remove all numbers + s=$(echo "$s" | tr -d '0-9') + + # remove special characters except spaces and letters + s=$(echo "$s" | tr -cd '[:alpha:] [:space:]') + + # clean extra spaces + s=$(echo "$s" | tr -s ' ') + + echo "$s" +} + +title=$(hyprctl clients -j | jq '.[] | select(.workspace.id == 3)' | grep "The Movie Database" | sed 's/ — The Movie Database.*//' | sed 's/ "title": "//g') +tmdbid=$(tmdbid "$title") + +year="${title: -6}" + +if [ -z "$tmdbid" ]; then + new_title="${title//\ ([0-9][0-9][0-9][0-9])/}" + tmdbid=$(tmdbid "$new_title") +fi + +clean=$(clean_title "$title") + +wtype "$clean $year [tmdb-$tmdbid]"