Compare commits

..

2 Commits

Author SHA1 Message Date
af14629939
feat: remove unused .mozilla 2024-04-24 11:29:09 +02:00
32cb220161
feat: mimeapps, remove p10k 2024-04-24 11:25:04 +02:00
32 changed files with 1383 additions and 11793 deletions

View File

@ -5,10 +5,13 @@
<C-PgUp> = :prev-tab<Enter> <C-PgUp> = :prev-tab<Enter>
<C-n> = :next-tab<Enter> <C-n> = :next-tab<Enter>
<C-PgDn> = :next-tab<Enter> <C-PgDn> = :next-tab<Enter>
\[t = :prev-tab<Enter>
\]t = :next-tab<Enter>
<C-t> = :term<Enter> <C-t> = :term<Enter>
? = :help keys<Enter> ? = :help keys<Enter>
<C-c> = :prompt 'Quit?' quit<Enter> <C-c> = :quit<Enter>
<C-q> = :prompt 'Quit?' quit<Enter> <C-q> = :quit<Enter>
<C-z> = :suspend<Enter>
[messages] [messages]
q = :quit<Enter> q = :quit<Enter>
@ -44,6 +47,10 @@ V = :mark -v<Enter>
T = :toggle-threads<Enter> T = :toggle-threads<Enter>
zc = :fold<Enter> zc = :fold<Enter>
zo = :unfold<Enter> zo = :unfold<Enter>
za = :fold -t<Enter>
zM = :fold -a<Enter>
zR = :unfold -a<Enter>
<tab> = :fold -t<Enter>
<Enter> = :view<Enter> <Enter> = :view<Enter>
d = :prompt 'Really delete this message?' 'delete-message'<Enter> d = :prompt 'Really delete this message?' 'delete-message'<Enter>
@ -73,6 +80,13 @@ N = :prev-result<Enter>
s = :split<Enter> s = :split<Enter>
S = :vsplit<Enter> S = :vsplit<Enter>
pl = :patch list<Enter>
pa = :patch apply <Tab>
pd = :patch drop <Tab>
pb = :patch rebase<Enter>
pt = :patch term<Enter>
ps = :patch switch <Tab>
[messages:folder=Drafts] [messages:folder=Drafts]
<Enter> = :recall<Enter> <Enter> = :recall<Enter>
@ -114,6 +128,7 @@ $ex = <C-x>
# view # view
$noinherit = true $noinherit = true
$ex = <C-x> $ex = <C-x>
$complete = <C-o>
<C-k> = :prev-field<Enter> <C-k> = :prev-field<Enter>
<C-Up> = :prev-field<Enter> <C-Up> = :prev-field<Enter>
<C-j> = :next-field<Enter> <C-j> = :next-field<Enter>

View File

@ -1,18 +1,3 @@
#!/bin/bash #!/bin/bash
feh --bg-fill "$XDG_CONFIG_HOME/wallpapers/mount_cook.jpg" --no-fehbg feh --bg-fill "$XDG_CONFIG_HOME/wallpapers/mount_cook.jpg" --no-fehbg
NBMON="$(xrandr | grep -cw connected)"
BAT="$(ls /sys/class/power_supply/BAT*/ 2> /dev/null)"
if [ "$NBMON" = 1 ] && [ -n "$BAT" ]; then
stimeout=300 # laptop
else
stimeout=1800 # desktop
fi
cycle=15 # lock 15 sec after stimeout
dpms="$((stimeout + cycle + 1))" # turn off screen 1 sec after lock
xset s "$stimeout" "$cycle"
xset dpms "$dpms" "$dpms" "$dpms"

74
.config/mimeapps.list Normal file
View File

@ -0,0 +1,74 @@
[Default Applications]
# feh
image/bmp=feh.desktop
image/gif=feh.desktop
image/heic=feh.desktop
image/jpeg=feh.desktop
image/jpg=feh.desktop
image/pjpeg=feh.desktop
image/png=feh.desktop
image/tiff=feh.desktop
image/webp=feh.desktop
# firefox
application/xhtml+xml=org.mozilla.firefox.desktop
text/html=org.mozilla.firefox.desktop
text/mml=org.mozilla.firefox.desktop
text/xml=org.mozilla.firefox.desktop
x-scheme-handler/http=org.mozilla.firefox.desktop
x-scheme-handler/https=org.mozilla.firefox.desktop
# mpv
audio/3gpp2=mpv.desktop
audio/3gpp=mpv.desktop
audio/AMR=mpv.desktop
audio/aac=mpv.desktop
audio/ac3=mpv.desktop
audio/aiff=mpv.desktop
audio/amr-wb=mpv.desktop
audio/dv=mpv.desktop
audio/eac3=mpv.desktop
audio/flac=mpv.desktop
audio/m3u=mpv.desktop
audio/m4a=mpv.desktop
audio/mp1=mpv.desktop
audio/mp2=mpv.desktop
audio/mp3=mpv.desktop
audio/mp4=mpv.desktop
audio/mpeg2=mpv.desktop
audio/mpeg3=mpv.desktop
audio/mpeg=mpv.desktop
audio/mpegurl=mpv.desktop
audio/mpg=mpv.desktop
audio/musepack=mpv.desktop
audio/ogg=mpv.desktop
audio/opus=mpv.desktop
audio/rn-mpeg=mpv.desktop
audio/scpls=mpv.desktop
audio/vnd.wave=mpv.desktop
audio/vorbis=mpv.desktop
audio/wav=mpv.desktop
audio/webm=mpv.desktop
video/3gp=mpv.desktop
video/3gpp2=mpv.desktop
video/3gpp=mpv.desktop
video/avi=mpv.desktop
video/divx=mpv.desktop
video/dv=mpv.desktop
video/fli=mpv.desktop
video/flv=mpv.desktop
video/mkv=mpv.desktop
video/mp2t=mpv.desktop
video/mp4=mpv.desktop
video/mp4v-es=mpv.desktop
video/mpeg=mpv.desktop
video/msvideo=mpv.desktop
video/ogg=mpv.desktop
video/quicktime=mpv.desktop
video/webm=mpv.desktop
# pcmanfm
inode/directory=pcmanfm.desktop
# zathura
application/pdf=org.pwmt.zathura-pdf-poppler.desktop

View File

@ -2,7 +2,6 @@
@ Entertainment @ Entertainment
https://www.youtube.com/feeds/videos.xml?channel_id=UCI4W-ck8ZLA_YljxMhlpg2g "ChessSimp" https://www.youtube.com/feeds/videos.xml?channel_id=UCI4W-ck8ZLA_YljxMhlpg2g "ChessSimp"
https://www.youtube.com/feeds/videos.xml?channel_id=UCkOSNfdRmKcg4sHHcfrpOcQ "Floydson"
https://www.youtube.com/feeds/videos.xml?channel_id=UCto7D1L-MiRoOziCXK9uT5Q "LetsGameItOut" https://www.youtube.com/feeds/videos.xml?channel_id=UCto7D1L-MiRoOziCXK9uT5Q "LetsGameItOut"
https://www.youtube.com/feeds/videos.xml?channel_id=UCRlEFn0L2G_DktbyvN0AZ5A "WadZee" https://www.youtube.com/feeds/videos.xml?channel_id=UCRlEFn0L2G_DktbyvN0AZ5A "WadZee"

@ -1 +1 @@
Subproject commit 8aad4396840be7fc42896e3011751b7609ca4119 Subproject commit 5129a3693c482fcbc5ab99a7706ffc4360b995a0

@ -1 +1 @@
Subproject commit 1bb28df3cfc241b961331f00dcb8d5b45fe3e4f0 Subproject commit 7d1698f3d88b448e0639974248cc17f49b7b8acf

@ -1 +1 @@
Subproject commit 30492e7e1c9e5af3642e8a74c2f88dc1f50ec305 Subproject commit dc71d94fe223763d28ab49ee3de4fd7081a84891

View File

@ -219,7 +219,7 @@ backend = "glx";
# Use higher precision during rendering, and apply dither when presenting the # Use higher precision during rendering, and apply dither when presenting the
# rendered screen. Reduces banding artifacts, but might cause performance # rendered screen. Reduces banding artifacts, but might cause performance
# degradation. Only works with OpenGL. # degradation. Only works with OpenGL.
#dithered-present = false; dithered-present = false;
# Enable/disable VSync. # Enable/disable VSync.
# vsync = false # vsync = false
@ -257,7 +257,7 @@ detect-client-opacity = true;
# to maximize performance for full-screen windows. Known to cause flickering # to maximize performance for full-screen windows. Known to cause flickering
# when redirecting/unredirecting windows. # when redirecting/unredirecting windows.
# #
# unredir-if-possible = false unredir-if-possible = true
# Delay before unredirecting the window, in milliseconds. Defaults to 0. # Delay before unredirecting the window, in milliseconds. Defaults to 0.
# unredir-if-possible-delay = 0 # unredir-if-possible-delay = 0

View File

@ -33,6 +33,7 @@ static const Rule rules[] = {
*/ */
/* class instance title tags mask isfloating monitor */ /* class instance title tags mask isfloating monitor */
{ "feh", NULL, NULL, 0, 1, -1 }, { "feh", NULL, NULL, 0, 1, -1 },
{ "zenity", NULL, NULL, 0, 1, -1 },
}; };
/* layout(s) */ /* layout(s) */
@ -58,21 +59,21 @@ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn()
static const char *dmenucmd[] = { "dmenu_run", "-i", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; static const char *dmenucmd[] = { "dmenu_run", "-i", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
static const char *termcmd[] = { "alacritty", NULL }; static const char *termcmd[] = { "alacritty", NULL };
static const char *lockcmd[] = { "lock", NULL }; static const char *lockcmd[] = { "lock", NULL };
static const char *wwwcmd[] = { "firefox", NULL }; static const char *wwwcmd[] = { "org.mozilla.firefox", NULL };
static const char *pwwwcmd[] = { "firefox", "--private-window", NULL }; static const char *pwwwcmd[] = { "org.mozilla.firefox", "--private-window", NULL };
static const char *calccmd[] = { "alacritty", "-epython", NULL }; static const char *calccmd[] = { "alacritty", "-epython", NULL };
static const char *fmcmd[] = { "pcmanfm", NULL }; static const char *fmcmd[] = { "pcmanfm", NULL };
static const char *prtsccmd[] = { "sh", "-c", "gm import png:- | xclip -sel c -t image/png && xclip -sel c -o | feh -", NULL }; static const char *prtsccmd[] = { "sh", "-c", "gm import png:- | xclip -sel c -t image/png && xclip -sel c -o | feh -", NULL };
static const char *lvolcmd[] = { "set-vol", "-5", NULL }; static const char *lvolcmd[] = { "vol", "-5", NULL };
static const char *rvolcmd[] = { "set-vol", "+5", NULL }; static const char *rvolcmd[] = { "vol", "+5", NULL };
static const char *mutecmd[] = { "set-vol", "m", NULL }; static const char *mutecmd[] = { "vol", "m", NULL };
static const char *micmutecmd[] = { "wpctl", "set-mute", "@DEFAULT_SOURCE@", "toggle", NULL }; static const char *micmutecmd[] = { "wpctl", "set-mute", "@DEFAULT_SOURCE@", "toggle", NULL };
static const char *pausecmd[] = { "playerctl", "play-pause", NULL }; static const char *pausecmd[] = { "playerctl", "play-pause", NULL };
static const char *prevcmd[] = { "playerctl", "previous", NULL }; static const char *prevcmd[] = { "playerctl", "previous", NULL };
static const char *nextcmd[] = { "playerctl", "next", NULL }; static const char *nextcmd[] = { "playerctl", "next", NULL };
static const char *stopcmd[] = { "playerctl", "stop", NULL }; static const char *stopcmd[] = { "playerctl", "stop", NULL };
static const char *lbrtcmd[] = { "set-light", "-10", NULL }; static const char *lbrtcmd[] = { "light", "-10", NULL };
static const char *rbrtcmd[] = { "set-light", "+10", NULL }; static const char *rbrtcmd[] = { "light", "+10", NULL };
static const char *passselectcmd[] = { "passselect", NULL }; static const char *passselectcmd[] = { "passselect", NULL };
static const char *passopencmd[] = { "passopen", NULL }; static const char *passopencmd[] = { "passopen", NULL };
static const char *passusercmd[] = { "passuser", NULL }; static const char *passusercmd[] = { "passuser", NULL };
@ -108,7 +109,6 @@ static const Key keys[] = {
{ MODKEY, XK_j, focusstack, {.i = +1 } }, { MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } }, { MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY|ShiftMask, XK_z, zoom, {0} }, { MODKEY|ShiftMask, XK_z, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY|ShiftMask, XK_c, killclient, {0} }, { MODKEY|ShiftMask, XK_c, killclient, {0} },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0] } }, { MODKEY, XK_t, setlayout, {.v = &layouts[0] } },
{ MODKEY, XK_m, setlayout, {.v = &layouts[1] } }, { MODKEY, XK_m, setlayout, {.v = &layouts[1] } },

File diff suppressed because it is too large Load Diff

View File

@ -1,18 +1,15 @@
# vim: ft=zsh # vim: ft=zsh
autoload -U bashcompinit compinit colors autoload -Uz bashcompinit compinit
zmodload zsh/complist zmodload zsh/complist
fpath=("$ZDOTDIR/completions" $fpath) fpath=("$ZDOTDIR/completions" $fpath)
compinit -d "$XDG_CACHE_HOME/.zcompdump-$ZSH_VERSION" compinit -d "$XDG_CACHE_HOME/.zcompdump-$ZSH_VERSION"
bashcompinit bashcompinit
colors . "$ZDOTDIR/theme.zsh"
. "$ZDOTDIR/input.zsh"
. "$ZDOTDIR/powerlevel10k/powerlevel10k.zsh-theme" . /usr/share/fzf/key-bindings.zsh
. "$ZDOTDIR/.p10k.zsh"
#. "$ZDOTDIR/prompt.zsh"
. "$ZDOTDIR/inputrc.zsh"
for f in "$ZDOTDIR"/aliases/*; do for f in "$ZDOTDIR"/aliases/*; do
. "$f" . "$f"
@ -35,24 +32,4 @@ setopt EXTENDED_HISTORY
setopt EXTENDED_GLOB setopt EXTENDED_GLOB
export PAGER=less
export LESS_TERMCAP_mb="${fg_bold[red]}"
export LESS_TERMCAP_md="${fg_bold[red]}"
export LESS_TERMCAP_me="${reset_color}"
export LESS_TERMCAP_so="${fg_bold[yellow]}${bg[blue]}"
export LESS_TERMCAP_se="${reset_color}"
export LESS_TERMCAP_us="${fg_bold[green]}"
export LESS_TERMCAP_ue="${reset_color}"
export GROFF_NO_SGR=1
. <(dircolors)
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
WORDCHARS='' WORDCHARS=''
zstyle ':completion:*:*:*:*:*' menu select
zstyle ':completion:*' matcher-list 'r:|=*' 'l:|=* r:|=*'
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
# disable named-directories autocompletion
zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories

View File

@ -3,90 +3,84 @@
alias dk='docker' alias dk='docker'
## container ## container
alias dkc='docker container' alias dkc='docker container' \
alias dkcc='docker container create' dkcc='docker container create' \
alias dkci='docker container inspect' dkci='docker container inspect' \
alias dkcls='docker container ls' dkcls='docker container ls' \
alias dkclsa='docker container ls -a' dkclsa='docker container ls -a' \
alias dkclsaq='docker container ls -a -q' dkclsaq='docker container ls -a -q' \
alias dkclsq='docker container ls -q' dkclsq='docker container ls -q' \
alias dkcrm!='docker container rm -f' dkcrm!='docker container rm -f' \
alias dkcrm='docker container rm' dkcrm='docker container rm' \
alias dkcsp='docker container stop' dkcsp='docker container stop' \
alias dkcst='docker container restart' dkcst='docker container restart' \
alias dkex='docker container exec -i -t' dkex='docker container exec -i -t' \
alias dklo='docker logs -f' dklo='docker logs -f' \
alias dkr='docker run -i -t' dkr='docker run -i -t' \
alias dktop='docker top' dktop='docker top'
## image ## image
alias dkb='docker build . -t' alias dkb='docker build . -t' \
alias dki='docker image' dki='docker image' \
alias dkic='docker image create' dkic='docker image create' \
alias dkii='docker image inspect' dkii='docker image inspect' \
alias dkil='docker pull' dkil='docker pull' \
function dkila() { dkils='docker image ls' \
readarray -t IMG \ dkilsa='docker image ls -a' \
<<< "$(docker image ls | grep -v localhost | awk '{print $1 ":" $2}')" dkilsaq='docker image ls -a -q' \
dkilsq='docker image ls -q' \
docker pull "${IMG[@]}" dkip='docker image push' \
} dkirm!='docker image rm -f' \
alias dkils='docker image ls' dkirm='docker image rm' \
alias dkilsa='docker image ls -a' dkis='docker image save' \
alias dkilsaq='docker image ls -a -q' dkit='docker image tag'
alias dkilsq='docker image ls -q'
alias dkip='docker image push'
alias dkirm!='docker image rm -f'
alias dkirm='docker image rm'
alias dkis='docker image save'
alias dkit='docker image tag'
## volume ## volume
alias dkv='docker volume' alias dkv='docker volume' \
alias dkvc='docker volume create' dkvc='docker volume create' \
alias dkvi='docker volume inspect' dkvi='docker volume inspect' \
alias dkvls='docker volume ls' dkvls='docker volume ls' \
alias dkvlsq='docker volume ls -q' dkvlsq='docker volume ls -q' \
alias dkvrm!='docker volume rm -f' dkvrm!='docker volume rm -f' \
alias dkvrm='docker volume rm' dkvrm='docker volume rm'
## network ## network
alias dkn='docker network' alias dkn='docker network' \
alias dknc='docker network create' dknc='docker network create' \
alias dkni='docker network inspect' dkni='docker network inspect' \
alias dknls='docker network ls' dknls='docker network ls' \
alias dknlsq='docker network ls -q' dknlsq='docker network ls -q' \
alias dknrm!='docker network rm -f' dknrm!='docker network rm -f' \
alias dknrm='docker network rm' dknrm='docker network rm'
## system ## system
alias dksys='docker system' alias dksys='docker system' \
alias dksysdf='docker system df' dksysdf='docker system df' \
alias dksysp!='docker system prune -f' dksysp!='docker system prune -f' \
alias dksysp='docker system prune' dksysp='docker system prune'
# compose # compose
alias dc='docker-compose' alias dc='docker-compose' \
alias dcd='docker-compose down' dcd='docker-compose down' \
alias dcup='docker-compose up' dcup='docker-compose up' \
alias dcupb='docker-compose up --build' dcupb='docker-compose up --build' \
alias dcupd='docker-compose up -d' dcupd='docker-compose up -d' \
alias dcupdb='docker-compose up -d --build' dcupdb='docker-compose up -d --build'
## container ## container
alias dccls='docker-compose ps' alias dccls='docker-compose ps' \
alias dcclsq='docker-compose ps -q' dcclsq='docker-compose ps -q' \
alias dcex='docker-compose exec' dcex='docker-compose exec' \
alias dcr='docker-compose run --rm' dcr='docker-compose run --rm' \
alias dcrd='docker-compose run -d --rm' dcrd='docker-compose run -d --rm' \
alias dcrm!='docker-compose rm -f' dcrm!='docker-compose rm -f' \
alias dcrm='docker-compose rm' dcrm='docker-compose rm' \
alias dcrmv!='docker-compose rm -v -f' dcrmv!='docker-compose rm -v -f' \
alias dcrmv='docker-compose rm -v' dcrmv='docker-compose rm -v' \
alias dcsp='docker-compose stop' dcsp='docker-compose stop' \
alias dcst='docker-compose restart' dcst='docker-compose restart'
## image ## image
alias dcb!='docker-compose build --no-cache' alias dcb!='docker-compose build --no-cache' \
alias dcb='docker-compose build' dcb='docker-compose build' \
alias dcl='docker-compose pull' dcl='docker-compose pull'

View File

@ -6,9 +6,11 @@ function update() {
$TERM --hold -e "$SHELL" -ic "config submodule update --remote --recursive && echo -e '\e[32mDONE'" & $TERM --hold -e "$SHELL" -ic "config submodule update --remote --recursive && echo -e '\e[32mDONE'" &
} }
alias pac='sudo pacman' \ alias pac='sudo pacman'
vi='$EDITOR' \
qcp='qcp -o tabsize=4' \ alias vi='$EDITOR'
alias qcp='qcp -o tabsize=4' \
qmv='qmv -o tabsize=4' qmv='qmv -o tabsize=4'
alias config='git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"' \ alias config='git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"' \
@ -21,13 +23,6 @@ alias sudo='sudo ' \
watch='watch -c ' \ watch='watch -c ' \
xargs='xargs ' xargs='xargs '
function j() {
dests=(**/"$1"*~cvs~node_modules/)
[ -n "${dests[2]}" ] && dests=("$(printf '%s\n' "${dests[@]}" | fzf)")
cd "${dests[1]}"
}
function tmp() { function tmp() {
cd "$(mktemp -d --tmpdir "$1"XXX)" cd "$(mktemp -d --tmpdir "$1"XXX)"
} }
@ -48,8 +43,9 @@ alias ls='ls --color=auto' \
l='ll -a' \ l='ll -a' \
la='ll -A' la='ll -A'
alias diff='diff --color' alias diff='diff --color' \
grep='grep --color --exclude-dir={.bzr,.cache,.git,.hg,.idea,.svn,.tox,.venv,.vscode,CVS,node_modules}'
alias grep='grep --color --exclude-dir={.bzr,.cache,.git,.hg,.idea,.svn,.tox,.venv,.vscode,CVS,node_modules}' alias feh='feh --auto-zoom --scale-down'
alias xmr='monero-wallet-cli --daemon-address monero.maby.dev:18081 --wallet-file /home/ange/.config/monero/ange --trusted-daemon --log-file=/tmp/monero-wallet-cli.log' alias xmr='monero-wallet-cli --daemon-address monero.maby.dev:18081 --wallet-file /home/ange/.config/monero/ange --trusted-daemon --log-file=/tmp/monero-wallet-cli.log'

View File

@ -20,76 +20,76 @@ function grename() {
fi fi
} }
alias ggpur='ggu' alias ggpur='ggu' \
alias g='git' g='git' \
alias ga='git add' ga='git add' \
alias gaa='git add --all' gaa='git add --all' \
alias gapa='git add --patch' gapa='git add --patch' \
alias gau='git add --update' gau='git add --update' \
alias gav='git add --verbose' gav='git add --verbose' \
alias gam='git am' gam='git am' \
alias gama='git am --abort' gama='git am --abort' \
alias gamc='git am --continue' gamc='git am --continue' \
alias gamscp='git am --show-current-patch' gamscp='git am --show-current-patch' \
alias gams='git am --skip' gams='git am --skip' \
alias gap='git apply' gap='git apply' \
alias gapt='git apply --3way' gapt='git apply --3way' \
alias gbs='git bisect' gbs='git bisect' \
alias gbsb='git bisect bad' gbsb='git bisect bad' \
alias gbsg='git bisect good' gbsg='git bisect good' \
alias gbsn='git bisect new' gbsn='git bisect new' \
alias gbso='git bisect old' gbso='git bisect old' \
alias gbsr='git bisect reset' gbsr='git bisect reset' \
alias gbss='git bisect start' gbss='git bisect start' \
alias gbl='git blame -w' gbl='git blame -w' \
alias gb='git branch' gb='git branch' \
alias gba='git branch --all' gba='git branch --all' \
alias gbd='git branch --delete' gbd='git branch --delete' \
alias gbD='git branch --delete --force' gbD='git branch --delete --force'
alias gbgd='LANG=C git branch --no-color -vv | grep ": gone\]" | awk '"'"'{print $1}'"'"' | xargs git branch -d' alias gbgd='LANG=C git branch --no-color -vv | grep ": gone\]" | awk '"'"'{print $1}'"'"' | xargs git branch -d' \
alias gbgD='LANG=C git branch --no-color -vv | grep ": gone\]" | awk '"'"'{print $1}'"'"' | xargs git branch -D' gbgD='LANG=C git branch --no-color -vv | grep ": gone\]" | awk '"'"'{print $1}'"'"' | xargs git branch -D' \
alias gbm='git branch --move' gbm='git branch --move' \
alias gbnm='git branch --no-merged' gbnm='git branch --no-merged' \
alias gbr='git branch --remote' gbr='git branch --remote' \
alias ggsup='git branch --set-upstream-to=origin/$(current_branch)' ggsup='git branch --set-upstream-to=origin/$(current_branch)' \
alias gbg='LANG=C git branch -vv | grep ": gone\]"' gbg='LANG=C git branch -vv | grep ": gone\]"' \
alias gco='git checkout' gco='git checkout' \
alias gcor='git checkout --recurse-submodules' gcor='git checkout --recurse-submodules' \
alias gcb='git checkout -b' gcb='git checkout -b' \
alias gcp='git cherry-pick' gcp='git cherry-pick' \
alias gcpa='git cherry-pick --abort' gcpa='git cherry-pick --abort' \
alias gcpc='git cherry-pick --continue' gcpc='git cherry-pick --continue' \
alias gclean='git clean --interactive -d' gclean='git clean --interactive -d' \
alias gcl='git clone --recurse-submodules' gcl='git clone --recurse-submodules'
function gccd() { function gccd() {
gcl "$@" && cd "$(basename "$_")" gcl "$@" && cd "$(basename "$_")"
} }
compdef _git gccd=git-clone compdef _git gccd=git-clone
alias gcam='git commit --all --message' alias gcam='git commit --all --message' \
alias gcas='git commit --all --signoff' gcas='git commit --all --signoff' \
alias gcasm='git commit --all --signoff --message' gcasm='git commit --all --signoff --message' \
alias gcs='git commit --gpg-sign' gcs='git commit --gpg-sign' \
alias gcss='git commit --gpg-sign --signoff' gcss='git commit --gpg-sign --signoff' \
alias gcssm='git commit --gpg-sign --signoff --message' gcssm='git commit --gpg-sign --signoff --message' \
alias gcmsg='git commit --message' gcmsg='git commit --message' \
alias gcsm='git commit --signoff --message' gcsm='git commit --signoff --message' \
alias gc='git commit --verbose' gc='git commit --verbose' \
alias gca='git commit --verbose --all' gca='git commit --verbose --all' \
alias gca!='git commit --verbose --all --amend' gca!='git commit --verbose --all --amend' \
alias gcan!='git commit --verbose --all --no-edit --amend' gcan!='git commit --verbose --all --no-edit --amend' \
alias gcans!='git commit --verbose --all --signoff --no-edit --amend' gcans!='git commit --verbose --all --signoff --no-edit --amend' \
alias gc!='git commit --verbose --amend' gc!='git commit --verbose --amend' \
alias gcn!='git commit --verbose --no-edit --amend' gcn!='git commit --verbose --no-edit --amend' \
alias gcf='git config --list' gcf='git config --list' \
alias gdct='git describe --tags $(git rev-list --tags --max-count=1)' gdct='git describe --tags $(git rev-list --tags --max-count=1)' \
alias gd='git diff' gd='git diff' \
alias gdca='git diff --cached' gdca='git diff --cached' \
alias gdcw='git diff --cached --word-diff' gdcw='git diff --cached --word-diff' \
alias gds='git diff --staged' gds='git diff --staged' \
alias gdw='git diff --word-diff' gdw='git diff --word-diff'
function gdv() { function gdv() {
git diff -w "$@" | view - git diff -w "$@" | view -
@ -98,25 +98,25 @@ compdef _git gdv=git-diff
alias gdup='git diff @{upstream}' alias gdup='git diff @{upstream}'
alias gdt='git diff-tree --no-commit-id --name-only -r' alias gdt='git diff-tree --no-commit-id --name-only -r' \
alias gf='git fetch' gf='git fetch'
# --jobs=<n> was added in git 2.8 # --jobs=<n> was added in git 2.8
alias gfa='git fetch --all --prune --jobs=10' alias gfa='git fetch --all --prune --jobs=10' \
alias gfo='git fetch origin' gfo='git fetch origin' \
alias gg='git gui citool' gg='git gui citool' \
alias gga='git gui citool --amend' gga='git gui citool --amend' \
alias ghh='git help' ghh='git help' \
alias glgg='git log --graph' glgg='git log --graph' \
alias glgga='git log --graph --decorate --all' glgga='git log --graph --decorate --all' \
alias glgm='git log --graph --max-count=10' glgm='git log --graph --max-count=10' \
alias glods='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset" --date=short' glods='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset" --date=short' \
alias glod='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset"' glod='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset"' \
alias glola='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset" --all' glola='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset" --all' \
alias glols='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset" --stat' glols='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset" --stat' \
alias glol='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset"' glol='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset"' \
alias glo='git log --oneline --decorate' glo='git log --oneline --decorate' \
alias glog='git log --oneline --decorate --graph' glog='git log --oneline --decorate --graph' \
alias gloga='git log --oneline --decorate --graph --all' gloga='git log --oneline --decorate --graph --all'
# Pretty log messages # Pretty log messages
function _git_log_prettily() { function _git_log_prettily() {
@ -126,22 +126,22 @@ function _git_log_prettily() {
} }
compdef _git _git_log_prettily=git-log compdef _git _git_log_prettily=git-log
alias glp='_git_log_prettily' alias glp='_git_log_prettily' \
alias glg='git log --stat' glg='git log --stat' \
alias glgp='git log --stat --patch' glgp='git log --stat --patch' \
alias gignored='git ls-files -v | grep "^[[:lower:]]"' gignored='git ls-files -v | grep "^[[:lower:]]"' \
alias gfg='git ls-files | grep' gfg='git ls-files | grep' \
alias gmr='git merge' gmr='git merge' \
alias gmra='git merge --abort' gmra='git merge --abort' \
alias gmrs="git merge --squash" gmrs="git merge --squash" \
alias gmrtl='git mergetool --no-prompt' gmrtl='git mergetool --no-prompt' \
alias gmrtlvim='git mergetool --no-prompt --tool=vimdiff' gmrtlvim='git mergetool --no-prompt --tool=vimdiff'
alias gl='git pull' alias gl='git pull' \
alias gpr='git pull --rebase' gpr='git pull --rebase' \
alias gprv='git pull --rebase -v' gprv='git pull --rebase -v' \
alias gpra='git pull --rebase --autostash' gpra='git pull --rebase --autostash' \
alias gprav='git pull --rebase --autostash -v' gprav='git pull --rebase --autostash -v'
function ggu() { function ggu() {
[[ "$#" != 1 ]] && local b="$(current_branch)" [[ "$#" != 1 ]] && local b="$(current_branch)"
@ -161,9 +161,9 @@ function ggl() {
} }
compdef _git ggl=git-checkout compdef _git ggl=git-checkout
alias gluc='git pull upstream $(current_branch)' alias gluc='git pull upstream $(current_branch)' \
alias gp='git push' gp='git push' \
alias gpd='git push --dry-run' gpd='git push --dry-run'
function ggf() { function ggf() {
[[ "$#" != 1 ]] && local b="$(current_branch)" [[ "$#" != 1 ]] && local b="$(current_branch)"
@ -171,8 +171,8 @@ function ggf() {
} }
compdef _git ggf=git-checkout compdef _git ggf=git-checkout
alias gpf!='git push --force' alias gpf!='git push --force' \
alias gpf='git push --force-with-lease --force-if-includes' gpf='git push --force-with-lease --force-if-includes'
function ggfl() { function ggfl() {
[[ "$#" != 1 ]] && local b="$(current_branch)" [[ "$#" != 1 ]] && local b="$(current_branch)"
@ -180,68 +180,68 @@ function ggfl() {
} }
compdef _git ggfl=git-checkout compdef _git ggfl=git-checkout
alias gpsup='git push --set-upstream origin $(current_branch)' alias gpsup='git push --set-upstream origin $(current_branch)' \
alias gpsupf='git push --set-upstream origin $(current_branch) --force-with-lease --force-if-includes' gpsupf='git push --set-upstream origin $(current_branch) --force-with-lease --force-if-includes' \
alias gpv='git push --verbose' gpv='git push --verbose' \
alias gpoat='git push origin --all && git push origin --tags' gpoat='git push origin --all && git push origin --tags' \
alias gpod='git push origin --delete' gpod='git push origin --delete' \
alias ggpush='git push origin "$(current_branch)"' ggpush='git push origin "$(current_branch)"' \
alias gpu='git push upstream' gpu='git push upstream' \
alias grb='git rebase' grb='git rebase' \
alias grba='git rebase --abort' grba='git rebase --abort' \
alias grbc='git rebase --continue' grbc='git rebase --continue' \
alias grbi='git rebase --interactive' grbi='git rebase --interactive' \
alias grbo='git rebase --onto' grbo='git rebase --onto' \
alias grbs='git rebase --skip' grbs='git rebase --skip' \
alias gr='git remote' gr='git remote' \
alias grv='git remote --verbose' grv='git remote --verbose' \
alias gra='git remote add' gra='git remote add' \
alias grrm='git remote remove' grrm='git remote remove' \
alias grmv='git remote rename' grmv='git remote rename' \
alias grset='git remote set-url' grset='git remote set-url' \
alias grup='git remote update' grup='git remote update' \
alias grh='git reset' grh='git reset' \
alias gru='git reset --' gru='git reset --' \
alias grhh='git reset --hard' grhh='git reset --hard' \
alias grhk='git reset --keep' grhk='git reset --keep' \
alias grhs='git reset --soft' grhs='git reset --soft' \
alias gpristine='git reset --hard && git clean --force -dfx' gpristine='git reset --hard && git clean --force -dfx' \
alias groh='git reset origin/$(current_branch) --hard' groh='git reset origin/$(current_branch) --hard' \
alias grs='git restore' grs='git restore' \
alias grss='git restore --source' grss='git restore --source' \
alias grst='git restore --staged' grst='git restore --staged' \
alias grev='git revert' grev='git revert' \
alias grm='git rm' grm='git rm' \
alias grmc='git rm --cached' grmc='git rm --cached' \
alias grt='cd "$(git rev-parse --show-toplevel || echo .)"' grt='cd "$(git rev-parse --show-toplevel || echo .)"' \
alias gcount='git shortlog --summary --numbered' gcount='git shortlog --summary --numbered' \
alias gsh='git show' gsh='git show' \
alias gsps='git show --pretty=short --show-signature' gsps='git show --pretty=short --show-signature' \
alias gstall='git stash --all' gstall='git stash --all' \
alias gstaa='git stash apply' gstaa='git stash apply' \
alias gstc='git stash clear' gstc='git stash clear' \
alias gstd='git stash drop' gstd='git stash drop' \
alias gstl='git stash list' gstl='git stash list' \
alias gstp='git stash pop' gstp='git stash pop' \
alias gsta='git stash push' gsta='git stash push' \
alias gsts='git stash show --patch' gsts='git stash show --patch' \
alias gst='git status' gst='git status' \
alias gss='git status --short' gss='git status --short' \
alias gsb='git status --short --branch' gsb='git status --short --branch' \
alias gsi='git submodule init' gsi='git submodule init' \
alias gsu='git submodule update' gsu='git submodule update' \
alias gsw='git switch' gsw='git switch' \
alias gswc='git switch --create' gswc='git switch --create' \
alias gta='git tag --annotate' gta='git tag --annotate' \
alias gts='git tag --sign' gts='git tag --sign' \
alias gtv='git tag | sort -V' gtv='git tag | sort -V' \
alias gignore='git update-index --assume-unchanged' gignore='git update-index --assume-unchanged' \
alias gunignore='git update-index --no-assume-unchanged' gunignore='git update-index --no-assume-unchanged' \
alias gwch='git whatchanged -p --abbrev-commit --pretty=medium' gwch='git whatchanged -p --abbrev-commit --pretty=medium' \
alias gwt='git worktree' gwt='git worktree' \
alias gwta='git worktree add' gwta='git worktree add' \
alias gwtls='git worktree list' gwtls='git worktree list' \
alias gwtmv='git worktree move' gwtmv='git worktree move' \
alias gwtrm='git worktree remove' gwtrm='git worktree remove' \
alias gstu='gsta --include-untracked' gstu='gsta --include-untracked' \
alias gtl='gtl(){ git tag --sort=-v:refname -n --list "${1}*" }; noglob gtl' gtl='gtl(){ git tag --sort=-v:refname -n --list "${1}*" }; noglob gtl'

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

93
.config/zsh/input.zsh Normal file
View File

@ -0,0 +1,93 @@
function zle-line-init() {
echoti smkx
}
function zle-line-finish() {
echoti rmkx
}
zle -N zle-line-init
zle -N zle-line-finish
# Use emacs key bindings
bindkey -e
# [PageUp] - Up a line of history
bindkey -M emacs "${terminfo[kpp]}" up-line-or-history
bindkey -M viins "${terminfo[kpp]}" up-line-or-history
bindkey -M vicmd "${terminfo[kpp]}" up-line-or-history
# [PageDown] - Down a line of history
bindkey -M emacs "${terminfo[knp]}" down-line-or-history
bindkey -M viins "${terminfo[knp]}" down-line-or-history
bindkey -M vicmd "${terminfo[knp]}" down-line-or-history
# Start typing + [Up-Arrow] - fuzzy find history forward
autoload -Uz up-line-or-beginning-search
zle -N up-line-or-beginning-search
bindkey -M emacs "${terminfo[kcuu1]}" up-line-or-beginning-search
bindkey -M viins "${terminfo[kcuu1]}" up-line-or-beginning-search
bindkey -M vicmd "${terminfo[kcuu1]}" up-line-or-beginning-search
# Start typing + [Down-Arrow] - fuzzy find history backward
autoload -Uz down-line-or-beginning-search
zle -N down-line-or-beginning-search
bindkey -M emacs "${terminfo[kcud1]}" down-line-or-beginning-search
bindkey -M viins "${terminfo[kcud1]}" down-line-or-beginning-search
bindkey -M vicmd "${terminfo[kcud1]}" down-line-or-beginning-search
# [Home] - Go to beginning of line
bindkey -M emacs "${terminfo[khome]}" beginning-of-line
bindkey -M viins "${terminfo[khome]}" beginning-of-line
bindkey -M vicmd "${terminfo[khome]}" beginning-of-line
# [End] - Go to end of line
bindkey -M emacs "${terminfo[kend]}" end-of-line
bindkey -M viins "${terminfo[kend]}" end-of-line
bindkey -M vicmd "${terminfo[kend]}" end-of-line
# [Shift-Tab] - move through the completion menu backwards
bindkey -M emacs "${terminfo[kcbt]}" reverse-menu-complete
bindkey -M viins "${terminfo[kcbt]}" reverse-menu-complete
bindkey -M vicmd "${terminfo[kcbt]}" reverse-menu-complete
# [Backspace] - delete backward
bindkey -M emacs '^?' backward-delete-char
bindkey -M viins '^?' backward-delete-char
bindkey -M vicmd '^?' backward-delete-char
# [Delete] - delete forward
bindkey -M emacs "${terminfo[kdch1]}" delete-char
bindkey -M viins "${terminfo[kdch1]}" delete-char
bindkey -M vicmd "${terminfo[kdch1]}" delete-char
# [Ctrl-Delete] - delete whole forward-word
bindkey -M emacs '^[[3;5~' kill-word
bindkey -M viins '^[[3;5~' kill-word
bindkey -M vicmd '^[[3;5~' kill-word
# [Ctrl-RightArrow] - move forward one word
bindkey -M emacs '^[[1;5C' forward-word
bindkey -M viins '^[[1;5C' forward-word
bindkey -M vicmd '^[[1;5C' forward-word
# [Ctrl-LeftArrow] - move backward one word
bindkey -M emacs '^[[1;5D' backward-word
bindkey -M viins '^[[1;5D' backward-word
bindkey -M vicmd '^[[1;5D' backward-word
bindkey ' ' magic-space # [Space] - don't do history expansion
# file rename magick
bindkey "^[m" copy-prev-shell-word
bindkey -v
# allow vv to edit the command line (standard behaviour)
autoload -Uz edit-command-line
zle -N edit-command-line
bindkey -M vicmd 'vv' edit-command-line
# allow ctrl-p, ctrl-n for navigate history (standard behaviour)
bindkey '^P' up-history
bindkey '^N' down-history
# allow ctrl-h, ctrl-w, ctrl-? for char and word deletion (standard behaviour)
bindkey '^?' backward-delete-char
bindkey '^h' backward-delete-char
bindkey '^w' backward-kill-word

View File

@ -1,313 +0,0 @@
# http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html
# http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Zle-Builtins
# http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Standard-Widgets
# Make sure that the terminal is in application mode when zle is active, since
# only then values from $terminfo are valid
if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then
function zle-line-init() {
echoti smkx
}
function zle-line-finish() {
echoti rmkx
}
zle -N zle-line-init
zle -N zle-line-finish
fi
# Use emacs key bindings
bindkey -e
# [PageUp] - Up a line of history
if [[ -n "${terminfo[kpp]}" ]]; then
bindkey -M emacs "${terminfo[kpp]}" up-line-or-history
bindkey -M viins "${terminfo[kpp]}" up-line-or-history
bindkey -M vicmd "${terminfo[kpp]}" up-line-or-history
fi
# [PageDown] - Down a line of history
if [[ -n "${terminfo[knp]}" ]]; then
bindkey -M emacs "${terminfo[knp]}" down-line-or-history
bindkey -M viins "${terminfo[knp]}" down-line-or-history
bindkey -M vicmd "${terminfo[knp]}" down-line-or-history
fi
# Start typing + [Up-Arrow] - fuzzy find history forward
if [[ -n "${terminfo[kcuu1]}" ]]; then
autoload -U up-line-or-beginning-search
zle -N up-line-or-beginning-search
bindkey -M emacs "${terminfo[kcuu1]}" up-line-or-beginning-search
bindkey -M viins "${terminfo[kcuu1]}" up-line-or-beginning-search
bindkey -M vicmd "${terminfo[kcuu1]}" up-line-or-beginning-search
fi
# Start typing + [Down-Arrow] - fuzzy find history backward
if [[ -n "${terminfo[kcud1]}" ]]; then
autoload -U down-line-or-beginning-search
zle -N down-line-or-beginning-search
bindkey -M emacs "${terminfo[kcud1]}" down-line-or-beginning-search
bindkey -M viins "${terminfo[kcud1]}" down-line-or-beginning-search
bindkey -M vicmd "${terminfo[kcud1]}" down-line-or-beginning-search
fi
# [Home] - Go to beginning of line
if [[ -n "${terminfo[khome]}" ]]; then
bindkey -M emacs "${terminfo[khome]}" beginning-of-line
bindkey -M viins "${terminfo[khome]}" beginning-of-line
bindkey -M vicmd "${terminfo[khome]}" beginning-of-line
fi
# [End] - Go to end of line
if [[ -n "${terminfo[kend]}" ]]; then
bindkey -M emacs "${terminfo[kend]}" end-of-line
bindkey -M viins "${terminfo[kend]}" end-of-line
bindkey -M vicmd "${terminfo[kend]}" end-of-line
fi
# [Shift-Tab] - move through the completion menu backwards
if [[ -n "${terminfo[kcbt]}" ]]; then
bindkey -M emacs "${terminfo[kcbt]}" reverse-menu-complete
bindkey -M viins "${terminfo[kcbt]}" reverse-menu-complete
bindkey -M vicmd "${terminfo[kcbt]}" reverse-menu-complete
fi
# [Backspace] - delete backward
bindkey -M emacs '^?' backward-delete-char
bindkey -M viins '^?' backward-delete-char
bindkey -M vicmd '^?' backward-delete-char
# [Delete] - delete forward
if [[ -n "${terminfo[kdch1]}" ]]; then
bindkey -M emacs "${terminfo[kdch1]}" delete-char
bindkey -M viins "${terminfo[kdch1]}" delete-char
bindkey -M vicmd "${terminfo[kdch1]}" delete-char
else
bindkey -M emacs "^[[3~" delete-char
bindkey -M viins "^[[3~" delete-char
bindkey -M vicmd "^[[3~" delete-char
bindkey -M emacs "^[3;5~" delete-char
bindkey -M viins "^[3;5~" delete-char
bindkey -M vicmd "^[3;5~" delete-char
fi
# [Ctrl-Delete] - delete whole forward-word
bindkey -M emacs '^[[3;5~' kill-word
bindkey -M viins '^[[3;5~' kill-word
bindkey -M vicmd '^[[3;5~' kill-word
# [Ctrl-RightArrow] - move forward one word
bindkey -M emacs '^[[1;5C' forward-word
bindkey -M viins '^[[1;5C' forward-word
bindkey -M vicmd '^[[1;5C' forward-word
# [Ctrl-LeftArrow] - move backward one word
bindkey -M emacs '^[[1;5D' backward-word
bindkey -M viins '^[[1;5D' backward-word
bindkey -M vicmd '^[[1;5D' backward-word
bindkey '\ew' kill-region # [Esc-w] - Kill from the cursor to the mark
bindkey -s '\el' 'ls\n' # [Esc-l] - run command: ls
bindkey '^r' history-incremental-search-backward # [Ctrl-r] - Search backward incrementally for a specified string. The string may begin with ^ to anchor the search to the beginning of the line.
bindkey ' ' magic-space # [Space] - don't do history expansion
# Edit the current command line in $EDITOR
autoload -U edit-command-line
zle -N edit-command-line
bindkey '\C-x\C-e' edit-command-line
# file rename magick
bindkey "^[m" copy-prev-shell-word
# consider emacs keybindings:
#bindkey -e ## emacs key bindings
#
#bindkey '^[[A' up-line-or-search
#bindkey '^[[B' down-line-or-search
#bindkey '^[^[[C' emacs-forward-word
#bindkey '^[^[[D' emacs-backward-word
#
#bindkey -s '^X^Z' '%-^M'
#bindkey '^[e' expand-cmd-path
#bindkey '^[^I' reverse-menu-complete
#bindkey '^X^N' accept-and-infer-next-history
#bindkey '^W' kill-region
#bindkey '^I' complete-word
## Fix weird sequence that rxvt produces
#bindkey -s '^[[Z' '\t'
#
# Control whether to force a redraw on each mode change.
#
# Resetting the prompt on every mode change can cause lag when switching modes.
# This is especially true if the prompt does things like checking git status.
#
# Set to "true" to force the prompt to reset on each mode change.
# Unset or set to any other value to do the opposite.
#
# The default is not to reset, unless we're showing the mode in RPS1.
typeset -g VI_MODE_RESET_PROMPT_ON_MODE_CHANGE
# Control whether to change the cursor style on mode change.
#
# Set to "true" to change the cursor on each mode change.
# Unset or set to any other value to do the opposite.
typeset -g VI_MODE_SET_CURSOR
# Control how the cursor appears in the various vim modes. This only applies
# if $VI_MODE_SET_CURSOR=true.
#
# See https://vt100.net/docs/vt510-rm/DECSCUSR for cursor styles
typeset -g VI_MODE_CURSOR_NORMAL=2
typeset -g VI_MODE_CURSOR_VISUAL=6
typeset -g VI_MODE_CURSOR_INSERT=6
typeset -g VI_MODE_CURSOR_OPPEND=0
typeset -g VI_KEYMAP=main
function _vi-mode-set-cursor-shape-for-keymap() {
[[ "$VI_MODE_SET_CURSOR" = true ]] || return
# https://vt100.net/docs/vt510-rm/DECSCUSR
local _shape=0
case "${1:-${VI_KEYMAP:-main}}" in
main) _shape=$VI_MODE_CURSOR_INSERT ;; # vi insert: line
viins) _shape=$VI_MODE_CURSOR_INSERT ;; # vi insert: line
isearch) _shape=$VI_MODE_CURSOR_INSERT ;; # inc search: line
command) _shape=$VI_MODE_CURSOR_INSERT ;; # read a command name
vicmd) _shape=$VI_MODE_CURSOR_NORMAL ;; # vi cmd: block
visual) _shape=$VI_MODE_CURSOR_VISUAL ;; # vi visual mode: block
viopp) _shape=$VI_MODE_CURSOR_OPPEND ;; # vi operation pending: blinking block
*) _shape=0 ;;
esac
printf $'\e[%d q' "${_shape}"
}
function _visual-mode {
typeset -g VI_KEYMAP=visual
_vi-mode-set-cursor-shape-for-keymap "$VI_KEYMAP"
zle .visual-mode
}
zle -N visual-mode _visual-mode
function _vi-mode-should-reset-prompt() {
# If $VI_MODE_RESET_PROMPT_ON_MODE_CHANGE is unset (default), dynamically
# check whether we're using the prompt to display vi-mode info
if [[ -z "${VI_MODE_RESET_PROMPT_ON_MODE_CHANGE:-}" ]]; then
[[ "${PS1} ${RPS1}" = *'$(vi_mode_prompt_info)'* ]]
return $?
fi
# If $VI_MODE_RESET_PROMPT_ON_MODE_CHANGE was manually set, let's check
# if it was specifically set to true or it was disabled with any other value
[[ "${VI_MODE_RESET_PROMPT_ON_MODE_CHANGE}" = true ]]
}
# Updates editor information when the keymap changes.
function zle-keymap-select() {
# update keymap variable for the prompt
typeset -g VI_KEYMAP=$KEYMAP
if _vi-mode-should-reset-prompt; then
zle reset-prompt
zle -R
fi
_vi-mode-set-cursor-shape-for-keymap "${VI_KEYMAP}"
}
zle -N zle-keymap-select
# These "echoti" statements were originally set in lib/key-bindings.zsh
# Not sure the best way to extend without overriding.
function zle-line-init() {
local prev_vi_keymap="${VI_KEYMAP:-}"
typeset -g VI_KEYMAP=main
[[ "$prev_vi_keymap" != 'main' ]] && _vi-mode-should-reset-prompt && zle reset-prompt
(( ! ${+terminfo[smkx]} )) || echoti smkx
_vi-mode-set-cursor-shape-for-keymap "${VI_KEYMAP}"
}
zle -N zle-line-init
function zle-line-finish() {
typeset -g VI_KEYMAP=main
(( ! ${+terminfo[rmkx]} )) || echoti rmkx
_vi-mode-set-cursor-shape-for-keymap default
}
zle -N zle-line-finish
bindkey -v
# allow vv to edit the command line (standard behaviour)
autoload -Uz edit-command-line
zle -N edit-command-line
bindkey -M vicmd 'vv' edit-command-line
# allow ctrl-p, ctrl-n for navigate history (standard behaviour)
bindkey '^P' up-history
bindkey '^N' down-history
# allow ctrl-h, ctrl-w, ctrl-? for char and word deletion (standard behaviour)
bindkey '^?' backward-delete-char
bindkey '^h' backward-delete-char
bindkey '^w' backward-kill-word
# allow ctrl-r and ctrl-s to search the history
bindkey '^r' history-incremental-search-backward
bindkey '^s' history-incremental-search-forward
# allow ctrl-a and ctrl-e to move to beginning/end of line
bindkey '^a' beginning-of-line
bindkey '^e' end-of-line
function wrap_clipboard_widgets() {
# NB: Assume we are the first wrapper and that we only wrap native widgets
# See zsh-autosuggestions.zsh for a more generic and more robust wrapper
local verb="$1"
shift
local widget
local wrapped_name
for widget in "$@"; do
wrapped_name="_zsh-vi-${verb}-${widget}"
if [ "${verb}" = copy ]; then
eval "
function ${wrapped_name}() {
zle .${widget}
printf %s \"\${CUTBUFFER}\" | clipcopy 2>/dev/null || true
}
"
else
eval "
function ${wrapped_name}() {
CUTBUFFER=\"\$(clippaste 2>/dev/null || echo \$CUTBUFFER)\"
zle .${widget}
}
"
fi
zle -N "${widget}" "${wrapped_name}"
done
}
wrap_clipboard_widgets copy \
vi-yank vi-yank-eol vi-yank-whole-line \
vi-change vi-change-eol vi-change-whole-line \
vi-kill-line vi-kill-eol vi-backward-kill-word \
vi-delete vi-delete-char vi-backward-delete-char
wrap_clipboard_widgets paste \
vi-put-{before,after} \
put-replace-selection
unfunction wrap_clipboard_widgets
# if mode indicator wasn't setup by theme, define default, we'll leave INSERT_MODE_INDICATOR empty by default
if [[ -z "$MODE_INDICATOR" ]]; then
MODE_INDICATOR='%B%F{red}<%b<<%f'
fi
function vi_mode_prompt_info() {
echo "${${VI_KEYMAP/vicmd/$MODE_INDICATOR}/(main|viins)/$INSERT_MODE_INDICATOR}"
}
# define right prompt, if it wasn't defined by a theme
if [[ -z "$RPS1" && -z "$RPROMPT" ]]; then
RPS1='$(vi_mode_prompt_info)'
fi

@ -1 +0,0 @@
Subproject commit da9b03777c4f2390c7e3f5c720ee4689336f811b

View File

@ -1,47 +0,0 @@
# LEFT
# dir vcs command_execution_time status
# RIGHT
# background_jobs virtualenv kubecontext
autoload -Uz vcs_info
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:*' check-for-changes true
zstyle ':vcs_info:git*' formats '%b (%a) %m%u%c'
function preexec() {
_timer_start="$SECONDS"
}
function _get_time() {
local d="$((SECONDS - _timer_start))"
local text
text="$((d % 60))s"
if [ "$d" -gt 60 ]; then
text="$((d % 60))m$text"
(( d /= 60 ))
fi
if [ "$d" -gt 60 ]; then
text="${d}h$text"
fi
echo "$text"
}
function precmd() {
local err
IFS='|' err="${pipestatus[*]}"
timer="$((SECONDS - _timer_start))"
vcs_info
PROMPT='%~ '
[ -n "$vcs_info_msg_0_" ] && PROMPT="$PROMPT$vcs_info_msg_0_ "
[ "$timer" -ge 2 ] && PROMPT="$PROMPT$(_get_time) "
[ "$err" != 0 ] && PROMPT="$PROMPT$err "
RPROMPT='%(1j.%j.)'
false && RPROMPT="$RPROMPT virtualenv"
false && RPROMPT="$RPROMPT kubecontext"
}

66
.config/zsh/theme.zsh Normal file
View File

@ -0,0 +1,66 @@
autoload -Uz vcs_info colors && colors
export LESS_TERMCAP_mb="${fg_bold[red]}"
export LESS_TERMCAP_md="${fg_bold[red]}"
export LESS_TERMCAP_me="$reset_color"
export LESS_TERMCAP_so="${fg_bold[yellow]}${bg[blue]}"
export LESS_TERMCAP_se="$reset_color"
export LESS_TERMCAP_us="${fg_bold[green]}"
export LESS_TERMCAP_ue="$reset_color"
. <(dircolors)
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
zstyle ':completion:*:*:*:*:*' menu select
zstyle ':completion:*' matcher-list 'r:|=*' 'l:|=* r:|=*'
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories
zstyle ':vcs_info:*' check-for-changes true
zstyle ':vcs_info:*' stagedstr ' %{%F{178}%}+%{%f%b%}'
zstyle ':vcs_info:*' unstagedstr ' %{%F{178}%}*%{%f%b%}'
#zstyle ':vcs_info:*' untrackedstr ' %{%F{39}%}?%{%f%b%}'
zstyle ':vcs_info:git:*' formats '%{%F{76}%}%b%{%f%}%c%u '
zstyle ':vcs_info:git:*' actionformats '%{%F{76}%}%b%{%f%}|%{%F{196}%}%a%{%f%}%c%u '
function preexec() {
_timer_start="$SECONDS"
}
function _get_time() {
local d="$1"
local text
text="$((d % 60))s"
if [ "$d" -gt 60 ]; then
(( d /= 60 ))
text="$((d % 60))m$text"
if [ "$d" -gt 60 ]; then
text="${d}h$text"
fi
fi
echo "$text"
}
function precmd() {
IFS='|' local timer ctx err="${pipestatus[*]}"
[ "$_timer_start" -gt 0 ] && timer="$((SECONDS - _timer_start))"
_timer_start=-1
ctx="$(kubectx -c)"
vcs_info
PROMPT=''
[ -n "$ctx" ] && PROMPT+="%{%F{134}%}$ctx/$(kubens -c)%{%f%b%} "
PROMPT+='%{%B%F{32}%}%~%{%f%b%} '
PROMPT+="$vcs_info_msg_0_"
[ "$timer" -ge 2 ] && PROMPT+="%{%F{101}%}$(_get_time "$timer")%{%f%b%} "
[[ "$err" =~ [1-9] ]] && PROMPT+="%{%F{160}%}${err[*]}%{%f%b%} "
RPROMPT=''
RPROMPT+=' %{%F{71}%}%(1j.%j.)%{%f%b%}'
[ -n "$VIRTUAL_ENV" ] && RPROMPT+=" %{%F{37}%}${VIRTUAL_ENV:h:t}%{%f%b%}"
}

3
.gitmodules vendored
View File

@ -10,6 +10,3 @@
[submodule ".config/nvim/pack/plugins/opt/treesitter"] [submodule ".config/nvim/pack/plugins/opt/treesitter"]
path = .config/nvim/pack/plugins/opt/treesitter path = .config/nvim/pack/plugins/opt/treesitter
url = https://github.com/nvim-treesitter/nvim-treesitter.git url = https://github.com/nvim-treesitter/nvim-treesitter.git
[submodule ".config/zsh/powerlevel10k"]
path = .config/zsh/powerlevel10k
url = https://github.com/romkatv/powerlevel10k.git

View File

@ -1,4 +0,0 @@
#unified-extensions-button, #unified-extensions-button > .toolbarbutton-icon{
width: 0px !important;
padding: 0px !important;
}

View File

@ -1,40 +0,0 @@
user_pref("app.shield.optoutstudies.enabled", false);
user_pref("browser.aboutConfig.showWarning", false);
user_pref("browser.contentblocking.category", "strict");
user_pref("browser.download.useDownloadDir", false);
user_pref("browser.formfill.enable", false);
user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons", false);
user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features", false);
user_pref("browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.searchEngines", "");
user_pref("browser.newtabpage.enabled", false);
user_pref("browser.preferences.moreFromMozilla", false);
user_pref("browser.privatebrowsing.vpnpromourl", "");
user_pref("browser.startup.homepage", "chrome://browser/content/blanktab.html");
user_pref("browser.tabs.tabmanager.enabled", false);
user_pref("browser.topsites.contile.cachedTiles", "");
user_pref("browser.urlbar.update2.engineAliasRefresh", true);
user_pref("datareporting.healthreport.uploadEnabled", false);
user_pref("datareporting.policy.dataSubmissionEnabled", false);
user_pref("dom.security.https_only_mode", true);
user_pref("extensions.formautofill.addresses.enabled", false);
user_pref("extensions.formautofill.creditCards.enabled", false);
user_pref("extensions.pocket.enabled", false);
user_pref("findbar.highlightAll", true);
user_pref("identity.fxaccounts.enabled", false);
user_pref("media.videocontrols.picture-in-picture.video-toggle.enabled", false);
user_pref("network.proxy.socks_remote_dns", true);
user_pref("signon.rememberSignons", false);
user_pref("startup.homepage_override_url", "");
user_pref("startup.homepage_welcome_url", "");
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);
user_pref("toolkit.telemetry.archive.enabled", false);
user_pref("toolkit.telemetry.pioneer-new-studies-available", false);
// user preferences
user_pref("browser.startup.page", 3);
user_pref("browser.tabs.inTitlebar", 0);
user_pref("browser.toolbars.bookmarks.visibility", "newtab");
user_pref("browser.translations.enable", false);
user_pref("browser.uiCustomization.state", "{\"placements\":{\"widget-overflow-fixed-list\":[],\"unified-extensions-area\":[],\"nav-bar\":[\"back-button\",\"forward-button\",\"stop-reload-button\",\"urlbar-container\",\"downloads-button\",\"fxa-toolbar-menu-button\",\"unified-extensions-button\",\"ublock0_raymondhill_net-browser-action\"],\"toolbar-menubar\":[\"menubar-items\"],\"TabsToolbar\":[\"tabbrowser-tabs\",\"alltabs-button\"],\"PersonalToolbar\":[\"personal-bookmarks\"]},\"currentVersion\":20,\"newElementCount\":3}");
user_pref("browser.zoom.siteSpecific", false);
user_pref("media.autoplay.default", 5);

View File

@ -1,11 +0,0 @@
[General]
Version=2
[Install4F96D1932A9F858E]
Default=ange
Locked=1
[Profile0]
Name=ange
IsRelative=1
Path=ange

View File

@ -14,4 +14,7 @@ picom &
gammastep & gammastep &
sbar & sbar &
xset s 600 15
xset dpms 616 616 616
exec dwm exec dwm

View File

@ -28,8 +28,9 @@ path=(
$path $path
) )
export BROWSER=firefox export BROWSER=org.mozilla.firefox
export EDITOR=nvim export EDITOR=nvim
export VISUAL=nvim export VISUAL=nvim
export PAGER=less
export MAKEFLAGS='-j' export MAKEFLAGS='-j'

View File

@ -5,5 +5,4 @@
sleep 3 sleep 3
for _ in {0..1023}; do for _ in {0..1023}; do
xdotool mousemove_relative 8 0 xdotool mousemove_relative 8 0
#ydotool mousemove -x 8 -y 0
done done

View File

@ -11,7 +11,7 @@ function update_cpu() {
} }
function update_memory() { function update_memory() {
memory=" $(free -h | awk '/^Mem:/ {print $3}')" memory=" $(free -h | awk '/^Mem:/{print $3}')"
} }
function update_bat() { function update_bat() {
@ -53,14 +53,14 @@ function update_source_vol() {
} }
function update_wlp() { function update_wlp() {
local sig ssid local sig ssid dev=wlan0
sig="$(awk '/^wlp/ {print int($3)}' /proc/net/wireless)" sig="$(awk "/$dev/{print int(\$3)}" /proc/net/wireless)"
if [ -z "$sig" ]; then if [ -z "$sig" ]; then
wlp='⚠' wlp='⚠'
return return
fi fi
ssid="$(nmcli device wifi show-password | sed -n 's/^SSID:\s*//p')" ssid="$(networkctl status "$dev" | grep -Po 'Wi-Fi access point:\s*\K\w+')"
{ [ "$sig" -gt 56 ] && wlp="▂▄▆█ $ssid"; } || { [ "$sig" -gt 56 ] && wlp="▂▄▆█ $ssid"; } ||
{ [ "$sig" -gt 38 ] && wlp="▂▄▆_ $ssid"; } || { [ "$sig" -gt 38 ] && wlp="▂▄▆_ $ssid"; } ||
{ [ "$sig" -gt 21 ] && wlp="▂▄__ $ssid"; } || { [ "$sig" -gt 21 ] && wlp="▂▄__ $ssid"; } ||
@ -83,8 +83,9 @@ else
fi fi
# SIGNALING # SIGNALING
# trap '<function>;display' 'RTMIN+n' # trap '<function>;display;wait' 'RTMIN+n'
trap 'update_sink_vol;display' 'RTMIN' trap 'update_sink_vol;display;wait' 'RTMIN'
trap 'update_wlp;display;wait' 'RTMIN+1'
# to update it from external commands # to update it from external commands
## kill -m "$(cat ~/.cache/pidofbar)" ## kill -m "$(cat ~/.cache/pidofbar)"
# where m = 34 + n # where m = 34 + n
@ -107,5 +108,5 @@ while true; do
} }
sec="$((sec + 10))" sec="$((sec + 10))"
} }
awk '@load "time"; BEGIN {d=10; s=system("date \"+%S.%N\""); sleep(d - s % d)}' & awk "@load \"time\"; BEGIN {d=10; s=$(date '+%S.%N'); sleep(d - s % d)}" &
done done

13
bin/wlp Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash -e
iwctl=(iwctl station wlan0)
"${iwctl[@]}" show | grep -q 'Scanning\s\+yes' || "${iwctl[@]}" scan
for _ in {0..29}; do
if "${iwctl[@]}" show | grep -q '\s*State\s\+connected\s*$'; then
kill -35 "$(cat "$HOME/.cache/pidofbar")"
exit 0
fi
sleep 1
done