fix: apply-color script of fastfetch & gcp

This commit is contained in:
2026-01-11 17:02:42 +01:00
parent cff586109c
commit 01c17f0c08
3 changed files with 12 additions and 11 deletions
@@ -1,16 +1,16 @@
#!/bin/bash #!/bin/bash
[ -f "$HOME/.local/snippets/apply-color-helper" ] || { [ -f "$HOME/.local/snippets/apply-color-helper" ] || {
echo "Missing helper script: $HOME/.local/snippets/apply-color-helper" echo "Missing helper script: $HOME/.local/snippets/apply-color-helper"
exit 1 exit 1
} }
. "$HOME/.local/snippets/apply-color-helper" . "$HOME/.local/snippets/apply-color-helper"
file="$HOME/.config/fish/post.d/fetch.fish" file="$HOME/.config/fish/conf.d/60-fetch.fish"
sed -i -E "s/(set -g fetch_color\s+\"#)([0-9a-fA-F]{6})(\")/\1${colorHex}\3/" "$file" || { sed -i -E "s/(set -g fetch_color\s+\"#)([0-9a-fA-F]{6})(\")/\1${colorHex}\3/" "$file" || {
log_error "Failed to edit ${file}" log_error "Failed to edit ${file}"
exit 1 exit 1
} }
log_success "fastfetch" log_success "fastfetch"
@@ -92,10 +92,11 @@ end
if type -q git if type -q git
function gcp function gcp
git add -A || return 1
if test (count $argv) -eq 0 if test (count $argv) -eq 0
git commit -a -m "👐 foo: 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 else
git commit -a -m "$argv" || return 1 git commit -m "$argv" || return 1
end end
git push git push
end end
+3 -3
View File
@@ -43,9 +43,9 @@
"fetch_status": true, "fetch_status": true,
"fetch_upstream_icon": true, "fetch_upstream_icon": true,
"mapped_branches": { "mapped_branches": {
"feat/*": "🚀 ", "feat/*": "\ud83d\ude80 ",
"bug/*": "🐛 ", "bug/*": "\ud83d\udc1b ",
"dev/*": "🚧 " "dev/*": "\ud83d\udea7 "
} }
}, },
"style": "powerline", "style": "powerline",