feat(xxh): add xxh config
Assisted-by: Gemini:gemini-3.1-pro
This commit is contained in:
22
xxh/Justfile
Normal file
22
xxh/Justfile
Normal file
@@ -0,0 +1,22 @@
|
||||
# Variables
|
||||
dotfiles_dir := justfile_directory()
|
||||
plugin_dest := env("HOME") + "/.local/share/xxh-plugin-zsh-my-zshrc"
|
||||
xxh_config_dest := env("HOME") + "/.config/xxh/config.xxhc"
|
||||
|
||||
default:
|
||||
@just --list
|
||||
|
||||
# Deploy and build xxh configuration
|
||||
deploy:
|
||||
@echo "Preparing local plugin..."
|
||||
mkdir -p {{plugin_dest}}
|
||||
rsync -av --delete {{dotfiles_dir}}/custom-zshrc/ {{plugin_dest}}/
|
||||
|
||||
# Force execution rights on the build script
|
||||
chmod +x {{plugin_dest}}/build.sh
|
||||
|
||||
@echo "Generating configuration..."
|
||||
mkdir -p ~/.config/xxh
|
||||
# Replace placeholder with actual path
|
||||
sed "s|__ZSHRC_PLUGIN_DIR__|{{plugin_dest}}|g" {{dotfiles_dir}}/config.xxhc.template > {{xxh_config_dest}}
|
||||
@echo "Deployment successful!"
|
||||
15
xxh/config.xxhc.template
Normal file
15
xxh/config.xxhc.template
Normal file
@@ -0,0 +1,15 @@
|
||||
hosts:
|
||||
".*":
|
||||
+s: xxh-shell-zsh
|
||||
+hhh: "~"
|
||||
++pexpect-timeout: "10"
|
||||
+I:
|
||||
- xxh-plugin-zsh-ohmyzsh
|
||||
- xxh-plugin-zsh-powerlevel10k
|
||||
- xxh-plugin-prerun-zoxide
|
||||
- xxh-plugin-zsh-eza+git+https://github.com/experiences/xxh-plugin-zsh-eza
|
||||
- xxh-plugin-zsh-bat+git+https://github.com/experiences/xxh-plugin-zsh-bat
|
||||
- xxh-plugin-zsh-autosuggestions+git+https://github.com/MohamedOmar2020/xxh-plugin-zsh-autosuggestions
|
||||
- "xxh-plugin-zsh-my-zshrc+path+__ZSHRC_PLUGIN_DIR__"
|
||||
+e:
|
||||
- OMZ_PLUGINS="git screen sudo extract"
|
||||
8
xxh/custom-zshrc/build.sh
Normal file
8
xxh/custom-zshrc/build.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
|
||||
rm -rf "$DIR/build"
|
||||
mkdir -p "$DIR/build"
|
||||
|
||||
cp "$DIR/zshrc" "$DIR/build/pluginrc.zsh"
|
||||
34
xxh/custom-zshrc/zshrc
Normal file
34
xxh/custom-zshrc/zshrc
Normal file
@@ -0,0 +1,34 @@
|
||||
alias ll='ls -alF'
|
||||
alias update='sudo apt update'
|
||||
alias upgrade='sudo apt upgrade'
|
||||
alias ff='fastfetch'
|
||||
alias ll='eza --group-directories-first --icons -la'
|
||||
alias lt='eza --icons -lT'
|
||||
alias lg='lazygit'
|
||||
alias fbat="fzf --preview 'bat --style=numbers --color=always --line-range :500 {}'"
|
||||
|
||||
if [ -f /etc/os-release ]; then
|
||||
. /etc/os-release
|
||||
|
||||
case $ID in
|
||||
debian|ubuntu|proxmox)
|
||||
alias update="sudo apt update"
|
||||
alias upgrade="sudo apt upgrade -y"
|
||||
;;
|
||||
fedora|rhel|centos|rocky)
|
||||
alias update="sudo dnf check-update"
|
||||
alias upgrade="sudo dnf upgrade"
|
||||
;;
|
||||
alpine)
|
||||
alias update="sudo apk update"
|
||||
alias upgrade="sudo apk upgrade"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown OS for update aliases."
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ "$XXH_TARGET_gpg" = "true" ]; then
|
||||
export GPG_TTY=$(tty)
|
||||
fi
|
||||
Reference in New Issue
Block a user