dotfiles

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

commit 60337dc6be04ef1b5c9e10fecd372fa975a594b4
parent 89b4f74842bed140fc9047d6c3d3b216067846c6
Author: Hayden Hamilton <hayden@haydenvh.com>
Date:   Thu,  9 Apr 2020 13:00:17 +0100

general stuff to .scripts

Diffstat:
M.config/alias | 13++++++++++++-
M.config/neomutt/colours | 4----
M.config/neomutt/sidebar | 6+++---
M.config/nvim/init.vim | 18------------------
M.config/nvim/modules/abbrs.vim | 1+
M.config/nvim/modules/filetype.vim | 27+++++++++++++++++++++++++++
M.config/redshift/redshift.conf | 2+-
M.config/vimb/config | 4++--
M.config/vimb/scripts.js | 2+-
M.config/zsh/alias.zsh | 13++++++++++++-
M.config/zsh/functions.zsh | 19+++++++++++++++++++
M.config/zsh/ls.zsh | 2+-
M.local/xres | 2+-
M.scripts/bin/display/fehffile | 9+++++++--
M.scripts/bin/display/hlock | 2+-
M.scripts/bin/display/pexelgrab | 7++++++-
M.scripts/bin/display/rfeh | 2+-
M.scripts/bin/display/rwall | 6++++++
M.scripts/bin/display/wallblur | 22++++++++++++----------
A.scripts/bin/display/wbcachemake | 29+++++++++++++++++++++++++++++
M.scripts/bin/dmenu/daskpass | 6------
M.scripts/bin/dmenu/dfm | 2+-
M.scripts/bin/dmenu/dimg | 6++++++
M.scripts/bin/dmenu/dmon | 8+++++++-
M.scripts/bin/dmenu/dmpvurl | 2+-
M.scripts/bin/dmenu/dpass | 2+-
D.scripts/bin/genman/scratcher | 13-------------
M.scripts/bin/misc/dotadd | 3++-
M.scripts/bin/misc/hmpv | 2+-
M.scripts/bin/misc/qmv | 14++++++++------
M.scripts/bin/misc/rmpv | 2+-
M.scripts/bin/misc/urlhand | 5+++--
A.scripts/bin/misc/webimg | 4++++
A.scripts/custom/README | 1+
A.scripts/custom/dock | 10++++++++++
A.scripts/custom/undock | 8++++++++
D.scripts/custom/xrandr | 9---------
M.scripts/dwmblocks/net | 2+-
M.xinitrc | 1-
D.xprofile | 2--
M.zprofile | 1-
41 files changed, 197 insertions(+), 96 deletions(-)

diff --git a/.config/alias b/.config/alias @@ -3,15 +3,25 @@ l \ls --color la \ls --color -A ll \ls --color -lh lla \ls --color -lAh +r \rm +rr \rm -rf +rm nop r +m \mv +mv nop m vim nop v vi nop v v nvim git nop g g \git +c \cp +cp nop c 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 clock tty-clock -s -c -C 7 @@ -24,13 +34,14 @@ zsleep sudo zzz hibernate sudo ZZZ rmst bash ~/.scripts/random/gnulinux.sh vimb \vimb --no-maximize -cleancache sudo xbps-remove -Ooy; rm -rf ~/.cache ~/.mozilla ~/.local/share/webkitgtk ~/.viminfo ~/.wget-hsts ~/.lesshst ~/.sh_history ~/.python_history ~/.*history ~/.*hst ~/.dbus ~/.sciminfo ~/.viminfo ~/.w3m ~/.config/vimb/cookies.db; sudo vkpurge rm all; +cleancache sudo xbps-remove -Ooy; rm -rf ~/.cache ~/.mozilla ~/.local/share/webkitgtk ~/.viminfo ~/.wget-hsts ~/.lesshst ~/.sh_history ~/.python_history ~/.*history ~/.*hst* ~/.dbus ~/.sciminfo ~/.viminfo ~/.w3m ~/.config/vimb/cookies.db; sudo vkpurge rm all; mkconfall mkmailpass; mkalias tmux tmux -f ~/.config/tmux/config nw newsboat nm neomutt maic sudo make all install clean homesync rsync --port 222 --delete -azPe 'ssh -p 222' --exclude=general --exclude=.cache --exclude=.local/cache $HOME/ void@192.168.1.20:/home/void/homedir/ +tmux \tmux -f $HOME/.config/tmux/config ~d cd ~/general/downloads; ls ~do cd ~/general/documents; ls ~iw cd ~/images/wallpapers; ls diff --git a/.config/neomutt/colours b/.config/neomutt/colours @@ -22,10 +22,6 @@ mono indicator reverse mono error bold color normal default default color indicator brightblack white -color sidebar_highlight red default -color sidebar_divider brightblack black -color sidebar_flagged red black -color sidebar_new green black color normal brightyellow default color error red default color tilde black default diff --git a/.config/neomutt/sidebar b/.config/neomutt/sidebar @@ -6,10 +6,10 @@ set sidebar_format = "%B%?F? [%F]?%* %?N?%N/?%S" set mail_check_stats set sort_browser="unsorted" -bind index,pager \CI sidebar-prev +bind index,pager \CK sidebar-prev bind index,pager \CO sidebar-open -bind index,pager \CP sidebar-next +bind index,pager \CJ sidebar-next color sidebar_divider color2 default color sidebar_highlight color7 default -color sidebar_indicator color4 default +mono sidebar_indicator reverse diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim @@ -196,21 +196,3 @@ source ~/.config/nvim/modules/filetype.vim " quick-scope let g:qs_highlight_on_keys = ['f', 'F', 't', 'T'] - -"Automatic commands -augroup autocmd - "greet - autocmd BufRead *.greet set syntax=greet - "netrw - autocmd FileType,WinEnter,BufEnter netrw call Configurenetrw() - - "Get rid of shitty indenting - autocmd FileType html :normal gg=G - - "Nowrap - autocmd FileType html :setlocal nowrap - - "C - autocmd FileType C :noremap <buffer> <leader>end $a;<esc> - autocmd FileType C :inoremap <buffer> <leader><leader>end <esc>$a;<esc> -augroup END diff --git a/.config/nvim/modules/abbrs.vim b/.config/nvim/modules/abbrs.vim @@ -5,3 +5,4 @@ iabbrev ccopy Copyright (c) Hayden Hamilton <hayden@haydenvh.com> iabbrev ssig --<CR>Hayden iabbrev nname Hayden Hamilton iabbrev unkown unknown +iabbrev ggopher \|haydenvh.com\|70] diff --git a/.config/nvim/modules/filetype.vim b/.config/nvim/modules/filetype.vim @@ -0,0 +1,27 @@ +function Shconfig() + nnoremap <buffer> <localleader>s i#!/bin/sh<CR>#<CR># <++><CR># Created by Hayden Hamilton<CR>#<CR># haydenvh.com<CR># Copyright (c) <++> Hayden Hamilton<CR><CR>${XDG_CACHE_HOME:=$HOME/.cache}<CR>${XDG_CONFIG_HOME:=$HOME/.config}<CR>cache=$XDG_CACHE_HOME<CR>config=$XDG_CONFIG_HOME<esc> + nnoremap <buffer> <localleader>x :!chmod +x %<CR> + nnoremap <buffer> <localleader>f i(){<CR><CR>}<esc>kk0i + nnoremap <buffer> <localleader>$ i$()<esc>i + nnoremap <buffer> <localleader>($ i$(())<esc>hi +endfunction + +augroup autocmd + "greet + autocmd BufRead *.greet set syntax=greet + "netrw + autocmd FileType,WinEnter,BufEnter netrw call Configurenetrw() + + "Get rid of shitty indenting + autocmd FileType html :normal gg=G + + "Nowrap + autocmd FileType html :setlocal nowrap + + "C + autocmd FileType c :noremap <buffer> <localleader>e $a;<esc> + autocmd FileType c :inoremap <buffer> <localleader><localleader>e <esc>$a;<esc> + + "SH + autocmd FileType sh :call Shconfig() +augroup END diff --git a/.config/redshift/redshift.conf b/.config/redshift/redshift.conf @@ -2,7 +2,7 @@ [redshift] temp-day=5700 -temp-night=2800 +temp-night=2300 ; Pozzy london time - I don't wanna be v& location-provider=manual diff --git a/.config/vimb/config b/.config/vimb/config @@ -19,8 +19,8 @@ nnoremap vh :sh! vimbhist<CR> nnoremap Q :q!<CR> nmap B :sh! mpv "$(xclip -o)"<CR> -shortcut-add sx=https://searx.me/?q=$0 -shortcut-add sch=https://searx.ch/?q=$0 +shortcut-add sx=https://searx.me/ +shortcut-add sch=https://searx.win/?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.me" || hostname == "searx.ch") {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.win" || 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 @@ -16,15 +16,25 @@ alias l=" \ls --color" alias la=" \ls --color -A" alias ll=" \ls --color -lh" alias lla=" \ls --color -lAh" +alias r=" \rm" +alias rr=" \rm -rf" +alias rm=" nop r" +alias m=" \mv" +alias mv=" nop m" alias vim=" nop v" alias vi=" nop v" alias v=" nvim" alias git=" nop g" alias g=" \git" +alias c=" \cp" +alias cp=" nop c" 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" alias clock=" tty-clock -s -c -C 7" @@ -37,13 +47,14 @@ alias zsleep=" sudo zzz" alias hibernate=" sudo ZZZ" alias rmst=" bash ~/.scripts/random/gnulinux.sh" alias vimb=" \vimb --no-maximize" -alias cleancache=" sudo xbps-remove -Ooy; rm -rf ~/.cache ~/.mozilla ~/.local/share/webkitgtk ~/.viminfo ~/.wget-hsts ~/.lesshst ~/.sh_history ~/.python_history ~/.*history ~/.*hst ~/.dbus ~/.sciminfo ~/.viminfo ~/.w3m ~/.config/vimb/cookies.db; sudo vkpurge rm all;" +alias cleancache=" sudo xbps-remove -Ooy; rm -rf ~/.cache ~/.mozilla ~/.local/share/webkitgtk ~/.viminfo ~/.wget-hsts ~/.lesshst ~/.sh_history ~/.python_history ~/.*history ~/.*hst* ~/.dbus ~/.sciminfo ~/.viminfo ~/.w3m ~/.config/vimb/cookies.db; sudo vkpurge rm all;" alias mkconfall=" mkmailpass; mkalias" alias tmux=" tmux -f ~/.config/tmux/config" alias nw=" newsboat" alias nm=" neomutt" alias maic=" sudo make all install clean" alias homesync=" rsync --port 222 --delete -azPe 'ssh -p 222' --exclude=general --exclude=.cache --exclude=.local/cache $HOME/ void@192.168.1.20:/home/void/homedir/" +alias tmux=" \tmux -f $HOME/.config/tmux/config" alias ~d=" cd ~/general/downloads; ls" alias ~do=" cd ~/general/documents; ls" alias ~iw=" cd ~/images/wallpapers; ls" diff --git a/.config/zsh/functions.zsh b/.config/zsh/functions.zsh @@ -73,3 +73,22 @@ encsign(){ [ "$1" = "--help" ] && echo '$1=recipient $2=file' && exit 1 gpg --encrypt --sign --armor -r $1 $2 } + +h8(){ + for file in $(printf "$@") + do + name=$(curl -F 'file=<-' http://haydenvh.com:8080 < $file) + echo "$file : $name" + names="$names $name" + done + echo "$names" | xclip +} + +p8(){ + name=$(curl -F 'file=<-' http://haydenvh.com:8080 < /dev/stdin) + echo "$name" | tee | xclip +} + +cu(){ + sh $HOME/.scripts/custom/$1 +} diff --git a/.config/zsh/ls.zsh b/.config/zsh/ls.zsh @@ -1,2 +1,2 @@ #!/bin/bash -export LS_COLORS="di=35:fi=0:ln=33:ex=91;01:*.sh=91:*.html=92:*.css=97:*.md=97:*.yml=93:*.c=94:*.h=94:*.h.orig=94;01:*.h.rej=94;01:*.mk=96:*LICENSE=90:*Makefile=90:*make.sh=90:*README=97:*.c.orig=94;01:*.c.rej=94;01:*.png=95:*.jpg=95:*.heic=95:*.heif=95:*.mp3=95;01:*.opus=.95;01:*.m4a=95;01:*.flac=95;01:*.wav=95;01:*.mp4=95;04:*.mkv=95;04:*.webm=95;04" +export LS_COLORS="di=35:fi=0:ln=33:ex=91;01:*.sh=91:*.html=92:*.css=97:*.md=97:*.yml=93:*.c=94:*.h=94:*.h.orig=94;01:*.h.rej=94;01:*.mk=96:*LICENSE=90:*Makefile=90:*make.sh=90:*README=97:*TODO=97:*.c.orig=94;01:*.c.rej=94;01:*.png=95:*.jpeg=95:*.jpg=95:*.heic=95:*.heif=95:*.mp3=95;01:*.opus=.95;01:*.m4a=95;01:*.flac=95;01:*.wav=95;01:*.mp4=95;04:*.mkv=95;04:*.webm=95;04" diff --git a/.local/xres b/.local/xres @@ -8,7 +8,7 @@ ! special *.foreground: #1e5eb3 -*.background: #0c0a14 +*.background: #0a0a10 *.cursorColor: #1e5eb3 ! black diff --git a/.scripts/bin/display/fehffile b/.scripts/bin/display/fehffile @@ -1,5 +1,10 @@ -#!/bin/bash - +#!/bin/sh +# +# fehffile +# Created by Hayden Hamilton +# +# haydenvh.com +# Copyright (c) 2020 Hayden Hamilton backend="xwallpaper" [ "$backend" = "xwallpaper" ] && { diff --git a/.scripts/bin/display/hlock b/.scripts/bin/display/hlock @@ -4,7 +4,7 @@ # Created by Hayden Hamilton # # haydenvh.com -# Copyright (c) 2019 Hayden Hamilton. +# Copyright (c) 2019-2020 Hayden Hamilton. # image="/tmp/screen.png" locker="i3lock -i" diff --git a/.scripts/bin/display/pexelgrab b/.scripts/bin/display/pexelgrab @@ -1,4 +1,9 @@ -#!/bin/sh +# +# pexelgrab +# Created by Hayden Hamilton +# +# haydenvh.com +# Copyright (c) 2020 Hayden Hamilton [ -f $HOME/general/security/pexels ] && read API_KEY < $HOME/general/security/pexels || API_KEY="$1" [ "$API_KEY" = "" ] && echo "No api key..." && exit 1 diff --git a/.scripts/bin/display/rfeh b/.scripts/bin/display/rfeh @@ -4,7 +4,7 @@ # Created by Hayden Hamilton # # haydenvh.com -# Copyright (c) 2019 Hayden Hamilton. +# Copyright (c) 2019-2020 Hayden Hamilton. backend="xwallpaper" diff --git a/.scripts/bin/display/rwall b/.scripts/bin/display/rwall @@ -1,4 +1,10 @@ #!/bin/sh +# +# rwall +# Created by Hayden Hamilton +# +# haydenvh.com +# Copyright (c) 2020 Hayden Hamilton for arg in "$@" do diff --git a/.scripts/bin/display/wallblur b/.scripts/bin/display/wallblur @@ -4,7 +4,9 @@ # Created by Hayden Hamilton # # haydenvh.com -# Copyright (c) 2019 Hayden Hamilton. + +${XDG_CACHE_HOME:=$HOME/.cache} +cache=$XDG_CACHE_HOME backend="xwallpaper" args=$(echo "$@" | sed 's/--force//g;s/force//g') @@ -12,34 +14,34 @@ echo "$args" donorm(){ [ "$args" = "" ] && { - convert $file -sparse-color Barycentric '0,0 black 0,%h white' -function polynomial 3.5,-3.5,1 /tmp/blurmap.png - convert $file /tmp/blurmap.png -compose Blur -set option:compose:args 5 -composite $1 + convert $file -sparse-color Barycentric '0,0 black 0,%h white' -function polynomial 3.2,-3.5,1 /tmp/blurmap.png + convert $file /tmp/blurmap.png -compose Blur -set option:compose:args 7 -composite $1 } || { convert $file $args $1 } files="$files $1" } -input=$(cat $HOME/.cache/rfeh/prev) +input=$(cat $cache/rfeh/prev) count=0 files="" -mkdir -p $HOME/.cache/wallblur/ +mkdir -p $cache/wallblur/ for file in $input do count=$(($count+1)) [ "$(echo "$@" | grep "force")" = "" ] && { - [ -f $HOME/.cache/wallblur/$(basename $file) ] && { - files="$HOME/.cache/wallblur/$(basename $file) $files" + [ -f $cache/wallblur/$(basename $file) ] && { + files="$cache/wallblur/$(basename $file) $files" } || { - donorm "$HOME/.cache/wallblur/$(basename $file)" + donorm "$cache/wallblur/$(basename $file)" } } || { - donorm "$HOME/.cache/wallblur/$(basename $file)" + donorm "$cache/wallblur/$(basename $file)" } done -files=$(echo "$files" | sed 's~ $~~g;s~^ ~~g' | tr " " "\n" | sed "s~^~--output OUTPUT --zoom ~g" | tr "\n" " ") +files=$(echo "$files" | sed 's~[[:space:]]*$~~g;s~^[[:space:]]*~~g' | tr " " "\n" | sed "s~^~--output OUTPUT --zoom ~g" | tr "\n" " ") echo $files for OUTPUT in $(xrandr --listactivemonitors | awk '$4 {print $4}') do diff --git a/.scripts/bin/display/wbcachemake b/.scripts/bin/display/wbcachemake @@ -0,0 +1,29 @@ +#!/bin/sh +# +# wbcachemake +# Created by Hayden Hamilton +# +# haydenvh.com +# Copyright (c) 2020 Hayden Hamilton + +${XDG_CACHE_HOME:=$HOME/.cache} +cache="$XDG_CACHE_HOME" + +donorm(){ + [ "$args" = "" ] && { + convert $file -sparse-color Barycentric '0,0 black 0,%h white' -function polynomial 3.2,-3.5,1 /tmp/blurmap.png + convert $file /tmp/blurmap.png -compose Blur -set option:compose:args 7 -composite $1 + } || { + convert $file $args $1 + } + files="$files $1" +} + +mkdir -p $cache/wallblur +rm $cache/wallblur/* + +for file in $(find images/wallpapers -type f -name "*.png") +do + echo $file + donorm "$cache/wallblur/$(basename $file)" +done diff --git a/.scripts/bin/dmenu/daskpass b/.scripts/bin/dmenu/daskpass @@ -1,9 +1,3 @@ #!/bin/bash -# -# dmenu/daskpass -# Created by Hayden Hamilton -# -# haydenvh.com -# Copyright (c) 2019 Hayden Hamilton. dmenu -P -p "$1" <&- && echo diff --git a/.scripts/bin/dmenu/dfm b/.scripts/bin/dmenu/dfm @@ -4,7 +4,7 @@ # Created by Hayden Hamilton # # haydenvh.com -# Copyright (c) 2019 Hayden Hamilton. +# Copyright (c) 2019-2020 Hayden Hamilton. # if [ "$(echo $1 | awk '/help/ {print}')" != "" ] diff --git a/.scripts/bin/dmenu/dimg b/.scripts/bin/dmenu/dimg @@ -1,4 +1,10 @@ #!/bin/sh +# +# dimg +# Created by Hayden Hamilton +# +# haydenvh.com +# Copyright (c) 2020 Hayden Hamilton printf '' > /tmp/dimg [ ! -z $1 ] && dir="$1" || dir="$HOME/general/images/wallpapers" diff --git a/.scripts/bin/dmenu/dmon b/.scripts/bin/dmenu/dmon @@ -1,4 +1,10 @@ -#!/bin/bash +#!/bin/sh +# +# dmon +# Created by Hayden Hamilton +# +# haydenvh.com +# Copyright (c) 2020 Hayden Hamilton choice=$(xrandr -q | grep "[A-Z]* con" | dmenu -i -p "Choose primary monitor:" | awk '//{print $1}') cmd="xrandr --output $choice --primary" diff --git a/.scripts/bin/dmenu/dmpvurl b/.scripts/bin/dmenu/dmpvurl @@ -4,7 +4,7 @@ # Created by Hayden Hamilton # # haydenvh.com -# Copyright (c) 2019 Hayden Hamilton. +# Copyright (c) 2019-2020 Hayden Hamilton. # dmenu="dmenu" diff --git a/.scripts/bin/dmenu/dpass b/.scripts/bin/dmenu/dpass @@ -4,7 +4,7 @@ # Created by Hayden Hamilton # # haydenvh.com -# Copyright (c) 2019 Hayden Hamilton. +# Copyright (c) 2019-2020 Hayden Hamilton. # if [ "$(echo $1 | awk '/help/ {print $0}')" != "" ] diff --git a/.scripts/bin/genman/scratcher b/.scripts/bin/genman/scratcher @@ -1,13 +0,0 @@ -#!/bin/bash -i3msg(){ - i3-msg -s $(i3 --get-socketpath) "$@" -} -i3msg "floating toggle" -sleep 0.1 -i3msg "resize set 1000 500" -i3msg "border pixel 2" -i3msg "sticky toggle" -sleep 0.1 -i3msg "move position center" -sleep 0.5 -i3msg "move scratchpad" diff --git a/.scripts/bin/misc/dotadd b/.scripts/bin/misc/dotadd @@ -1,4 +1,5 @@ -git add ./LICENSE +#!/bin/sh +#git add ./LICENSE git add .config/sxhkd/ git add .local/xauth git add .local/xres diff --git a/.scripts/bin/misc/hmpv b/.scripts/bin/misc/hmpv @@ -4,7 +4,7 @@ # Created by Hayden Hamilton # # haydenvh.com -# Copyright (c) 2019 Hayden Hamilton. +# Copyright (c) 2019-2020 Hayden Hamilton. action=$1 socket=$2 diff --git a/.scripts/bin/misc/qmv b/.scripts/bin/misc/qmv @@ -1,4 +1,10 @@ #!/bin/sh +# +# qmv +# Created by Hayden Hamilton +# +# haydenvh.com +# Copyright (c) 2020 Hayden Hamilton [ "$(echo "$1" | grep "help")" != "" ] && printf " qmv [mode] [modeinfo] [files] @@ -30,17 +36,13 @@ _number0(){ fileext=$(echo "$@" | grep -o "\.[A-Za-z0-9]*" | sed 's/^\.//g') pad=$(echo "$number" | grep -o "^0*") padc=$(echo "$pad" | wc -m) - echo $padc for file in $all do - numa=$(echo "$number" | wc -m) - pada=$(($numa-$padc)) - padnum=$(for void in $(seq $pada); do printf "0"; done; printf "$number") [ "$fileext" = "" ] && { - mv $file $padnum + mv $file $(printf "0${padc}d" "$number") } || { - mv $file $padnum.$fileext + mv $file $(printf "0${padc}d" "$number").$fileext }; number=$(($number+1)) done } diff --git a/.scripts/bin/misc/rmpv b/.scripts/bin/misc/rmpv @@ -4,7 +4,7 @@ # Created by Hayden Hamilton # # haydenvh.com -# Copyright (c) 2019 Hayden Hamilton. +# Copyright (c) 2019-2020 Hayden Hamilton. dir=$1 count="$2" diff --git a/.scripts/bin/misc/urlhand b/.scripts/bin/misc/urlhand @@ -1,6 +1,6 @@ #!/bin/bash -link=$(awk '/http.:\/\/|gopher:\/\//' < /dev/stdin | sed 's/.*http/http/g;s/.*gopher/gopher/g' | tr -d '<[]>' | awk '{print $1}' | sort | dmenu -i -p "Select a url:") +link=$(awk '/https*:\/\/|gopher:\/\//' < /dev/stdin | sed 's/.*http/http/g;s/.*gopher/gopher/g' | tr -d '<[]>' | awk '{print $1}' | sort | dmenu -i -p "Select a url:") IFS=$'\n' @@ -9,7 +9,8 @@ popupmpv youtube-dl --add-metadata -ic youtube-dl --add-metadata -xic vimb --no-maximize -xclip" | dmenu -i -p "Select a handler:") +xclip +webimg" | dmenu -i -p "Select a handler:") pkill mpvlisten hmpv pause /tmp/mpv-socket diff --git a/.scripts/bin/misc/webimg b/.scripts/bin/misc/webimg @@ -0,0 +1,4 @@ +#!/bin/sh + +curl "$1" > /tmp/webimg +sxiv /tmp/webimg diff --git a/.scripts/custom/README b/.scripts/custom/README @@ -0,0 +1 @@ +These are scripts that suite my specific hardware - don't expect them to work out of the box. diff --git a/.scripts/custom/dock b/.scripts/custom/dock @@ -0,0 +1,10 @@ +#!/bin/sh + +for d in "LVDS1" "VGA1" "HDMI2" +do + ds="$ds --output $d --off" +done + +xrandr $ds --output VGA1 --mode 1920x1080 --primary --pos 0x0 +xrandr --output HDMI2 --mode 1920x1080 --pos 1920x0 + diff --git a/.scripts/custom/undock b/.scripts/custom/undock @@ -0,0 +1,8 @@ +#!/bin/sh + +for d in "LVDS1" "VGA1" "HDMI2" +do + xrandr --output $d --off +done + +xrandr --output LVDS1 --mode 1280x800 diff --git a/.scripts/custom/xrandr b/.scripts/custom/xrandr @@ -1,9 +0,0 @@ -#!/bin/sh - -cmons=$(xrandr | grep "[A-Z]* con" | wc -l) - -[ "$cmons" = "3" ] && xrandr --output LVDS1 --off --output VGA1 --primary --output HDMI2 --right-of VGA1 || -[ "$cmons" = "2" ] && { - mon2=$(xrandr | grep "[A-Z]* con" | sed '/^LVDS/d' | awk '//{print $1}') - xrandr --output $mon2 --primary --output LVDS1 --left-of $mon2 -} || xrandr --output LVDS1 --primary diff --git a/.scripts/dwmblocks/net b/.scripts/dwmblocks/net @@ -6,7 +6,7 @@ # haydenvh.com # Copyright (c) 2019 Hayden Hamilton. -ip=$(curl -s http://icanhazip.com/) +ip=$(curl -s http://n0a110w.xyz/ip.sh | tail -n 1) echo "[$ip]" echo echo \#4Da0C6 diff --git a/.xinitrc b/.xinitrc @@ -4,7 +4,6 @@ xrdb ~/.local/xres & setxkbmap haydenh & xsetroot -cursor_name sailboat & sxhkd & -sh ~/.scripts/custom/* & while true; do dwm diff --git a/.xprofile b/.xprofile @@ -1 +0,0 @@ -.zprofile -\ No newline at end of file diff --git a/.zprofile b/.zprofile @@ -21,7 +21,6 @@ export SUDO_ASKPASS="$HOME/.scripts/bin/dmenu/daskpass" export PASS="$HOME/.local/pass" export SHELL="/usr/bin/zsh" export ZDOTDIR="$HOME/.config/zsh" -export IP="$(curl icanhazip.com -qs)" xrdb -merge ~/.local/xres . .config/zsh/ls.zsh [ "$hostname" != "" ] && {