aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitconfig113
-rw-r--r--.tridactylrc1
-rw-r--r--.vimrc3
-rwxr-xr-x.xprofile2
-rw-r--r--.zshrc3
-rwxr-xr-xbin/cmus_toggle8
-rwxr-xr-xbin/manga_dmenu.sh5
-rwxr-xr-xbin/postit.sh2
-rwxr-xr-xbin/run_with_dmenu.sh7
-rwxr-xr-xdocker/postgres.sh2
-rw-r--r--zshrc_stripped.sh94
11 files changed, 136 insertions, 104 deletions
diff --git a/.gitconfig b/.gitconfig
index 3096768..f08ee96 100644
--- a/.gitconfig
+++ b/.gitconfig
@@ -1,6 +1,113 @@
+# This is Git's per-user configuration file.
[user]
+# Please adapt and uncomment the following lines:
+ name = terminaldweller
email = thabogre@gmail.com
+
+# https://stackoverflow.com/questions/1838873/visualizing-branch-topology-in-git
+[color "decorate"]
+ HEAD = bold blink italic 196
+ branch = 214
+ tag = bold 222
+
[alias]
- conflicts = !git ls-files -u | cut -f 2 | sort -u
- pr = "!f() { git fetch -fu ${2:-upstream} refs/pull/$1/head:pr/$1 && git checkout pr/$1; }; f"
- pr-clean = "!git checkout master ; git for-each-ref refs/heads/pr/* --format=\"%(refname)\" | while read ref ; do branch=${ref#refs/heads/} ; git branch -D $branch ; done"
+ tree = "forest --pretty=format:\"%C(red)%h %C(magenta)(%ar) %C(blue)%an %C(reset)%s\" --style=15 --reverse"
+ lg = lg1
+ lg1 = lg1-specific --all
+ lg2 = lg2-specific --all
+ lg3 = lg3-specific --all
+
+ lg1-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)'
+ lg2-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'
+ lg3-specific = log --simplify-by-decoration --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(auto)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)'
+
+ # delimiter used as column seperator
+ delim = |
+ # example thompson1
+ lg4 = log --all --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)'
+ # modified thompson1 example
+ lg5 = log --all --graph --color --abbrev-commit --decorate --format=format:'^%C(bold blue)%<(7,trunc)%h%C(reset)^%C(bold green)%<(21,trunc)%ar%C(reset)^%C(white)%<(40,trunc)%s%C(reset)^%C(dim white)%<(25,trunc)%an%C(reset)^%C(auto)%d%C(reset)'
+ # set a column for the graph
+ thompson1-new-col = 1
+
+ tably = !bash -c '" \
+ declare -A col_length; \
+ delim=$(git config alias.delim); \
+ git_log_cmd=$(git config alias.$1); \
+ git_tre_col=${2:-$(git config alias.$1-col)}; \
+ \
+ i=0; \
+ n=0; \
+ while IFS= read -r line; do \
+ ((n++)); \
+ while read -d\"$delim\" -r col_info;do \
+ ((i++)); \
+ [[ -z \"$col_info\" ]] && col_length[\"$n:$i\"]=${col_length[\"${last[$i]:-1}:$i\"]} && ((i--)) && continue; \
+ [[ $i -gt ${i_max:-0} ]] && i_max=$i; \
+ col_length[\"$n:$i\"]=$(grep -Eo \"\\([0-9]*,[lm]*trunc\\)\" <<< \"$col_info\" | grep -Eo \"[0-9]*\" | head -n 1); \
+ [[ -n \"${col_length[\"$n:$i\"]}\" ]] && last[$i]=$n; \
+ chars_extra=$(grep -Eo \"\\trunc\\).*\" <<< \"$col_info\"); \
+ chars_extra=${chars_extra#trunc)}; \
+ chars_begin=${chars_extra%%\\%*}; \
+ chars_extra=${chars_extra#*\\%}; \
+ case \" ad aD ae aE ai aI al aL an aN ar as at b B cd cD ce cE ci cI cl cL cn cN cr \
+ cs ct d D e f G? gd gD ge gE GF GG GK gn gN GP gs GS GT h H N p P s S t T \" in \
+ *\" ${chars_extra:0:2} \"*) \
+ chars_extra=${chars_extra:2}; \
+ chars_after=${chars_extra%%\\%*}; \
+ ;; \
+ *\" ${chars_extra:0:1} \"*) \
+ chars_extra=${chars_extra:1}; \
+ chars_after=${chars_extra%%\\%*}; \
+ ;; \
+ *) \
+ echo \"No Placeholder found. Probably no tablelike output.\"; \
+ continue; \
+ ;; \
+ esac ; \
+ if [[ -n \"$chars_begin$chars_after\" ]];then \
+ len_extra=$(echo \"$chars_begin$chars_after\" | wc -m); \
+ col_length["$n:$i"]=$((${col_length["$n:$i"]}+$len_extra-1)); \
+ fi; \
+ \
+ done <<< \"${line#*=format:}$delim\"; \
+ i=1; \
+ done <<< \"$(echo -e \"${git_log_cmd//\\%n/\\\\n}\")\"; \
+ \
+ while IFS= read -r graph;do \
+ chars_count=$(sed -nl1000 \"l\" <<< \"$graph\" | grep -Eo \"\\\\\\\\\\\\\\\\|\\||\\/|\\ |\\*|_\" | wc -l); \
+ [[ ${chars_count:-0} -gt ${col_length["1:1"]:-0} ]] && col_length["1:1"]=$chars_count; \
+ done < <([[ -n \"$(grep -F graph <<< \"$git_log_cmd\")\" ]] && git log --all --graph --pretty=format:\" \" && echo); \
+ \
+ l=0; \
+ while IFS= read -r line;do \
+ c=0; \
+ ((l++)); \
+ [[ $l -gt $n ]] && l=1; \
+ while IFS= read -d\"$delim\" -r col_content;do \
+ ((c++)); \
+ if [[ $c -eq 1 ]];then \
+ [[ -n \"$(grep -F \"*\" <<< \"$col_content\")\" ]] || l=2; \
+ chars=$(sed -nl1000 \"l\" <<< \"$col_content\" | grep -Eo \"\\\\\\\\\\\\\\\\|\\||\\/|\\ |\\*|_\" | wc -l); \
+ whitespaces=$((${col_length["1:1"]}-$chars)); \
+ whitespaces=$(seq -s\" \" $whitespaces|tr -d \"[:digit:]\"); \
+ col_content[1]=\"${col_content[1]}$col_content$whitespaces\n\"; \
+ else \
+ col_content[$c]=\"${col_content[$c]}$(printf \"%-${col_length[\"$l:$c\"]}s\" \"${col_content:-\"\"}\")\n\"; \
+ fi; \
+ done <<< \"$line$delim\"; \
+ for ((k=$c+1;k<=$i_max;k++));do \
+ empty_content=\"$(printf \"%-${col_length[\"$l:$k\"]:-${col_length[\"${last[$k]:-1}:$k\"]:-0}}s\" \"\")\"; \
+ col_content[$k]=\"${col_content[$k]}$empty_content\n\"; \
+ done; \
+ done < <(git $1 && echo); \
+ \
+ while read col_num;do \
+ if [[ -z \"$cont_all\" ]];then \
+ cont_all=${col_content[$col_num]}; \
+ else \
+ cont_all=$(paste -d\" \" <(echo -e \"$cont_all\") <(echo -e \"${col_content[$col_num]}\")); \
+ fi; \
+ done <<< $(seq 2 1 ${git_tre_col:-1};seq 1;seq $((${git_tre_col:-1}+1)) 1 $i_max); \
+ echo -e \"$cont_all\"; \
+ "' "git-tably"
diff --git a/.tridactylrc b/.tridactylrc
index 85dc6d2..c6ce13d 100644
--- a/.tridactylrc
+++ b/.tridactylrc
@@ -2,6 +2,7 @@ sanitize tridactyllocal tridactylsync
guiset_quiet hoverlink right
autocmd DocStart mail.google.com mode ignore
colourscheme dark
+completionfuzziness 1
bind tp tabmove -1
bind tn tabmove +1
diff --git a/.vimrc b/.vimrc
index 8fbec6d..bd68296 100644
--- a/.vimrc
+++ b/.vimrc
@@ -1622,6 +1622,9 @@ function! s:vvman(one, two)
endfunction
let g:Infofallback = function("s:vvman")
+" fugitive
+autocmd BufReadPost fugitive://* set bufhidden=delete
+
"this should be here at the end so nothing else could override it
hi SpecialKey ctermbg=16
hi Pmenu ctermbg=233
diff --git a/.xprofile b/.xprofile
index b4d146a..6c784bb 100755
--- a/.xprofile
+++ b/.xprofile
@@ -1 +1 @@
-xrandr --output eDP1 --mode 1920x1080 --right-of HDMI2
+xrandr --output eDP-2 --left-of HDMI-1
diff --git a/.zshrc b/.zshrc
index c9809c2..85aec32 100644
--- a/.zshrc
+++ b/.zshrc
@@ -366,9 +366,10 @@ export PATH=$PATH:/home/devi/gradle/gradle-7.2/bin
export PATH=$PATH:/home/devi/devi/emsdk.git/3.1.0
export PATH=$PATH:/home/devi/devi/emsdk.git/3.1.0/node/14.15.5_64bit/bin
export PATH=$PATH:/home/devi/devi/emsdk.git/3.1.0/upstream/emscripten
+export PATH=$PATH:/home/devi/devi/git-scripts.git/master
ks() {
- kubectl "$@" -n kube-system
+ kubectl -n kube-system "$@"
}
export EDITOR=vim
diff --git a/bin/cmus_toggle b/bin/cmus_toggle
new file mode 100755
index 0000000..8568a82
--- /dev/null
+++ b/bin/cmus_toggle
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+STATUS=$(cmus-remote -Q | grep status | awk '{print $2}')
+if [ "$STATUS" = paused ];then
+ cmus-remote -p
+elif [ $STATUS = playing ];then
+ cmus-remote -u
+fi
diff --git a/bin/manga_dmenu.sh b/bin/manga_dmenu.sh
deleted file mode 100755
index 436968b..0000000
--- a/bin/manga_dmenu.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/env zsh
-# until kaminokumo --manga; do done | dmenu -nhb "dark slate gray" -nhf white -shb "forest green" -shf white -l 12 -p "Manga List:" > /dev/null
-source ~/scripts/zshrc_stripped.sh
-until kaminokumo --manga; do done | dmenu -p "Manga List:" > /dev/null
-
diff --git a/bin/postit.sh b/bin/postit.sh
index d0556a8..d0271e3 100755
--- a/bin/postit.sh
+++ b/bin/postit.sh
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
-POSTIT=$(cat ~/devi/abbatoir/postit | dmenu -l 20 -p "Select Postit:")
+POSTIT=$(cat ~/scripts/postit | dmenu -l 20 -p "Select Postit:")
echo -n "${POSTIT:0:${#POSTIT}}" | xsel -ip
diff --git a/bin/run_with_dmenu.sh b/bin/run_with_dmenu.sh
index c7bf9dd..a0dc7cf 100755
--- a/bin/run_with_dmenu.sh
+++ b/bin/run_with_dmenu.sh
@@ -1,7 +1,6 @@
#!/usr/bin/env zsh
-# set -o pipefail
-source ~/scripts/zshrc_stripped.sh
-COMMAND=$(echo "" | dmenu -h 20 -p "Quick Term:")
+. ~/scripts/zshrc_stripped.sh
+COMMAND=$(echo "" | dmenu -i -l 20 -p "Quick Term:")
RESULT=$(eval "$COMMAND")
-echo $RESULT | dmenu -h 20 -p "Quick Term Out:" > /dev/null
+echo $RESULT | dmenu -i -l 20 -p "Quick Term Out:" | xsel -ib
diff --git a/docker/postgres.sh b/docker/postgres.sh
index 14f9adf..1890d6f 100755
--- a/docker/postgres.sh
+++ b/docker/postgres.sh
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
-docker run -d -p 5432:5432 -v postgres-data:/var/lib/postgresql/data -e POSTGRES_PASSWORD=devi -e POSTGRES_USER=devi -e POSTGRES_DB=devi postgres:13.2-alpine
+docker run -d -p 5432:5432 -v postgres-data:/var/lib/postgresql/data -e POSTGRES_PASSWORD=devi -e POSTGRES_USER=devi -e POSTGRES_DB=devi postgres:14.2-alpine3.15
# docker run --add-host=localhost:127.0.0.1 -p 5432:5432 -v postgres-data:/var/lib/postgresql/data -e POSTGRES_PASSWORD=devi -e POSTGRES_USER=devi -e POSTGRES_DB=devi postgres:13
diff --git a/zshrc_stripped.sh b/zshrc_stripped.sh
index 4c60e2e..bf4573d 100644
--- a/zshrc_stripped.sh
+++ b/zshrc_stripped.sh
@@ -1,79 +1,23 @@
#!/usr/bin/env zsh
-alias "$SHELL"="echo $SHELL"
-alias la="ls -A"
-alias ee="nautilus ."
-alias updaterc="cp ~/scripts/.zshrc ~/.zshrc"
-alias fixvimrc='cp ~/scripts/.vimrc ~/.vimrc'
-alias fixtmuxrc='cp ~/scripts/.tmux.conf ~/.tmux.conf'
-alias fixtmuxpowerline='cp ~/scripts/default.sh ~/tmux-powerline/themes/default.sh'
-alias fixctagsrc='cp ~/scripts/.ctags ~/.ctags'
-alias fixtvrc='cp ~/scripts/.tvrc ~/.tvrc'
-alias tmuxpowerline='vim ~/scripts/default.sh'
-alias lss="ls -s"
+export PATH=:$PATH:/home/devi/scripts/bin
+export PATH=:$PATH:/home/devi/bin
+
alias speedtest="curl -o /dev/null http://speedtest.sea01.softlayer.com/downloads/test100.zip"
-alias zshrc="vim ~/scripts/.zshrc"
-alias vimrc="vim ~/scripts/.vimrc"
-alias tmuxrc="vim ~/scripts/.tmux.conf"
-alias zshtheme="vim ~/scripts/devi.zsh-theme"
alias quit="exit"
-alias xx="dtrx"
-alias angband="/home/bloodstalker/angband-4.1.0/angband-master/src/angband"
-alias startdocker="sudo systemctl start docker"
-alias vv="vim"
-alias mm="cmatrix -s -C blue"
alias contest="ping 4.2.2.4 -c 7; ping google.com -c 7"
-alias solide="vim ~/scripts/makefile"
-alias dropsolide="cp ~/scripts/makefile ./"
-alias genjctags="find . -type f -iregex \".*\.js$\" -not -path \"./node_modules/*\" -exec jsctags {} -f \; | sed '/^$/d' | sort > tags"
alias isup="ps -aux | grep "
-alias ipfsd="ipfs daemon > /dev/null 2>&1 &; disown"
-alias i3rc="vim ~/scripts/.config/i3/config"
-alias fixi3rc="cp ~/scripts/.config/i3/config ~/.config/i3/config && i3-msg restart"
-alias muttrc="vim ~/scripts/.muttrc"
-alias fixmuttrc="cp ~/scripts/.muttrc ~/.muttrc"
-alias dropcmake="cp ~/scripts/makefilec ./makefile"
-alias dropcppmake="cp ~/scripts/makefilecpp ./makefile"
-alias droppy="cp ~/scripts/python/main.py ./main.py"
alias diff="colordiff"
-alias yy="~/scripts/hived"
-alias fixurls="cp ~/scripts/urls ~/.newsbeuter/urls"
-alias qtrc="vim ~/scripts/qtbrowser/config.py"
-alias fixqtrc="cp ~/scripts/qtbrowser/config.py ~/.config/qutebrowser/config.py"
-alias dropcextra="cp ~/scripts/c/devi_extra.h ./devi_extra.h"
-alias dropcmain="cp ~/scripts/c/main.c ./"
-alias dropcppmain="cp ~/scripts/c/main.cpp ./"
-alias tg="telegram-cli"
-alias telebot="/home/bloodstalker/scripts/telebot.py > /dev/null 2>&1 &"
-alias dw="~/df/df_linux/df"
alias clean="clear"
-alias hplovecraft="lynx http://www.hplovecraft.com/writings/texts/"
-alias casmith="lynx http://www.eldritchdark.com/writings/short-stories/"
-alias tt="transmission-cli -u 1 -w ~/winshare/"
alias mv="mv -i"
alias cp="cp -i"
-alias nuke="rm -rf * .[!.]* ..?*"
-alias lynx="lynx -lss ~/scripts/lynx.lss -cfg ~/scripts/lynx.cfg -prettysrc"
-alias bruiser="bruiser --history ~/.bruiser/history.lua"
-alias digg="dig && clear"
-alias ogg="ogg123"
-alias jupyterlocal="jupyter notebook --NotebookApp.allow_origin='https://colab.research.google.com' --port=8775"
-alias mupdf="/home/bloodstalker/extra/mupdf/build/release/mupdf-x11 -D red -P black -I"
-alias googler="~/extra/googler/googler --colors GKmexy -c us -l en --count 7 --exact "
-alias ddgr="ddgr --colorize always -r us-en -n 15"
-alias pirate-get="pirate-get -S ~/magnets/"
alias vps="ssh 5.56.132.89 -l ubuntu"
-alias pytags="ctags --fields=+l --languages=python --python-kinds=-iv -R ."
alias v="vim"
-alias kshrc="vim ~/scripts/.kshrc"
-alias fixkshrc="cp ~/scripts/.kshrc ~/.kshrc"
-alias rangerrc="vim ~/scripts/.config/ranger/rc.conf"
-alias fixrangerrc="cp ~/scripts/.config/ranger/rc.conf ~/.config/ranger/rc.conf"
-alias zathurarc="vim ~/scripts/zathurarc"
-alias fixzathurarc="cp ~/scripts/zathurarc ~/.config/zathura/"
+alias getmangas="proxychains4 -q -f ~/proxies/ice/proxychains.conf kaminokumo --manga"
+alias getanimes="proxychains4 -q -f ~/proxies/ice/proxychains.conf kaminokumo --anime"
function math {
- echo $(($@))
+ echo $(("$@"))
}
REPORTTIME=4
@@ -84,31 +28,5 @@ alias def="sdcv --color"
export LESS='-R'
export LESSOPEN='|~/scripts/lesscolor.sh %s'
-export PATH=$PATH:/home/bloodstalker/extra/cov-analysis-linux64-2019.03/bin
-export PATH=:$PATH:/home/bloodstalker/extra/llvm-11/llvm-project/build/bin
-export PATH=:$PATH:/home/bloodstalker/extra/llvm-11/llvm-project/build/lib
-export PATH=:$PATH:/home/bloodstalker/arcanist/arcanist/bin
-export PATH=:$PATH:/home/bloodstalker/devi/abbatoir/hole58/solidity_0.4.18/build/solc
-export PATH=:$PATH:/home/bloodstalker/binaryen/bin
-export PATH=:$PATH:/home/bloodstalker/extra/go-ethereum/build/bin
-export PATH=:$PATH:/home/bloodstalker/.cargo/bin
-export PATH=:$PATH:/home/bloodstalker/extra/parity/target/release
-export PATH=:$PATH:/home/bloodstalker/extra/wasm-jit-prototype/build/bin
-export PATH=:$PATH:/home/bloodstalker/scripts/bin
-export PATH=:$PATH:/home/bloodstalker/extra/android-ndk/android-ndk-r16b
-export PATH=:$PATH:/home/bloodstalker/.cargo/bin/racer
-export PATH=:$PATH:/home/bloodstalker/extra/phantomjs-2.1.1-linux-i686/bin
-export PATH=:$PATH:/home/bloodstalker/rigetti/forest-sdk_2.0.1-linux-barebones
-export PATH=:$PATH:/home/bloodstalker/extra/tg/bin
-export PATH=:$PATH:/home/bloodstalker/extra/Nim/bin
-export PATH=:$PATH:/home/bloodstalker/extra/geckodriver
-export PATH=:$PATH:/home/bloodstalker/extra/cppcheck
-export PATH=:$PATH:/home/bloodstalker/extra/binaryen-version_91
-export PATH=:$PATH:/home/bloodstalker/extra/wabt-1.0.13/
-export PATH=:$PATH:/home/bloodstalker/extra/emscripten
-export PATH=:$PATH:/home/bloodstalker/extra/emscripten/clang/tag-e1.39.11/build_tag-e1.39.11_64/bin
-export PATH=:$PATH:/home/bloodstalker/extra/emscripten/node/8.9.1_64bit/bin
-export PATH=:$PATH:/home/bloodstalker/extra/emscripten/emscripten/tag-1.39.11
-
export EDITOR=vim
export BROWSER=lynx