dotfiles

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

commit 27375df4402e22c32204de52164c3e5e16edf210
parent 60337dc6be04ef1b5c9e10fecd372fa975a594b4
Author: Hayden Hamilton <hayden@haydenvh.com>
Date:   Wed, 15 Apr 2020 08:41:45 +0100

fixing up dwmbar

Diffstat:
M.config/alias | 2++
M.config/newsboat/config | 4++--
M.config/nvim/init.vim | 1+
M.config/nvim/modules/filetype.vim | 4++++
M.config/nvim/modules/message.vim | 2+-
M.config/sxhkd/sxhkdrc | 2+-
M.config/vimb/config | 2+-
M.config/zsh/alias.zsh | 2++
M.config/zsh/ls.zsh | 39+++++++++++++++++++++++++++++++++++++--
D.mailcap | 6------
M.scripts/bin/display/wallblur | 2+-
M.scripts/bin/display/wbcachemake | 24+++++++++++++++++++-----
M.scripts/bin/dmenu/dimg | 19++++++++++++-------
M.scripts/bin/misc/dotadd | 2--
M.scripts/bin/misc/urlhand | 3++-
M.scripts/dwmblocks/dwmbar | 46++++++++++++++++++++++++----------------------
M.zprofile | 2--
DLICENSE | 19-------------------
18 files changed, 109 insertions(+), 72 deletions(-)

diff --git a/.config/alias b/.config/alias @@ -15,6 +15,8 @@ git nop g g \git c \cp cp nop c +find nop f +f \find xi sudo xbps-install xiu sudo xbps-install -S; sudo xbps-install -yu xbps; sudo xbps-install -yu xq sudo xbps-query diff --git a/.config/newsboat/config b/.config/newsboat/config @@ -1,8 +1,8 @@ #show-read-feeds no auto-reload yes -browser "vimb --no-maximize" -external-url-viewer "urlhand" +browser "nohup vimb --no-maximize" +external-url-viewer "nohup urlhand" bind-key j down bind-key k up diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim @@ -62,6 +62,7 @@ function! ReopenFile() execute 'edit' . curfile endfunction +noremap <leader>q :qa!<CR> noremap <leader>g :Goyo \| set linebreak<CR> noremap <leader>cd :chdir noremap <leader>ca :ColorizerAttachToBuffer<CR> diff --git a/.config/nvim/modules/filetype.vim b/.config/nvim/modules/filetype.vim @@ -4,6 +4,10 @@ function Shconfig() nnoremap <buffer> <localleader>f i(){<CR><CR>}<esc>kk0i nnoremap <buffer> <localleader>$ i$()<esc>i nnoremap <buffer> <localleader>($ i$(())<esc>hi + nnoremap <buffer> <localleader>$ca i$cache + nnoremap <buffer> <localleader>$co i$config + iabbrev ccachedir ${XDG_CACHE_HOME:=$HOME/.cache}<CR>cache=$XDG_CACHE_HOME + iabbrev cconfigdir ${XDG_CONFIG_HOME:=$HOME/.config}<CR>cache=$XDG_CONFIG_HOME endfunction augroup autocmd diff --git a/.config/nvim/modules/message.vim b/.config/nvim/modules/message.vim @@ -28,7 +28,7 @@ function! LauncherRecent() redir! >/tmp/vim-recent.1 | silent! echo '' | silent! echo '' | silent! echo 'Config files:' | redir END redir! >/tmp/vim-recent.2 | silent! echo '' | silent! echo '' | silent! echo 'Recent files (cwd):' | redir END redir! >/tmp/vim-recent.3 | silent! echo '' | silent! echo '' | silent! echo 'General:' | redir END - redir! >/tmp/vim-recentcmd.vim | silent! echo ':silent! unmap <buffer> <c-k>' | silent! echo ':silent! unmap <buffer> q' | silent! echo 'nnoremap <buffer> q :q<CR>:new<CR>:only<CR>:let g:netrw_winsize=20<CR>:Lexplore<CR><c-w>l' | silent! echo ':silent! unmap <buffer>Q' | silent! echo ':nnoremap <buffer> Q :qa!<CR>' | silent! echo ':nnoremap <buffer>: <CR>' | redir END + redir! >/tmp/vim-recentcmd.vim | silent! echo ':silent! unmap <buffer> <c-k>' | silent! echo ':silent! unmap <buffer> q' | silent! echo 'nnoremap <buffer> q :q<CR>:new<CR>:only<CR>:source $HOME/.config/nvim/init.vim<CR>' | silent! echo ':silent! unmap <buffer>Q' | silent! echo ':nnoremap <buffer> Q :qa!<CR>' | silent! echo ':nnoremap <buffer>: <CR>' | silent! echo ":let mapleader=';;;;;;;;;;;;;;;'" | silent! echo ":let maplocalleader=',,,,,,,,,,,,,,,,,,'"| redir END for string in olist let string=substitute(string, $HOME, "~", "") if i=='10' diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc @@ -1,4 +1,4 @@ -super + {shift, ctrl, alt, shift + ctrl} + bracketright +super + {,shift, ctrl, alt} + bracketright dinput "Are you sure?" "{sudo zzz, sudo ZZZ, sudo halt, sudo reboot}" super + Return diff --git a/.config/vimb/config b/.config/vimb/config @@ -20,7 +20,7 @@ nnoremap Q :q!<CR> nmap B :sh! mpv "$(xclip -o)"<CR> shortcut-add sx=https://searx.me/ -shortcut-add sch=https://searx.win/?q=$0 +shortcut-add sch=https://occusearch.de/?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/zsh/alias.zsh b/.config/zsh/alias.zsh @@ -28,6 +28,8 @@ alias git=" nop g" alias g=" \git" alias c=" \cp" alias cp=" nop c" +alias find=" nop f" +alias f=" \find" 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" diff --git a/.config/zsh/ls.zsh b/.config/zsh/ls.zsh @@ -1,2 +1,37 @@ -#!/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:*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" +#!/bin/zsh +export LS_COLORS="$(echo 'di=35 +:fi=0 +:ln=33 +:ex=91;01 +:*.sh=91 +:*.hex=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 +:*.xcf=95 +:*.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' | tr -d '\n')" diff --git a/.mailcap b/.mailcap @@ -1,6 +0,0 @@ -text/html ; vimb '%s' -text/* ; nvim '%s' - -application/pdf ; zathura '%s' - -image/* ; sxiv '%s' diff --git a/.scripts/bin/display/wallblur b/.scripts/bin/display/wallblur @@ -14,7 +14,7 @@ echo "$args" 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 -sparse-color Barycentric '0,0 black 0,%h white' -function polynomial 2.8,-3.1,1 /tmp/blurmap.png convert $file /tmp/blurmap.png -compose Blur -set option:compose:args 7 -composite $1 } || { convert $file $args $1 diff --git a/.scripts/bin/display/wbcachemake b/.scripts/bin/display/wbcachemake @@ -11,8 +11,8 @@ 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 -sparse-color Barycentric '0,0 black 0,%h white' -function polynomial 3.0,-3.2,1 /tmp/blurmap.png + convert $file /tmp/blurmap.png -compose Blur -set option:compose:args 8 -composite $1 } || { convert $file $args $1 } @@ -22,8 +22,22 @@ donorm(){ mkdir -p $cache/wallblur rm $cache/wallblur/* -for file in $(find images/wallpapers -type f -name "*.png") +files=$(find images/wallpapers -type f -name "*.png") +half=$(echo "$files" | wc -l) +half=$(($half/2)) +top=$(echo "$files" | head -n $half) +bot=$(echo "$files" | tail -n $half) + +for file in $top +do + echo $file start + donorm "$cache/wallblur/$(basename $file)" + echo $file done +done & + +for file in $bot do - echo $file + echo $file start donorm "$cache/wallblur/$(basename $file)" -done + echo $file done +done & diff --git a/.scripts/bin/dmenu/dimg b/.scripts/bin/dmenu/dimg @@ -6,6 +6,9 @@ # haydenvh.com # Copyright (c) 2020 Hayden Hamilton +${XDG_CACHE_HOME:=$HOME/.cache} +cache=$XDG_CACHE_HOME + printf '' > /tmp/dimg [ ! -z $1 ] && dir="$1" || dir="$HOME/general/images/wallpapers" @@ -14,11 +17,13 @@ case $(printf 'wallpaper\nview' | dmenu -i -p 'Select option:') in wallpaper) setwall ;; esac -monitors=$(xrandr --listmonitors | awk '/Monitors/{print $2}') -for i in $(seq $monitors) -do - files="$files $(find $dir -type f | shuf | dmenu -i -p "Select wallpaper $i:")" -done +setwall(){ + monitors=$(xrandr --listmonitors | awk '/Monitors/{print $2}') + for i in $(seq $monitors) + do + files="$files $(find $dir -type f | shuf | dmenu -i -p "Select wallpaper $i:")" + done -echo "$files" | sed 's/^[[:space:]]*//g;s/[[:space:]]*$//g' > /tmp/dimg -fehffile /tmp/dimg + echo "$files" | sed 's/^[[:space:]]*//g;s/[[:space:]]*$//g' > $cache/rfeh/prev + fehffile $cache/rfeh/prev +} diff --git a/.scripts/bin/misc/dotadd b/.scripts/bin/misc/dotadd @@ -1,5 +1,4 @@ #!/bin/sh -#git add ./LICENSE git add .config/sxhkd/ git add .local/xauth git add .local/xres @@ -8,7 +7,6 @@ git add .config/tmux/config git add .zprofile git add .config/zsh/ git add ./.scripts/ -git add ./.xprofile git add ./.xinitrc git add .config/picom/config git add .config/irssi/pipeline.theme diff --git a/.scripts/bin/misc/urlhand b/.scripts/bin/misc/urlhand @@ -10,7 +10,8 @@ youtube-dl --add-metadata -ic youtube-dl --add-metadata -xic vimb --no-maximize xclip -webimg" | dmenu -i -p "Select a handler:") +webimg +st -e curl" | dmenu -i -p "Select a handler:") pkill mpvlisten hmpv pause /tmp/mpv-socket diff --git a/.scripts/dwmblocks/dwmbar b/.scripts/dwmblocks/dwmbar @@ -1,40 +1,42 @@ #!/bin/bash mkdir -p ~/.cache/blocks +block(){ + $HOME/.scripts/dwmblocks/$1 > $HOME/.cache/blocks/$1 & +} -./host > ~/.cache/blocks/host & +block host fetchmail & -swait=21 while true do - ((swait>20)) &&{ - ./net > ~/.cache/blocks/net & - ./news > ~/.cache/blocks/news & - ./weather > ~/.cache/blocks/weather & - ./disk > ~/.cache/blocks/disk & - ./disk2 > ~/.cache/blocks/disk2 & - ./time > ~/.cache/blocks/time & - swait=0 - }; - #./.scripts/i3blocks/cal > .cache/blocks/cal & - ./bat > ~/.cache/blocks/bat & - ./cpu > ~/.cache/blocks/cpu & - ./mem > ~/.cache/blocks/mem & - ./mpv 2> /dev/null > ~/.cache/blocks/mpv & - ./vol > ~/.cache/blocks/vol & + block bat + block cpu + block mem + block vol sleep 3 - cd ~/.scripts/i3blocks - swait=$(($swait+1)) done & while true do + block mpv + block time sleep 1 - ./time2 > ~/.cache/blocks/time2 +done & + +while true +do + block net + block news + block weather + block disk + block disk2 + block time2 + sleep 20 done & cd ~/.cache/blocks -while true; do -sleep 1 +while true +do + sleep 1 xsetroot -name "$(for void in $(seq 150); do printf " "; done) $(cat bat cpu disk disk2 mem mpv net news vol weather time time2 host | sed '/^#/d;/^$/d' | sed '1~2s/^/\^c#aaaaff\^/;2~2s/^/\^c#ffaaaa\^/;s~\[~ ^b#1a3136^ ~g;s~\]~ ^d^~g' | tr '\n' ' ') " done 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" -xrdb -merge ~/.local/xres . .config/zsh/ls.zsh [ "$hostname" != "" ] && { echo > /dev/null @@ -37,7 +36,6 @@ xrdb -merge ~/.local/xres export XDG_CONFIG_HOME=$HOME/.config export XDG_CACHE_HOME=$HOME/.cache export XDG_DATA_DIRS=/usr/local/share:/usr/share:$HOME/.local/share -export XDG_RUNTIME_DIR=/tmp export XAUTHORITY=$HOME/.local/.xauth export LESSHISTFILE=- export GNUPGHOME=$HOME/.local/gnupg diff --git a/LICENSE b/LICENSE @@ -1,19 +0,0 @@ -Copyright (C) 2019 Hayden Hamilton <hayden@haydenvh.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE.