My zsh configuration
git clone https://github.com/m-col/zshrc
Files | Refs | Readme

Commit c21b1f7f8dcae46f4470d1bd75e26d53f2c53231
Parent: 7d148c5f7a89530912db959208d70e3d48c79fb6
Author: mcol <mcol@posteo.net>
Date: 2021-11-15 00:49:22 +0000
Committer: mcol <mcol@posteo.net>
Committed: 2021-11-15 00:49:22 +0000

update

zshrc Modified

@@ -21,6 +21,7 @@
 HYPHEN_INSENSITIVE="true"
 COMPLETION_WAITING_DOTS="true"
 ZSH_COMPDUMP="$HOME/.zcompdump"
+setopt NO_nomatch
 
 # zsh history
 HISTFILE="$HOME/.zsh_history"
@@ -68,6 +69,16 @@
 # don't load default ranger config
 export RANGER_LOAD_DEFAULT_RC=FALSE
 
-export PYTHONPATH=$HOME/git/reach
-export XKB_DEFAULT_OPTIONS=caps:swapescape,altwin:swap_alt_win
-export XKB_DEFAULT_LAYOUT=gb
+export PYTHONPATH=$HOME/git/reach:$PYTHONPATH
+
+# mypy
+export MYPYPATH=$PYTHONPATH
+
+export PAGER="less --mouse"
+
+# If being executed via the '2' script
+if [[ -n "$DO2" ]]
+then
+    z $DO2
+    unset DO2
+fi

zsh-syntax-highlighting Modified

@@ -1 +1 @@
-Subproject commit d61ebbcbbf7da8fc35040f591e37b89272623036
+Subproject commit c7caf57ca805abd54f11f756fda6395dd4187f8a

zsh-autosuggestions Modified

@@ -1 +1 @@
-Subproject commit 70f36c007db30a5fe1edf2b63664088b502a729c
+Subproject commit a411ef3e0992d4839f0732ebeb9823024afaaaa8

z Modified

@@ -1 +1 @@
-Subproject commit e77e9384937bd43eb6ca8f1ba036924f4006df07
+Subproject commit b82ac78a2d4457d2ca09973332638f123f065fd1

rc.conf Modified

@@ -23,7 +23,7 @@
 set column_ratios 1,3,4
 
 # Which files should be hidden? (regular expression)
-set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$
+set hidden_filter ^\.|\.(?:pyc|pyo|o|swp)$|^lost\+found$|^__(py)?cache__$
 
 # Show hidden files? You can toggle this by typing 'zh'
 set show_hidden false
@@ -614,8 +614,8 @@
 map r3 shell convert %s -rotate 270 %s
 
 # drag files
-#map <C-d> shell dragon-drag-and-drop -a -x %p &> /dev/null &
-map <C-d> shell cp %s /tmp/%s && dragon-drag-and-drop -a -x /tmp/%s &> /dev/null &
+map <C-d> shell dragon-drag-and-drop -a -x %p &> /dev/null &
+#map <C-d> shell cp %s /tmp/%s && dragon-drag-and-drop -a -x /tmp/%s &> /dev/null &
 
 # filter while finding
 map f console scout -ftsea%space
@@ -653,23 +653,23 @@
 map gD cd ~/Downloads
 map gz cd ~/.zsh
 map gB cd ~/.local/share/Trash/files
-map gq cd /usr/lib/python3.7/site-packages/libqtile
+map gq cd ~/git/qtile
 
 
 # git
-map bs shell git -c color.status=always status | less -r
+map bs shell git -c color.status=always status | less --mouse -r
 map bm console shell git commit -m '
-map bd shell git diff --color=always %s | less -r
-map bD shell git diff --color=always | less -r
+map bd shell git diff --color=always -- %s | less --mouse -r
+map bD shell git diff --color=always | less --mouse -r
 map ba shell git add %s
 map bA shell git add -f %s
 map bc console shell git checkout%space
-map bp shell git push | less -r
-map bl shell git pull | less -r
+map bp shell git push | less --mouse -r
+map bl shell git pull | less --mouse -r
 map bu shell git restore --cached %s
 map br shell git restore %s
 map bt shell tig
-map bg shell gita add $(git rev-parse --show-toplevel) | less
+map bg shell gita add $(git rev-parse --show-toplevel) | less --mouse
 # a plugin that adds file glyphs / icon support to Ranger:
 # https://github.com/alexanderjeurissen/ranger_devicons
 default_linemode devicons

functions.zsh Modified

@@ -63,8 +63,12 @@
 }
 
 rec_screen() {
-    ffmpeg -f x11grab -r 30 -s 1920x1080 -i :0.0 out.mp4
+    ffmpeg -f x11grab -r 30 -s 1920x1080 -i $DISPLAY -pix_fmt yuv420p out.mp4
 }
 rec_screen_mic() {
-    ffmpeg -f x11grab -r 30 -s 1920x1080 -i :0.0 -f pulse -ac 2 -i default out.mkv
+    ffmpeg -f x11grab -r 30 -s 1920x1080 -i $DISPLAY -f pulse -ac 2 -i default out.mkv
+}
+
+tagans() {
+    git log --pretty=format:"%an" $1...$2 | sort -u
 }

aliases Modified

@@ -6,13 +6,22 @@
 # misc
 alias ..='cd ../'
 alias ...='cd ../../'
-alias l='ls -lhFv'
+alias l='ls -lhFv -I \*.o'
 alias lc='ls -c1'
 alias tmp='cd /tmp; l'
 alias _='sudo'
 alias grep='grep --exclude-dir="__pycache__"'
 alias p='ps aux  | grep -v grep | grep -i'
 alias import='echo you forgot to enter python'
+alias rg='grep -r'
+vgr() { vim `grep -lr "$@"`; }
+
+if [[ -z "$WAYLAND_DISPLAY" ]]
+then
+    alias copy='xclip -selection clipboard'
+else
+    alias copy='wl-copy'
+fi
 
 # systemd
 alias sc='systemctl'
@@ -52,14 +61,20 @@
 alias ad='git add'
 alias co='git commit'
 alias cm='git commit -m'
+alias ca='git commit --amend'
 alias psh='git push'
+alias pshs='git push &> /dev/null &'
 alias fe='git fetch && git status'
 alias pl='git pull'
-alias rb='git pull --rebase upstream master'
+alias rb='git pull --rebase upstream master || git pull --rebase upstream main'
+alias rbi='git rebase -i'
+alias rbc='git rebase --continue'
+rbh() { git rebase -i HEAD~$1; }
 alias br='git branch'
 alias brs='git branch -v'
 alias ch='git checkout'
 alias dif='git diff'
+alias diff='git diff --'
 alias dic='git diff --cached'
 alias cl='git clone'
 alias chp='git cherry-pick'
@@ -67,12 +82,17 @@
 alias st='git stash'
 alias stl='git stash list'
 alias stp='git stash pop'
+pr() { git fetch upstream pull/$1/head:$1 && git checkout $1; }
+lg() { git log -${1:-1}; }
+alias lgc="git log -1 | head -1 | awk '{print \$2}' | copy -n"
 
 # tools
 alias usync='rsync -avPzh --delete'
-alias psb='python setup.py build'
-alias psi='python setup.py install'
-alias psiu='python setup.py install --user'
+alias psb='python setup.py -q build'
+alias psi='python setup.py -q install'
+alias psiu='python setup.py -q install --user'
+alias m=make
+alias mc='make clean'
 
 # quick edits
 alias modalia='vim $HOME/.config/aliases && source $HOME/.config/aliases'