From 865de2b8a6b14b99c493ca844252ae25e780ca13 Mon Sep 17 00:00:00 2001 From: Hayate Nakano Date: Mon, 12 Feb 2024 15:26:05 +0900 Subject: [PATCH] up --- config/xdg/wezterm/wezterm.lua | 23 ++++++++++++----------- config/zprofile | 7 +------ config/zshrc | 2 +- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/config/xdg/wezterm/wezterm.lua b/config/xdg/wezterm/wezterm.lua index 955245f..1b0d717 100644 --- a/config/xdg/wezterm/wezterm.lua +++ b/config/xdg/wezterm/wezterm.lua @@ -84,8 +84,15 @@ local key_tables = { end) }, -- move tab - { key = "Tab", action = wezterm.action { ActivateTabRelative = 1 } }, - { key = "Tab", mods = "SHIFT", action = wezterm.action { ActivateTabRelative = -1 } }, + { + key = "Tab", + action = wezterm.action { ActivateTabRelative = 1 } + }, + { + key = "Tab", + mods = "SHIFT", + action = wezterm.action { ActivateTabRelative = -1 } + }, -- misc { key = "r", @@ -178,7 +185,7 @@ wezterm.on("format-tab-title", function(tab, tabs, panes, config, hover, max_wid return elements end) -wezterm.on("update-right-status", function(window, pane) +wezterm.on("update-status", function(window, pane) local SOLID_LEFT_ARROW = utf8.char(0xe0b6) local color_mode = "" @@ -205,14 +212,8 @@ wezterm.on("update-right-status", function(window, pane) local cwd_uri = pane:get_current_working_dir() if cwd_uri then - cwd_uri = cwd_uri:sub(8); - local slash = cwd_uri:find("/") - local hostname = "" - if slash then - hostname = cwd_uri:sub(1, slash - 1) - local dot = hostname:find("[.]") - if dot then hostname = hostname:sub(1, dot - 1) end - insert_element(hostname) + if cwd_uri.host then + insert_element(cwd_uri.host) end end diff --git a/config/zprofile b/config/zprofile index 7e3ef6d..a4968a4 100644 --- a/config/zprofile +++ b/config/zprofile @@ -4,12 +4,7 @@ export XDG_DATA_HOME="$HOME/.local/share" export DOTFILES_ROOT="$HOME/.dotfiles" export PATH="$DOTFILES_ROOT/bin:$PATH" - -if [ -d /opt/homebrew ]; then - eval "$(/opt/homebrew/bin/brew shellenv)" -else - eval "$(brew shellenv)" -fi +[ -d /opt/homebrew ] && eval "$(/opt/homebrew/bin/brew shellenv)" || eval "$(brew shellenv)" export PATH="$HOME/.local/bin:$PATH" export PATH="$HOME/.cargo/bin:$PATH" diff --git a/config/zshrc b/config/zshrc index ce7dd6f..d2c3bf6 100644 --- a/config/zshrc +++ b/config/zshrc @@ -9,7 +9,7 @@ setopt HIST_IGNORE_SPACE setopt HIST_REDUCE_BLANKS setopt HIST_NO_STORE -alias ls='exa --icons --group-directories-first --color=auto' +alias ls='eza --icons --group-directories-first --color=auto' alias ll='ls --long --header --git' alias la='ll --all' alias lt='ls --tree'