Compare commits
No commits in common. "af14629939ddd3586a1dd8f41acfb562dfb66b5a" and "03a0bab19454116aa9e1b91bb4a70ad99084dd77" have entirely different histories.
af14629939
...
03a0bab194
@ -5,13 +5,10 @@
|
|||||||
<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> = :quit<Enter>
|
<C-c> = :prompt 'Quit?' quit<Enter>
|
||||||
<C-q> = :quit<Enter>
|
<C-q> = :prompt 'Quit?' quit<Enter>
|
||||||
<C-z> = :suspend<Enter>
|
|
||||||
|
|
||||||
[messages]
|
[messages]
|
||||||
q = :quit<Enter>
|
q = :quit<Enter>
|
||||||
@ -47,10 +44,6 @@ 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>
|
||||||
@ -80,13 +73,6 @@ 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>
|
||||||
|
|
||||||
@ -128,7 +114,6 @@ $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>
|
||||||
|
@ -1,3 +1,18 @@
|
|||||||
#!/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"
|
||||||
|
@ -1,74 +0,0 @@
|
|||||||
[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
|
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
@ 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 5129a3693c482fcbc5ab99a7706ffc4360b995a0
|
Subproject commit 8aad4396840be7fc42896e3011751b7609ca4119
|
@ -1 +1 @@
|
|||||||
Subproject commit 7d1698f3d88b448e0639974248cc17f49b7b8acf
|
Subproject commit 1bb28df3cfc241b961331f00dcb8d5b45fe3e4f0
|
@ -1 +1 @@
|
|||||||
Subproject commit dc71d94fe223763d28ab49ee3de4fd7081a84891
|
Subproject commit 30492e7e1c9e5af3642e8a74c2f88dc1f50ec305
|
@ -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 = true
|
# unredir-if-possible = false
|
||||||
|
|
||||||
# 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
|
||||||
|
@ -33,7 +33,6 @@ 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) */
|
||||||
@ -59,21 +58,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[] = { "org.mozilla.firefox", NULL };
|
static const char *wwwcmd[] = { "firefox", NULL };
|
||||||
static const char *pwwwcmd[] = { "org.mozilla.firefox", "--private-window", NULL };
|
static const char *pwwwcmd[] = { "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[] = { "vol", "-5", NULL };
|
static const char *lvolcmd[] = { "set-vol", "-5", NULL };
|
||||||
static const char *rvolcmd[] = { "vol", "+5", NULL };
|
static const char *rvolcmd[] = { "set-vol", "+5", NULL };
|
||||||
static const char *mutecmd[] = { "vol", "m", NULL };
|
static const char *mutecmd[] = { "set-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[] = { "light", "-10", NULL };
|
static const char *lbrtcmd[] = { "set-light", "-10", NULL };
|
||||||
static const char *rbrtcmd[] = { "light", "+10", NULL };
|
static const char *rbrtcmd[] = { "set-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 };
|
||||||
@ -109,6 +108,7 @@ 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] } },
|
||||||
|
1704
.config/zsh/.p10k.zsh
Normal file
1704
.config/zsh/.p10k.zsh
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,15 +1,18 @@
|
|||||||
# vim: ft=zsh
|
# vim: ft=zsh
|
||||||
|
|
||||||
autoload -Uz bashcompinit compinit
|
autoload -U bashcompinit compinit colors
|
||||||
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
|
||||||
|
|
||||||
. "$ZDOTDIR/theme.zsh"
|
colors
|
||||||
. "$ZDOTDIR/input.zsh"
|
|
||||||
. /usr/share/fzf/key-bindings.zsh
|
. "$ZDOTDIR/powerlevel10k/powerlevel10k.zsh-theme"
|
||||||
|
. "$ZDOTDIR/.p10k.zsh"
|
||||||
|
#. "$ZDOTDIR/prompt.zsh"
|
||||||
|
. "$ZDOTDIR/inputrc.zsh"
|
||||||
|
|
||||||
for f in "$ZDOTDIR"/aliases/*; do
|
for f in "$ZDOTDIR"/aliases/*; do
|
||||||
. "$f"
|
. "$f"
|
||||||
@ -32,4 +35,24 @@ 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
|
||||||
|
@ -3,84 +3,90 @@
|
|||||||
alias dk='docker'
|
alias dk='docker'
|
||||||
|
|
||||||
## container
|
## container
|
||||||
alias dkc='docker container' \
|
alias dkc='docker container'
|
||||||
dkcc='docker container create' \
|
alias dkcc='docker container create'
|
||||||
dkci='docker container inspect' \
|
alias dkci='docker container inspect'
|
||||||
dkcls='docker container ls' \
|
alias dkcls='docker container ls'
|
||||||
dkclsa='docker container ls -a' \
|
alias dkclsa='docker container ls -a'
|
||||||
dkclsaq='docker container ls -a -q' \
|
alias dkclsaq='docker container ls -a -q'
|
||||||
dkclsq='docker container ls -q' \
|
alias dkclsq='docker container ls -q'
|
||||||
dkcrm!='docker container rm -f' \
|
alias dkcrm!='docker container rm -f'
|
||||||
dkcrm='docker container rm' \
|
alias dkcrm='docker container rm'
|
||||||
dkcsp='docker container stop' \
|
alias dkcsp='docker container stop'
|
||||||
dkcst='docker container restart' \
|
alias dkcst='docker container restart'
|
||||||
dkex='docker container exec -i -t' \
|
alias dkex='docker container exec -i -t'
|
||||||
dklo='docker logs -f' \
|
alias dklo='docker logs -f'
|
||||||
dkr='docker run -i -t' \
|
alias dkr='docker run -i -t'
|
||||||
dktop='docker top'
|
alias dktop='docker top'
|
||||||
|
|
||||||
## image
|
## image
|
||||||
alias dkb='docker build . -t' \
|
alias dkb='docker build . -t'
|
||||||
dki='docker image' \
|
alias dki='docker image'
|
||||||
dkic='docker image create' \
|
alias dkic='docker image create'
|
||||||
dkii='docker image inspect' \
|
alias dkii='docker image inspect'
|
||||||
dkil='docker pull' \
|
alias dkil='docker pull'
|
||||||
dkils='docker image ls' \
|
function dkila() {
|
||||||
dkilsa='docker image ls -a' \
|
readarray -t IMG \
|
||||||
dkilsaq='docker image ls -a -q' \
|
<<< "$(docker image ls | grep -v localhost | awk '{print $1 ":" $2}')"
|
||||||
dkilsq='docker image ls -q' \
|
|
||||||
dkip='docker image push' \
|
docker pull "${IMG[@]}"
|
||||||
dkirm!='docker image rm -f' \
|
}
|
||||||
dkirm='docker image rm' \
|
alias dkils='docker image ls'
|
||||||
dkis='docker image save' \
|
alias dkilsa='docker image ls -a'
|
||||||
dkit='docker image tag'
|
alias dkilsaq='docker image ls -a -q'
|
||||||
|
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'
|
||||||
dkvc='docker volume create' \
|
alias dkvc='docker volume create'
|
||||||
dkvi='docker volume inspect' \
|
alias dkvi='docker volume inspect'
|
||||||
dkvls='docker volume ls' \
|
alias dkvls='docker volume ls'
|
||||||
dkvlsq='docker volume ls -q' \
|
alias dkvlsq='docker volume ls -q'
|
||||||
dkvrm!='docker volume rm -f' \
|
alias dkvrm!='docker volume rm -f'
|
||||||
dkvrm='docker volume rm'
|
alias dkvrm='docker volume rm'
|
||||||
|
|
||||||
## network
|
## network
|
||||||
alias dkn='docker network' \
|
alias dkn='docker network'
|
||||||
dknc='docker network create' \
|
alias dknc='docker network create'
|
||||||
dkni='docker network inspect' \
|
alias dkni='docker network inspect'
|
||||||
dknls='docker network ls' \
|
alias dknls='docker network ls'
|
||||||
dknlsq='docker network ls -q' \
|
alias dknlsq='docker network ls -q'
|
||||||
dknrm!='docker network rm -f' \
|
alias dknrm!='docker network rm -f'
|
||||||
dknrm='docker network rm'
|
alias dknrm='docker network rm'
|
||||||
|
|
||||||
## system
|
## system
|
||||||
alias dksys='docker system' \
|
alias dksys='docker system'
|
||||||
dksysdf='docker system df' \
|
alias dksysdf='docker system df'
|
||||||
dksysp!='docker system prune -f' \
|
alias dksysp!='docker system prune -f'
|
||||||
dksysp='docker system prune'
|
alias dksysp='docker system prune'
|
||||||
|
|
||||||
# compose
|
# compose
|
||||||
alias dc='docker-compose' \
|
alias dc='docker-compose'
|
||||||
dcd='docker-compose down' \
|
alias dcd='docker-compose down'
|
||||||
dcup='docker-compose up' \
|
alias dcup='docker-compose up'
|
||||||
dcupb='docker-compose up --build' \
|
alias dcupb='docker-compose up --build'
|
||||||
dcupd='docker-compose up -d' \
|
alias dcupd='docker-compose up -d'
|
||||||
dcupdb='docker-compose up -d --build'
|
alias dcupdb='docker-compose up -d --build'
|
||||||
|
|
||||||
## container
|
## container
|
||||||
alias dccls='docker-compose ps' \
|
alias dccls='docker-compose ps'
|
||||||
dcclsq='docker-compose ps -q' \
|
alias dcclsq='docker-compose ps -q'
|
||||||
dcex='docker-compose exec' \
|
alias dcex='docker-compose exec'
|
||||||
dcr='docker-compose run --rm' \
|
alias dcr='docker-compose run --rm'
|
||||||
dcrd='docker-compose run -d --rm' \
|
alias dcrd='docker-compose run -d --rm'
|
||||||
dcrm!='docker-compose rm -f' \
|
alias dcrm!='docker-compose rm -f'
|
||||||
dcrm='docker-compose rm' \
|
alias dcrm='docker-compose rm'
|
||||||
dcrmv!='docker-compose rm -v -f' \
|
alias dcrmv!='docker-compose rm -v -f'
|
||||||
dcrmv='docker-compose rm -v' \
|
alias dcrmv='docker-compose rm -v'
|
||||||
dcsp='docker-compose stop' \
|
alias dcsp='docker-compose stop'
|
||||||
dcst='docker-compose restart'
|
alias dcst='docker-compose restart'
|
||||||
|
|
||||||
## image
|
## image
|
||||||
alias dcb!='docker-compose build --no-cache' \
|
alias dcb!='docker-compose build --no-cache'
|
||||||
dcb='docker-compose build' \
|
alias dcb='docker-compose build'
|
||||||
dcl='docker-compose pull'
|
alias dcl='docker-compose pull'
|
||||||
|
@ -6,11 +6,9 @@ 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' \
|
||||||
alias vi='$EDITOR'
|
qcp='qcp -o tabsize=4' \
|
||||||
|
|
||||||
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"' \
|
||||||
@ -23,6 +21,13 @@ 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)"
|
||||||
}
|
}
|
||||||
@ -43,9 +48,8 @@ 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 feh='feh --auto-zoom --scale-down'
|
alias grep='grep --color --exclude-dir={.bzr,.cache,.git,.hg,.idea,.svn,.tox,.venv,.vscode,CVS,node_modules}'
|
||||||
|
|
||||||
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'
|
||||||
|
@ -20,76 +20,76 @@ function grename() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
alias ggpur='ggu' \
|
alias ggpur='ggu'
|
||||||
g='git' \
|
alias g='git'
|
||||||
ga='git add' \
|
alias ga='git add'
|
||||||
gaa='git add --all' \
|
alias gaa='git add --all'
|
||||||
gapa='git add --patch' \
|
alias gapa='git add --patch'
|
||||||
gau='git add --update' \
|
alias gau='git add --update'
|
||||||
gav='git add --verbose' \
|
alias gav='git add --verbose'
|
||||||
gam='git am' \
|
alias gam='git am'
|
||||||
gama='git am --abort' \
|
alias gama='git am --abort'
|
||||||
gamc='git am --continue' \
|
alias gamc='git am --continue'
|
||||||
gamscp='git am --show-current-patch' \
|
alias gamscp='git am --show-current-patch'
|
||||||
gams='git am --skip' \
|
alias gams='git am --skip'
|
||||||
gap='git apply' \
|
alias gap='git apply'
|
||||||
gapt='git apply --3way' \
|
alias gapt='git apply --3way'
|
||||||
gbs='git bisect' \
|
alias gbs='git bisect'
|
||||||
gbsb='git bisect bad' \
|
alias gbsb='git bisect bad'
|
||||||
gbsg='git bisect good' \
|
alias gbsg='git bisect good'
|
||||||
gbsn='git bisect new' \
|
alias gbsn='git bisect new'
|
||||||
gbso='git bisect old' \
|
alias gbso='git bisect old'
|
||||||
gbsr='git bisect reset' \
|
alias gbsr='git bisect reset'
|
||||||
gbss='git bisect start' \
|
alias gbss='git bisect start'
|
||||||
gbl='git blame -w' \
|
alias gbl='git blame -w'
|
||||||
gb='git branch' \
|
alias gb='git branch'
|
||||||
gba='git branch --all' \
|
alias gba='git branch --all'
|
||||||
gbd='git branch --delete' \
|
alias gbd='git branch --delete'
|
||||||
gbD='git branch --delete --force'
|
alias 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'
|
||||||
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'
|
||||||
gbm='git branch --move' \
|
alias gbm='git branch --move'
|
||||||
gbnm='git branch --no-merged' \
|
alias gbnm='git branch --no-merged'
|
||||||
gbr='git branch --remote' \
|
alias gbr='git branch --remote'
|
||||||
ggsup='git branch --set-upstream-to=origin/$(current_branch)' \
|
alias ggsup='git branch --set-upstream-to=origin/$(current_branch)'
|
||||||
gbg='LANG=C git branch -vv | grep ": gone\]"' \
|
alias gbg='LANG=C git branch -vv | grep ": gone\]"'
|
||||||
gco='git checkout' \
|
alias gco='git checkout'
|
||||||
gcor='git checkout --recurse-submodules' \
|
alias gcor='git checkout --recurse-submodules'
|
||||||
gcb='git checkout -b' \
|
alias gcb='git checkout -b'
|
||||||
gcp='git cherry-pick' \
|
alias gcp='git cherry-pick'
|
||||||
gcpa='git cherry-pick --abort' \
|
alias gcpa='git cherry-pick --abort'
|
||||||
gcpc='git cherry-pick --continue' \
|
alias gcpc='git cherry-pick --continue'
|
||||||
gclean='git clean --interactive -d' \
|
alias gclean='git clean --interactive -d'
|
||||||
gcl='git clone --recurse-submodules'
|
alias 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'
|
||||||
gcas='git commit --all --signoff' \
|
alias gcas='git commit --all --signoff'
|
||||||
gcasm='git commit --all --signoff --message' \
|
alias gcasm='git commit --all --signoff --message'
|
||||||
gcs='git commit --gpg-sign' \
|
alias gcs='git commit --gpg-sign'
|
||||||
gcss='git commit --gpg-sign --signoff' \
|
alias gcss='git commit --gpg-sign --signoff'
|
||||||
gcssm='git commit --gpg-sign --signoff --message' \
|
alias gcssm='git commit --gpg-sign --signoff --message'
|
||||||
gcmsg='git commit --message' \
|
alias gcmsg='git commit --message'
|
||||||
gcsm='git commit --signoff --message' \
|
alias gcsm='git commit --signoff --message'
|
||||||
gc='git commit --verbose' \
|
alias gc='git commit --verbose'
|
||||||
gca='git commit --verbose --all' \
|
alias gca='git commit --verbose --all'
|
||||||
gca!='git commit --verbose --all --amend' \
|
alias gca!='git commit --verbose --all --amend'
|
||||||
gcan!='git commit --verbose --all --no-edit --amend' \
|
alias gcan!='git commit --verbose --all --no-edit --amend'
|
||||||
gcans!='git commit --verbose --all --signoff --no-edit --amend' \
|
alias gcans!='git commit --verbose --all --signoff --no-edit --amend'
|
||||||
gc!='git commit --verbose --amend' \
|
alias gc!='git commit --verbose --amend'
|
||||||
gcn!='git commit --verbose --no-edit --amend' \
|
alias gcn!='git commit --verbose --no-edit --amend'
|
||||||
gcf='git config --list' \
|
alias gcf='git config --list'
|
||||||
gdct='git describe --tags $(git rev-list --tags --max-count=1)' \
|
alias gdct='git describe --tags $(git rev-list --tags --max-count=1)'
|
||||||
gd='git diff' \
|
alias gd='git diff'
|
||||||
gdca='git diff --cached' \
|
alias gdca='git diff --cached'
|
||||||
gdcw='git diff --cached --word-diff' \
|
alias gdcw='git diff --cached --word-diff'
|
||||||
gds='git diff --staged' \
|
alias gds='git diff --staged'
|
||||||
gdw='git diff --word-diff'
|
alias 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'
|
||||||
gf='git fetch'
|
alias 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'
|
||||||
gfo='git fetch origin' \
|
alias gfo='git fetch origin'
|
||||||
gg='git gui citool' \
|
alias gg='git gui citool'
|
||||||
gga='git gui citool --amend' \
|
alias gga='git gui citool --amend'
|
||||||
ghh='git help' \
|
alias ghh='git help'
|
||||||
glgg='git log --graph' \
|
alias glgg='git log --graph'
|
||||||
glgga='git log --graph --decorate --all' \
|
alias glgga='git log --graph --decorate --all'
|
||||||
glgm='git log --graph --max-count=10' \
|
alias glgm='git log --graph --max-count=10'
|
||||||
glods='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset" --date=short' \
|
alias glods='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset" --date=short'
|
||||||
glod='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset"' \
|
alias glod='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset"'
|
||||||
glola='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset" --all' \
|
alias glola='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset" --all'
|
||||||
glols='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset" --stat' \
|
alias glols='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset" --stat'
|
||||||
glol='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset"' \
|
alias glol='git log --graph --pretty="%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset"'
|
||||||
glo='git log --oneline --decorate' \
|
alias glo='git log --oneline --decorate'
|
||||||
glog='git log --oneline --decorate --graph' \
|
alias glog='git log --oneline --decorate --graph'
|
||||||
gloga='git log --oneline --decorate --graph --all'
|
alias 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'
|
||||||
glg='git log --stat' \
|
alias glg='git log --stat'
|
||||||
glgp='git log --stat --patch' \
|
alias glgp='git log --stat --patch'
|
||||||
gignored='git ls-files -v | grep "^[[:lower:]]"' \
|
alias gignored='git ls-files -v | grep "^[[:lower:]]"'
|
||||||
gfg='git ls-files | grep' \
|
alias gfg='git ls-files | grep'
|
||||||
gmr='git merge' \
|
alias gmr='git merge'
|
||||||
gmra='git merge --abort' \
|
alias gmra='git merge --abort'
|
||||||
gmrs="git merge --squash" \
|
alias gmrs="git merge --squash"
|
||||||
gmrtl='git mergetool --no-prompt' \
|
alias gmrtl='git mergetool --no-prompt'
|
||||||
gmrtlvim='git mergetool --no-prompt --tool=vimdiff'
|
alias gmrtlvim='git mergetool --no-prompt --tool=vimdiff'
|
||||||
|
|
||||||
alias gl='git pull' \
|
alias gl='git pull'
|
||||||
gpr='git pull --rebase' \
|
alias gpr='git pull --rebase'
|
||||||
gprv='git pull --rebase -v' \
|
alias gprv='git pull --rebase -v'
|
||||||
gpra='git pull --rebase --autostash' \
|
alias gpra='git pull --rebase --autostash'
|
||||||
gprav='git pull --rebase --autostash -v'
|
alias 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)'
|
||||||
gp='git push' \
|
alias gp='git push'
|
||||||
gpd='git push --dry-run'
|
alias 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'
|
||||||
gpf='git push --force-with-lease --force-if-includes'
|
alias 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)'
|
||||||
gpsupf='git push --set-upstream origin $(current_branch) --force-with-lease --force-if-includes' \
|
alias gpsupf='git push --set-upstream origin $(current_branch) --force-with-lease --force-if-includes'
|
||||||
gpv='git push --verbose' \
|
alias gpv='git push --verbose'
|
||||||
gpoat='git push origin --all && git push origin --tags' \
|
alias gpoat='git push origin --all && git push origin --tags'
|
||||||
gpod='git push origin --delete' \
|
alias gpod='git push origin --delete'
|
||||||
ggpush='git push origin "$(current_branch)"' \
|
alias ggpush='git push origin "$(current_branch)"'
|
||||||
gpu='git push upstream' \
|
alias gpu='git push upstream'
|
||||||
grb='git rebase' \
|
alias grb='git rebase'
|
||||||
grba='git rebase --abort' \
|
alias grba='git rebase --abort'
|
||||||
grbc='git rebase --continue' \
|
alias grbc='git rebase --continue'
|
||||||
grbi='git rebase --interactive' \
|
alias grbi='git rebase --interactive'
|
||||||
grbo='git rebase --onto' \
|
alias grbo='git rebase --onto'
|
||||||
grbs='git rebase --skip' \
|
alias grbs='git rebase --skip'
|
||||||
gr='git remote' \
|
alias gr='git remote'
|
||||||
grv='git remote --verbose' \
|
alias grv='git remote --verbose'
|
||||||
gra='git remote add' \
|
alias gra='git remote add'
|
||||||
grrm='git remote remove' \
|
alias grrm='git remote remove'
|
||||||
grmv='git remote rename' \
|
alias grmv='git remote rename'
|
||||||
grset='git remote set-url' \
|
alias grset='git remote set-url'
|
||||||
grup='git remote update' \
|
alias grup='git remote update'
|
||||||
grh='git reset' \
|
alias grh='git reset'
|
||||||
gru='git reset --' \
|
alias gru='git reset --'
|
||||||
grhh='git reset --hard' \
|
alias grhh='git reset --hard'
|
||||||
grhk='git reset --keep' \
|
alias grhk='git reset --keep'
|
||||||
grhs='git reset --soft' \
|
alias grhs='git reset --soft'
|
||||||
gpristine='git reset --hard && git clean --force -dfx' \
|
alias gpristine='git reset --hard && git clean --force -dfx'
|
||||||
groh='git reset origin/$(current_branch) --hard' \
|
alias groh='git reset origin/$(current_branch) --hard'
|
||||||
grs='git restore' \
|
alias grs='git restore'
|
||||||
grss='git restore --source' \
|
alias grss='git restore --source'
|
||||||
grst='git restore --staged' \
|
alias grst='git restore --staged'
|
||||||
grev='git revert' \
|
alias grev='git revert'
|
||||||
grm='git rm' \
|
alias grm='git rm'
|
||||||
grmc='git rm --cached' \
|
alias grmc='git rm --cached'
|
||||||
grt='cd "$(git rev-parse --show-toplevel || echo .)"' \
|
alias grt='cd "$(git rev-parse --show-toplevel || echo .)"'
|
||||||
gcount='git shortlog --summary --numbered' \
|
alias gcount='git shortlog --summary --numbered'
|
||||||
gsh='git show' \
|
alias gsh='git show'
|
||||||
gsps='git show --pretty=short --show-signature' \
|
alias gsps='git show --pretty=short --show-signature'
|
||||||
gstall='git stash --all' \
|
alias gstall='git stash --all'
|
||||||
gstaa='git stash apply' \
|
alias gstaa='git stash apply'
|
||||||
gstc='git stash clear' \
|
alias gstc='git stash clear'
|
||||||
gstd='git stash drop' \
|
alias gstd='git stash drop'
|
||||||
gstl='git stash list' \
|
alias gstl='git stash list'
|
||||||
gstp='git stash pop' \
|
alias gstp='git stash pop'
|
||||||
gsta='git stash push' \
|
alias gsta='git stash push'
|
||||||
gsts='git stash show --patch' \
|
alias gsts='git stash show --patch'
|
||||||
gst='git status' \
|
alias gst='git status'
|
||||||
gss='git status --short' \
|
alias gss='git status --short'
|
||||||
gsb='git status --short --branch' \
|
alias gsb='git status --short --branch'
|
||||||
gsi='git submodule init' \
|
alias gsi='git submodule init'
|
||||||
gsu='git submodule update' \
|
alias gsu='git submodule update'
|
||||||
gsw='git switch' \
|
alias gsw='git switch'
|
||||||
gswc='git switch --create' \
|
alias gswc='git switch --create'
|
||||||
gta='git tag --annotate' \
|
alias gta='git tag --annotate'
|
||||||
gts='git tag --sign' \
|
alias gts='git tag --sign'
|
||||||
gtv='git tag | sort -V' \
|
alias gtv='git tag | sort -V'
|
||||||
gignore='git update-index --assume-unchanged' \
|
alias gignore='git update-index --assume-unchanged'
|
||||||
gunignore='git update-index --no-assume-unchanged' \
|
alias gunignore='git update-index --no-assume-unchanged'
|
||||||
gwch='git whatchanged -p --abbrev-commit --pretty=medium' \
|
alias gwch='git whatchanged -p --abbrev-commit --pretty=medium'
|
||||||
gwt='git worktree' \
|
alias gwt='git worktree'
|
||||||
gwta='git worktree add' \
|
alias gwta='git worktree add'
|
||||||
gwtls='git worktree list' \
|
alias gwtls='git worktree list'
|
||||||
gwtmv='git worktree move' \
|
alias gwtmv='git worktree move'
|
||||||
gwtrm='git worktree remove' \
|
alias gwtrm='git worktree remove'
|
||||||
gstu='gsta --include-untracked' \
|
alias gstu='gsta --include-untracked'
|
||||||
gtl='gtl(){ git tag --sort=-v:refname -n --list "${1}*" }; noglob gtl'
|
alias gtl='gtl(){ git tag --sort=-v:refname -n --list "${1}*" }; noglob gtl'
|
||||||
|
File diff suppressed because it is too large
Load Diff
8503
.config/zsh/completions/_git
Normal file
8503
.config/zsh/completions/_git
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,93 +0,0 @@
|
|||||||
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
|
|
313
.config/zsh/inputrc.zsh
Normal file
313
.config/zsh/inputrc.zsh
Normal file
@ -0,0 +1,313 @@
|
|||||||
|
# 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
.config/zsh/powerlevel10k
Submodule
1
.config/zsh/powerlevel10k
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit da9b03777c4f2390c7e3f5c720ee4689336f811b
|
47
.config/zsh/prompt.zsh
Normal file
47
.config/zsh/prompt.zsh
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
# 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"
|
||||||
|
}
|
@ -1,66 +0,0 @@
|
|||||||
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
3
.gitmodules
vendored
@ -10,3 +10,6 @@
|
|||||||
[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
|
||||||
|
4
.mozilla/firefox/ange/chrome/userChrome.css
Normal file
4
.mozilla/firefox/ange/chrome/userChrome.css
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#unified-extensions-button, #unified-extensions-button > .toolbarbutton-icon{
|
||||||
|
width: 0px !important;
|
||||||
|
padding: 0px !important;
|
||||||
|
}
|
40
.mozilla/firefox/ange/user.js
Normal file
40
.mozilla/firefox/ange/user.js
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
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);
|
11
.mozilla/firefox/profiles.ini
Normal file
11
.mozilla/firefox/profiles.ini
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[General]
|
||||||
|
Version=2
|
||||||
|
|
||||||
|
[Install4F96D1932A9F858E]
|
||||||
|
Default=ange
|
||||||
|
Locked=1
|
||||||
|
|
||||||
|
[Profile0]
|
||||||
|
Name=ange
|
||||||
|
IsRelative=1
|
||||||
|
Path=ange
|
3
.xinitrc
3
.xinitrc
@ -14,7 +14,4 @@ picom &
|
|||||||
gammastep &
|
gammastep &
|
||||||
sbar &
|
sbar &
|
||||||
|
|
||||||
xset s 600 15
|
|
||||||
xset dpms 616 616 616
|
|
||||||
|
|
||||||
exec dwm
|
exec dwm
|
||||||
|
3
.zshenv
3
.zshenv
@ -28,9 +28,8 @@ path=(
|
|||||||
$path
|
$path
|
||||||
)
|
)
|
||||||
|
|
||||||
export BROWSER=org.mozilla.firefox
|
export BROWSER=firefox
|
||||||
export EDITOR=nvim
|
export EDITOR=nvim
|
||||||
export VISUAL=nvim
|
export VISUAL=nvim
|
||||||
export PAGER=less
|
|
||||||
|
|
||||||
export MAKEFLAGS='-j'
|
export MAKEFLAGS='-j'
|
||||||
|
@ -5,4 +5,5 @@
|
|||||||
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
|
||||||
|
15
bin/sbar
15
bin/sbar
@ -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 dev=wlan0
|
local sig ssid
|
||||||
|
|
||||||
sig="$(awk "/$dev/{print int(\$3)}" /proc/net/wireless)"
|
sig="$(awk '/^wlp/ {print int($3)}' /proc/net/wireless)"
|
||||||
if [ -z "$sig" ]; then
|
if [ -z "$sig" ]; then
|
||||||
wlp='⚠'
|
wlp='⚠'
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
ssid="$(networkctl status "$dev" | grep -Po 'Wi-Fi access point:\s*\K\w+')"
|
ssid="$(nmcli device wifi show-password | sed -n 's/^SSID:\s*//p')"
|
||||||
{ [ "$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,9 +83,8 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# SIGNALING
|
# SIGNALING
|
||||||
# trap '<function>;display;wait' 'RTMIN+n'
|
# trap '<function>;display' 'RTMIN+n'
|
||||||
trap 'update_sink_vol;display;wait' 'RTMIN'
|
trap 'update_sink_vol;display' '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
|
||||||
@ -108,5 +107,5 @@ while true; do
|
|||||||
}
|
}
|
||||||
sec="$((sec + 10))"
|
sec="$((sec + 10))"
|
||||||
}
|
}
|
||||||
awk "@load \"time\"; BEGIN {d=10; s=$(date '+%S.%N'); sleep(d - s % d)}" &
|
awk '@load "time"; BEGIN {d=10; s=system("date \"+%S.%N\""); sleep(d - s % d)}' &
|
||||||
done
|
done
|
||||||
|
13
bin/wlp
13
bin/wlp
@ -1,13 +0,0 @@
|
|||||||
#!/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
|
|
Loading…
Reference in New Issue
Block a user