fix(nix): zsh plugin
This commit is contained in:
parent
58aadf500a
commit
03cea9482a
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
|
|
||||||
install_if_not_exists() {
|
install_if_not_exists() {
|
||||||
local path="${HOME}/.config/zsh/plugins/${1}"
|
local dir="${HOME}/.local/share/zsh/plugins/${1}"
|
||||||
if [ ! -d "${path}" ]; then
|
if [ ! -d "${dir}" ]; then
|
||||||
/usr/bin/git clone "https://github.com/${1}" "${path}"
|
/usr/bin/env git clone "https://github.com/${1}" "${dir}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,26 +1,8 @@
|
|||||||
|
|
||||||
# set a fancy prompt (non-color, unless we know we "want" color)
|
|
||||||
case "$TERM" in
|
case "$TERM" in
|
||||||
xterm-color|*-256color) color_prompt=yes;;
|
xterm-color|*-256color) color_prompt=yes;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# uncomment for a colored prompt, if the terminal has the capability; turned
|
|
||||||
# off by default to not distract the user: the focus in a terminal window
|
|
||||||
# should be on the output of commands, not on the prompt
|
|
||||||
force_color_prompt=yes
|
|
||||||
|
|
||||||
if [ -n "$force_color_prompt" ]; then
|
|
||||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
|
||||||
# We have color support; assume it's compliant with Ecma-48
|
|
||||||
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
|
||||||
# a case would tend to support setf rather than setaf.)
|
|
||||||
color_prompt=yes
|
|
||||||
else
|
|
||||||
color_prompt=
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
setopt prompt_subst
|
setopt prompt_subst
|
||||||
autoload -Uz vcs_info
|
autoload -Uz vcs_info
|
||||||
zstyle ':vcs_info:*' enable git cvs svn
|
zstyle ':vcs_info:*' enable git cvs svn
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
# vim: ft=zsh
|
# vim: ft=zsh
|
||||||
|
|
||||||
_so() {
|
_so() {
|
||||||
[ -r "${1}" ] && [ -f "${1}" ] && source "${1}"
|
[ -r "${1}" ] && [ -e "${1}" ] && source "${1}"
|
||||||
}
|
}
|
||||||
|
|
||||||
_sod() {
|
_sod() {
|
||||||
@ -18,6 +18,7 @@ _sod() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
_so "/etc/profile"
|
||||||
source "${ZDOTDIR}/options"
|
source "${ZDOTDIR}/options"
|
||||||
source "${ZDOTDIR}/completion"
|
source "${ZDOTDIR}/completion"
|
||||||
source "${ZDOTDIR}/history"
|
source "${ZDOTDIR}/history"
|
||||||
@ -25,7 +26,6 @@ source "${ZDOTDIR}/prompt"
|
|||||||
source "${ZDOTDIR}/other"
|
source "${ZDOTDIR}/other"
|
||||||
source "${ZDOTDIR}/aliases"
|
source "${ZDOTDIR}/aliases"
|
||||||
source "${ZDOTDIR}/functions"
|
source "${ZDOTDIR}/functions"
|
||||||
_so "/etc/profile"
|
|
||||||
|
|
||||||
_so "${ZDOTDIR}/hosts/${HOST}"
|
_so "${ZDOTDIR}/hosts/${HOST}"
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
man mpv noto-fonts p7zip poppler resvg ripgrep rofi slurp
|
man mpv noto-fonts p7zip poppler resvg ripgrep rofi slurp
|
||||||
socat sway swaybg swayidle swaylock tmux tree-sitter ueberzug
|
socat sway swaybg swayidle swaylock tmux tree-sitter ueberzug
|
||||||
waybar wget wl-clipboard wlr-randr wtype yazi ydotool zoxide
|
waybar wget wl-clipboard wlr-randr wtype yazi ydotool zoxide
|
||||||
docker httpie
|
docker httpie home-manager
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user