summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkj_sh6042025-12-25 21:58:41 -0500
committerkj_sh6042025-12-25 21:58:41 -0500
commitb5f983331fc6ebfde8786427a045de19b1faf190 (patch)
tree631e0a7730b179e1ca37d7607d1abb9e7dca0dcf
parentd51bb89e203f03e346bf778ee54fbc82c974a59a (diff)
refactor: update zsh config
-rw-r--r--.config/shell/.zshrc65
1 files changed, 31 insertions, 34 deletions
diff --git a/.config/shell/.zshrc b/.config/shell/.zshrc
index 85b52c6..7fc291b 100644
--- a/.config/shell/.zshrc
+++ b/.config/shell/.zshrc
@@ -29,38 +29,33 @@ HISTSIZE=9999999
29SAVEHIST=9999999 29SAVEHIST=9999999
30 30
31# aliases 31# aliases
32 # conditionally alias alternative applications if installed 32 # conditionally alias alternative applications/flags if available
33 command which eza >/dev/null 2>&1 && alias ls="eza" 33 command which eza >/dev/null 2>&1 && alias ls="eza"
34 command which alsi >/dev/null 2>&1 && alias neofetch="alsi" 34 command which alsi >/dev/null 2>&1 && alias neofetch="alsi"
35 35 command grep --color=auto --version >/dev/null 2>&1 && alias grep='grep --color=auto'
36 # personal aliases 36
37 # alias echo=(command which echo) 37 # personal abbreviations
38 # alias printf=(command which printf) 38 abbr -S --quiet S="cd ~/.local/bin && ls"
39 alias S="cd ~/.local/bin && ls" 39 abbr -S --quiet c="cal"
40 alias c="cal" 40 abbr -S --quiet d="disown"
41 alias d="disown" 41 abbr -S --quiet dots="cd ~/.local/share/.dotfiles/"
42 alias dots="cd ~/.local/share/.dotfiles/" 42 abbr -S --quiet ks="killall screen"
43 alias egrep='grep -E' 43 abbr -S --quiet la='ls -lah'
44 alias fgrep='grep -F' 44 abbr -S --quiet lgit="lazygit"
45 alias grep='grep --color=auto' 45 abbr -S --quiet p="paru"
46 alias ks="killall screen" 46 abbr -S --quiet pu="paru -Syu --noconfirm"
47 alias la='ls -lah' 47 abbr -S --quiet s="screen"
48 alias lgit="lazygit" 48 abbr -S --quiet sls="screen -ls"
49 alias p="paru" 49 abbr -S --quiet sr="screen -r"
50 alias pu="paru -Syu --noconfirm" 50 abbr -S --quiet t="timedatectl"
51 alias s="screen" 51 abbr -S --quiet uncommit="git reset --soft HEAD^"
52 alias sls="screen -ls" 52 abbr -S --quiet x="startx"
53 alias sr="screen -r" 53
54 alias t="timedatectl" 54 # youtube-dl abbreviations
55 alias uncommit="git reset --soft HEAD^" 55 abbr -S --quiet yt-best="youtube-dl -cif 'bestvideo+bestaudio/best'"
56 alias w="curl wttr.in" 56 abbr -S --quiet yt-m4a="youtube-dl -cif 'bestaudio[ext=m4a]'"
57 alias x="startx" 57 abbr -S --quiet yt-mp4="youtube-dl -cif 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best'"
58 58 abbr -S --quiet yt-webm="youtube-dl -cif 'bestvideo[ext=webm]+bestaudio[ext=webm]/best[ext=webm]/best'"
59 # youtube-dl aliases
60 alias yt-best="youtube-dl -cif 'bestvideo+bestaudio/best'"
61 alias yt-m4a="youtube-dl -cif 'bestaudio[ext=m4a]'"
62 alias yt-mp4="youtube-dl -cif 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best'"
63 alias yt-webm="youtube-dl -cif 'bestvideo[ext=webm]+bestaudio[ext=webm]/best[ext=webm]/best'"
64 59
65# pfetch stuff 60# pfetch stuff
66export PF_INFO="ascii title os kernel uptime pkgs memory" 61export PF_INFO="ascii title os kernel uptime pkgs memory"
@@ -88,11 +83,13 @@ bindkey -M menuselect 'l' vi-forward-char
88bindkey -M menuselect 'j' vi-down-line-or-history 83bindkey -M menuselect 'j' vi-down-line-or-history
89bindkey -v '^?' backward-delete-char 84bindkey -v '^?' backward-delete-char
90 85
91# edit line in vim with ctrl-e 86# edit line in vim with ctrl-x ctrl-e or ctrl-x e
92autoload edit-command-line; zle -N edit-command-line 87autoload edit-command-line; zle -N edit-command-line
93bindkey '^e' edit-command-line 88bindkey '^x^e' edit-command-line
89bindkey '^xe' edit-command-line
94bindkey -M vicmd '^[[P' vi-delete-char 90bindkey -M vicmd '^[[P' vi-delete-char
95bindkey -M vicmd '^e' edit-command-line 91bindkey -M vicmd '^x^e' edit-command-line
92bindkey -M vicmd '^xe' edit-command-line
96bindkey -M visual '^[[P' vi-delete 93bindkey -M visual '^[[P' vi-delete
97 94
98# cursor shape settings for vi modes 95# cursor shape settings for vi modes
@@ -136,4 +133,4 @@ bindkey "^b" backward-word
136bindkey "^[[A" history-substring-search-up 133bindkey "^[[A" history-substring-search-up
137bindkey "^[[B" history-substring-search-down 134bindkey "^[[B" history-substring-search-down
138bindkey -M vicmd "k" history-substring-search-up 135bindkey -M vicmd "k" history-substring-search-up
139bindkey -M vicmd "j" history-substring-search-down 136bindkey -M vicmd "j" history-substring-search-down \ No newline at end of file