From 07c3233d69d63d241ede109471aaf9d63591c502 Mon Sep 17 00:00:00 2001 From: Kid Date: Wed, 18 Dec 2019 18:47:31 +0800 Subject: [PATCH 1/5] get wallpaper for Plasma desktop --- neofetch | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/neofetch b/neofetch index efcea319..43313703 100755 --- a/neofetch +++ b/neofetch @@ -3741,6 +3741,10 @@ END image="$(decode_url "$image")" ;; + "Plasma"*) + image="$(cat ${HOME}/.config/plasma-org.kde.plasma.desktop-appletsrc | grep --fixed-strings --after-context 1 "[Wallpaper][org.kde.image][General]" | grep --extended-regexp --only-matching "file.+")" + ;; + *) if type -p feh >/dev/null && [[ -f "${HOME}/.fehbg" ]]; then image="$(awk -F\' '/feh/ {printf $(NF-1)}' "${HOME}/.fehbg")" @@ -5777,23 +5781,23 @@ EOF "Carbs"*) set_colors 4 5 4 4 4 4 read -rd '' ascii_data <<'EOF' -${c2} .......... - ..,;:ccccccc:;'.. - ..,clllc:;;;;;:cllc,. - .,cllc,... ..';;'. - .;lol;.. .. - .,lol;. - .coo:. - .'lol,. - .,lol,. - .,lol,. - 'col;. - .:ooc'. - .'col:. - .'cllc'.. .''. - ..:lolc,'.......',cll,. - ..;cllllccccclllc;'. - ...',;;;;;;,,... +${c2} .......... + ..,;:ccccccc:;'.. + ..,clllc:;;;;;:cllc,. + .,cllc,... ..';;'. + .;lol;.. .. + .,lol;. + .coo:. + .'lol,. + .,lol,. + .,lol,. + 'col;. + .:ooc'. + .'col:. + .'cllc'.. .''. + ..:lolc,'.......',cll,. + ..;cllllccccclllc;'. + ...',;;;;;;,,... ..... EOF ;; From c18965133876464a376fec6653c5bfb513e914ac Mon Sep 17 00:00:00 2001 From: Kid Date: Wed, 18 Dec 2019 18:51:45 +0800 Subject: [PATCH 2/5] revert spaces --- neofetch | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/neofetch b/neofetch index 43313703..142dae93 100755 --- a/neofetch +++ b/neofetch @@ -5781,23 +5781,23 @@ EOF "Carbs"*) set_colors 4 5 4 4 4 4 read -rd '' ascii_data <<'EOF' -${c2} .......... - ..,;:ccccccc:;'.. - ..,clllc:;;;;;:cllc,. - .,cllc,... ..';;'. - .;lol;.. .. - .,lol;. - .coo:. - .'lol,. - .,lol,. - .,lol,. - 'col;. - .:ooc'. - .'col:. - .'cllc'.. .''. - ..:lolc,'.......',cll,. - ..;cllllccccclllc;'. - ...',;;;;;;,,... +${c2} .......... + ..,;:ccccccc:;'.. + ..,clllc:;;;;;:cllc,. + .,cllc,... ..';;'. + .;lol;.. .. + .,lol;. + .coo:. + .'lol,. + .,lol,. + .,lol,. + 'col;. + .:ooc'. + .'col:. + .'cllc'.. .''. + ..:lolc,'.......',cll,. + ..;cllllccccclllc;'. + ...',;;;;;;,,... ..... EOF ;; From 090c4e4e5b1d0eeae4c37f1b858201f9a6084d2b Mon Sep 17 00:00:00 2001 From: Kid Date: Wed, 18 Dec 2019 19:57:07 +0800 Subject: [PATCH 3/5] fix format --- neofetch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 142dae93..15f7277e 100755 --- a/neofetch +++ b/neofetch @@ -3742,7 +3742,8 @@ END ;; "Plasma"*) - image="$(cat ${HOME}/.config/plasma-org.kde.plasma.desktop-appletsrc | grep --fixed-strings --after-context 1 "[Wallpaper][org.kde.image][General]" | grep --extended-regexp --only-matching "file.+")" + image="${XDG_CONFIG_HOME}/plasma-org.kde.plasma.desktop-appletsrc" + image="$(awk -F '=' '$1 == "Image" { print $2 }' $image)" ;; *) From 1b99df310d86c898ebd346626f0042bacb19c170 Mon Sep 17 00:00:00 2001 From: Kid Date: Wed, 18 Dec 2019 20:11:41 +0800 Subject: [PATCH 4/5] fix quotes --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 15f7277e..f660f299 100755 --- a/neofetch +++ b/neofetch @@ -3743,7 +3743,7 @@ END "Plasma"*) image="${XDG_CONFIG_HOME}/plasma-org.kde.plasma.desktop-appletsrc" - image="$(awk -F '=' '$1 == "Image" { print $2 }' $image)" + image="$(awk -F '=' '$1 == "Image" { print $2 }' "$image")" ;; *) From ce39f1bdbd4c75c1afa60c05e0a8b354ab66678c Mon Sep 17 00:00:00 2001 From: Kid Date: Mon, 23 Dec 2019 10:39:42 +0800 Subject: [PATCH 5/5] Update neofetch --- neofetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neofetch b/neofetch index f660f299..077fac5e 100755 --- a/neofetch +++ b/neofetch @@ -3742,8 +3742,8 @@ END ;; "Plasma"*) - image="${XDG_CONFIG_HOME}/plasma-org.kde.plasma.desktop-appletsrc" - image="$(awk -F '=' '$1 == "Image" { print $2 }' "$image")" + image="${XDG_CONFIG_HOME}/plasmarc" + image="$(awk -F '=' '$1 == "usersWallpapers" { print $2 }' "$image")" ;; *)