dotfiles

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

commit 880ee2a5bd6af588bcd2511d8b9d26ef27b0512d
parent e32a88b0ae505bb7b85fd7684e538d6cf12389d8
Author: pyratebeard <root@pyratebeard.net>
Date:   Thu, 25 Feb 2021 16:45:43 +0000

small changes

Diffstat:
Mbin/bin/connect | 2+-
Mbin/bin/ghosts | 3+--
Mbin/bin/lock | 2+-
Mbin/bin/mus | 4+++-
Mbin/bin/sysinfo | 74+++++++++++++++++++++++++++++++++++++-------------------------------------
5 files changed, 43 insertions(+), 42 deletions(-)

diff --git a/bin/bin/connect b/bin/bin/connect @@ -2,7 +2,7 @@ # vars WIFI_DEV=$(iw dev | awk '$1=="Interface"{print $2}') -CONNECTION_FILE_PATH="$HOME/lib/doc/wifi/" +CONNECTION_FILE_PATH="$HOME/lib/documents/wifi/" CONNECTION_FILE="${CONNECTION_FILE_PATH}${1}" CONNECTION=$(echo ${CONNECTION_FILE} | awk -F\/ '{print $NF}') VPN_KEY_PATH="$HOME/lib/key" diff --git a/bin/bin/ghosts b/bin/bin/ghosts @@ -28,4 +28,4 @@ $f1 ▀▄██████▀ $f2 ▀▄██████▀ $f3 ▀▄ $f1 ▀█████ $f2 ▀█████ $f3 ▀█████ $f4 ▀█████ $f5 ▀█████ $f6 ▀█████ $f1 ▀▀▀▀▄ $f2 ▀▀▀▀▄ $f3 ▀▀▀▀▄ $f4 ▀▀▀▀▄ $f5 ▀▀▀▀▄ $f6 ▀▀▀▀▄ $rst -EOF -\ No newline at end of file +EOF diff --git a/bin/bin/lock b/bin/bin/lock @@ -1,2 +1,2 @@ #pkill ssh-agent ; pkill gpg-agent -i3lock -u -c \#4e495a +light-locker-command --lock diff --git a/bin/bin/mus b/bin/bin/mus @@ -2,7 +2,9 @@ cmd=$1 -if [ -z "$cmd" ] ; then +if [ "$TERM" == "screen-256color" ] ; then + dtach -A /tmp/mus cmus +elif [ -z "$cmd" ] ; then urxvtc -e dtach -A /tmp/mus cmus elif [ "$cmd" == "p" ] ; then /usr/bin/cmus-remote -u diff --git a/bin/bin/sysinfo b/bin/bin/sysinfo @@ -1,14 +1,15 @@ #!/bin/sh ## author: pyratebeard <root@pyratebeard.net> ## original author: xero <x@xero.nu> -#█▓▒░ vars -#FULL=▓ -#EMPTY=░ -FULL=━ +#\\ vars +FULL=▓ +EMPTY=░ +#FULL=━ +#EMPTY=┄ + #EMPTY=━ #EMPTY=─ #FULL=┅ -EMPTY=┄ name=$USER host=$(hostname) @@ -16,7 +17,7 @@ uptime=$(uptime -p | cut -b4- | tr -d ',|eeks|ay|our|inute') battery=/sys/class/power_supply/BAT1 distro=$(grep -E "^ID=" /etc/os-release | awk -F= '{print $2}') pkgs=$(pacman -Qqs | wc -l) -upgrade=$(sudo pacman -Sy >/dev/null ; pacman -Qu | wc -l) +#upgrade=$(sudo pacman -Sy >/dev/null ; pacman -Qu | wc -l) kernel=$(uname -r) shell=$(echo $SHELL | awk -F/ '{print $NF}') term=$TERM @@ -26,7 +27,7 @@ font_size=$(grep -Ei "^urxvt\*font" ~/.Xdefaults | grep -Eo '[0-9]{1,2}') #wm=$XDG_SESSION_DESKTOP wm='2bwm' -#█▓▒░ progress bar +#\\ progress bar draw() { perc=$1 @@ -41,45 +42,44 @@ draw() fi for v in `seq 0 $(( size - 1 ))`; do test "$v" -le "$inc" \ - && out="${out}\e[1;${color}m${FULL}" \ - || out="${out}\e[0;${color}m${EMPTY}" + && out="${out}\e[0;34m${FULL}" \ + || out="${out}\e[38;5;236m${EMPTY}" done printf $out } -#█▓▒░ colors -printf "\n" -~/bin/blocks1 -printf "\n" +#\\ colors +~/bin/blocks + -#█▓▒░ greets -printf " \e[1;34m user \e[30m\\\\\ \e[36m$name\n" -printf " \e[1;34m host \e[30m\\\\\ \e[32m$host\n" -printf " \e[1;34m up \e[30m\\\\\ \e[37m$uptime\n" +#\\ 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[0m\n" -#█▓▒░ environment -printf " \e[1;34m distro \e[30m\\\\\ \e[0m$distro\n" -printf " \e[1;34m kernel \e[30m\\\\\ \e[0m$kernel\n" -printf " \e[1;34mpackages \e[30m\\\\\ \e[0m$pkgs\n" -printf " \e[1;34m upgrade \e[30m\\\\\ \e[0m$upgrade\n" -printf " \e[1;34m wm \e[30m\\\\\ \e[0m$wm\n" -printf " \e[1;34m shell \e[30m\\\\\ \e[0m$shell\n" -printf " \e[1;34m term \e[30m\\\\\ \e[0m$term\n" -printf " \e[1;34m font \e[30m\\\\\ \e[0m$font $font_size\n" -printf " \e[1;34m colors \e[30m\\\\\ \e[0m$colors\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;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[0m\n" -#█▓▒░ cpu +#\\ cpu cpu=$(grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage}') c_lvl=`printf "%.0f" $cpu` -printf " \e[0;36m%-4s \e[1;36m%-5s %-25s \n" " cpu" "$c_lvl%" `draw $c_lvl 15` +printf " \e[1;35m%-4s \e[0;34m%-5s %-25s \n" " cpu" "$c_lvl%" " "`draw $c_lvl 15` -#█▓▒░ ram +#\\ ram ram=`free | awk '/Mem:/ {print int($3/$2 * 100.0)}'` -printf " \e[0;36m%-4s \e[1;36m%-5s %-25s \n" " ram" "$ram%" `draw $ram 15` +printf " \e[1;35m%-4s \e[0;34m%-5s %-25s \n" " ram" "$ram%" " "`draw $ram 15` -#█▓▒░ battery +#\\ battery if [ -f $battery/charge_full ] ; then b_full=$battery/charge_full b_now=$battery/charge_now @@ -92,23 +92,23 @@ if [ -f $battery/charge_full ] ; then color='31' ;; *) - color='36' + color='34' ;; esac printf " \e[0;${color}m%-4s \e[1;${color}m%-5s %-25s \n" " bat" "$charge%" `draw $charge 15 $color` fi -#█▓▒░ volume +#\\ volume vol=`amixer get Master | awk '$0~/%/{print $5}' | head -n1 | tr -d '[]%'` if amixer get Master | grep -q '\[off\]' then color='31' else - color='36' + color='34' fi -printf " \e[0;${color}m%-4s \e[1;${color}m%-5s %-25s \n" " vol" "$vol%" `draw $vol 15 $color` +printf " \e[1;35m%-4s \e[0;34m%-5s %-25s \n" " vol" "$vol%" " "`draw $vol 15 $color` -#█▓▒░ temperature +#\\ temperature #temp=`sensors | awk '/Core\ 0/ {gsub(/\+/,"",$3); gsub(/\..+/,"",$3) ; print $3}'` #case 1 in # $(($temp <= 50)))