Change zsh theme
Custom theme is very minimal and has little info about your whereabouts on the server. "bira" theme set as default. Custom theme wasn't removed, just commented-out.
This commit is contained in:
@@ -18,12 +18,15 @@ cd ~/server_cli_tools
|
|||||||
| # | Component | What it does |
|
| # | Component | What it does |
|
||||||
|---|-----------|-------------|
|
|---|-----------|-------------|
|
||||||
| 1 | **Core packages** | `vim`, `bat`, `eza`, `fzf`, `htop`, `tmux`, `zsh`, `ripgrep`, `fd-find`, `zoxide`, `git-delta` |
|
| 1 | **Core packages** | `vim`, `bat`, `eza`, `fzf`, `htop`, `tmux`, `zsh`, `ripgrep`, `fd-find`, `zoxide`, `git-delta` |
|
||||||
| 2 | **Zsh + Oh-My-Zsh** | Shell, plugins (`zsh-autosuggestions`, `zsh-syntax-highlighting`, `z`), custom prompt theme |
|
| 2 | **Zsh + Oh-My-Zsh** | Shell, plugins (`zsh-autosuggestions`, `zsh-syntax-highlighting`, `z`), `bira` prompt theme |
|
||||||
| 3 | **Aliases + tools** | General, git, and docker aliases with a self-documenting help system (`h`) |
|
| 3 | **Aliases + tools** | General, git, and docker aliases with a self-documenting help system (`h`) |
|
||||||
| 4 | **Terminal configs** | `bat` theme (base16) |
|
| 4 | **Terminal configs** | `bat` theme (base16) |
|
||||||
| 5 | **Docker** | `docker.io` via apt, service enabled, user added to `docker` group, management aliases |
|
| 5 | **Docker** | `docker.io` via apt, service enabled, user added to `docker` group, management aliases |
|
||||||
| 6 | **Git config** | `git-delta` as pager with side-by-side diffs |
|
| 6 | **Git config** | `git-delta` as pager with side-by-side diffs |
|
||||||
|
|
||||||
|
> **NOTE:** There's minimal custom theme in `<repo>/configs/zsh/zhann-elvis.zsh-theme`. To apply it toggle `ZSH_THEME` and uncomment sourcing it in `~/.zshrc` after install.
|
||||||
|
> For more themes, see [Oh-My-Zsh themes](https://github.com/ohmyzsh/ohmyzsh/wiki/themes).
|
||||||
|
|
||||||
## Alias highlights
|
## Alias highlights
|
||||||
|
|
||||||
Type `h` after installation to see all aliases with descriptions. Some highlights:
|
Type `h` after installation to see all aliases with descriptions. Some highlights:
|
||||||
@@ -63,8 +66,7 @@ server_cli_tools/
|
|||||||
custom_tools/
|
custom_tools/
|
||||||
backup_dotfiles.sh # backup conflicting dotfiles
|
backup_dotfiles.sh # backup conflicting dotfiles
|
||||||
bat/config # bat theme
|
bat/config # bat theme
|
||||||
zsh/zhann-elvis.zsh-theme # custom zsh prompt (git-aware)
|
zshrc # .zshrc with oh-my-zsh, bira theme, plugins
|
||||||
zshrc # .zshrc with oh-my-zsh + plugins
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Customization
|
## Customization
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ export ZSH="$HOME/.oh-my-zsh"
|
|||||||
export ALIASES="$HOME/.config/aliases"
|
export ALIASES="$HOME/.config/aliases"
|
||||||
export CT_DIR="$HOME/.config/custom_tools"
|
export CT_DIR="$HOME/.config/custom_tools"
|
||||||
export EDITOR="vim"
|
export EDITOR="vim"
|
||||||
ZSH_THEME=""
|
# ZSH_THEME=""
|
||||||
|
ZSH_THEME="bira"
|
||||||
DISABLE_AUTO_TITLE="true"
|
DISABLE_AUTO_TITLE="true"
|
||||||
plugins=(
|
plugins=(
|
||||||
git
|
git
|
||||||
@@ -11,7 +12,7 @@ plugins=(
|
|||||||
z
|
z
|
||||||
)
|
)
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
source $HOME/.config/zsh/zhann-elvis.zsh-theme
|
# source $HOME/.config/zsh/zhann-elvis.zsh-theme
|
||||||
source $ALIASES/.aliases
|
source $ALIASES/.aliases
|
||||||
autoload -Uz zcalc
|
autoload -Uz zcalc
|
||||||
[ -f /usr/share/doc/fzf/examples/key-bindings.zsh ] && source /usr/share/doc/fzf/examples/key-bindings.zsh
|
[ -f /usr/share/doc/fzf/examples/key-bindings.zsh ] && source /usr/share/doc/fzf/examples/key-bindings.zsh
|
||||||
|
|||||||
42
install.sh
42
install.sh
@@ -77,7 +77,7 @@ check_os() {
|
|||||||
fi
|
fi
|
||||||
. /etc/os-release
|
. /etc/os-release
|
||||||
case "$ID" in
|
case "$ID" in
|
||||||
ubuntu|debian) ;;
|
ubuntu | debian) ;;
|
||||||
*)
|
*)
|
||||||
e_warn "Detected $ID — this script is designed for Ubuntu/Debian."
|
e_warn "Detected $ID — this script is designed for Ubuntu/Debian."
|
||||||
e_warn "Package installation may not work. Configs will still be copied."
|
e_warn "Package installation may not work. Configs will still be copied."
|
||||||
@@ -175,9 +175,9 @@ install_zsh() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Theme
|
# Theme
|
||||||
mkdir -p "$HOME/.config/zsh"
|
# mkdir -p "$HOME/.config/zsh"
|
||||||
copy_config "$CONFIGS/zsh/zhann-elvis.zsh-theme" "$HOME/.config/zsh/zhann-elvis.zsh-theme"
|
# copy_config "$CONFIGS/zsh/zhann-elvis.zsh-theme" "$HOME/.config/zsh/zhann-elvis.zsh-theme"
|
||||||
e_info " Installed zhann-elvis.zsh-theme"
|
# e_info " Installed zhann-elvis.zsh-theme"
|
||||||
|
|
||||||
# .zshrc
|
# .zshrc
|
||||||
copy_config "$CONFIGS/zshrc" "$HOME/.zshrc"
|
copy_config "$CONFIGS/zshrc" "$HOME/.zshrc"
|
||||||
@@ -225,8 +225,8 @@ install_docker() {
|
|||||||
apt_install docker.io
|
apt_install docker.io
|
||||||
|
|
||||||
if command_exists systemctl; then
|
if command_exists systemctl; then
|
||||||
sudo systemctl enable --now docker 2>/dev/null \
|
sudo systemctl enable --now docker 2>/dev/null ||
|
||||||
|| e_warn " Could not enable docker service — start manually: sudo systemctl start docker"
|
e_warn " Could not enable docker service — start manually: sudo systemctl start docker"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if id -nG "$USER" 2>/dev/null | grep -qw docker; then
|
if id -nG "$USER" 2>/dev/null | grep -qw docker; then
|
||||||
@@ -258,7 +258,7 @@ install_git_config() {
|
|||||||
e_info " Delta config already present in ~/.gitconfig"
|
e_info " Delta config already present in ~/.gitconfig"
|
||||||
else
|
else
|
||||||
e_info " Adding delta pager config to ~/.gitconfig"
|
e_info " Adding delta pager config to ~/.gitconfig"
|
||||||
cat >> "$gitconfig" << 'DELTA'
|
cat >>"$gitconfig" <<'DELTA'
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
pager = delta
|
pager = delta
|
||||||
@@ -287,8 +287,11 @@ uninstall() {
|
|||||||
printf "Continue? [y/N] "
|
printf "Continue? [y/N] "
|
||||||
read -r confirm
|
read -r confirm
|
||||||
case "$confirm" in
|
case "$confirm" in
|
||||||
y|Y) ;;
|
y | Y) ;;
|
||||||
*) echo "Aborted."; exit 0 ;;
|
*)
|
||||||
|
echo "Aborted."
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
local removed=()
|
local removed=()
|
||||||
@@ -347,7 +350,7 @@ uninstall() {
|
|||||||
/^\[/ { skip=0 }
|
/^\[/ { skip=0 }
|
||||||
skip { next }
|
skip { next }
|
||||||
{ print }
|
{ print }
|
||||||
' "$gitconfig" > "$tmp"
|
' "$gitconfig" >"$tmp"
|
||||||
mv "$tmp" "$gitconfig"
|
mv "$tmp" "$gitconfig"
|
||||||
removed+=("git-delta-config")
|
removed+=("git-delta-config")
|
||||||
fi
|
fi
|
||||||
@@ -373,7 +376,7 @@ uninstall() {
|
|||||||
printf "Restore from this backup? [y/N] "
|
printf "Restore from this backup? [y/N] "
|
||||||
read -r restore
|
read -r restore
|
||||||
case "$restore" in
|
case "$restore" in
|
||||||
y|Y)
|
y | Y)
|
||||||
cp -a "$bkp_base/$latest"/. "$HOME"/
|
cp -a "$bkp_base/$latest"/. "$HOME"/
|
||||||
e_succ "Restored from $bkp_base/$latest"
|
e_succ "Restored from $bkp_base/$latest"
|
||||||
;;
|
;;
|
||||||
@@ -391,7 +394,7 @@ uninstall() {
|
|||||||
|
|
||||||
COMPONENTS=(
|
COMPONENTS=(
|
||||||
"Core packages (vim, bat, eza, fzf, htop, tmux, rg, fd, zoxide, delta)"
|
"Core packages (vim, bat, eza, fzf, htop, tmux, rg, fd, zoxide, delta)"
|
||||||
"Zsh + Oh-My-Zsh (shell, plugins, theme)"
|
"Zsh + Oh-My-Zsh (shell, plugins)"
|
||||||
"Aliases + custom tools"
|
"Aliases + custom tools"
|
||||||
"Terminal configs (bat)"
|
"Terminal configs (bat)"
|
||||||
"Docker (engine + aliases)"
|
"Docker (engine + aliases)"
|
||||||
@@ -438,16 +441,16 @@ show_menu() {
|
|||||||
read -r choice
|
read -r choice
|
||||||
|
|
||||||
case "$choice" in
|
case "$choice" in
|
||||||
q|Q)
|
q | Q)
|
||||||
echo "Aborted."
|
echo "Aborted."
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
a|A)
|
a | A)
|
||||||
for ((i = 0; i < count; i++)); do
|
for ((i = 0; i < count; i++)); do
|
||||||
selected[$i]=1
|
selected[$i]=1
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
n|N)
|
n | N)
|
||||||
for ((i = 0; i < count; i++)); do
|
for ((i = 0; i < count; i++)); do
|
||||||
selected[$i]=0
|
selected[$i]=0
|
||||||
done
|
done
|
||||||
@@ -548,7 +551,7 @@ usage() {
|
|||||||
|
|
||||||
main() {
|
main() {
|
||||||
case "${1:-}" in
|
case "${1:-}" in
|
||||||
--help|-h)
|
--help | -h)
|
||||||
usage
|
usage
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
@@ -558,7 +561,10 @@ main() {
|
|||||||
;;
|
;;
|
||||||
--update)
|
--update)
|
||||||
e_info "Pulling latest changes..."
|
e_info "Pulling latest changes..."
|
||||||
git -C "$SCRIPT_DIR" pull || { e_err "git pull failed"; exit 1; }
|
git -C "$SCRIPT_DIR" pull || {
|
||||||
|
e_err "git pull failed"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
echo ""
|
echo ""
|
||||||
check_os
|
check_os
|
||||||
if [ "${2:-}" = "--all" ] || [ "${2:-}" = "-a" ]; then
|
if [ "${2:-}" = "--all" ] || [ "${2:-}" = "-a" ]; then
|
||||||
@@ -571,7 +577,7 @@ main() {
|
|||||||
fi
|
fi
|
||||||
print_summary
|
print_summary
|
||||||
;;
|
;;
|
||||||
--all|-a)
|
--all | -a)
|
||||||
check_os
|
check_os
|
||||||
e_info "Server CLI Tools — installing all components"
|
e_info "Server CLI Tools — installing all components"
|
||||||
for installer in "${INSTALLERS[@]}"; do
|
for installer in "${INSTALLERS[@]}"; do
|
||||||
|
|||||||
Reference in New Issue
Block a user