Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
neofetch
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
neofetch
Commits
00f75a61
Commit
00f75a61
authored
Jan 02, 2017
by
Dylan Araps
Committed by
GitHub
Jan 02, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #574 from dylanaraps/decode
Wallpaper: Decode gsettings file paths, closes #573
parents
ce63709b
b5757417
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
neofetch
neofetch
+13
-3
No files found.
neofetch
View file @
00f75a61
...
@@ -2009,9 +2009,14 @@ get_wallpaper() {
...
@@ -2009,9 +2009,14 @@ get_wallpaper() {
((
"
$de_run
"
!=
1
))
&&
get_de
((
"
$de_run
"
!=
1
))
&&
get_de
case
"
$de
"
in
case
"
$de
"
in
"Cinnamon"
*
)
image
=
"
$(
gsettings get org.cinnamon.desktop.background picture-uri
)
"
;;
"MATE"
*
)
image
=
"
$(
gsettings get org.mate.background picture-filename
)
"
;;
"MATE"
*
)
image
=
"
$(
gsettings get org.mate.background picture-filename
)
"
;;
"XFCE"
*
)
image
=
"
$(
xfconf-query
-c
xfce4-desktop
-p
/backdrop/screen0/monitor0/workspace0/last-image
)
"
;;
"XFCE"
*
)
image
=
"
$(
xfconf-query
-c
xfce4-desktop
-p
/backdrop/screen0/monitor0/workspace0/last-image
)
"
;;
"Cinnamon"
*
)
image
=
"
$(
gsettings get org.cinnamon.desktop.background picture-uri
)
"
image
=
"
$(
decode_url
"
$image
"
)
"
;;
*
)
*
)
if
type
-p
feh
>
/dev/null
&&
[[
-f
"
${
HOME
}
/.fehbg"
]]
;
then
if
type
-p
feh
>
/dev/null
&&
[[
-f
"
${
HOME
}
/.fehbg"
]]
;
then
image
=
"
$(
awk
-F
\'
'/feh/ {printf $2}'
"
${
HOME
}
/.fehbg"
)
"
image
=
"
$(
awk
-F
\'
'/feh/ {printf $2}'
"
${
HOME
}
/.fehbg"
)
"
...
@@ -2020,7 +2025,8 @@ get_wallpaper() {
...
@@ -2020,7 +2025,8 @@ get_wallpaper() {
image
=
"
$(
awk
-F
'='
'/file/ {printf $2;exit;}'
"
${
XDG_CONFIG_HOME
}
/nitrogen/bg-saved.cfg"
)
"
image
=
"
$(
awk
-F
'='
'/file/ {printf $2;exit;}'
"
${
XDG_CONFIG_HOME
}
/nitrogen/bg-saved.cfg"
)
"
else
else
image
=
"
$(
gsettings get org.gnome.desktop.background picture-uri
)
"
image
=
"
$(
gsettings get org.gnome.dimage
=
esktop.background picture-uri
)
"
image
=
"
$(
decode_url
"
$image
"
)
"
fi
fi
;;
;;
esac
esac
...
@@ -2028,7 +2034,6 @@ get_wallpaper() {
...
@@ -2028,7 +2034,6 @@ get_wallpaper() {
# Strip un-needed info from the path.
# Strip un-needed info from the path.
image
=
"
${
image
/
'file://'
}
"
image
=
"
${
image
/
'file://'
}
"
image
=
"
$(
trim_quotes
"
$image
"
)
"
image
=
"
$(
trim_quotes
"
$image
"
)
"
image
=
"
${
image
//\%20/
}
"
;;
;;
"Mac OS X"
)
"Mac OS X"
)
...
@@ -3108,6 +3113,11 @@ get_process_name() {
...
@@ -3108,6 +3113,11 @@ get_process_name() {
printf
"%s"
"
$name
"
printf
"%s"
"
$name
"
}
}
decode_url
()
{
decode
=
"
${
1
//+/
}
"
printf
"%b"
"
${
decode
//%/\\x
}
"
}
# FINISH UP
# FINISH UP
usage
()
{
printf
"%s"
"
\
usage
()
{
printf
"%s"
"
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment