chore: remove zellij, use wezterm keyboard directly
parent
03dc35e6e0
commit
aa40157d2a
|
@ -50,6 +50,10 @@ url = "https://raw.githubusercontent.com/catppuccin/bat/main/Catppuccin-mocha.tm
|
|||
internal = "data/fd/.ignore"
|
||||
external = "~/.ignore"
|
||||
|
||||
[[apps.tmux.paths]]
|
||||
internal = "data/tmux"
|
||||
external = "~/.config/tmux"
|
||||
|
||||
[[apps.zellij.paths]]
|
||||
internal = "data/zellij"
|
||||
external = "~/.config/zellij"
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
# Change prefix
|
||||
set -g prefix C-a
|
||||
unbind C-b
|
||||
bind C-a send-prefix
|
||||
|
||||
# Split panes using | and -
|
||||
bind | split-window -h
|
||||
bind - split-window -v
|
||||
|
||||
# Sync with Zellij
|
||||
bind -n M-n split-window -h
|
||||
bind -n M-m split-window -v
|
||||
|
||||
# Switch panes using Alt
|
||||
bind -n M-Left select-pane -L
|
||||
bind -n M-Right select-pane -R
|
||||
bind -n M-Up select-pane -U
|
||||
bind -n M-Down select-pane -D
|
||||
|
||||
# Color
|
||||
set -g default-terminal "tmux-256color"
|
|
@ -1,4 +1,22 @@
|
|||
local wezterm = require("wezterm")
|
||||
local act = wezterm.action
|
||||
|
||||
local function get_appearance()
|
||||
if wezterm.gui then
|
||||
return wezterm.gui.get_appearance()
|
||||
end
|
||||
|
||||
return "Dark"
|
||||
end
|
||||
|
||||
local function scheme_for_appearance(appearance)
|
||||
if appearance:find("Dark") then
|
||||
return "Catppuccin Mocha"
|
||||
else
|
||||
return "Catppuccin Latte"
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
font = wezterm.font({
|
||||
family = "SF Mono",
|
||||
|
@ -7,23 +25,59 @@ return {
|
|||
line_height = 1.2,
|
||||
use_cap_height_to_scale_fallback_fonts = true,
|
||||
|
||||
color_scheme = "Catppuccin Mocha",
|
||||
color_scheme = scheme_for_appearance(get_appearance()),
|
||||
|
||||
keys = {
|
||||
{
|
||||
key = "LeftArrow",
|
||||
mods = "CTRL|SHIFT",
|
||||
action = wezterm.action.ActivateTabRelative(-1),
|
||||
action = act.ActivateTabRelative(-1),
|
||||
},
|
||||
{
|
||||
key = "RightArrow",
|
||||
mods = "CTRL|SHIFT",
|
||||
action = wezterm.action.ActivateTabRelative(1),
|
||||
action = act.ActivateTabRelative(1),
|
||||
},
|
||||
-- Sync with Zellij
|
||||
{
|
||||
key = "n",
|
||||
mods = "ALT",
|
||||
action = act.SplitHorizontal({ domain = "CurrentPaneDomain" }),
|
||||
},
|
||||
{
|
||||
key = "m",
|
||||
mods = "ALT",
|
||||
action = act.SplitVertical({ domain = "CurrentPaneDomain" }),
|
||||
},
|
||||
{
|
||||
key = "p",
|
||||
mods = "ALT",
|
||||
action = act.PaneSelect({
|
||||
alphabet = "1234567890",
|
||||
}),
|
||||
},
|
||||
{
|
||||
key = "o",
|
||||
mods = "ALT",
|
||||
action = act.SpawnCommandInNewTab({}),
|
||||
},
|
||||
{
|
||||
key = "[",
|
||||
mods = "ALT",
|
||||
action = act.ActivateTabRelative(-1),
|
||||
},
|
||||
{
|
||||
key = "]",
|
||||
mods = "ALT",
|
||||
action = act.ActivateTabRelative(1),
|
||||
},
|
||||
},
|
||||
|
||||
use_fancy_tab_bar = false,
|
||||
hide_tab_bar_if_only_one_tab = true,
|
||||
tab_bar_at_bottom = true,
|
||||
tab_and_split_indices_are_zero_based = true,
|
||||
tab_max_width = 32,
|
||||
|
||||
window_background_opacity = 0.9,
|
||||
text_background_opacity = 0.8,
|
||||
|
|
|
@ -36,9 +36,3 @@ typeset -g POWERLEVEL9K_INSTANT_PROMPT=off
|
|||
# https://github.com/zsh-users/zsh-autosuggestions#suggestion-strategy
|
||||
typeset -g ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20
|
||||
typeset -g ZSH_AUTOSUGGEST_HISTORY_IGNORE=$HISTORY_IGNORE
|
||||
|
||||
# https://zellij.dev/documentation/integration.html
|
||||
if command -v zellij &>/dev/null; then
|
||||
ZELLIJ_AUTO_EXIT="true"
|
||||
eval "$(zellij setup --generate-auto-start zsh)"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue