diff --git a/eww/.gitignore b/eww/.gitignore deleted file mode 100644 index bf0824e..0000000 --- a/eww/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.log \ No newline at end of file diff --git a/eww/Main/eww.yuck b/eww/Main/eww.yuck index 36fb027..2549317 100644 --- a/eww/Main/eww.yuck +++ b/eww/Main/eww.yuck @@ -24,7 +24,7 @@ (defpoll music-pp :interval "1s" "Main/scripts/music-title --icon") (defpoll music-artist :interval "1s" "Main/scripts/music-artist") (defpoll music-art :interval "1s" "Main/scripts/music-art") -(defpoll music-art-blur :interval "1s" "Main/scripts/music-art --blur") +(defpoll music-art-blur :interval "1s" "Main/scripts/music-art-blur") (defpoll volume :interval "1s" "Main/scripts/system --vol") (defpoll brightness :interval "1s" "Main/scripts/system --bri") (defpoll fortune :interval "1h" "Main/scripts/fortune-split 32 6") diff --git a/eww/Main/images/.gitignore b/eww/Main/images/.gitignore deleted file mode 100644 index a46d61d..0000000 --- a/eww/Main/images/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -temp* -cache.conf \ No newline at end of file diff --git a/eww/Main/scripts/music-art b/eww/Main/scripts/music-art index d967cef..b7b87ad 100755 --- a/eww/Main/scripts/music-art +++ b/eww/Main/scripts/music-art @@ -1,68 +1,45 @@ #!/bin/bash -tmp_dir="$HOME/.config/eww/Main/images" -tmp_temp_path=$tmp_dir/temp.png -tmp_blur_path="$tmp_dir/temp-blur.png" +tmp_dir="$HOME/.cache/eww/music-art" +art_path=$tmp_dir/temp.png +art_blur_path="$tmp_dir/temp-blur.png" cache_path="$tmp_dir/cache.conf" -default_path="$tmp_dir/default-music.svg" -default_blur_path="$tmp_dir/default-music-blur.png" +cache_blur_path="$tmp_dir/cache-blur.conf" +log_path="$tmp_dir/log.txt" +default_path="$HOME/.config/eww/Main/images/default-music.svg" +default_blur_path="$HOME/.config/eww/Main/images/default-music-blur.png" mkdir -p "$tmp_dir" artlink="$(playerctl metadata mpris:artUrl)" [ -f "$cache_path" ] && . "$cache_path" -# if [[ "$artlink" =~ ^https?:// ]]; then -# # avoid unnecessary downloads -# if [[ "$cached" != "$artlink" ]]; then -# echo "$artlink" > "$cache_path" -# curl -s "$artlink" --output "$tmp_temp_path" || exit 1 -# outputUrl="$tmp_temp_path" -# magick "$tmp_temp_path" -blur 0x8 "$tmp_blur_path" -# else -# outputUrl="$cached" -# fi -# elif [[ "$artlink" =~ ^file:// ]]; then -# if [[ §cached != "$artlink" ]]; then -# echo "$artlink" > "$cache_path" -# cp "$artFromBrowser" "$tmp_temp_path" -# magick "$tmp_temp_path" -blur 0x8 "$tmp_blur_path" -# outputUrl="$tmp_temp_path" -# else -# outputUrl="$cached" -# fi -# else -# outputUrl="$default_path" -# tmp_blur_path="$default_blur_path" -# fi - # avoid unnecessary downloads if [ -z "$artlink" ]; then - # No art URL, use default - outputUrl="$default_path" - tmp_blur_path="$default_blur_path" - echo "$outputUrl" > "$cache_path" + art_path="$default_path" + art_blur_path="$default_blur_path" elif [[ "$cachedlink" != "$artlink" ]]; then - echo "cachedlink=$artlink" > "$cache_path" + echo "cachedlink=\"$artlink\"" > "$cache_path" + echo "Updating music art: $artlink" >> "$log_path" if [[ "$artlink" == "file://"* ]]; then # Handle local file URLs local_file_path="${artlink#file://}" if [[ -f "$local_file_path" ]]; then - magick "$local_file_path" "$tmp_temp_path" || exit 1 + magick "$local_file_path" "$art_path" || exit 1 fi + magick "$art_path" -blur 0x8 "$art_blur_path" elif [[ "$artlink" =~ ^https?:// ]]; then # Handle HTTP/HTTPS URLs - curl -s "$artlink" --output "$tmp_temp_path"_orig || exit 1 - magick "$tmp_temp_path"_orig "$tmp_temp_path" || exit 1 + curl -s "$artlink" --output "$art_path"_orig || exit 1 + magick "$art_path"_orig "$art_path" || exit 1 + magick "$art_path" -blur 0x8 "$art_blur_path" + else + echo "Unknown art link format: $artlink" >> "$log_path" + art_path="$default_path" + art_blur_path="$default_blur_path" fi - - outputUrl="$tmp_temp_path" - magick "$tmp_temp_path" -blur 0x8 "$tmp_blur_path" fi -if [[ $1 == "--blur" ]]; then - echo "$tmp_blur_path" -else - echo "$tmp_temp_path" -fi \ No newline at end of file +echo "path=\"$art_blur_path\"" > "$cache_blur_path" +echo "$art_path" \ No newline at end of file diff --git a/eww/Main/scripts/music-art-blur b/eww/Main/scripts/music-art-blur new file mode 100755 index 0000000..25626bc --- /dev/null +++ b/eww/Main/scripts/music-art-blur @@ -0,0 +1,8 @@ +#!/bin/bash + +tmp_dir="$HOME/.cache/eww/music-art" +cache_blur_path="$tmp_dir/cache-blur.conf" + +. "$cache_blur_path" + +echo "$path" \ No newline at end of file diff --git a/fastfetch/brief.jsonc b/fastfetch/brief.jsonc index 1a39013..1648abc 100644 --- a/fastfetch/brief.jsonc +++ b/fastfetch/brief.jsonc @@ -1,25 +1,19 @@ { "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", - "display": { - "key": { - "width": 13 - } - }, "modules": [ - { "format": " ╔══════════════════════════════════", "type": "custom", "outputColor": "keys" }, - { "format": " ║ {user-name}@{host-name}", "type": "title", "outputColor": "keys" }, - { "format": " ║ ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌", "type": "custom", "outputColor": "keys" }, - { "key": " ║ os", "type": "os" }, - { "key": " ║ kernel", "type": "kernel" }, - { "format": "┌─╨─────────────────────────────────────", "type": "custom", "outputColor": "keys" }, - { "key": "│ host", "type": "host", "keyWidth": 9 }, - { "key": "│ cpu", "type": "cpu", "format": "{name}", "keyWidth": 9 }, - { "key": "│ gpu", "type": "gpu", "format": "{vendor} {name}", "keyWidth": 9 }, - { "format": "└─╥─────────────────────────────────────", "type": "custom", "outputColor": "keys" }, - { "key": " ║ shell", "type": "shell" }, - { "key": " ║ wm", "type": "wm" }, - { "key": " ║ de", "type": "de" }, - { "key": " ║ uptime", "type": "uptime" }, - { "format": " ╚══════════════════════════════════", "type": "custom", "outputColor": "keys" } + { "type": "title", "outputColor": "keys" }, + { "type": "separator" }, + { "key": " os", "type": "os", "outputColor": "#f5e0dc", "keyColor": "#f5e0dc" }, + { "key": "└ kernel", "type": "kernel", "outputColor": "#f2cdcd", "keyColor": "#f2cdcd" }, + { "type": "separator" }, + { "key": " host", "type": "host", "outputColor": "#eba0ac", "keyColor": "#eba0ac" }, + { "key": "├ gpu", "type": "gpu", "outputColor": "#f9e2af", "keyColor": "#f9e2af", "format": "{vendor} {name}" }, + { "key": "└ cpu", "type": "cpu", "outputColor": "#fab387", "keyColor": "#fab387", "format": "{name}" }, + { "type": "separator" }, + { "key": " shell", "type": "shell", "outputColor": "#89dceb", "keyColor": "#89dceb" }, + { "key": "├ wm", "type": "wm", "outputColor": "#74c7ec", "keyColor": "#74c7ec" }, + { "key": "├󰇄 de", "type": "de", "outputColor": "#89b4fa", "keyColor": "#89b4fa" }, + { "key": "└ up", "type": "uptime", "outputColor": "#b4befe", "keyColor": "#b4befe" }, + { "type": "break" } ] } diff --git a/fish/prev.d/programs.fish b/fish/prev.d/programs.fish index 4085b46..f185994 100644 --- a/fish/prev.d/programs.fish +++ b/fish/prev.d/programs.fish @@ -15,4 +15,4 @@ end if type -q trash alias rm="echo \"use 'trash' instead :)\" && sh -c \"exit 42\"" -end \ No newline at end of file +end diff --git a/waybar/modules/publicip.sh b/waybar/modules/publicip.sh index 1f0e9bb..45e323e 100755 --- a/waybar/modules/publicip.sh +++ b/waybar/modules/publicip.sh @@ -31,6 +31,8 @@ if ! ping -c 1 -W 2 1.1.1.1 >/dev/null 2>&1; then [ -z "$CACHED_IP" ] && CACHED_IP="N/A" [ -z "$CACHED_CODE" ] && CACHED_CODE="N/A" + echo "$(date +%Y-%m-%dT%H:%M:%S) - Waiting for network" >>"$time_log" + jq -n --unbuffered --compact-output \ --arg ip "$CACHED_IP" \ --arg country "$CACHED_CODE" \