diff --git a/vimplugrc b/vimplugrc index cca207f..c57d27f 100644 --- a/vimplugrc +++ b/vimplugrc @@ -86,6 +86,9 @@ let g:lightline = { let g:lightline['colorscheme'] = printf(lightline_theme) if $TERM !~ '^linux' + if $TERM == 'xterm-256color' + set term=xterm-direct + endif if has('gui_running') set guifont=Cascadia\ Code\ PL:h16 set guicursor=a:blinkon0,a:block,i:ver1-Cursor/lCursor,r:hor1-Cursor/lCursor diff --git a/wezterm.lua b/wezterm.lua index 3e6c534..59aaace 100644 --- a/wezterm.lua +++ b/wezterm.lua @@ -1,6 +1,6 @@ local wt = require 'wezterm' local act = wt.action -local fontsize_darwin = 15 +local fontsize_darwin = 13 local fontsize_others = 11 local theme_n = 0 local themes = { @@ -70,13 +70,14 @@ wt.on('reset-overrides', function(window) window:set_config_overrides() end) wt.on('webinar', function(window) window:set_config_overrides(webinar_overrides) end) return { - audible_bell = "Disabled", + audible_bell = 'Disabled', font_size = set_fontsize(), + font = wt.font 'Cascadia Code PL', color_scheme = default_theme, cursor_blink_rate = 0, check_for_updates = false, - use_resize_increments = true, bold_brightens_ansi_colors = false, + term = 'wezterm', window_padding = { left = 0, right = 0, top = 0, bottom = 0, }, @@ -89,14 +90,18 @@ return { { key = 's', mods = 'META', action = act.EmitEvent 'next-theme' }, { key = 'd', mods = 'META', action = act.EmitEvent 'reset-overrides' }, { key = 'w', mods = 'META', action = act.EmitEvent 'webinar' }, + -- tabs + { key = 'c', mods = 'LEADER', action = act.SpawnTab 'DefaultDomain' }, + { key = 'n', mods = 'LEADER', action = act.ActivateTabRelative( 1) }, + { key = 'p', mods = 'LEADER', action = act.ActivateTabRelative(-1) }, -- panes - { key = 's', mods = 'LEADER', action = act.SplitVertical { domain = 'CurrentPaneDomain' } }, + { key = 's', mods = 'LEADER', action = act.SplitVertical { domain = 'CurrentPaneDomain' } }, { key = 'v', mods = 'LEADER', action = act.SplitHorizontal { domain = 'CurrentPaneDomain' } }, - { key = 'h', mods = 'LEADER', action = act.ActivatePaneDirection 'Left' }, - { key = 'j', mods = 'LEADER', action = act.ActivatePaneDirection 'Down' }, - { key = 'k', mods = 'LEADER', action = act.ActivatePaneDirection 'Up' }, + { key = 'h', mods = 'LEADER', action = act.ActivatePaneDirection 'Left' }, + { key = 'j', mods = 'LEADER', action = act.ActivatePaneDirection 'Down' }, + { key = 'k', mods = 'LEADER', action = act.ActivatePaneDirection 'Up' }, { key = 'l', mods = 'LEADER', action = act.ActivatePaneDirection 'Right' }, - { key = 'u', mods = 'LEADER', action = act.RotatePanes 'Clockwise' }, + { key = 'u', mods = 'LEADER', action = act.RotatePanes 'Clockwise' }, { key = 'i', mods = 'LEADER', action = act.RotatePanes 'CounterClockwise' }, { key = 'Return', mods = 'LEADER', action = act.TogglePaneZoomState }, { key = 'Space', mods = 'LEADER', action = act.PaneSelect }, diff --git a/zsh/functions.zsh b/zsh/functions.zsh index c9b79f1..1e16e99 100644 --- a/zsh/functions.zsh +++ b/zsh/functions.zsh @@ -3,6 +3,7 @@ termcompat() { case $term in (alacritty*) ;& (kitty*) ;& + (wezterm) ;& (xterm-*) term=xterm;; (rxvt-unicode*) diff --git a/zsh/prompt-plain.zsh b/zsh/prompt-plain.zsh index db5033c..56344af 100644 --- a/zsh/prompt-plain.zsh +++ b/zsh/prompt-plain.zsh @@ -1,10 +1,10 @@ reset='%%{\e[0m%%}' -prompt_fmt='[ %s %s:%s %s]\n\U01f525 ' +prompt_fmt='[ %s@%s %s %s]\n\U1f525 ' prompt_fmtn='[ %%{\e[2;3m%%}%s%%{\e[0m%%} ] ' -prompt_user='%F{%(!.red.blue)}%n%f' +prompt_user='%F{%(!.9.12)}%n%f' prompt_host='%m' -prompt_cwd='%F{green}%d%f' -prompt_git_fmt='\ue0a0 %s %s%%f ' +prompt_cwd='%F{10}%d%f' +prompt_git_fmt='\ue0a0 %s:%s%%f ' prompt_state_file=/tmp/zsh_gitstatus_$$.tmp printf -v PROMPT $prompt_fmt $prompt_user $prompt_host $prompt_cwd @@ -31,15 +31,15 @@ precmd.git() { fi [[ $line[1,2] == '??' ]] && (( untracked_count++ )) [[ $line[1,2] =~ .[MD] ]] && (( unstaged_count++ )) - [[ $line[1,2] =~ [MDARC]. ]] && (( staged_count++ )) [[ $line[1,2] =~ [ADU]{2} ]] && (( unmerged_count++ )) + [[ $line[1,2] =~ [MDARC]. ]] && (( staged_count++ )) done <<< $raw_status - (( unstaged_count )) && git_status+=%F{yellow}~$unstaged_count - (( staged_count )) && git_status+=%F{blue}+$staged_count - (( untracked_count )) && git_status+=%F{red}-$untracked_count - (( unmerged_count )) && git_status+=%F{cyan}*$unmerged_count - [[ -z $git_status ]] && git_status=%F{green}ok + (( untracked_count )) && git_status+=\ %F{9}-$untracked_count + (( unstaged_count )) && git_status+=\ %F{11}~$unstaged_count + (( unmerged_count )) && git_status+=\ %F{14}*$unmerged_count + (( staged_count )) && git_status+=\ %F{12}+$staged_count + [[ -z $git_status ]] && git_status=\ %F{10}ok printf $prompt_git_fmt $branch_status $git_status > $prompt_state_file } diff --git a/zsh/prompt-powerline.zsh b/zsh/prompt-powerline.zsh index 4a2947b..0481cfd 100644 --- a/zsh/prompt-powerline.zsh +++ b/zsh/prompt-powerline.zsh @@ -5,17 +5,17 @@ printf -v PROMPT4 $prompt_fmtn '+%N:%i' prompt_fifo=~/.zsh_gitstatus_$$ typeset -A prompt_symbols=( - sep_a $'\ue0b0' - sep_b $'\ue0b1' + sep_a '' #$'\ue0b0' + sep_b '' #$'\ue0b1' ellipsis $'\u2026' ro $'\u2717' ssh $'\u23fb' git $'\ue0a0' - git_unstaged '±' + git_unstaged '~' git_staged $'\u2713' git_untracked '!' git_unmerged '*' - bang $'\n\U01f525' + bang $'\n\U1f525' ) # gruvbox typeset -A prompt_colors=( @@ -130,7 +130,7 @@ precmd.prompt.git() { esac done <<< $raw_status - for i in git_unstaged git_untracked git_unmerged git_staged; do + for i in git_untracked git_unmerged git_unstaged git_staged; do (( count[$i] )) && precmd.prompt.add "$count[$i]$prompt_symbols[$i]" $prompt_colors[$i] done }