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
67a0879a
Commit
67a0879a
authored
Jun 12, 2016
by
Dylan Araps
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix lint errors
parent
bd6225aa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
25 deletions
+25
-25
neofetch
neofetch
+25
-25
No files found.
neofetch
View file @
67a0879a
...
@@ -881,19 +881,19 @@ getwmtheme () {
...
@@ -881,19 +881,19 @@ getwmtheme () {
'E17' | 'Enlightenment')
'E17' | 'Enlightenment')
if type -p eet >/dev/null 2>&1; then
if type -p eet >/dev/null 2>&1; then
wmtheme="
$(
eet
-d
$HOME
/.e/e/config/standard/e.cfg
config |
awk
'/value \"file\" string.*.edj/ {print $4}'
)
"
wmtheme="
$(
eet
-d
"
$HOME
/.e/e/config/standard/e.cfg"
config |
awk
'/value \"file\" string.*.edj/ {print $4}'
)
"
wmtheme=
${
wmtheme
##*/
}
wmtheme=
${
wmtheme
##*/
}
wmtheme=
${
wmtheme
%.*
}
wmtheme=
${
wmtheme
%.*
}
fi
fi
;;
;;
'Fluxbox')
'Fluxbox')
[ -f
$HOME
/.fluxbox/init
] &&
\
[ -f
"
$HOME
/.fluxbox/init
"
] &&
\
wmtheme="
$(
awk
-F
"/"
'/styleFile/ {print $NF}'
"
$HOME
/.fluxbox/init"
)
"
wmtheme="
$(
awk
-F
"/"
'/styleFile/ {print $NF}'
"
$HOME
/.fluxbox/init"
)
"
;;
;;
'IceWM'*)
'IceWM'*)
[ -f
$HOME
/.icewm/theme
] &&
\
[ -f
"
$HOME
/.icewm/theme
"
] &&
\
wmtheme="
$(
awk
-F
"[
\"
,/]"
'!/#/ {print $2}'
"
$HOME
/.icewm/theme"
)
"
wmtheme="
$(
awk
-F
"[
\"
,/]"
'!/#/ {print $2}'
"
$HOME
/.icewm/theme"
)
"
;;
;;
...
@@ -909,7 +909,7 @@ getwmtheme () {
...
@@ -909,7 +909,7 @@ getwmtheme () {
;;
;;
'PekWM')
'PekWM')
[ -f
$HOME
/.pekwm/config
] &&
\
[ -f
"
$HOME
/.pekwm/config
"
] &&
\
wmtheme="
$(
awk
-F
"/"
'/Theme/ {gsub(/\"/,""); print $NF}'
"
$HOME
/.pekwm/config"
)
"
wmtheme="
$(
awk
-F
"/"
'/Theme/ {gsub(/\"/,""); print $NF}'
"
$HOME
/.pekwm/config"
)
"
;;
;;
...
@@ -1404,7 +1404,7 @@ getgpu () {
...
@@ -1404,7 +1404,7 @@ getgpu () {
getmemory () {
getmemory () {
case "$os" in
case "$os" in
"Linux" | "Windows")
"Linux" | "Windows")
if
[ ! -z "$(grep -F "MemAvail" /proc/meminfo)" ]
; then
if
grep -F "MemAvail" /proc/meminfo >/dev/null 2>&1
; then
mem=($(awk -F '
:|
kB
' '
/MemTotal|MemAvail/ {printf
$2
}
' /proc/meminfo))
mem=($(awk -F '
:|
kB
' '
/MemTotal|MemAvail/ {printf
$2
}
' /proc/meminfo))
memused=
$((
mem[0]
-
mem[1]
))
memused=
$((
mem[0]
-
mem[1]
))
else
else
...
@@ -1892,8 +1892,8 @@ getbattery () {
...
@@ -1892,8 +1892,8 @@ getbattery () {
*) index="
$battery_num
" ;;
*) index="
$battery_num
" ;;
esac
esac
batteries=(
$(
cat
/sys/class/power_supply/BAT
${
battery_num
}
/capacity
)
)
batteries=(
$(
cat
"/sys/class/power_supply/BAT
$battery_num
/capacity"
)
)
battery_state=(
$(
cat
/sys/class/power_supply/BAT
${
battery_num
}
/status
)
)
battery_state=(
$(
cat
"/sys/class/power_supply/BAT
${
battery_num
}
/status"
)
)
# Get the subtitle and reassign it so it doesn't change.
# Get the subtitle and reassign it so it doesn't change.
title="
$subtitle
"
title="
$subtitle
"
...
@@ -1911,7 +1911,7 @@ getbattery () {
...
@@ -1911,7 +1911,7 @@ getbattery () {
# Print each battery on a separate line.
# Print each battery on a separate line.
for bat in "
${
batteries
[@]
}
"; do
for bat in "
${
batteries
[@]
}
"; do
case "
$battery_display
" in
case "
$battery_display
" in
"
bar
") prin "
${
title
}${
index
:-
0
}
" "
$(
bar
${
bat
/
'%'
}
100
)
" ;;
"
bar
") prin "
${
title
}${
index
:-
0
}
" "
$(
bar
"
${
bat
/
'%'
}
"
100
)
" ;;
"
infobar
") prin "
${
title
}${
index
:-
0
}
" "
${
bat
}
%
$(
bar
"
${
bat
/
'%'
}
"
100
)
" ;;
"
infobar
") prin "
${
title
}${
index
:-
0
}
" "
${
bat
}
%
$(
bar
"
${
bat
/
'%'
}
"
100
)
" ;;
"
barinfo
") prin "
${
title
}${
index
:-
0
}
" "
$(
bar
"
${
bat
/
'%'
}
"
100
)
${
bat
}
%
" ;;
"
barinfo
") prin "
${
title
}${
index
:-
0
}
" "
$(
bar
"
${
bat
/
'%'
}
"
100
)
${
bat
}
%
" ;;
*) prin "
${
title
}${
index
:-
0
}
" "
${
bat
}
%
" ;;
*) prin "
${
title
}${
index
:-
0
}
" "
${
bat
}
%
" ;;
...
@@ -1970,7 +1970,7 @@ getbattery () {
...
@@ -1970,7 +1970,7 @@ getbattery () {
esac
esac
case "
$battery_display
" in
case "
$battery_display
" in
"
bar
") battery="
$(
bar
${
battery
/
'%'
*
}
100
)
" ;;
"
bar
") battery="
$(
bar
"
${
battery
/
'%'
*
}
"
100
)
" ;;
"
infobar
") battery="
${
battery
}
$(
bar
"
${
battery
/
'%'
*
}
"
100
)
" ;;
"
infobar
") battery="
${
battery
}
$(
bar
"
${
battery
/
'%'
*
}
"
100
)
" ;;
"
barinfo
") battery="
$(
bar
"
${
battery
/
'%'
*
}
"
100
)
${
battery
}
" ;;
"
barinfo
") battery="
$(
bar
"
${
battery
/
'%'
*
}
"
100
)
${
battery
}
" ;;
esac
esac
...
@@ -2728,12 +2728,12 @@ colors () {
...
@@ -2728,12 +2728,12 @@ colors () {
}
}
setcolors
()
{
setcolors
()
{
c1
=
"
$(
color
$1
)${
ascii_bold
}
"
c1
=
"
$(
color
"
$1
"
)${
ascii_bold
}
"
c2
=
"
$(
color
$2
)${
ascii_bold
}
"
c2
=
"
$(
color
"
$2
"
)${
ascii_bold
}
"
c3
=
"
$(
color
$3
)${
ascii_bold
}
"
c3
=
"
$(
color
"
$3
"
)${
ascii_bold
}
"
c4
=
"
$(
color
$4
)${
ascii_bold
}
"
c4
=
"
$(
color
"
$4
"
)${
ascii_bold
}
"
c5
=
"
$(
color
$5
)${
ascii_bold
}
"
c5
=
"
$(
color
"
$5
"
)${
ascii_bold
}
"
c6
=
"
$(
color
$6
)${
ascii_bold
}
"
c6
=
"
$(
color
"
$6
"
)${
ascii_bold
}
"
if
[
"
${
colors
[0]
}
"
==
"distro"
]
;
then
if
[
"
${
colors
[0]
}
"
==
"distro"
]
;
then
title_color
=
"
$c1
"
title_color
=
"
$c1
"
...
@@ -2747,24 +2747,24 @@ setcolors () {
...
@@ -2747,24 +2747,24 @@ setcolors () {
[
"
$2
"
==
7
]
&&
subtitle_color
=
"
\0
33[0m
\0
33[3
${
1
}
m"
[
"
$2
"
==
7
]
&&
subtitle_color
=
"
\0
33[0m
\0
33[3
${
1
}
m"
[
"
$1
"
==
7
]
&&
title_color
=
"
\0
33[0m"
[
"
$1
"
==
7
]
&&
title_color
=
"
\0
33[0m"
else
else
title_color
=
"
$(
color
${
colors
[0]
}
)
"
title_color
=
"
$(
color
"
${
colors
[0]
}
"
)
"
at_color
=
"
$(
color
${
colors
[1]
}
)
"
at_color
=
"
$(
color
"
${
colors
[1]
}
"
)
"
underline_color
=
"
$(
color
${
colors
[2]
}
)
"
underline_color
=
"
$(
color
"
${
colors
[2]
}
"
)
"
subtitle_color
=
"
$(
color
${
colors
[3]
}
)
"
subtitle_color
=
"
$(
color
"
${
colors
[3]
}
"
)
"
colon_color
=
"
$(
color
${
colors
[4]
}
)
"
colon_color
=
"
$(
color
"
${
colors
[4]
}
"
)
"
info_color
=
"
$(
color
${
colors
[5]
}
)
"
info_color
=
"
$(
color
"
${
colors
[5]
}
"
)
"
fi
fi
if
[
"
$progress_color_elapsed
"
==
"distro"
]
;
then
if
[
"
$progress_color_elapsed
"
==
"distro"
]
;
then
progress_color_elapsed
=
"
$(
color
fg
)
"
progress_color_elapsed
=
"
$(
color
fg
)
"
else
else
progress_color_elapsed
=
"
$(
color
$progress_color_elapsed
)
"
progress_color_elapsed
=
"
$(
color
"
$progress_color_elapsed
"
)
"
fi
fi
case
"
$progress_color_total
$1
"
in
case
"
$progress_color_total
$1
"
in
distro
\
[
736]
)
progress_color_total
=
"
$c2
"
;;
distro
\
[
736]
)
progress_color_total
=
"
$c2
"
;;
distro
\
[
0-9]
)
progress_color_total
=
"
$c1
"
;;
distro
\
[
0-9]
)
progress_color_total
=
"
$c1
"
;;
*
)
progress_color_total
=
"
$(
color
$progress_color_total
)
"
;;
*
)
progress_color_total
=
"
$(
color
"
$progress_color_total
"
)
"
;;
esac
esac
}
}
...
@@ -3247,7 +3247,7 @@ while [ "$1" ]; do
...
@@ -3247,7 +3247,7 @@ while [ "$1" ]; do
fi
fi
for
func
in
"
${
info
[@]
}
"
;
do
for
func
in
"
${
info
[@]
}
"
;
do
info
"
$(
tr
'[:lower:]'
'[:upper:]'
<<<
"
$func
"
)
"
$func
info
"
$(
tr
'[:lower:]'
'[:upper:]'
<<<
"
$func
"
)
"
"
$func
"
done
done
info linebreak
info linebreak
...
@@ -3361,7 +3361,7 @@ fi
...
@@ -3361,7 +3361,7 @@ fi
# Show error messages
# Show error messages
if
[
"
$verbose
"
==
"on"
]
;
then
if
[
"
$verbose
"
==
"on"
]
;
then
printf
"
$err
"
printf
"
%s"
"
$err
"
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