dotfiles

*nix config files
git clone git://git.pyratebeard.net/dotfiles.git
Log | Files | Refs | README

commit b0bf5f532fc918683b5e2a7c9cbf22dde6d5976f
parent 55d0ba4fc56df9ce51a2a703eedc9749b23b79bd
Author: pyratebeard <root@pyratebeard.net>
Date:   Thu,  5 Aug 2021 15:28:50 +0100

change dividers and colours

Diffstat:
Mbin/bin/sysinfo | 41+++++++++++++++++++++--------------------
1 file changed, 21 insertions(+), 20 deletions(-)

diff --git a/bin/bin/sysinfo b/bin/bin/sysinfo @@ -2,14 +2,14 @@ ## author: pyratebeard <root@pyratebeard.net> ## original author: xero <x@xero.nu> #\\ vars -FULL=▓ -EMPTY=░ +#FULL=▓ +#EMPTY=░ #FULL=━ #EMPTY=┄ #EMPTY=━ -#EMPTY=─ -#FULL=┅ +EMPTY=─ +FULL=┅ name=$USER host=$(hostname) @@ -20,7 +20,8 @@ pkgs=$(pacman -Qqs | wc -l) #upgrade=$(sudo pacman -Sy >/dev/null ; pacman -Qu | wc -l) kernel=$(uname -r) shell=$(echo $SHELL | awk -F/ '{print $NF}') -term=$TERM +#term=$TERM +term="urxvt" colors=$(grep urxvt-colors ~/.Xdefaults | awk -F\/ '{print $NF}' | tr -d '"') font=$(grep -Ei "^urxvt\*font" ~/.Xdefaults | awk -F: '{print $3}') font_size=$(grep -Ei "^urxvt\*font" ~/.Xdefaults | grep -Eo '[0-9]{1,2}') @@ -53,31 +54,31 @@ draw() #\\ greets -printf " \e[1;35m user \e[38;5;236m▓▒ \e[0;35m$name\n" -printf " \e[1;35m host \e[38;5;236m▓▒ \e[0;33m$host\e[0m\n" -printf " \e[1;35m up \e[38;5;236m▓▒ \e[1;37m$uptime\n" +printf " \e[1;33m user \e[0;34m┄┬┄ \e[0;33m$name\n" +printf " \e[1;33m host \e[0;34m┄┼┄ \e[1;35m$host\e[0m\n" +printf " \e[1;33m up \e[0;34m┄┴┄ \e[1;37m$uptime\n" printf " \e[0m\n" #\\ environment -printf " \e[1;35m distro \e[38;5;236m▓▒ \e[0m$distro\n" -printf " \e[1;35m kernel \e[38;5;236m▓▒ \e[0m$kernel\n" -printf " \e[1;35mpackages \e[38;5;236m▓▒ \e[0m$pkgs\n" +printf " \e[1;33m distro \e[0;34m┄┬┄ \e[0m$distro\n" +printf " \e[1;33m kernel \e[0;34m┄┼┄ \e[0m$kernel\n" +printf " \e[1;33mpackages \e[0;34m┄┼┄ \e[0m$pkgs\n" #printf " \e[1;35m upgrade \e[38;5;236m▓▒ \e[0m$upgrade\n" -printf " \e[1;35m wm \e[38;5;236m▓▒ \e[0m$wm\n" -printf " \e[1;35m shell \e[38;5;236m▓▒ \e[0m$shell\n" -printf " \e[1;35m term \e[38;5;236m▓▒ \e[0m$term\n" -printf " \e[1;35m font \e[38;5;236m▓▒ \e[0m$font $font_size\n" -printf " \e[1;35m colors \e[38;5;236m▓▒ \e[0m$colors\n" +printf " \e[1;33m wm \e[0;34m┄┼┄ \e[0m$wm\n" +printf " \e[1;33m shell \e[0;34m┄┼┄ \e[0m$shell\n" +printf " \e[1;33m term \e[0;34m┄┼┄ \e[0m$term\n" +printf " \e[1;33m font \e[0;34m┄┼┄ \e[0m$font $font_size\n" +printf " \e[1;33m colors \e[0;34m┄┴┄ \e[0m$colors\n" printf " \e[0m\n" #\\ cpu cpu=$(grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage}') c_lvl=`printf "%.0f" $cpu` -printf " \e[1;35m%-4s \e[0;34m%-5s %-25s \n" " cpu" "$c_lvl%" " "`draw $c_lvl 15` +printf " \e[1;35m%-4s \e[1;37m%-5s %-25s \n" " cpu" "$c_lvl%" " "`draw $c_lvl 15` #\\ ram ram=`free | awk '/Mem:/ {print int($3/$2 * 100.0)}'` -printf " \e[1;35m%-4s \e[0;34m%-5s %-25s \n" " ram" "$ram%" " "`draw $ram 15` +printf " \e[1;35m%-4s \e[1;37m%-5s %-25s \n" " ram" "$ram%" " "`draw $ram 15` #\\ battery if [ -f $battery/charge_full ] ; then @@ -99,14 +100,14 @@ if [ -f $battery/charge_full ] ; then fi #\\ volume -vol=`amixer get Master | awk '$0~/%/{print $4}' | head -n1 | tr -d '[]%'` +vol=`amixer get Master | awk '$0~/%/{print $5}' | head -n1 | tr -d '[]%'` if amixer get Master | grep -q '\[off\]' then color='31' else color='34' fi -printf " \e[1;35m%-4s \e[0;34m%-5s %-25s \n" " vol" "$vol%" " "`draw $vol 15 $color` +printf " \e[1;35m%-4s \e[1;37m%-5s %-25s \n" " vol" "$vol%" " "`draw $vol 15 $color` #\\ temperature #temp=`sensors | awk '/Core\ 0/ {gsub(/\+/,"",$3); gsub(/\..+/,"",$3) ; print $3}'`