Updates for aliases and rc.d.
This commit is contained in:
parent
96d9c8db4b
commit
6c49e78867
|
|
@ -125,14 +125,14 @@ cat >"${ALIAS_FILE}" <<-'EOF'
|
|||
}
|
||||
EOF
|
||||
|
||||
ALIAS_FILE="${DEST}/${ALIAS_DIR}/003_local.sh"
|
||||
ALIAS_FILE="${DEST}/${ALIAS_DIR}/003_local.zsh"
|
||||
cat >"${ALIAS_FILE}" <<-'EOF'
|
||||
alias baobab='dbus-run-session baobab'
|
||||
alias bc='bc -lq'
|
||||
alias leech="wget -e robots=off -c -r --level=0 -nc -np --random-wait"
|
||||
alias less="less -R"
|
||||
#alias mpv='mpv --ao=alsa --force-window -af "crossfeed=strength=0.2:range=0.5:slope=0.5:level_in=0.9:level_out=1:block_size=1024"'
|
||||
alias mpv='mpv --ao=pipewire --pipewire-buffer=47 --force-window'
|
||||
#alias mpv='mpv --ao=pipewire --pipewire-buffer=47 --force-window'
|
||||
alias odc='~/bin/odysee-dl_low.sh hls-215'
|
||||
alias pastebinit='pastebinit -b paste.debian.net'
|
||||
alias plocate='plocate --existing --basename --ignore-case'
|
||||
|
|
@ -154,17 +154,26 @@ cat >"${ALIAS_FILE}" <<-'EOF'
|
|||
alias ytfzf='ytfzf --ytdl-pref=18'
|
||||
EOF
|
||||
|
||||
ALIAS_FILE="${DEST}/${ALIAS_DIR}/004_iotop.sh"
|
||||
ALIAS_FILE="${DEST}/${ALIAS_DIR}/001_editor.zsh"
|
||||
cat >"${ALIAS_FILE}" <<EOF
|
||||
if [ -x /usr/bin/nvim ]; then
|
||||
alias vi="/usr/bin/nvim"
|
||||
alias vim="/usr/bin/nvim"
|
||||
export EDITOR="/usr/bin/nvim"
|
||||
fi
|
||||
EOF
|
||||
|
||||
ALIAS_FILE="${DEST}/${ALIAS_DIR}/004_iotop.zsh"
|
||||
cat >"${ALIAS_FILE}" <<-'EOF'
|
||||
alias iotop='bash -c "sudo sysctl kernel.task_delayacct=1 && sudo iotop ; sudo sysctl kernel.task_delayacct=0"'
|
||||
EOF
|
||||
|
||||
ALIAS_FILE="${DEST}/${ALIAS_DIR}/004_docker_path.sh"
|
||||
ALIAS_FILE="${DEST}/${ALIAS_DIR}/004_docker_path.zsh"
|
||||
cat <<-EOF | tee "${ALIAS_FILE}"
|
||||
export PATH=$PATH:/usr/libexec/docker/cli-plugins
|
||||
EOF
|
||||
|
||||
ALIAS_FILE="${DEST}/${ALIAS_DIR}/004_cargo-path.sh"
|
||||
ALIAS_FILE="${DEST}/${ALIAS_DIR}/004_cargo-path.zsh"
|
||||
cat <<-EOF | tee "${ALIAS_FILE}"
|
||||
export PATH=$PATH:${HOME}/.cargo/bin
|
||||
EOF
|
||||
|
|
|
|||
|
|
@ -260,28 +260,34 @@ cat <<-EOF | tee "${DEST}"/.zgen-local-plugins
|
|||
zgenom save
|
||||
EOF
|
||||
|
||||
# Dedup path
|
||||
cat <<-EOF | tee "${DEST}/${ALIAS_DIR}/zzz_dedup_path.zsh"
|
||||
# Dedup the path, auto installers help themselves to you config files.'
|
||||
typeset -U path
|
||||
EOF
|
||||
|
||||
# prevent update
|
||||
cat <<-EOF | tee "${DEST}"/"${ALIAS_DIR}"/001_quickstart-refresh.zsh
|
||||
cat <<-EOF | tee "${DEST}/${ALIAS_DIR}/001_quickstart-refresh.zsh"
|
||||
# Use unset 'QUICKSTART_KIT_REFRESH_IN_DAYS' to disable.'
|
||||
# QUICKSTART_KIT_REFRESH_IN_DAYS=0'
|
||||
unset "QUICKSTART_KIT_REFRESH_IN_DAYS"
|
||||
EOF
|
||||
|
||||
#
|
||||
echo '# zgenom autoupdate' >"${DEST}"/"${ALIAS_DIR}"/001_zgenom-refresh.zsh
|
||||
echo '# zgenom autoupdate' >"${DEST}/${ALIAS_DIR}/001_zgenom-refresh.zsh"
|
||||
|
||||
# oh-my-zsh disable update check
|
||||
echo 'DISABLE_AUTO_UPDATE="true"' >"${DEST}"/"${ALIAS_DIR}"/001_auto-update-off.zsh
|
||||
echo 'DISABLE_AUTO_UPDATE="true"' >"${DEST}/${ALIAS_DIR}/001_auto-update-off.zsh"
|
||||
|
||||
# sed -i 's,^\(export LOCATE_PATH=\).*,\1'/var/lib/mlocate/mlocate.db',' ~/.zshrc
|
||||
|
||||
# Use powerline-daemon to speedup the prompt.
|
||||
echo 'powerline-daemon -q' >"${DEST}"/"${ALIAS_DIR}"/006_powerline-daemon.zsh
|
||||
echo 'powerline-daemon -q' >"${DEST}/${ALIAS_DIR}/006_powerline-daemon.zsh"
|
||||
|
||||
sudo sed -i 's,^\(CHARMAP=\).*,\1'\"UTF-8\"',' /etc/default/console-setup
|
||||
|
||||
# set theme for zsh
|
||||
cat <<-EOF | tee "${DEST}"/"${ALIAS_DIR}"/002_theme.zsh
|
||||
cat <<-EOF | tee "${DEST}/${ALIAS_DIR}/002_theme.zsh"
|
||||
# https://zshthem.es/browse-zsh-themes/
|
||||
ZSH_THEME="agnoster" # powerline based theme
|
||||
#ZSH_THEME="3den"
|
||||
|
|
@ -289,13 +295,13 @@ cat <<-EOF | tee "${DEST}"/"${ALIAS_DIR}"/002_theme.zsh
|
|||
EOF
|
||||
|
||||
# set colorize tool
|
||||
cat <<-EOF | tee "${DEST}"/"${ALIAS_DIR}"/003_colorize.zsh
|
||||
cat <<-EOF | tee "${DEST}/${ALIAS_DIR}/003_colorize.zsh"
|
||||
ZSH_COLORIZE_TOOL="chroma"
|
||||
ZSH_COLORIZE_CHROMA_FORMATTER=terminal256
|
||||
EOF
|
||||
|
||||
# see also ZVM jeffreytse/zsh-vi-mode plugin
|
||||
cat <<-'EOF' | tee "${DEST}"/"${ALIAS_DIR}"/001_vi-mode.sh
|
||||
cat <<-'EOF' | tee "${DEST}/${ALIAS_DIR}/001_vi-mode.sh"
|
||||
# Set vi mode
|
||||
bindkey -v
|
||||
bindkey '^R' history-incremental-search-backward
|
||||
|
|
@ -338,7 +344,7 @@ EOF
|
|||
|
||||
## add a separate zsh aliases directory
|
||||
|
||||
cat <<'EOF' | tee "${DEST}"/"${ALIAS_DIR}"/000_enable-aliases-directory.zsh
|
||||
cat <<'EOF' | tee "${DEST}/${ALIAS_DIR}/000_enable-aliases-directory.zsh"
|
||||
# Enable ${ALIAS_DIR} to keep aliases separate from env variables
|
||||
if [ -d ~/.zsh_aliases.d ]; then
|
||||
for f in ~/.zsh_aliases.d/**/*.zsh(N); do
|
||||
|
|
@ -348,18 +354,18 @@ fi
|
|||
EOF
|
||||
|
||||
ALIASES_HOME=".zsh_aliases.d"
|
||||
mkdir -p "${DEST}"/"${ALIASES_HOME}"
|
||||
mkdir -p "${DEST}/${ALIASES_HOME}"
|
||||
|
||||
# Set the path to the pipx bin directory
|
||||
cat <<'EOF' | tee "${DEST}"/"${ALIAS_DIR}"/001_pipx-path.zsh
|
||||
cat <<'EOF' | tee "${DEST}/${ALIAS_DIR}/001_pipx-path.zsh"
|
||||
export PATH="$PATH:$HOME/.local/bin"
|
||||
EOF
|
||||
|
||||
# tell bash to check the next word after the alias (i.e sudo) by adding a space to the end of the alias value.
|
||||
echo "# tell bash to check the next word after the alias (i.e sudo) by adding a space to the end of the alias value." >"${DEST}"/"${ALIAS_DIR}"/002_sudo.zsh
|
||||
echo 'alias sudo="sudo "' >>"${DEST}"/"${ALIAS_DIR}"/002_sudo.zsh
|
||||
echo 'alias sudo="sudo "' >>"${DEST}/${ALIAS_DIR}/002_sudo.zsh"
|
||||
|
||||
cat <<-EOF | tee "${DEST}"/"${ALIAS_DIR}"/003_py_aliases.zsh
|
||||
cat <<-EOF | tee "${DEST}/${ALIAS_DIR}/003_py_aliases.zsh"
|
||||
_py_version() {
|
||||
PY_VERSIONS=(2 3)
|
||||
|
||||
|
|
@ -396,8 +402,8 @@ cat <<-EOF | tee "${DEST}"/"${ALIAS_DIR}"/003_py_aliases.zsh
|
|||
# alias jupyter="_py_version"
|
||||
EOF
|
||||
|
||||
mkdir -p "${DEST}"/"${ALIAS_DIR}"/
|
||||
cat <<-EOF | tee "${DEST}"/"${ALIAS_DIR}"/003_transfer.zsh
|
||||
mkdir -p "${DEST}/${ALIAS_DIR}/"
|
||||
cat <<-EOF | tee "${DEST}/${ALIAS_DIR}/003_transfer.zsh"
|
||||
#
|
||||
# Defines transfer alias and provides easy command line file and folder sharing.
|
||||
#
|
||||
|
|
@ -466,10 +472,23 @@ cat <<-EOF | tee "${DEST}"/"${ALIAS_DIR}"/003_transfer.zsh
|
|||
}
|
||||
EOF
|
||||
|
||||
cat <<EOF | tee "${DEST}"/"${ALIAS_DIR}"/002_nvm.zsh
|
||||
cat <<EOF | tee "${DEST}/${ALIAS_DIR}/002_nvm.zsh"
|
||||
plugins+=(nvm)
|
||||
zstyle ':omz:plugins:nvm' lazy yes
|
||||
EOF
|
||||
|
||||
# https://github.com/catppuccin/fzf/blob/main/themes/catppuccin-fzf-mocha.sh
|
||||
conf_print_fzf_colors() {
|
||||
cat <<EOF
|
||||
export FZF_DEFAULT_OPTS=" \
|
||||
--color=bg+:#313244,bg:#1E1E2E,spinner:#F5E0DC,hl:#F38BA8 \
|
||||
--color=fg:#CDD6F4,header:#F38BA8,info:#CBA6F7,pointer:#F5E0DC \
|
||||
--color=marker:#B4BEFE,fg+:#CDD6F4,prompt:#CBA6F7,hl+:#F38BA8 \
|
||||
--color=selected-bg:#45475A \
|
||||
--color=border:#6C7086,label:#CDD6F4"
|
||||
EOF
|
||||
}
|
||||
conf_print_fzf_colors | tee "${DEST}/${ALIAS_DIR}/002_fzf_colors.zsh"
|
||||
|
||||
sudo chown -R root:root /usr/local/share/zsh/site-functions
|
||||
sudo chmod -R 755 /usr/local/share/zsh/site-functions
|
||||
|
|
|
|||
Loading…
Reference in New Issue