Replace Kitty with Wezterm, and clean up the command prompt

This commit is contained in:
Zoé Cassiopée Gauthier 2022-02-19 12:49:25 -05:00
parent d8a298bb82
commit ca1b711c35
4 changed files with 65 additions and 21 deletions

View File

@ -2,23 +2,25 @@
set -e set -e
if [ $SPIN ]; then DOTFILES="$(dirname -- "$(readlink -f -- "$0")")"
DOTFILES="$HOME/dotfiles"
else
DOTFILES="$(dirname -- "$(readlink -f -- "$0")")"
fi
echo "🐚 Installing dotfiles from '$DOTFILES'..." echo "🐚 Installing dotfiles from '$DOTFILES'..."
mkdir -p ~/.config/wezterm
ln -sf "$DOTFILES/ackrc" ~/.ackrc ln -sf "$DOTFILES/ackrc" ~/.ackrc
ln -sf "$DOTFILES/gitconfig" ~/.gitconfig ln -sf "$DOTFILES/gitconfig" ~/.gitconfig
ln -sf "$DOTFILES/inputrc" ~/.inputrc ln -sf "$DOTFILES/inputrc" ~/.inputrc
ln -sf "$DOTFILES/starship.toml" ~/.config/starship.toml
ln -sf "$DOTFILES/tmux.conf" ~/.tmux.conf ln -sf "$DOTFILES/tmux.conf" ~/.tmux.conf
ln -sf "$DOTFILES/wezterm.lua" ~/.config/wezterm/wezterm.lua
ln -sf "$DOTFILES/zshenv" ~/.zshenv ln -sf "$DOTFILES/zshenv" ~/.zshenv
ln -sf "$DOTFILES/zshrc" ~/.zshrc ln -sf "$DOTFILES/zshrc" ~/.zshrc
mkdir -p ~/.config
ln -sf "$DOTFILES/starship.toml" ~/.config/starship.toml ### Vim
if ! (command -v dpkg-query >/dev/null 2>&1 && dpkg-query --list vim >/dev/null 2>&1); then
sudo apt install vim
fi
if [ ! -d ~/.vim ]; then if [ ! -d ~/.vim ]; then
git clone --quiet https://github.com/deuxpi/dotvim.git ~/.vim git clone --quiet https://github.com/deuxpi/dotvim.git ~/.vim
@ -29,6 +31,9 @@ fi
mkdir -p ~/.config/coc/ mkdir -p ~/.config/coc/
vim +'PlugInstall --sync' +qa vim +'PlugInstall --sync' +qa
### Oh My Zsh!
if [ ! -d ~/.oh-my-zsh ]; then if [ ! -d ~/.oh-my-zsh ]; then
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended --keep-zshrc sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended --keep-zshrc
fi fi
@ -41,9 +46,19 @@ fi
mkdir -p ~/.oh-my-zsh/custom/themes mkdir -p ~/.oh-my-zsh/custom/themes
ln -sf "$DOTFILES/themes/witchhazelhypercolor.zsh-theme" ~/.oh-my-zsh/custom/themes/witchhazelhypercolor.zsh-theme ln -sf "$DOTFILES/themes/witchhazelhypercolor.zsh-theme" ~/.oh-my-zsh/custom/themes/witchhazelhypercolor.zsh-theme
### Starship
if ! [ -x "$(command -v starship)" ]; then if ! [ -x "$(command -v starship)" ]; then
sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- -y sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- -y
fi fi
mkdir -p ~/.config/kitty/
ln -sf "$DOTFILES/kitty.conf" ~/.config/kitty/kitty.conf ### Wezterm
if ! [ -x "$(command -v wezterm)" ]; then
curl -LO https://github.com/wez/wezterm/releases/download/20220101-133340-7edc5b5a/WezTerm-20220101-133340-7edc5b5a-Ubuntu18.04.AppImage
chmod +x WezTerm-20220101-133340-7edc5b5a-Ubuntu18.04.AppImage
mkdir -p ~/.local/bin
mv WezTerm-20220101-133340-7edc5b5a-Ubuntu18.04.AppImage ~/.local/bin/wezterm
fi

View File

@ -3,17 +3,26 @@ command_timeout = 10000
[docker_context] [docker_context]
disabled = true disabled = true
[character]
success_symbol = "✨"
error_symbol = "💥"
[gcloud] [gcloud]
disabled = true disabled = true
[git_branch]
symbol = ":"
format = "[on](italic) [$symbol$branch]($style) "
[git_state]
cherry_pick = "[🍒 PICKING](bold red)"
[git_status] [git_status]
conflicted = "🏳" format = '([$all_status$ahead_behind]($style) )'
ahead = "🏎💨" ahead = '[↑$count](green)'
behind = "😰" behind = '[↓$count](red)'
diverged = "😵" diverged = '[↑$ahead_count](green) [↓$behind_count](red)'
untracked = "🤷‍" untracked = "?"
stashed = "📦" stashed = "📦"
modified = "📝" modified = '[📝\($count\)](yellow) '
staged = '[++\($count\)](green)' staged = '[+\($count\)](green)'
renamed = "👅"
deleted = "🗑"

20
wezterm.lua Normal file
View File

@ -0,0 +1,20 @@
local wezterm = require 'wezterm';
return {
colors = {
foreground = "#f8f8f2",
background = "#282634",
cursor_bg = "#f8f8f0",
cursor_border = "#f8f8f0",
cursor_fg = "#060709",
selection_bg = "#8077a8",
selection_fg = "#f6e1ce",
ansi = {"#040303","#f92672","#c2ffdf","#e6c000","#c2ffdf","#ffb8d1","#c5a3ff","#f8f8f0"},
brights = {"#6090cb","#ff857f","#c2ffdf","#ffea00","#c2ffdf","#ffb8d1","#c5a3ff","#f8f8f0"},
},
font = wezterm.font_with_fallback({
{family="IBM Plex Mono", weight="DemiBold"},
"FreeMono",
}),
initial_cols = 140,
initial_rows = 50,
}

4
zshrc
View File

@ -123,8 +123,8 @@ source $ZSH/oh-my-zsh.sh
# alias zshconfig="mate ~/.zshrc" # alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh" # alias ohmyzsh="mate ~/.oh-my-zsh"
alias ssh="kitty +kitten ssh" alias ssh="wezterm ssh"
alias icat="kitty icat --align=left" alias icat="wezterm imgcat"
alias isvg="rsvg-convert | icat" alias isvg="rsvg-convert | icat"
alias idot='dot -Tsvg -Gbgcolor="transparent" -Ecolor="#f8f8f2ff" -Efontcolor="#f8f8f2ff" -Efontname="IBM Plex Mono Semibold" -Ncolor="#f8f8f2ff" -Nfontcolor="#f8f8f2ff" -Nfontname="IBM Plex Mono Semibold" | isvg' alias idot='dot -Tsvg -Gbgcolor="transparent" -Ecolor="#f8f8f2ff" -Efontcolor="#f8f8f2ff" -Efontname="IBM Plex Mono Semibold" -Ncolor="#f8f8f2ff" -Nfontcolor="#f8f8f2ff" -Nfontname="IBM Plex Mono Semibold" | isvg'