dotfiles

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

commit 383a0aeb21b3a3cabdc11142003758e8735d6879
parent 24b24229ee2b13f553668bc1716372c8f8732b2e
Author: Hayden Hamilton <haydenh@sdf.org>
Date:   Wed, 17 Jun 2020 20:31:09 +0100

sync

Diffstat:
M.config/alias | 3+++
M.config/irssi/config | 6+++++-
M.config/irssi/pipeline.theme | 13+++++++------
A.config/irssi/scripts/autorun/irssi-alert.pl | 35+++++++++++++++++++++++++++++++++++
M.config/nvim/modules/filetype.vim | 6+++---
M.config/sxhkd/sxhkdrc | 5++++-
M.config/vimb/config | 3+--
M.config/vimb/scripts.js | 2+-
M.config/zsh/alias.zsh | 3+++
M.scripts/bin/display/shmenu | 2+-
M.scripts/bin/dmenu/dpass | 2+-
M.scripts/bin/misc/alcl | 26+++++++++++++++-----------
M.scripts/bin/misc/sxhkdrestart | 2+-
A.scripts/bin/misc/uniqfind | 13+++++++++++++
14 files changed, 93 insertions(+), 28 deletions(-)

diff --git a/.config/alias b/.config/alias @@ -39,6 +39,9 @@ tmux \tmux -f $HOME/.config/tmux/config 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 +sdf ssh haydenh@tty.sdf.org +localserve ssh void@192.168.1.20 ~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 @@ -247,7 +247,11 @@ settings = { timestamp_format = "%H:%M:%S"; }; "fe-text" = { actlist_sort = "refnum"; }; - "fe-common/core" = { theme = "pipeline"; autolog = "yes"; }; + "fe-common/core" = { + theme = "pipeline"; + autolog = "yes"; + beep_msg_level = "MSGS NOTICES HILIGHT"; + }; "perl/core/scripts" = { ascii_figlet_path = "/usr/bin/figlet"; nickcolor_colors = "4 8 9 10 11 12 13 14 15"; diff --git a/.config/irssi/pipeline.theme b/.config/irssi/pipeline.theme @@ -28,7 +28,8 @@ abstracts = { # timestamp styling, nothing by default # timestamp = "%B$*%n"; # shown - timestamp = ""; #hidden + timestamp = ""; + #hidden # any kind of text that needs hilighting, default is to bold hilight = "%_$*%_"; @@ -195,7 +196,7 @@ abstracts = { # background of statusbar sb_background = "%0"; - isbstart = "%0" + isbstart = "%0"; # default statusbar item style @@ -224,10 +225,10 @@ abstracts = { # %r%n%_$0%_$1%K |%n %| formats = { "fe-common/core" = { - pubmsg = "{pubmsgnick $2 {pubnick $0}}$1"; - join = "%_%B+%_{pubnick $0} %n$1"; - part = "%_%G-{pubnick $0} %n$1 {reason $3}"; - kick = "%_%G!{pubnick $0} %nby {pubnick $2} from {channel $1} {reason $3}"; + pubmsg = "{pubmsgnick $2 {pubnick \00315$0}}$1"; + join = "%_%B+%_{pubnick \00315$0} %n%w$1"; + part = "%_%G-{pubnick \00315$0} %n%w$1 {reason $3}"; + kick = "%_%G!{pubnick \00315$0} %nb%wy {pubnick $2} from ${channel $1} {reason $3}"; quit = "%_%G<{pubnick $0} %n$1 {reason $2}"; nick_changed = "{nick %w$0%n} %Nis now {nick %W$1%n}"; endofnames = "{channel $0}: {hilight $1} nicks ({comment @/{hilight $2} +/{hilight $3} -/{hilight $4}})"; diff --git a/.config/irssi/scripts/autorun/irssi-alert.pl b/.config/irssi/scripts/autorun/irssi-alert.pl @@ -0,0 +1,35 @@ +# irssi-alert.pl +use Irssi; + +# config +my $own_nick = 'haydenh'; +my $channel = '#GNU/matrix'; + +$::VERSION='1'; +%::IRSSI = ( + authors => 'haydenh', + contact => 'haydenh@AT@sdf.DOT.org', + name => 'irssi-alert', + description => 'Send the \a escape code on a message containing a certain + string, in a private message, or a specified channel', + license => 'MIT', +); + +sub priv { + system("echo -n '\a'"); +} + +sub pub { + my ($server, $msg, $nick, $address, $target) = @_; + + if ($msg =~ $own_nick) { + system("echo -n '\a'"); + } else { + if ($target =~ $channel) { + system("echo -n '\a'"); + } + } +} + +Irssi::signal_add('message public', 'pub'); +Irssi::signal_add('message private', 'priv'); diff --git a/.config/nvim/modules/filetype.vim b/.config/nvim/modules/filetype.vim @@ -17,7 +17,7 @@ function Gphconfig() nnoremap <buffer> <localleader>t :%s/\t/ /g<CR> nnoremap <buffer> <localleader>l :call GphZettel("")<left><left> inoremap <buffer> <localleader>l <esc>:call GphZettel("")<left><left> - nnoremap <buffer> <localleader>s :%s/\/home\/hayden\/net\//gopher:\/\/haydenh.null/g<CR> + nnoremap <buffer> <localleader>s :mark `<CR>:%s/\/home\/hayden\/net\//gopher:\/\/haydenh.null/g<CR>:normal ``j$<CR> endfunction function GphZettel(srch) @@ -29,8 +29,8 @@ function GphZettelFin() mark ` read !sed -n 's/[[:space:]]*\[/\t[/;s/][[:space:]]*/]\t/;/^\!/p' < /tmp/vim.zettel | awk -F'\t' '{print $2}' normal G - read !sed -n 's/[[:space:]]*\[/\t[/;s/][[:space:]]*/]\t/;/^\!/p' < /tmp/vim.zettel | awk -F'\t' '{print "[<++|$2|$3|server|port]}' - normal ``kJA + read !sed -n 's/[[:space:]]*\[/\t[/;s/][[:space:]]*/]\t/;/^\!/p' < /tmp/vim.zettel | awk -F'\t' '{print "[<++>|"$2"|"$3"|server|port]"}' + normal ``kJ$ endfunction function GphCitation() diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc @@ -10,6 +10,9 @@ super + b super + shift + b dmpvurl /tmp/mpv-socket /tmp/mpv-socket2 +super + n + tabbed -c st -w > /tmp/txid + super + ctrl + b queuevid @@ -53,7 +56,7 @@ super + ctrl + u dmpv general/music/ /tmp/mpv-socket /tmp/mpv-socket2 --no-video fuzz super + alt + {y,u} - rmpv ~/general/{videos,music}/ 100 + rmpv general/{videos,music}/ 150 super + ctrl + {i,p} hmpv {back,forward} /tmp/mpv-socket diff --git a/.config/vimb/config b/.config/vimb/config @@ -39,12 +39,11 @@ set default-font=DejaVu Sans Mono set monospace-font=DejaVu Sans Mono set sans-serif-font=DejaVu Sans Mono set serif-font=DejaVu Sans Mono -set default-zoom=75 shortcut-default sch shortcut-add sx=https://searx.me/ -shortcut-add sch=https://searx.lukesmith.xyz/?q=$0 +shortcut-add sch=https://rapu.nz/?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.lukesmith.xyz" || 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.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 == "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/alias.zsh b/.config/zsh/alias.zsh @@ -52,6 +52,9 @@ alias tmux=" \tmux -f $HOME/.config/tmux/config" 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 sdf=" ssh haydenh@tty.sdf.org" +alias localserve=" ssh void@192.168.1.20" alias ~d=" cd ~/general/downloads; ls" alias ~do=" cd ~/general/documents; ls" alias ~iw=" cd ~/images/wallpapers; ls" diff --git a/.scripts/bin/display/shmenu b/.scripts/bin/display/shmenu @@ -1,6 +1,6 @@ #!/bin/bash -[ -z $1 ] && echo "usage: shmenu prompt +[ -z $1 ] && echo "usage: shmenu <prompt> stdin is given to the user to search through stdout contains the selection diff --git a/.scripts/bin/dmenu/dpass b/.scripts/bin/dmenu/dpass @@ -28,7 +28,7 @@ then exit 0 elif [ "$pass" = "generate" ] then - password=$(head -c 500 /dev/urandom | tr -dc 'a-zA-Z0-9~!@#$%^&*_+=-' | fold -w 30 | head -n 1) + password=$(head -c 500 /dev/urandom | tr -dc 'a-zA-Z0-9~!@#$%^&*_+=-' | fold -w 35 | head -n 1) passname=$(echo "" | $dmenu -l 50 -i -p "Name for password (only 1 word):") [ "$passname" = "" ] && passname="pleaseeditthis" echo "$passname: $password" >> $PASS diff --git a/.scripts/bin/misc/alcl b/.scripts/bin/misc/alcl @@ -39,9 +39,9 @@ sanitise(){ } _list(){ - for f in $(find $PHLOG/$1 -type f -name "*.gph" -o -name "*.txt" -not -name "links.gph") + for f in $(find $PHLOG/$1 -type f -not -name "*links.gph*" -name "*.gph" -o -name "*.txt") do - echo "$(stat -c '%y' $f)##$f" + echo "$(echo "$f" | awk -F"/" '{print $NF}' | sed 's~-.*$~~')##$f" done | sort -r | sed "s/^.*##//;s~$PHLOG/$1[/]*~~g" | while IFS= read -r line do @@ -66,15 +66,24 @@ _new(){ } } printf "Entry title? " && read name < /dev/tty - filename=$(echo "$name" | tr '[[:space:]]' '.' | tr '[:upper:]' '[:lower:]' | tr -dc '[A-Za-z0-9-.+=%#!]' | sed 's/\.\./\./g') + num=$(find $PHLOG/ -name "*.txt" -o -name "*.gph" -not -name "*links.gph" | wc -l) + num=$(($num+1)) + filename="$(printf "%05d" "$num")-$(echo "$name" | tr '[[:space:]]' '.' | tr '[:upper:]' '[:lower:]' | tr -dc '[A-Za-z0-9-.+=%#!]' | sed 's/\.\./\./g')" printf "gph or txt? " && read filetype < /dev/tty [ -f $dir/$filename$filetype ] && echo "Entry already exists... quitting" && exit 1 case "$filetype" in gph) gophertype="1";; - *) gophetype="0";; + *) gophertype="0";; esac printf "$HEAD\n\n#$name\n\n<++>\n\n$FOOT\n\n" > $dir/$filename$filetype $EDITOR $dir/$filename$filetype + + [ ! -f $dir/$filename$filetype ] && { + printf "Cancelling...\nDraft entry moved to $HOME/$filename$filetype, use \`alcl import\` later.\n" + printf "!! FILE: $dir/$filename$filetype\n!! DRAFT PHLOG ENTRY\n" | cat /dev/stdin $dir/$filename$filetype > $HOME/$filename$filetype + exit 2 + } + [ ! -f $RSSBNB ] && { printf "No RSSBNB file... creating.\nPhlog title? " read title < /dev/tty @@ -85,13 +94,8 @@ _new(){ echo ":main,$(echo "$title" | sanitise),$(echo "$link" | sanitise),$(sed '/^\!/d' < /tmp/desc.alcl | sanitise):" } - printf "! Entry description?\n! All lines starting with '!' are ignored\n! Add a single line containing a single char, 'X' to cancel your entry.\n" > /tmp/desc.alcl + printf "! Entry description?\n! All lines starting with '!' are ignored.\n" > /tmp/desc.alcl $EDITOR /tmp/desc.alcl - sed '/^!/d;/^$/d' < /tmp/desc.alcl | head -n 1 | grep '^X$' >/dev/null && { - printf "Cancelling...\nDraft entry moved to $HOME/$filename$filetype, use \`alcl import\` later.\n" - printf "!! FILE: $dir/$filename$filetype\n!! DRAFT PHLOG ENTRY\n" | cat /dev/stdin $dir/$filename$filetype > $HOME/$filename$filetype - exit 2 - } echo ":sub,$(echo "$name" | sanitise),gopher\://$(echo "$HOSTNAME" | sanitise)/$gophertype$(echo "$gopherdir" | sanitise)/$filename$filetype,$(sanitise < /tmp/desc.alcl | sed '/^\!/d'):" >> $RSSBNB } @@ -137,7 +141,7 @@ _find(){ # rest is secondary contents=$(grep "$1" $files | awk -F: '{print $1}') - printf "$title\n$contents\n" | uniq -c | tail -n +2 | sort -r + printf "$title\n$contents\n" | sed "s~$PHLOG~$GOPHERDIR~" | uniq -c | tail -n +2 | sort -r } diff --git a/.scripts/bin/misc/sxhkdrestart b/.scripts/bin/misc/sxhkdrestart @@ -1,3 +1,3 @@ -#!/bin/sh +#!/bin/bash kill -s SIGUSR1 $(pgrep sxhkd) diff --git a/.scripts/bin/misc/uniqfind b/.scripts/bin/misc/uniqfind @@ -0,0 +1,13 @@ +#!/bin/sh +# +# compare dir $11 and dir $2 + +d1=$(mktemp) +d2=$(mktemp) + +find $1 -type f | sed "s~^$1[/]*~~" > $d1 +find $2 -type f | sed "s~^$2[/]*~~" > $d2 + +printf "> $1\n< $2\n" +diff $d1 $d2 +rm $d1 $d2