-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: split
.zshrc
to individual files
split `$XDG_CONFIG_HOME/zsh/.zshrc` up into `$XDG_CONFIG_HOME/zsh/.zshrc.d/*`. This allows for better management and prioritization between different tool's env. Similar to what was done to `.profile` in e712243 (feat: split `.profile` to individual files, 2023-02-10).
- Loading branch information
Showing
20 changed files
with
107 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/zsh | ||
# vim:ft=sh | ||
|
||
alias top="btm --basic" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/zsh | ||
# vim:ft=sh | ||
|
||
alias dexec="docker exec -it" | ||
alias dps="docker ps" | ||
alias dc="docker compose" | ||
alias dce="docker compose exec" | ||
alias dcps="docker compose ps" | ||
alias dcls="docker compose ls" | ||
alias dcdn="docker compose down" | ||
alias dcup="docker compose up" | ||
alias dcupd="docker compose up -d" | ||
alias dcl="docker compose logs" | ||
alias dclf="docker compose logs -f" | ||
alias dct="docker context" | ||
alias dcu="docker context use" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/zsh | ||
# vim: ft=sh | ||
|
||
_fzf_compgen_path() { | ||
fd --hidden --follow --exclude ".git" . "$1" | ||
} | ||
|
||
_fzf_compgen_dir() { | ||
fd --type d --hidden --follow --exclude ".git" . "$1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/sh | ||
|
||
need() { | ||
for need_cmd in "$@"; do | ||
if ! command -v "$need_cmd" >/dev/null 2>&1; then | ||
printf "live-grep: command not found: %s\n" "$need_cmd" >&2 | ||
exit 1 | ||
fi | ||
done | ||
} | ||
|
||
need "rg" "bat" | ||
|
||
INITIAL_QUERY="${*:-}" | ||
RG_PREFIX="rg --column --line-number --no-heading --color=always --smart-case " | ||
PREVIEW_CMD='bat --color=always {1} --highlight-line {2} 2>/dev/null || bat --color=always {}' | ||
INITIAL_CMD="$RG_PREFIX --files" | ||
|
||
if [ $# -gt 0 ]; then | ||
INITIAL_CMD="$RG_PREFIX '$INITIAL_QUERY'" | ||
fi | ||
|
||
# shellcheck disable=2046 | ||
set -- $( | ||
FZF_DEFAULT_COMMAND="$INITIAL_CMD" fzf \ | ||
--ansi --color="hl:-1:underline,hl+:-1:underline:reverse" \ | ||
--bind="change:reload:sleep 0.1; [ -n {q} ] && ($RG_PREFIX {q} || true) || $RG_PREFIX --files" \ | ||
--disabled --query="$INITIAL_QUERY" --delimiter=":" \ | ||
--preview="$PREVIEW_CMD" --preview-window='up,60%,border-bottom,+{2}+3/3,~3' | ||
) | ||
|
||
if [ $# -gt 0 ]; then | ||
xdg-open "$1" "+$2" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/zsh | ||
# vim:ft=sh | ||
|
||
alias unlock='echo "" | gpg --clearsign 1>/dev/null && ssh localhost -- : 1>/dev/null' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
|
||
SHELDON_PROFILE="$(uname -r 2>/dev/null | rev | cut -d- -f1 | rev)" | ||
export SHELDON_PROFILE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/zsh | ||
|
||
source <(sheldon source) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/zsh | ||
|
||
source <(starship init zsh) |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/zsh | ||
# vim:ft=sh | ||
|
||
alias tlmgr='/usr/share/texmf-dist/scripts/texlive/tlmgr.pl --usermode' |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/zsh | ||
# vim:ft=sh | ||
|
||
alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"' |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/zsh | ||
# vim:ft=sh | ||
|
||
bindkey '^ ' autosuggest-accept | ||
bindkey -M vicmd '^ ' autosuggest-accept | ||
|
||
export ZSH_AUTOSUGGEST_STRATEGY=(match_prev_cmd completion) | ||
export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#4f4738" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/zsh | ||
# vim:ft=sh | ||
|
||
export ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern line) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters