dotfiles

<-- duh.
Log | Files | Refs | LICENSE

commit 9392242453fb039edf5843c90c78afa1553aac77
parent 383a0aeb21b3a3cabdc11142003758e8735d6879
Author: Hayden Hamilton <haydenh@sdf.org>
Date:   Wed,  1 Jul 2020 00:02:49 +0100

holy fuck, I wrote rmpv so inneficiently before - that hardly even looked like my code

Diffstat:
M.config/alias | 8++++++--
M.config/irssi/config | 2+-
M.config/neomutt/mailcap | 2+-
M.config/nvim/after/syntax/sh.vim | 16++++++++--------
M.config/nvim/startup.greet | 2+-
M.config/sxhkd/sxhkdrc | 3+++
M.config/tmux/config | 2+-
M.config/vimb/config | 2+-
M.config/vimb/scripts.js | 2+-
M.config/zsh/.zshrc | 2++
M.config/zsh/alias.zsh | 8++++++--
M.config/zsh/functions/0x0.zsh | 2+-
A.config/zsh/functions/geo.zsh | 3+++
A.scripts/bin/display/colour-wall | 10++++++++++
A.scripts/bin/display/infowall | 37+++++++++++++++++++++++++++++++++++++
M.scripts/bin/display/shmenu | 1+
M.scripts/bin/dmenu/dpass | 3++-
M.scripts/bin/misc/popupcurl | 2+-
A.scripts/bin/misc/popupcurl2 | 3+++
M.scripts/bin/misc/rmpv | 29+++++------------------------
M.xinitrc | 8+-------
21 files changed, 95 insertions(+), 52 deletions(-)

diff --git a/.config/alias b/.config/alias @@ -13,8 +13,6 @@ xi sudo xbps-install xiu sudo xbps-install -S; sudo xbps-install -yu xbps; sudo xbps-install -yu xq sudo xbps-query xr sudo xbps-remove -ssh222 ssh -p 222 -scp222 scp -P 222 wget \wget --hsts-file="/dev/null" irssi \irssi --config ~/.config/irssi/config pipes \pipes -R -r 10000 -c 10 -c 11 -c 12 -c 13 -c 14 -c 15 -s 15 @@ -40,8 +38,14 @@ notes vim ~/.local/notes fwknop fwknop --rc-file=$HOME/.config/fwknop/config --save-args-file=/dev/full edconf nvim ~/.config/zsh/.zshrc gnu.matrix fwknop --rc-file=$HOME/.config/fwknop/config --save-args-file=/dev/full -sn gnu.matrix && ssh gnu.matrix +irc-us.oscss.eu ssh -p 222 hayden@140.82.11.69 +freebsd.oscss ssh -p 22122 hayden@freebsd.oscss.eu sdf ssh haydenh@tty.sdf.org localserve ssh void@192.168.1.20 +irc ssh -p 15551 hayden@77.68.91.186 +vps2 ssh -p 15552 hayden@vps2.haydenvh.com +dd echo PLEASE TRIPLE CHECK, THEN RUN ddd +ddd dd ~d cd ~/general/downloads; ls ~do cd ~/general/documents; ls ~iw cd ~/images/wallpapers; ls diff --git a/.config/irssi/config b/.config/irssi/config @@ -242,7 +242,7 @@ settings = { core = { real_name = "haydenvh.com"; user_name = "haydenh"; - nick = "allicce"; + nick = "testing__"; recode_transliterate = "no"; timestamp_format = "%H:%M:%S"; }; diff --git a/.config/neomutt/mailcap b/.config/neomutt/mailcap @@ -1,4 +1,4 @@ -text/html ; vimb '%s' +text/html ; w3m '%s' text/* ; nvim '%s' application/pdf ; zathura '%s' diff --git a/.config/nvim/after/syntax/sh.vim b/.config/nvim/after/syntax/sh.vim @@ -1,8 +1,8 @@ -if exists("b:current_syntax") - unlet b:current_syntax -endif -syn include @AWKScript syntax/awk.vim -syn region AWKScriptCode matchgroup=AWKCommand start=+[=\\]\@<!'+ skip=+\\'+ end=+'+ contains=@AWKScript contained -syn region AWKScriptEmbedded matchgroup=AWKCommand start=+\<awk\>+ skip=+\\$+ end=+[=\\]\@<!'+me=e-1 contains=@shIdList,@shExprList2 nextgroup=AWKScriptCode -syn cluster shCommandSubList add=AWKScriptEmbedded -hi def link AWKCommand statement +" if exists("b:current_syntax") +" unlet b:current_syntax +" endif +" syn include @AWKScript syntax/awk.vim +" syn region AWKScriptCode matchgroup=AWKCommand start=+[=\\]\@<!'+ skip=+\\'+ end=+'+ contains=@AWKScript contained +" syn region AWKScriptEmbedded matchgroup=AWKCommand start=+\<awk\>+ skip=+\\$+ end=+[=\\]\@<!'+me=e-1 contains=@shIdList,@shExprList2 nextgroup=AWKScriptCode +" syn cluster shCommandSubList add=AWKScriptEmbedded +" hi def link AWKCommand statement diff --git a/.config/nvim/startup.greet b/.config/nvim/startup.greet @@ -15,7 +15,7 @@ Plugins collected by Hayden Hamilton init.vim created by Hayden Hamilton modules/ created by Hayden Hamilton - Find more stuff at http://haydenvh.com + More stuff at gopher://haydenvh.com :edit ~/.config/nvim/init - Contains mappings and settings for neovim. diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc @@ -49,6 +49,9 @@ super + ctrl + w super + alt + w fehffile ~/.cache/rfeh/prev +super + shift + w + colour-wall + super + ctrl + y dmpv general/videos/ /tmp/mpv-socket2 /tmp/mpv-socket --fs fuzz diff --git a/.config/tmux/config b/.config/tmux/config @@ -23,7 +23,7 @@ bind-key -r C-k resize-pane -U bind-key -r C-l resize-pane -R set-option -g status-justify right -set-option -g status-bg black # colour213 # pink +set-option -g status-bg black set-option -g status-fg cyan set-option -g status-interval 5 set-option -g status-left-length 30 diff --git a/.config/vimb/config b/.config/vimb/config @@ -43,7 +43,7 @@ set serif-font=DejaVu Sans Mono shortcut-default sch shortcut-add sx=https://searx.me/ -shortcut-add sch=https://rapu.nz/?q=$0 +shortcut-add sch=http://searx.tyil.nl/?q=$0 shortcut-add bit=https://bitchute.com/search?q=$0 shortcut-add yt=https://youtube.com/results?search_query=$0 shortcut-add hh=http://www.haydenvh.com/h/ diff --git a/.config/vimb/scripts.js b/.config/vimb/scripts.js @@ -17,7 +17,7 @@ var element = document.getElementsByTagName("tr"); element.outerHTML = element.outerHTML; addGlobalStyle("*{color:#1e5eb3 !important;}#js-tab-pipeline *{background-color:#0a0a10 !important}form *{background-color:#0a0a10 !important;}h1,h2,h3,h4,h5,h6{color:inherit !important;}.avatar-container *{ background-color:#141726 !important;}.top-bar{ background:#111111 !important;}aside{ background-color:#111111 !important;}.js-jobs-container{ background-color:#111111 !important;}.build-job *{ background-color:#222222 !important; border:0 !important;}body.ui-indigo .navbar-gitlab .navbar-sub-nav > li.active > button{ background-color:rgba(10,10,10,0.5) !important;}.content-block, .content-block *, .content-block * *{ background-color:#141726 !important;}.dropdown{ background-color:rgba(0,0,0,0) !important;}.file-holder *{ background-color:#141726 !important;}.banner-callout{ display:none !important;}.bg-light{ background-color:#141726 !important; border:none !important;}*{ color:#1e5eb3 !important; border-radius:0 !important;}.avatar-tile{ background-color:#141726 !important;}.avatar-container{ background-color:rgba(0,0,0,0) !important;}textarea{ border:0 !important; background-color:rgba(50,50,50,0.5) !important;}.input-group-prepend,.input-group-prepend div{ border:0 !important; background-color:rgba(25,25,25,0.5) !important;}gspan{color:#aaaaaa !important}.commit-sha-group div{ background-color:#141726 !important; border:0 !important; color:#ffffff !important;}.ci-status-link{ display:none !important;}.card, .card div{ background-color:#141726 !important;}.card{ border:0 !important;}.row-content-block{ background-color:#141726; border:0 !important;}.commit-header{ background-color:#141726 !important; border:0 !important;}body{font-family:monospace !important}.toggle-sidebar-button{ background-color:#141726; border:0 !important;}.dropdown-menu{ background-color:#141726;}input{ background:rgba(50,50,50,0.5) !important;}.cover-block{ background-color:#141726; color:#ffffff !important; padding-bottom:5vh !important;}.cover-block p,.cover-block .cover-title{ color:#ffffff !important;}.profile-link-holder{ color:#ffffff !important;}.cover-block .scrolling-tabs-container .nav-links{ border-bottom:0; position:relative; top:5vh;}.cover-block .scrolling-tabs-container .nav-links li{ border-top:#ffffff 1px solid !important;}.user-caller{display:none !important;}.avatar-container{border:0 !important;border-radius:0 !important;}article{border:0 !important;}article div{background-color:#141726 !important; border:0 !important; color:#ffffff !important;}article p{ color:#ffffff !important;}code{ background-color:rgba(15,15,15,0.5)}body{ background-color:#0a0a10; color:#1e5eb3 !important;}#content-body input,#content-body button,#content-body.dropdown,#content-body a{ border:none; background-color:rgba(0,0,0,0) !important; color:#1e5eb3 !important;font-weight:bold !important;}header{ background-color:#141726 !important;}.nav-sidebar{ background-color:#141726 !important;}.fly-out-list{ background-color:#141726 !important; border:0; border:#393982 1px solid !important; color:#ffffff !important;}a{ color:#ffffff !important;}.info-well{ background-color:rgba(0,0,0,0); border:0;}.bs-callout{ display:none !important;}.count-badge-count{ display:none !important;}table{ border:0 !important; background-color:rgba(0,0,0,0) !important; color:#ffffff !important;}.table-holder{ border:0 !important;}thead th{ background-color:#141726 !important; border:0 !important;}tr{ border-bottom-color:#141726 !important;}tr:hover{ border-bottom-color:#141726 !important; display:}"); } -if (hostname == "searx.rapu.nz" || hostname == "searx.me") {addGlobalStyle("*{color:#1e5eb3 !important;border-color:#1e5e3 !important;}#categories label{ background-color:#141726; border:none !important; padding:1vw; cursor:pointer; border-bottom:#5555 5px solid !important;}.result{ background-color:rgba(0,0,0,0) !important;}.highlight{ background-color:#aaa !important;}.alert{ background-color:rgba(10,10,10,0.5) !important;}.panel div{ background-color:#0a0a10 !important; color:#1e5eb3 !important;}.panel img{ border:7.5px solid #141726}.searx-navbar{ background-color:#141726;}body{ background-color:#0a0a10; font-family:monospace !important;}input,button{ background-color:rgba(0,0,0,0) !important;}.footer{ display:none;}");} +if (hostname == "searx.tyil.nl" || hostname == "searx.me") {addGlobalStyle("*{color:#1e5eb3 !important;border-color:#1e5e3 !important;}#categories label{ background-color:#141726; border:none !important; padding:1vw; cursor:pointer; border-bottom:#5555 5px solid !important;}.result{ background-color:rgba(0,0,0,0) !important;}.highlight{ background-color:#aaa !important;}.alert{ background-color:rgba(10,10,10,0.5) !important;}.panel div{ background-color:#0a0a10 !important; color:#1e5eb3 !important;}.panel img{ border:7.5px solid #141726}.searx-navbar{ background-color:#141726;}body{ background-color:#0a0a10; font-family:monospace !important;}input,button{ background-color:rgba(0,0,0,0) !important;}.footer{ display:none;}");} if (hostname == "neinchan.com") { addGlobalStyle(".greenText{color:#3ab475 !important;}a{color:#3ab475 !important;font-weight:bold !important;font-decoration:underline !important;}*{color:#1e5eb3 !important;}fieldset{ border:0 !important;}fieldset legend{ display:none !important;}.small{ display:none !important;g}*{border-radius:0 !important; background-color:#070911 !important;font-family:monospace !important;}nav{ padding-top:2vh !important; border-bottom:#aaaaaa 1px solid !important;}nav *,nav{ background-color:#141726 !important; color:#1e5eb3 !important;}hr{ border:0 !important; border-bottom:#aaaaaa 1px solid !important;}.postCell .innerPost{ border:#aaaaaa 1px solid !important;}.deletionCheckBox{ display:none !important;}th{ border:#aaaaaa 0.5px solid !important; padding-left:1vw !important; padding-right:1vw !important;}table input,table textarea,table .dropzone,button{ border:#aaaaaa 0.5px solid !important; padding:0.5vw !important; max-width:285px !important;}") document.getElementsByTagName("table")[0].setAttribute("cellspacing","0") diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc @@ -60,6 +60,8 @@ do . $file done +. $HOME/.local/knock + # Highlighted man pages export LESS_TERMCAP_mb=$'\e[1;32m' export LESS_TERMCAP_md=$'\e[1;35m' diff --git a/.config/zsh/alias.zsh b/.config/zsh/alias.zsh @@ -26,8 +26,6 @@ alias xi=" sudo xbps-install" alias xiu=" sudo xbps-install -S; sudo xbps-install -yu xbps; sudo xbps-install -yu" alias xq=" sudo xbps-query" alias xr=" sudo xbps-remove" -alias ssh222=" ssh -p 222" -alias scp222=" scp -P 222" alias wget=" \wget --hsts-file="/dev/null"" alias irssi=" \irssi --config ~/.config/irssi/config" alias pipes=" \pipes -R -r 10000 -c 10 -c 11 -c 12 -c 13 -c 14 -c 15 -s 15" @@ -53,8 +51,14 @@ alias notes=" vim ~/.local/notes" alias fwknop=" fwknop --rc-file=$HOME/.config/fwknop/config --save-args-file=/dev/full" alias edconf=" nvim ~/.config/zsh/.zshrc" alias gnu.matrix=" fwknop --rc-file=$HOME/.config/fwknop/config --save-args-file=/dev/full -sn gnu.matrix && ssh gnu.matrix" +alias irc-us.oscss.eu=" ssh -p 222 hayden@140.82.11.69" +alias freebsd.oscss=" ssh -p 22122 hayden@freebsd.oscss.eu" alias sdf=" ssh haydenh@tty.sdf.org" alias localserve=" ssh void@192.168.1.20" +alias irc=" ssh -p 15551 hayden@77.68.91.186" +alias vps2=" ssh -p 15552 hayden@vps2.haydenvh.com" +alias dd=" echo PLEASE TRIPLE CHECK, THEN RUN ddd" +alias ddd=" dd" alias ~d=" cd ~/general/downloads; ls" alias ~do=" cd ~/general/documents; ls" alias ~iw=" cd ~/images/wallpapers; ls" diff --git a/.config/zsh/functions/0x0.zsh b/.config/zsh/functions/0x0.zsh @@ -1,3 +1,3 @@ 0x0(){ - curl -n -F "file=@/dev/stdin" https://0x0.st < /dev/stdin | tee /dev/stderr | xclip + curl -n -F "file=@/dev/stdin" https://0x0.st < /dev/stdin | tee /dev/stderr | tr -d '\n' | xclip } diff --git a/.config/zsh/functions/geo.zsh b/.config/zsh/functions/geo.zsh @@ -0,0 +1,3 @@ +geo(){ + curl -s https://ipinfo.io/$1/json | jq .ip,.city,.region,.country | tr '\n' '\,' | tr -d '\"' | sed 's/,/, /g' +} diff --git a/.scripts/bin/display/colour-wall b/.scripts/bin/display/colour-wall @@ -0,0 +1,10 @@ +#!/bin/sh + +uptime=$(uptime -s | tr -dc '0-9') +unix=$(date +%s) +mem=$(free | head -n 2 | tail -n 1 | awk '{print $2 + $3 + $4 + $5 + $6 + $7}') + +# hex=$(echo "scale=0;obase=16;ibase=A; (($uptime*$unix)/$mem)%16581375" | bc) +hex=$(echo "scale=0;obase=16;ibase=A; (($uptime*$unix)/$mem)" | bc | grep -o '......$') +convert -size 1x1 xc:"#$hex" /tmp/colour.jpg +xwallpaper --zoom /tmp/colour.jpg diff --git a/.scripts/bin/display/infowall b/.scripts/bin/display/infowall @@ -0,0 +1,37 @@ +#!/bin/sh + +LC_ALL=C + +( + echo "Uptime:$(uptime -p | awk '{$1="";print $0}')" + echo "Time: $(date '+%A %d, %B, %Y - %H:%M:%S %Z')" + free -h | tail -n +2 | awk '{print $1" "$3"/"$2}' | sed "/Mem:/ s~$~ (most intensive: $(ps aux | awk '{$1="";$2="";$3="";print $0}' | sed 's/\.//' | sort -n -r | awk '{print $8}' | head -n 1))~" + echo "Running processes: $(ps a | wc -l)" + threads=$(grep -c ^processor /proc/cpuinfo) + [ ! -z $TERM ] && echo "Terminal: $TERM" + [ ! -z $EDITOR ] && echo "Editor: $EDITOR" + [ ! -z $SHELL ] && { + printf "Shell: $SHELL " + [ ! -z $SHLVL ] && echo "($SHLVL deep)" || echo + } + echo "CPU cores/threads: $threads" + echo "CPU usage: $(echo "scale=2; $(ps -e -o %cpu | awk '{s+=$1} END {print s}')/$threads" | bc | sed 's/^\./0\./')% (most intensive: $(ps aux | awk '{$1="";$2="";print $0}' | sed 's/\.//' | sort -n -r | awk '{print $9}' | head -n 1))" + echo "External IPv4: $(curl -qs icanhazip.com)" + echo "Internal IP*: $(ip a | grep '^[[:space:]]*inet' | grep -Ev '127.0.0.1/8|::1/128' | awk '{print $2}' | tr '\n' '\t' | sed 's/\t/, /g;s~/[0-9]*,~,~g')" + uname -a | awk '{printf "Host: "$2"\nKernel: "$1" "$3"\nOS: "$13"\nArch: "$12"\n"}' + libc=$(ldd 2>&1 | head -n 1 | sed 's/(.*//') + [ "$libc" != "" ] && echo "libc: $libc" + echo "Distro: $(sed 's/.*="//g;s/"$//g' < /etc/os-release | tail -n 1)" + [ -e /usr/bin/xbps-query ] && { + echo "Pkgs (xbps): $(xbps-query -l | wc -l)" + echo "Manually inst. pkgs (xbps): $(xbps-query -m | wc -l)" + echo "Orphan pkgs (xbps): $(xbps-query -O | wc -l)" + } + df -h | tail -n +2 | awk '$1 != "tmpfs" && $1 != "devtmpfs" && $1 != "cgroup" {print "Disk "$1": "$3"/"$2" (on "$6")"}' + for colour in $(seq 16) + do + printf "$(tput setaf $(($colour-1)))$(tput setab $(($colour-1))) $(tput sgr0)" + [ $colour = 8 ] && printf '\n' + done | sed 's/^/Colours: /' + echo +) | sed "s~^~$(tput bold)$(tput setaf 3)~g;s/: /$(tput sgr0)\t: $(tput setaf 5)/" | column --table -s ' ' diff --git a/.scripts/bin/display/shmenu b/.scripts/bin/display/shmenu @@ -13,6 +13,7 @@ cleanup(){ files=$(cat /dev/stdin) +IFS='' while true do clear > /dev/stderr diff --git a/.scripts/bin/dmenu/dpass b/.scripts/bin/dmenu/dpass @@ -38,5 +38,6 @@ then $TERMINAL "$1" vim $PASS else echo "$getpass" | sed "s/$pass.//g" | tr " " "\n" | $dmenu $2 -P -l 20 -p "Password:" | xclip - notify-send "Password copied to clipboard." + sleep 5 + printf '' | xclip # self destruct clipboard fi diff --git a/.scripts/bin/misc/popupcurl b/.scripts/bin/misc/popupcurl @@ -1,3 +1,3 @@ #!/bin/sh -exec $TERMINAL -e curl $@ +exec $TERMINAL -e popupcurl2 $@ diff --git a/.scripts/bin/misc/popupcurl2 b/.scripts/bin/misc/popupcurl2 @@ -0,0 +1,3 @@ +#!/bin/sh + +curl $@ | less diff --git a/.scripts/bin/misc/rmpv b/.scripts/bin/misc/rmpv @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # rmpv # Created by Hayden Hamilton @@ -9,30 +9,11 @@ dir=$1 count="$2" filetypes="mp3 opus mkv mp4 flac m4a webm wav" -getfiles(){ - files+=$(find $dir | awk "/$1/"' {print}') -} - -allfiles(){ - for filetype in $filetypes - do - getfiles $filetype - done - if [ "$files" = "" ] - then - echo "No files found..." - exit 1 - fi -} -randomize() { - filearray=($files) - length=${#filearray[@]} - randoms=$(od -vAn -N2 -tu2 < /dev/urandom) - randomn=$((1+$randoms%$length)) - echo ${filearray[$randomn]} +files=$(find $dir | grep -E 'mp3$|opus$|mkv$|mp4$|flac$|m4a$|webm$|wav$' | shuf | head -n $count) +echo "$files" | grep '[[:alnum:]]' >/dev/null || { + echo "No files found..." + exit 1 } -allfiles -files=$(for i in `seq $count`; do randomize; done) echo "$1" | grep "music" && mpv --input-ipc-server=/tmp/mpv-socket $files --no-video || mpv --input-ipc-server=/tmp/mpv-socket $files diff --git a/.xinitrc b/.xinitrc @@ -5,10 +5,4 @@ setxkbmap haydenh & xsetroot -cursor_name sailboat & sxhkd & -while true; do - dwm -done - -#while true; do -# sowm -#done +exec dwm