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
50d8a44a
Commit
50d8a44a
authored
Apr 01, 2016
by
Dylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't hardcode '/home/dyl/.config', use '' if available
parent
68c5fdb3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
18 deletions
+18
-18
config
config/config
+1
-2
neofetch
neofetch
+17
-16
No files found.
config/config
View file @
50d8a44a
...
@@ -7,7 +7,6 @@
...
@@ -7,7 +7,6 @@
# Speed up script by not using unicode
# Speed up script by not using unicode
export
LC_ALL
=
C
export
LC_ALL
=
C
export
LANG
=
C
export
LANG
=
C
export
LANGUAGE
=
C
# Info Options {{{
# Info Options {{{
...
@@ -395,7 +394,7 @@ config="on"
...
@@ -395,7 +394,7 @@ config="on"
# Path to custom config file location
# Path to custom config file location
# --config path/to/config
# --config path/to/config
config_file
=
"
$
HOME
/.config
/neofetch/config"
config_file
=
"
$
{
XDG_CONFIG_HOME
:-${
HOME
}
/.config
}
/neofetch/config"
# }}}
# }}}
neofetch
View file @
50d8a44a
...
@@ -22,8 +22,9 @@
...
@@ -22,8 +22,9 @@
# Created by Dylan Araps
# Created by Dylan Araps
# https://github.com/dylanaraps/
# https://github.com/dylanaraps/
version
=
${
BASH_VERSION
/.*
}
version
=
"
${
BASH_VERSION
/.*
}
"
SYS_LOCALE
=
"
${
LANG
:-
C
}
"
SYS_LOCALE
=
"
${
LANG
:-
C
}
"
XDG_CONFIG_HOME
=
"
${
XDG_CONFIG_HOME
:-${
HOME
}
/.config
}
"
# Speed up script by not using unicode
# Speed up script by not using unicode
export
LC_ALL
=
C
export
LC_ALL
=
C
...
@@ -420,7 +421,7 @@ config="on"
...
@@ -420,7 +421,7 @@ config="on"
# Path to custom config file location
# Path to custom config file location
# --config path/to/config
# --config path/to/config
config_file
=
"
$
HOME
/.config
/neofetch/config"
config_file
=
"
$
{
XDG_CONFIG_HOME
:-${
HOME
}
/.config
}
/neofetch/config"
# }}}
# }}}
...
@@ -860,7 +861,7 @@ getwmtheme () {
...
@@ -860,7 +861,7 @@ getwmtheme () {
'Openbox')
'Openbox')
[ -f "
${
HOME
}
/.config/openbox/rc.xml
" ] &&
\
[ -f "
${
HOME
}
/.config/openbox/rc.xml
" ] &&
\
wmtheme="
$(
awk
-F
"[<,>]"
'/<theme/ {getline; print $3}'
"
$
HOME
/.config
/openbox/rc.xml"
)
";
wmtheme="
$(
awk
-F
"[<,>]"
'/<theme/ {getline; print $3}'
"
$
XDG_CONFIG_HOME
/openbox/rc.xml"
)
";
;;
;;
'PekWM')
'PekWM')
...
@@ -1472,8 +1473,8 @@ getstyle () {
...
@@ -1472,8 +1473,8 @@ getstyle () {
# Check for gtk3 theme
# Check for gtk3 theme
if [ -z "
$gtk3theme
" ]; then
if [ -z "
$gtk3theme
" ]; then
if [ -f "
$
HOME
/.config
/gtk-3.0/settings.ini
" ]; then
if [ -f "
$
XDG_CONFIG_HOME
/gtk-3.0/settings.ini
" ]; then
gtk3theme=
$(
grep
"^[^#]*
$name
"
"
$
HOME
/.config
/gtk-3.0/settings.ini"
)
gtk3theme=
$(
grep
"^[^#]*
$name
"
"
$
XDG_CONFIG_HOME
/gtk-3.0/settings.ini"
)
elif type -p gsettings >/dev/null 2>&1; then
elif type -p gsettings >/dev/null 2>&1; then
gtk3theme="
$(
gsettings get org.gnome.desktop.interface
$gsettings
)
"
gtk3theme="
$(
gsettings get org.gnome.desktop.interface
$gsettings
)
"
...
@@ -1843,7 +1844,7 @@ getwallpaper () {
...
@@ -1843,7 +1844,7 @@ getwallpaper () {
img="
$(
awk
-F
\'
'/feh/ {printf $2}'
"
$HOME
/.fehbg"
)
"
img="
$(
awk
-F
\'
'/feh/ {printf $2}'
"
$HOME
/.fehbg"
)
"
elif type -p nitrogen >/dev/null 2>&1; then
elif type -p nitrogen >/dev/null 2>&1; then
img="
$(
awk
-F
'='
'/file/ {printf $2;exit;}'
"
$
HOME
/.config
/nitrogen/bg-saved.cfg"
)
"
img="
$(
awk
-F
'='
'/file/ {printf $2;exit;}'
"
$
XDG_CONFIG_HOME
/nitrogen/bg-saved.cfg"
)
"
elif type -p gsettings >/dev/null 2>&1; then
elif type -p gsettings >/dev/null 2>&1; then
case "
$XDG_CURRENT_DESKTOP
" in
case "
$XDG_CURRENT_DESKTOP
" in
...
@@ -2492,26 +2493,26 @@ getconfig () {
...
@@ -2492,26 +2493,26 @@ getconfig () {
source "
$config_file
"
source "
$config_file
"
return
return
fi
fi
mkdir -p "
$
HOME
/.config
/neofetch/
"
mkdir -p "
$
XDG_CONFIG_HOME
/neofetch/
"
# Check
$
HOME
/.config
/neofetch and create the
# Check
$
XDG_CONFIG_HOME
/neofetch and create the
# dir/files if they don't exist.
# dir/files if they don't exist.
if [ -f "
$
HOME
/.config
/neofetch/config
" ]; then
if [ -f "
$
XDG_CONFIG_HOME
/neofetch/config
" ]; then
source "
$
HOME
/.config
/neofetch/config
"
source "
$
XDG_CONFIG_HOME
/neofetch/config
"
elif [ -f "
/usr/share/neofetch/config
" ]; then
elif [ -f "
/usr/share/neofetch/config
" ]; then
cp "
/usr/share/neofetch/config
" "
$
HOME
/.config
/neofetch
"
cp "
/usr/share/neofetch/config
" "
$
XDG_CONFIG_HOME
/neofetch
"
source "
$
HOME
/.config
/neofetch/config
"
source "
$
XDG_CONFIG_HOME
/neofetch/config
"
elif [ -f "
/usr/local/share/neofetch/config
" ]; then
elif [ -f "
/usr/local/share/neofetch/config
" ]; then
cp "
/usr/local/share/neofetch/config
" "
$
HOME
/.config
/neofetch
"
cp "
/usr/local/share/neofetch/config
" "
$
XDG_CONFIG_HOME
/neofetch
"
source "
$
HOME
/.config
/neofetch/config
"
source "
$
XDG_CONFIG_HOME
/neofetch/config
"
else
else
getscriptdir
getscriptdir
cp "
$script_dir
/config/config
" "
$
HOME
/.config
/neofetch
"
cp "
$script_dir
/config/config
" "
$
XDG_CONFIG_HOME
/neofetch
"
source "
$
HOME
/.config
/neofetch/config
"
source "
$
XDG_CONFIG_HOME
/neofetch/config
"
fi
fi
}
}
...
...
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