From 916bd6b61ed133674f0cefba915fcb4ea73ad43a Mon Sep 17 00:00:00 2001 From: Uyanide Date: Wed, 3 Dec 2025 20:07:20 +0100 Subject: [PATCH] some ghostty related fix --- .../scripts/.local/scripts/change-wallpaper | 31 ++++++++++--------- config/shell/.config/fish/post.d/.gitignore | 3 +- config/shell/.config/fish/post.d/alias.fish | 2 +- config/shell/.config/fish/post.d/fetch.fish | 16 +++++----- config/shell/.config/fish/post.d/ghostty.fish | 6 ++++ config/wallpaper/Pictures/backgrounds | 2 +- 6 files changed, 34 insertions(+), 26 deletions(-) create mode 100644 config/shell/.config/fish/post.d/ghostty.fish diff --git a/config/scripts/.local/scripts/change-wallpaper b/config/scripts/.local/scripts/change-wallpaper index f010e55..5314df4 100755 --- a/config/scripts/.local/scripts/change-wallpaper +++ b/config/scripts/.local/scripts/change-wallpaper @@ -72,27 +72,28 @@ touch "$image" # Copy image to local wallpaper directory ext=${image##*.} +wallpaper_ext="png" random_name=$(tr -dc 'a-zA-Z0-9' $2)?$1:$2; s=m*f; if(s<2) s=2; @@ -134,9 +135,9 @@ blurred_cache_image="$blur_cache_dir/${hash}.$ext" }') ### use a temporary file to avoid incomplete file being used - temp_blurred=$(mktemp --suffix=."$ext") || exit 1 + temp_blurred=$(mktemp --suffix=."$wallpaper_ext") || exit 1 trap 'rm -f "${temp_blurred}"' EXIT - magick "$image_copied" -blur 0x"$sigma" "$temp_blurred" || { + magick "$wallpaper_image" -blur 0x"$sigma" "$temp_blurred" || { echo "Could not create blurred image" exit 1 } @@ -163,18 +164,18 @@ blurred_cache_image="$blur_cache_dir/${hash}.$ext" # Apply wallpaper if [ "$XDG_CURRENT_DESKTOP" = "Hyprland" ]; then - swww img -n background "$image_copied" --transition-type fade --transition-duration 2 >/dev/null 2>/dev/null + swww img -n background "$wallpaper_image" --transition-type fade --transition-duration 2 >/dev/null 2>/dev/null - notify-send -a "change-wallpaper" "Wallpaper Changed" "$image" -i "$image_copied" + notify-send -a "change-wallpaper" "Wallpaper Changed" "$image" -i "$wallpaper_image" - change-colortheme -i "$image_copied" || exit 1 + change-colortheme -i "$wallpaper_image" || exit 1 elif [ "$XDG_CURRENT_DESKTOP" = "niri" ]; then ### Handled in wallpaper-daemon - # swww img -n background "$image_copied" --transition-type fade --transition-duration 2 > /dev/null 2> /dev/null + # swww img -n background "$wallpaper_image" --transition-type fade --transition-duration 2 > /dev/null 2> /dev/null - notify-send -a "change-wallpaper" "Wallpaper Changed" "$image" -i "$image_copied" + notify-send -a "change-wallpaper" "Wallpaper Changed" "$image" -i "$wallpaper_image" - change-colortheme -i "$image_copied" || exit 1 + change-colortheme -i "$wallpaper_image" || exit 1 else echo "Unsupported desktop environment: $XDG_CURRENT_DESKTOP" exit 1 diff --git a/config/shell/.config/fish/post.d/.gitignore b/config/shell/.config/fish/post.d/.gitignore index 97b693e..0210448 100644 --- a/config/shell/.config/fish/post.d/.gitignore +++ b/config/shell/.config/fish/post.d/.gitignore @@ -2,4 +2,5 @@ !.gitignore !fetch.fish !sshs.fish -!alias.fish \ No newline at end of file +!alias.fish +!ghostty.fish \ No newline at end of file diff --git a/config/shell/.config/fish/post.d/alias.fish b/config/shell/.config/fish/post.d/alias.fish index 2aa77f0..c9f488f 100644 --- a/config/shell/.config/fish/post.d/alias.fish +++ b/config/shell/.config/fish/post.d/alias.fish @@ -94,7 +94,7 @@ if type -q git function acp git add . || return 1 if test (count $argv) -eq 0 - git commit -m "too lazy to come up with a helpful commit message :)" || return 1 + git commit -m "👐 foo: too lazy to come up with a helpful commit message :)" || return 1 else git commit -m "$argv" || return 1 end diff --git a/config/shell/.config/fish/post.d/fetch.fish b/config/shell/.config/fish/post.d/fetch.fish index bd89fc5..55d7da1 100644 --- a/config/shell/.config/fish/post.d/fetch.fish +++ b/config/shell/.config/fish/post.d/fetch.fish @@ -1,18 +1,18 @@ if not set -q fetch_logo_type - set -g fetch_logo_type "auto" + set -g fetch_logo_type auto end if not set -q fetch_color set -g fetch_color "#89b4fa" end -if test "$fetch_logo_type" = "symbols" +if test "$fetch_logo_type" = symbols set -g fetch_args "--logo-type raw --logo-width 42 --logo \"$HOME/.config/fastfetch/logo_ros/42x.symbols\" --color \"$fetch_color\"" set -g fetch_args_brief "--logo-type raw --logo-width 28 --logo \"$HOME/.config/fastfetch/logo_ros/28x.symbols\" --color \"$fetch_color\"" -else if test "$fetch_logo_type" = "logo" +else if test "$fetch_logo_type" = logo set -g fetch_args "--logo-type builtin" set -g fetch_args_brief "--logo-type small" -else if test "$fetch_logo_type" = "sixel" +else if test "$fetch_logo_type" = sixel set -g fetch_args "--logo-type raw --logo-width 42 --logo \"$HOME/.config/fastfetch/logo_ros/42x.sixel\" --color \"$fetch_color\"" set -g fetch_args_brief "--logo-type raw --logo-width 28 --logo \"$HOME/.config/fastfetch/logo_ros/28x.sixel\" --color \"$fetch_color\"" else # "kitty" or "auto" and others @@ -24,15 +24,15 @@ if type -q fastfetch alias ff="fastfetch -c $HOME/.config/fastfetch/config.jsonc $fetch_args" if test -f "$HOME/.config/fastfetch/brief.jsonc" - alias ff-brief="fastfetch -c $HOME/.config/fastfetch/brief.jsonc $fetch_args_brief" + alias ffb="fastfetch -c $HOME/.config/fastfetch/brief.jsonc $fetch_args_brief" else - alias ff-brief=ff + alias ffb=ff end end # add 'set -g no_fetch' somewhere other than post.d to disable fetching if not set -q no_fetch - if type -q ff-brief - ff-brief + if type -q ffb + ffb end end diff --git a/config/shell/.config/fish/post.d/ghostty.fish b/config/shell/.config/fish/post.d/ghostty.fish new file mode 100644 index 0000000..f4253e3 --- /dev/null +++ b/config/shell/.config/fish/post.d/ghostty.fish @@ -0,0 +1,6 @@ +if string match -q '*ghostty*' $TERM && test $XDG_CURRENT_DESKTOP = niri + if test "$ghostty_niri_initialized" != "1" + set -xg ghostty_niri_initialized 1 + niri msg action set-column-width 50% + end +end \ No newline at end of file diff --git a/config/wallpaper/Pictures/backgrounds b/config/wallpaper/Pictures/backgrounds index a549b96..afca243 160000 --- a/config/wallpaper/Pictures/backgrounds +++ b/config/wallpaper/Pictures/backgrounds @@ -1 +1 @@ -Subproject commit a549b962e97df0bb848d6fa9e89aabb05f1cf75b +Subproject commit afca243978d6268a8ddc177fc0d499927ca1be2e