Add changes from #2, thanks @ix
This commit is contained in:
parent
f808a9c076
commit
e3780099f4
1 changed files with 15 additions and 5 deletions
12
fetch.sh
12
fetch.sh
|
@ -127,7 +127,11 @@ title="$(whoami)@$(hostname)"
|
|||
|
||||
# Operating System (Configurable with "-O" and "--distro" at launch)
|
||||
# You can manually set this if the command below doesn't work for you.
|
||||
if type -p crux >/dev/null 2>&1; then
|
||||
os="CRUX"
|
||||
else
|
||||
os=$(awk '/^NAME=/' /etc/*ease | sed -n 's/^NAME=//p' | tr -d '"')
|
||||
fi
|
||||
|
||||
# Linux kernel name/version (Configurable with "-K" and "--kernel" at launch)
|
||||
kernel=$(uname -r)
|
||||
|
@ -199,7 +203,11 @@ cpuspeed () {
|
|||
memory=$(free -m | awk '/Mem:/ {printf $3 "MB / " $2 "MB"}')
|
||||
|
||||
# Currently playing song/artist (Configurable with "-m" and "--song" at launch)
|
||||
if type -p mpc >/dev/null 2>&1; then
|
||||
song=$(mpc current)
|
||||
else
|
||||
song="Unknown"
|
||||
fi
|
||||
|
||||
# Print terminal colors in a line
|
||||
# (Configurable with "--printcols start end" at launch)
|
||||
|
@ -488,9 +496,11 @@ printf "\n"
|
|||
# Enable line wrap again
|
||||
[ $linewrap -eq 0 ] && tput smam
|
||||
|
||||
# Display the image
|
||||
# If w3mimgviewer is found Display the image
|
||||
if type -p /usr/lib/w3m/w3mimgdisplay >/dev/null 2>&1; then
|
||||
printf "0;1;$xoffset;$yoffset;$imgsize;$imgsize;;;;;$img\n4;\n3;" |\
|
||||
/usr/lib/w3m/w3mimgdisplay
|
||||
fi
|
||||
|
||||
# Show the cursor again
|
||||
tput cnorm
|
||||
|
|
Loading…
Reference in a new issue