From 69a5cf92af0063aefca5445c281f75070fa70cca Mon Sep 17 00:00:00 2001 From: askiiart Date: Fri, 16 Aug 2024 11:18:15 -0500 Subject: [PATCH] Switch from kitty to Wezterm --- .gitignore | 2 ++ backup.sh | 3 +++ fish/conf.d/aliases.fish | 3 +++ restore.sh | 2 ++ sway/config | 2 +- wezterm.lua | 57 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 wezterm.lua diff --git a/.gitignore b/.gitignore index 37e7e69..2a54598 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ **/fishd.tmp* vscode/argv.json +fish/completions/wezterm.fish +fish/fish_variables diff --git a/backup.sh b/backup.sh index 96934f9..db4603e 100755 --- a/backup.sh +++ b/backup.sh @@ -103,3 +103,6 @@ if command_exists "xbps-install"; then cp /usr/bin/sway-runner $GIT_DIR/ sudo chown $(whoami) sway-runner fi + +# Wezterm +cp ~/.wezterm.lua $GIT_DIR/wezterm.lua \ No newline at end of file diff --git a/fish/conf.d/aliases.fish b/fish/conf.d/aliases.fish index 804978c..6402598 100644 --- a/fish/conf.d/aliases.fish +++ b/fish/conf.d/aliases.fish @@ -20,6 +20,9 @@ alias pls="please" if [ $TERM = "xterm-kitty" ] alias icat="kitten icat" alias s="kitten ssh" +else + alias icat="wezterm imgcat" + alias s="ssh" end # NixOS diff --git a/restore.sh b/restore.sh index 20001d6..ead604f 100755 --- a/restore.sh +++ b/restore.sh @@ -113,6 +113,8 @@ done # WezTerm wezterm shell-completion --shell fish > ~/.config/fish/completions/wezterm.fish +cp $GIT_DIR/wezterm.lua ~/.wezterm.lua +gsettings set org.cinnamon.desktop.default-applications.terminal exec wezterm-gui # VS code mkdir -p $HOME/.config/Code/User/ diff --git a/sway/config b/sway/config index 1856dc5..1f176e1 100644 --- a/sway/config +++ b/sway/config @@ -14,7 +14,7 @@ set $down j set $up k set $right l # Your preferred terminal emulator -set $term kitty +set $term wezterm-gui # Your preferred application launcher # Note: pass the final command to swaymsg so that the resulting window can be opened # on the original workspace that the command was run on. diff --git a/wezterm.lua b/wezterm.lua new file mode 100644 index 0000000..344cac0 --- /dev/null +++ b/wezterm.lua @@ -0,0 +1,57 @@ +local wezterm = require 'wezterm' +local config = wezterm.config_builder() + +----- actual config ----- + +config.font = wezterm.font('FiraCode Nerd Font') +config.font_size = 11.0 + +-- enable scrollbar +config.enable_scroll_bar = true + +-- clone of my catppuccin mocha kitty theme (not the same as the default catppuccin mocha color scheme +config.color_scheme = 'Catppuccin Mocha' + +config.window_padding = { + left = 0, + right = 0, + top = 0, + bottom = 0 +} + +config.colors = { + foreground = '#CAD3F5', + background = '#24273A', + cursor_fg = '#24273A', + cursor_bg = '#F4DBD6', + cursor_border = '#F4DBD6', + selection_fg = '#24273A', + selection_bg = '#F4DBD6', + scrollbar_thumb = '#F4DBD6', + split = '#1E1E2E', + + ansi = { + '#494D64', -- black + '#ED8796', -- red + '#A6DA95', -- green + '#EED49F', -- yellow + '#8AADF4', -- blue + '#F5BDE6', -- magenta + '#8BD5CA', -- cyan + '#B8C0E0' -- white + }, + brights = { + '#5B6078', -- black + '#ED8796', -- red + '#A6DA95', -- green + '#EED49F', -- yellow + '#8AADF4', -- blue + '#F5BDE6', -- magenta + '#8BD5CA', -- cyan + '#A5ADCB' -- white + } +} + +config.default_cursor_style = 'SteadyBar' + +return config