all repos — dotfiles @ 44c1b8b751c98f9b1f38d40439d30c68ae2805d8

my *nix dotfiles

2m2t

Signed-off-by: Anirudh Oppiliappan <x@icyphox.sh>
Anirudh Oppiliappan x@icyphox.sh
Sun, 16 Feb 2020 09:51:35 +0530
commit

44c1b8b751c98f9b1f38d40439d30c68ae2805d8

parent

a23a4945b23420b1b0800e9e3dfe9bfc083f1968

5 files changed, 64 insertions(+), 75 deletions(-)

jump to
M bin/infobin/info

@@ -1,93 +1,81 @@

#!/usr/bin/env bash # icyinfo, but better -BLK="\e[30m" -RED="\e[31m" -GRN="\e[32m" -YLW="\e[33m" -BLU="\e[34m" -PUR="\e[35m" -CYN="\e[36m" -BRED="\e[31m" -BGRN="\e[32m" -BYLW="\e[33m" -BBLU="\e[34m" -BPUR="\e[35m" -BCYN="\e[36m" -WHT="\e[37m" -RST="\e[0m" +export BLK="\e[30m" +export RED="\e[31m" +export GRN="\e[32m" +export YLW="\e[33m" +export BLU="\e[34m" +export PUR="\e[35m" +export CYN="\e[36m" +export BRED="\e[31m" +export BGRN="\e[32m" +export BYLW="\e[33m" +export BBLU="\e[34m" +export BPUR="\e[35m" +export BCYN="\e[36m" +export WHT="\e[37m" +export RST="\e[0m" -BAR="████" -((LEN = ${#BAR} * 6)) -COLOR_BARS="$RED$BAR$GRN$BAR$YLW$BAR$BLU$BAR$PUR$BAR$CYN$BAR$RST" +#BAR="████" +#((LEN = ${#BAR} * 6)) +#COLOR_BARS="$RED$BAR$GRN$BAR$YLW$BAR$BLU$BAR$PUR$BAR$CYN$BAR$RST" -user=$(whoami) -host=$(hostname) -kernel=$(uname -r) -#uptime=$(uptime -p) # too long to print -shell=$(basename $SHELL) +basename() { + # Usage: basename "path" ["suffix"] + local tmp + + tmp=${1%"${1##*[!/]}"} + tmp=${tmp##*/} + tmp=${tmp%"${2/"$tmp"}"} -os() { - os=$(source /etc/os-release && echo $ID) - export os + printf '%s\n' "${tmp:-/}" } +prinfo() { + # 1 - field + # 2 - info + # 3 - prev line + prev_line="$1$2" + export prev_line -wm() { -# id=$(xprop -root -notype _NET_SUPPORTING_WM_CHECK) -# id=${id##* } -# wm=$(xprop -id "$id" -notype -len 100 -f _NET_WM_NAME 8t) -# wm=${wm/*_NET_WM_NAME = } -# wm=${wm/\"} -# wm=${wm/\"*} -# wm=${wm,,} - wm="2bwm" - export wm -} -pkgs() { - pkgs="$(kiss l | wc -l)" - export pkgs + printf '\e[%sD\e[B' "${#3}" + printf '%b' "${YLW}$1${RST}$2" } -# get our vars -os -wm -pkgs +user="$USER" +host="$HOSTNAME" +kernel="$(uname -r)" +shell="$(basename "$SHELL")" +art=" +${GRN} + o +.oo.Oo. + O. + Ooo'${RST} + ${RED}___${RST}${GRN}O${RST}${RED}___ + \ / + \___/${RST} +" -COL=$(tput cols) -ROW=$(tput lines) -((PADY = ROW / 2 - 1 - ${#ENTS[@]} / 2)) -((PADX = COL / 2 - LEN / 2)) +. /etc/os-release +os="$ID" +pkgs="$(kiss l | wc -l)" -for ((i = 0; i < PADX; ++i)); do - PADC="$PADC " -done +printf '\e[2J' -for ((i = 0; i < PADY; ++i)); do - PADR="$PADR\n" -done -clear +printf '%b\n' "$art" -printf "%b" "$PADR" +printf '%b\n' "${CYN}$user${RST}@${CYN}$host${RST}" -printf "%s%b" "$PADC" "┏┓╋╋╋╋╋┏┓ \n" -printf "%s%b" "$PADC" "┣╋━┳┳┳━┫┗┳━┳┳┓ \n" -printf "%s%b" "$PADC" "┃┃━┫┃┃╋┃┃┃╋┣┃┫ \n" -printf "%s%b" "$PADC" "┗┻━╋┓┃┏┻┻┻━┻┻┛ \n" -printf "%s%b" "$PADC" "╋╋╋┗━┻┛\n\n" +prinfo "os" " $os" +prinfo "kernel" " $kernel" "$prev_line" +prinfo "pkgs" " $pkgs" "$prev_line" +prinfo "shell" " $shell" "$prev_line" -#printf "%s%b" "$PADC" "$COLOR_BARS\n\n" -printf "%s%b" "$PADC" "${CYN}$user${RST}@${CYN}$host${RST}\n" -printf "%s%b" "$PADC" "os: ${CYN}$os${RST}\n" -printf "%s%b" "$PADC" "kernel: ${CYN}$kernel${RST}\n" -printf "%s%b" "$PADC" "pkgs: ${CYN}$pkgs${RST}\n" -printf "%s%b" "$PADC" "wm: ${CYN}$wm${RST}\n" -printf "%s%b" "$PADC" "shell: ${CYN}$shell${RST}\n" -printf "%s%b" "$PADC" "$COLOR_BARS\n" -tput civis -read -n 1 -tput cnorm +# Pause +read -rsn1 _
M bin/scrbin/scr

@@ -21,8 +21,6 @@ import -window root "$scr_path/$output.png"

;; w) import -window "$(xdotool getwindowfocus)" "$scr_path/$output.png" - convert "$scr_path/$output.png" \( +clone -background transparent -shadow 60x40+0+15 \) \ - +swap -background white -layers merge +repage "$scr_path/$output.png" ;; s) import "$scr_path/$output.png"
M git/.gitconfiggit/.gitconfig

@@ -7,3 +7,5 @@ gpgsign = true

verbose = true [gpg] program = gpg2 +[credential] + helper = store
M ssh/configssh/config

@@ -5,6 +5,7 @@

Host github.com Hostname ssh.github.com Port 443 + TCPKeepAlive yes IdentityFile ~/.ssh/github Host emerald
M weechat/weechat.confweechat/weechat.conf

@@ -342,7 +342,7 @@ nicklist.color_fg = 8

nicklist.conditions = "nicklist" nicklist.filling_left_right = vertical nicklist.filling_top_bottom = columns_vertical -nicklist.hidden = off +nicklist.hidden = on nicklist.items = "buffer_nicklist" nicklist.position = right nicklist.priority = 200