alactritty

This commit is contained in:
= 2024-07-15 17:49:00 -06:00
parent 22283aaca8
commit e141ebdef3
4 changed files with 55 additions and 32 deletions

View File

@ -204,10 +204,6 @@ multiplier = 3
# When true, Alacritty will use a custom built-in font for box drawing characters (Unicode points U+2500 - U+259F) and powerline symbols (Unicode points U+E0B0 - U+E0B3).
# Default: true
[font]
normal = { family = "DejaVu Sans Mono", style = "Normal" }
size = 13
builtin_box_drawing = true
# COLORS
# This section documents the [colors] table of the configuration file.

View File

@ -13,4 +13,9 @@
[shell]
program="/opt/homebrew/bin/tmux"
program="/usr/local/bin/tmux"
[font]
normal = { family = "DejaVu Sans Mono", style = "Normal" }
size = 13
builtin_box_drawing = true

View File

@ -13,4 +13,9 @@
[shell]
program="/usr/local/bin/tmux"
program="/opt/homebrew/bin/tmux"
[font]
normal = { family = "Hack Nerd Font Mono" }
size = 13
builtin_box_drawing = true

View File

@ -42,10 +42,20 @@ brew_packages=(
"stow"
"terragrunt"
"tmux"
"font-hack-nerd-font"
"alacritty"
"spotify"
"tailscale"
"visual-studio-code"
)
function get_ips {
ifconfig | awk '/inet / && !/inet6/ && !/127.0.0.1/ {printf "IP(s): %s ", $2}'
function shell_start_disp {
echo -n $(hostname)
if [[ -f /sbin/ifconfig ]]
then
ifconfig | awk '/inet / && !/inet6/ && !/127.0.0.1/ {printf " %s ", $2}'
fi
}
@ -55,7 +65,7 @@ if [[ -f "/opt/homebrew/bin/brew" ]] then
export HOMEBREW_NO_ENV_HINTS=1
fi
# IF Linux
if [[ `uname` == "Linux" ]]
then
[[ ":$PATH:" != *":/home/errol/Applications:"* ]] && PATH="/home/errol/Applications:${PATH}"
@ -66,20 +76,12 @@ then
if [ -f '/home/errol/google-cloud-sdk/completion.zsh.inc' ]; then . '/home/errol/google-cloud-sdk/completion.zsh.inc'; fi
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
if [[ -f /sbin/ifconfig ]]
then
echo "Linux - `hostname`"
fi
fi
if [[ $(uname) == "Darwin" ]]
then
if [[ ! -f /Users/$(whoami)/.config/alacritty/alacritty.toml ]]
# Alacritty Crap
if [[ -f /Users/$(whoami)/.config/alacritty/alacritty-base.toml ]]
then
cd /Users/$(whoami)/.config/alacritty
echo $(pwd)
toml_files=("alacritty-base.toml" "alacritty-shell-osx.toml")
toml_files=("alacritty-base.toml" "alacritty-osx.toml")
combined_file="alacritty.toml"
echo -n > "$combined_file"
for file in "${toml_files[@]}"; do
@ -94,17 +96,35 @@ then
fi
done
fi
if [[ -f /sbin/ifconfig ]]
then
echo "MacOS - `hostname`"
fi
ensure_brew_packages "${brew_packages[@]}"
fi
get_ips
## IF MacOS
if [[ $(uname) == "Darwin" ]]
then
# Alacritty Crap
if [[ -f /Users/$(whoami)/.config/alacritty/alacritty-base.toml ]]
then
cd /Users/$(whoami)/.config/alacritty
echo $(pwd)
toml_files=("alacritty-base.toml" "alacritty-osx.toml")
combined_file="alacritty.toml"
echo -n > "$combined_file"
for file in "${toml_files[@]}"; do
# Check if the file exists
if [ -f "$file" ]; then
# Append content of the current TOML file to the combined file
cat "$file" >> "$combined_file"
# Add a newline to separate TOML sections (optional)
echo >> "$combined_file"
else
echo "File '$file' not found. Skipping."
fi
done
fi
fi
shell_start_disp
# Keybindings
bindkey -e
@ -138,7 +158,4 @@ zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
zstyle ':completion:*' menu no
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls --color $realpath'
zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-preview 'ls --color $realpath'
# Prompt
# eval "$(starship init zsh)"
zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-preview 'ls --color $realpath'