fix: local config

This commit is contained in:
David JULIEN 2022-11-18 10:38:18 +01:00
parent 05a8a07c44
commit be4d042579
3 changed files with 16 additions and 16 deletions

View File

@ -33,7 +33,7 @@ export SUDO_EDITOR="nvim"
export EDITOR="nvim"
export TERMINAL="st"
export READER="zathura"
export BROWSER="firefox-bin"
export BROWSER="firefox"
export IRC_CLIENT="irssi"
export MAIL_CLIENT="neomutt"
export MUSIC_CLIENT="ncmpcpp"

View File

@ -13,12 +13,12 @@
## INFO
# $USER is already defined
host="$(cat /etc/conf.d/hostname | awk -F'"' '{ printf $2 }')"
host="$(cat /etc/hostname)"
cpu="$(grep "name" /proc/cpuinfo | uniq | sed -e 's/.*: //' -e 's/ .-Core.*//')"
os="Gentoo"
kernel="$(uname -sr)"
uptime="$(uptime -p | sed 's/up //')"
packages="$(printf '%s\n' /var/db/pkg/*/* | wc -l)"
packages="$(dpkg-query -f '.\n' -W | wc -l)"
shell="$($SHELL --version | sed -e 's/(.*)//')"
wm="$(tail -n 1 "$XDG_CONFIG_HOME/X11/xinitrc" | rev | cut -d ' ' -f 1 | rev)"
@ -62,20 +62,20 @@ if [ -x "$(command -v tput)" ]; then
fi
# you can change these
lc="${bold}${magenta}" # labels
nc="${bold}${magenta}" # user and hostname
lc="${bold}${red}" # labels
nc="${bold}${red}" # user and hostname
ic="${reset}${white}" # info
a0="${reset}${magenta}" # first gentoo color
a0="${reset}${red}" # first logo color
a1="${reset}${white}" # second logo color
cat <<EOF
${a0} ${nc}${USER}${ic}@${nc}${host}
${a0} _-----_ ${lc}cpu: ${ic}${cpu}
${a0} ( \\ ${lc}os: ${ic}${os}
${a0} \\ 0 \\ ${lc}kernel: ${ic}${kernel}
${a1} \\ ) ${lc}shell: ${ic}${shell}
${a1} / _/ ${lc}wm: ${ic}${wm}
${a1} ( _- ${lc}uptime: ${ic}${uptime}
${a1} \\____- ${lc}packages: ${ic}${packages}
${lc}memory: ${ic}${mem_used}MiB/${mem_total}MiB
${a0} ${nc}${USER}${ic}@${nc}${host}
${a0} _____ ${lc}cpu: ${ic}${cpu}
${a0} / __ \\ ${lc}os: ${ic}${os}
${a0} | / | ${lc}kernel: ${ic}${kernel}
${a1} | \\___- ${lc}shell: ${ic}${shell}
${a1} -_ ${lc}wm: ${ic}${wm}
${a1} --_ ${lc}uptime: ${ic}${uptime}
${a1} ${lc}packages: ${ic}${packages}
${lc}memory: ${ic}${mem_used}MiB/${mem_total}MiB
EOF

View File

@ -24,4 +24,4 @@ do
done
[ -n "$unread" ] && unread="$(echo "$unread" | cut -c 2-)" || exit
printf " %s%s " "$unread" "$icon"
printf " %s%s " "$unread" "$icon"