commit 821ececc531be8da45c3a50ff39614ccaf48a1d6
parent 69cd2f60d123a022061600e2453c1a0272ecc76b
Author: Hayden Hamilton <hayden@haydenvh.com>
Date: Sun, 1 Mar 2020 12:11:06 +0000
a few things
Diffstat:
17 files changed, 127 insertions(+), 16 deletions(-)
diff --git a/.alias b/.alias
@@ -13,7 +13,7 @@ map telnet mapscii.me
tetris ssh netris.rocketnine.space
calcurse \calcurse -D ~/.config/calcurse
irssi \irssi --home ~/.config/irssi/ -n haydenh
-sleep sudo zzz
+zsleep sudo zzz
hibernate sudo ZZZ
rmst bash ~/.scripts/random/gnulinux.sh
fff bash ~/.config/fff/config
@@ -23,6 +23,8 @@ cleancache sudo xbps-remove -Oo; rm -rf ~/.cache ~/.mozilla ~/.local/share/webk
mkconfall mkmailpass; mkalias
nw newsboat
nm neomutt
+conftar cd ~; sshtar .config/ .tmux.conf .terminfo/ .scripts/ .alias .galias .vimrc
+maic sudo make all install clean
~d cd ~/general/downloads; ls
~do cd ~/general/documents; ls
~iw cd ~/images/wallpapers; ls
@@ -33,6 +35,10 @@ nm neomutt
~c cd ~/.config; ls
~s cd ~/.scripts; ls
~sb cd ~/.scripts/bin; ls
+~sbdi cd ~/.scripts/bin/display; ls
+~sbdm cd ~/.scripts/bin/dmenu; ls
+~sbi cd ~/.scripts/bin/i3; ls
+~sbm cd ~/.scripts/bin/misc; ls
~vrc vim ~/.vimrc
.. cd ..
... cd ../..
diff --git a/.config/bash/alias b/.config/bash/alias
@@ -13,7 +13,7 @@ alias map=" telnet mapscii.me"
alias tetris=" ssh netris.rocketnine.space"
alias calcurse=" \calcurse -D ~/.config/calcurse"
alias irssi=" \irssi --home ~/.config/irssi/ -n haydenh"
-alias sleep=" sudo zzz"
+alias zsleep=" sudo zzz"
alias hibernate=" sudo ZZZ"
alias rmst=" bash ~/.scripts/random/gnulinux.sh"
alias fff=" bash ~/.config/fff/config"
@@ -23,6 +23,8 @@ alias cleancache=" sudo xbps-remove -Oo; rm -rf ~/.cache ~/.mozilla ~/.local/sha
alias mkconfall=" mkmailpass; mkalias"
alias nw=" newsboat"
alias nm=" neomutt"
+alias conftar=" cd ~; sshtar .config/ .tmux.conf .terminfo/ .scripts/ .alias .galias .vimrc"
+alias maic=" sudo make all install clean"
alias ~d=" cd ~/general/downloads; ls"
alias ~do=" cd ~/general/documents; ls"
alias ~iw=" cd ~/images/wallpapers; ls"
@@ -33,6 +35,10 @@ alias ~w=" cd ~/work; ls"
alias ~c=" cd ~/.config; ls"
alias ~s=" cd ~/.scripts; ls"
alias ~sb=" cd ~/.scripts/bin; ls"
+alias ~sbdi=" cd ~/.scripts/bin/display; ls"
+alias ~sbdm=" cd ~/.scripts/bin/dmenu; ls"
+alias ~sbi=" cd ~/.scripts/bin/i3; ls"
+alias ~sbm=" cd ~/.scripts/bin/misc; ls"
alias ~vrc=" vim ~/.vimrc"
alias ..=" cd .."
alias ...=" cd ../.."
diff --git a/.config/fish/alias b/.config/fish/alias
@@ -13,7 +13,7 @@ alias map=" telnet mapscii.me"
alias tetris=" ssh netris.rocketnine.space"
alias calcurse=" \calcurse -D ~/.config/calcurse"
alias irssi=" \irssi --home ~/.config/irssi/ -n haydenh"
-alias sleep=" sudo zzz"
+alias zsleep=" sudo zzz"
alias hibernate=" sudo ZZZ"
alias rmst=" bash ~/.scripts/random/gnulinux.sh"
alias fff=" bash ~/.config/fff/config"
@@ -23,6 +23,8 @@ alias cleancache=" sudo xbps-remove -Oo; rm -rf ~/.cache ~/.mozilla ~/.local/sha
alias mkconfall=" mkmailpass; mkalias"
alias nw=" newsboat"
alias nm=" neomutt"
+alias conftar=" cd ~; sshtar .config/ .tmux.conf .terminfo/ .scripts/ .alias .galias .vimrc"
+alias maic=" sudo make all install clean"
alias ~d=" cd ~/general/downloads; ls"
alias ~do=" cd ~/general/documents; ls"
alias ~iw=" cd ~/images/wallpapers; ls"
@@ -33,6 +35,10 @@ alias ~w=" cd ~/work; ls"
alias ~c=" cd ~/.config; ls"
alias ~s=" cd ~/.scripts; ls"
alias ~sb=" cd ~/.scripts/bin; ls"
+alias ~sbdi=" cd ~/.scripts/bin/display; ls"
+alias ~sbdm=" cd ~/.scripts/bin/dmenu; ls"
+alias ~sbi=" cd ~/.scripts/bin/i3; ls"
+alias ~sbm=" cd ~/.scripts/bin/misc; ls"
alias ~vrc=" vim ~/.vimrc"
alias ..=" cd .."
alias ...=" cd ../.."
diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc
@@ -37,6 +37,9 @@ key[PageUp]="${terminfo[kpp]}"
key[PageDown]="${terminfo[knp]}"
key[ShiftTab]="${terminfo[kcbt]}"
+# Functions
+. $HOME/.config/zsh/functions
+
# Syntax highlighting
typeset -A ZSH_HIGHLIGHT_STYLES
. /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
diff --git a/.config/zsh/alias b/.config/zsh/alias
@@ -13,7 +13,7 @@ alias map=" telnet mapscii.me"
alias tetris=" ssh netris.rocketnine.space"
alias calcurse=" \calcurse -D ~/.config/calcurse"
alias irssi=" \irssi --home ~/.config/irssi/ -n haydenh"
-alias sleep=" sudo zzz"
+alias zsleep=" sudo zzz"
alias hibernate=" sudo ZZZ"
alias rmst=" bash ~/.scripts/random/gnulinux.sh"
alias fff=" bash ~/.config/fff/config"
@@ -23,6 +23,8 @@ alias cleancache=" sudo xbps-remove -Oo; rm -rf ~/.cache ~/.mozilla ~/.local/sha
alias mkconfall=" mkmailpass; mkalias"
alias nw=" newsboat"
alias nm=" neomutt"
+alias conftar=" cd ~; sshtar .config/ .tmux.conf .terminfo/ .scripts/ .alias .galias .vimrc"
+alias maic=" sudo make all install clean"
alias ~d=" cd ~/general/downloads; ls"
alias ~do=" cd ~/general/documents; ls"
alias ~iw=" cd ~/images/wallpapers; ls"
@@ -33,6 +35,10 @@ alias ~w=" cd ~/work; ls"
alias ~c=" cd ~/.config; ls"
alias ~s=" cd ~/.scripts; ls"
alias ~sb=" cd ~/.scripts/bin; ls"
+alias ~sbdi=" cd ~/.scripts/bin/display; ls"
+alias ~sbdm=" cd ~/.scripts/bin/dmenu; ls"
+alias ~sbi=" cd ~/.scripts/bin/i3; ls"
+alias ~sbm=" cd ~/.scripts/bin/misc; ls"
alias ~vrc=" vim ~/.vimrc"
alias ..=" cd .."
alias ...=" cd ../.."
@@ -57,3 +63,4 @@ alias -g ...........=" ../../../../../../../../../.."
alias -g ............=" ../../../../../../../../../../.."
alias -g om=" origin master"
alias -g gm=" github master"
+alias -g aic=" all install clean"
diff --git a/.config/zsh/functions b/.config/zsh/functions
@@ -0,0 +1,30 @@
+killprog(){
+ for prog in $(printf "$@")
+ do
+ pkill $prog
+ done
+}
+
+0x0(){
+ for file in $(printf "$@")
+ do
+ name=$(curl -F "file=@$file" http://0x0.st)
+ echo "$file has been hosted at $name"
+ done
+}
+
+ix(){
+ for file in $(printf "$@")
+ do
+ name=$(curl -F "f:1=<-" ix.io < $file)
+ echo "$file has been hosted at $name"
+ done
+}
+
+make(){
+ [ -f make.sh ] && {
+ sh make.sh "$@"
+ } || {
+ command make "$@"
+ }
+}
diff --git a/.galias b/.galias
@@ -10,3 +10,4 @@
............ ../../../../../../../../../../..
om origin master
gm github master
+aic all install clean
diff --git a/.ls_colors b/.ls_colors
@@ -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:*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:*.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"
diff --git a/.scripts/bin/display/fehffile b/.scripts/bin/display/fehffile
@@ -1,3 +1,15 @@
#!/bin/bash
-files=$(cat $1 | tr " " "\n" | sed "s~^~--bg-fill ~g" | tr "\n" " ")
-feh $files
+
+backend="xwallpaper"
+
+[ "$backend" = "xwallpaper" ] && {
+ files=$(tr " " "\n" < $1 | sed "s~^~--output OUTPUT --zoom ~g" | tr "\n" " ")
+ for OUTPUT in $(xrandr --listactivemonitors | awk '$4 {print $4}')
+ do
+ files=$(echo "$files" | sed "s/OUTPUT/$OUTPUT/")
+ done
+ xwallpaper $files
+} || {
+ files=$(tr " " "\n" < $1 | sed "s~^~--bg-fill ~g" | tr "\n" " ")
+ feh $files
+}
diff --git a/.scripts/bin/display/rfeh b/.scripts/bin/display/rfeh
@@ -6,6 +6,8 @@
# haydenvh.com
# Copyright (c) 2019 Hayden Hamilton.
+backend="xwallpaper"
+
if [ "$(echo $1 | awk '/help/ {print $0}')" != "" ]
then
echo 'rfeh /path/to/folder [number of monitors or "auto"] [true for locking] [program to lock with]
@@ -69,5 +71,14 @@ fi
};
echo $files
echo $files > $HOME/.cache/rfeh/prev
-files=$(echo "$files" | tr " " "\n" | sed "s~^~feh --bg-fill ~g" | tr "\n" " ")
-$lockwith $files
+[ "$backend" = "xwallpaper" ] && {
+ files=$(echo "$files" | tr " " "\n" | sed "s~^~--output OUTPUT --zoom ~g" | tr "\n" " ")
+ for OUTPUT in $(xrandr --listactivemonitors | awk '$4 {print $4}')
+ do
+ files=$(echo "$files" | sed "s/OUTPUT/$OUTPUT/")
+ done
+ xwallpaper $files
+} || {
+ files=$(echo "$files" | tr " " "\n" | sed "s~^~--bg-fill ~g" | tr "\n" " ")
+ feh $files
+}
diff --git a/.scripts/bin/display/wallblur b/.scripts/bin/display/wallblur
@@ -6,6 +6,8 @@
# haydenvh.com
# Copyright (c) 2019 Hayden Hamilton.
+backend="xwallpaper"
+
cachebool="$1"
if [ "$(echo $1 | awk '/help/ {print $0}')" != "" ]
then
@@ -44,5 +46,14 @@ do
donorm "/tmp/screen${count}.png"
fi
done
-files=$(echo "$files" | tr " " "\n" | sed "s~^~--bg-fill ~g" | tr "\n" " ")
-feh $files
+[ "$backend" = "xwallpaper" ] && {
+ files=$(echo "$files" | tr " " "\n" | sed "s~^~--output OUTPUT --zoom ~g" | tr "\n" " ")
+ for OUTPUT in $(xrandr --listactivemonitors | awk '$4 {print $4}')
+ do
+ files=$(echo "$files" | sed "s/OUTPUT/$OUTPUT/")
+ done
+ xwallpaper $files
+} || {
+ files=$(echo "$files" | tr " " "\n" | sed "s~^~--bg-fill ~g" | tr "\n" " ")
+ feh $files
+}
diff --git a/.scripts/bin/misc/cvrestart b/.scripts/bin/misc/cvrestart
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+pkill convtodwm
+pkill fetchmail
+
+cd ~/.scripts/i3blocks
+exec ./convtodwm >/dev/null 2>/dev/null &
+disown -a
diff --git a/.scripts/bin/misc/popupmpv b/.scripts/bin/misc/popupmpv
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec st -e mpv $@
diff --git a/.scripts/bin/misc/slock_mod b/.scripts/bin/misc/slock_mod
@@ -13,7 +13,6 @@ echo "dmpvurl: $(hmpv state $socket2)" >> ~/.cache/socket
sleep 0.2
hmpv pause $socket2
) &
-
slock -m "Locked at $(date) by $USER - what? You thought I would let you in... Fool."
state=$(cat ~/.cache/socket | awk '/:/')
diff --git a/.scripts/bin/misc/urlhand b/.scripts/bin/misc/urlhand
@@ -15,8 +15,9 @@ do
done
var=$(dmenu -i -p "Select an item" < ~/.cache/urlhand3 | grep -o '[0-9]*')
+[ "$var" = "" ] && exit 0
arg=$(grep "$var:" < ~/.cache/urlhand1 | sed 's|\t|/|g' | sed 's/^[0-9]*://')
-handlers=("mpv" "youtube-dl --add-metadata -ic" "youtube-dl --add-metadata -xic" "vimb --no-maximize" "surf" "w3m")
+handlers=("mpv" "popupmpv" "youtube-dl --add-metadata -ic" "youtube-dl --add-metadata -xic" "vimb --no-maximize" "surf" "w3m")
count=0
echo
printf "" > ~/.cache/urlhand2
@@ -29,6 +30,7 @@ do
done
var=$(dmenu -i -p "Select a handler" < ~/.cache/urlhand4 | grep -o '[0-9]*')
+[ "$var" = "" ] && exit 0
hand=$(grep "$var:" < ~/.cache/urlhand2 | sed 's|\t|/|g' | sed 's/^[0-9]*://')
pkill mpvlisten
hmpv pause /tmp/mpv-socket
diff --git a/.vimrc b/.vimrc
@@ -19,6 +19,11 @@ set nocompatible
"Leader
let mapleader=","
+"Cursor
+let &t_SI.="\033[6 q" "SI = INSERT mode
+let &t_SR.="\033[4 q" "SR = REPLACE mode
+let &t_EI.="\033[2 q" "EI = NORMAL mode (ELSE)
+
"Tab completion
set path+=**
set wildmenu
@@ -40,8 +45,7 @@ filetype plugin on
"Keys
map <leader>g :Goyo \| set linebreak<CR>
map <leader>c :!sudo make all install clean \| set linebreak<CR>
-map <leader>oc :!groff -T pdf % - > /tmp/grff<Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left>
-map <Leader>ov :!zathura /tmp/grff \| set linebreak<CR>
+map <leader>oc :!groff -T pdf % - > /tmp/grff \| zathura -<Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left>
map <Leader>sv :!sent % \| set linebreak<CR>
map <leader>sc :setlocal spell! spelllang=en_us \| set linebreak<CR>
map <leader>ff :r !find \| set linebreak<CR>
@@ -52,6 +56,8 @@ map <leader>bp :bp \| set linebreak<CR>
map <leader>mvg :r !find -maxdepth 1 -type f -printf "mv \"\%f\"\t<++>\n"<Enter>
map <leader>mvd :w! /tmp/bmv-edit \| set linebreak<CR>:!sh /tmp/bmv-edit \| set linebreak<CR>:q \| set linebreak<CR>
map <leader>ss :set syntax=
+map <leader>w :w \| set linebreak<CR>
+map <leader>W :w !sudo tee %<CR>
map dw diw
map cw ciw
imap <leader><leader>ss <Esc>:set syntax=
diff --git a/general/makefile b/general/makefile
@@ -36,7 +36,7 @@ extract:
tar xzvf downloads.tar.gz
tar xzvf documents.tar.gz
tar xjvf music.tar.bz
- tar xzvf videos.tar.gz
+ tar xjvf videos.tar.gz
tar xzvf mail.tar.gz
tar xzvf security.tar.gz
tar xjvf games.tar.gz