Last active
April 22, 2023 08:59
-
-
Save fzdwx/6a9edf4bc45eee0382a9bf2312790738 to your computer and use it in GitHub Desktop.
my wezterm config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local wezterm = require("wezterm") | |
local act = wezterm.action | |
local keys = { | |
{ key = "=", mods = "CTRL", action = wezterm.action.DecreaseFontSize }, | |
{ key = "=", mods = "CTRL|SHIFT", action = wezterm.action.IncreaseFontSize }, | |
-- pane | |
-- 在一个tab内切分的子pane中移动 | |
{ key = "LeftArrow", mods = "ALT", action = wezterm.action({ ActivatePaneDirection = "Left" }) }, | |
{ key = "RightArrow", mods = "ALT", action = wezterm.action({ ActivatePaneDirection = "Right" }) }, | |
{ key = "UpArrow", mods = "ALT", action = wezterm.action({ ActivatePaneDirection = "Up" }) }, | |
{ key = "DownArrow", mods = "ALT", action = wezterm.action({ ActivatePaneDirection = "Down" }) }, | |
{ | |
key = "LeftArrow", | |
mods = "CTRL", | |
action = act.AdjustPaneSize({ "Left", 5 }), | |
}, | |
{ | |
key = "DownArrow", | |
mods = "CTRL", | |
action = act.AdjustPaneSize({ "Down", 5 }), | |
}, | |
{ key = "UpArrow", mods = "CTRL", action = act.AdjustPaneSize({ "Up", 5 }) }, | |
{ | |
key = "RightArrow", | |
mods = "CTRL", | |
action = act.AdjustPaneSize({ "Right", 5 }), | |
}, | |
-- 向下分割 CTRL + - | |
{ key = "-", mods = "CTRL", action = wezterm.action({ SplitVertical = { domain = "CurrentPaneDomain" } }) }, | |
-- 向右分割 CTRL + \ | |
{ key = "\\", mods = "CTRL", action = wezterm.action({ SplitHorizontal = { domain = "CurrentPaneDomain" } }) }, | |
-- tab | |
-- 新建一个会话 | |
{ key = "C", mods = "CTRL", action = wezterm.action({ SpawnTab = "CurrentPaneDomain" }) }, | |
-- 关闭tab | |
{ key = "d", mods = "ALT", action = wezterm.action.CloseCurrentTab({ confirm = true }) }, | |
-- 先前向后移动大的tab | |
{ key = "1", mods = "ALT", action = wezterm.action({ ActivateTab = 0 }) }, | |
{ key = "2", mods = "ALT", action = wezterm.action({ ActivateTab = 1 }) }, | |
{ key = "3", mods = "ALT", action = wezterm.action({ ActivateTab = 2 }) }, | |
{ key = "4", mods = "ALT", action = wezterm.action({ ActivateTab = 3 }) }, | |
{ key = "5", mods = "ALT", action = wezterm.action({ ActivateTab = 4 }) }, | |
{ key = "6", mods = "ALT", action = wezterm.action({ ActivateTab = 5 }) }, | |
{ key = "7", mods = "ALT", action = wezterm.action({ ActivateTab = 6 }) }, | |
{ key = "8", mods = "ALT", action = wezterm.action({ ActivateTab = 7 }) }, | |
{ key = "9", mods = "ALT", action = wezterm.action({ ActivateTab = -1 }) }, | |
} | |
local mouse_bindings = { | |
-- 右键粘贴 | |
{ | |
event = { Down = { streak = 1, button = "Right" } }, | |
mods = "NONE", | |
action = wezterm.action({ PasteFrom = "Clipboard" }), | |
}, | |
-- 选中复制 | |
{ | |
event = { Up = { streak = 1, button = "Left" } }, | |
mods = "NONE", | |
action = wezterm.action.CompleteSelection("Clipboard"), | |
}, | |
} | |
wezterm.on("update-right-status", function(window, pane) | |
local date = " " .. wezterm.strftime("%a %b %-d %H:%M ") | |
window:set_right_status(wezterm.format({ | |
{ Attribute = { Underline = "Single" } }, | |
{ Attribute = { Italic = true } }, | |
{ Foreground = { Color = "Cyan" } }, | |
{ Text = date }, | |
})) | |
end) | |
-- A helper function for fallback fonts | |
wezterm.on("format-tab-title", function(tab, tabs, panes, config, hover, max_width) | |
if tab.is_active then | |
return { | |
{ Foreground = { Color = "Colour231" } }, | |
{ Background = { Color = "#24283B" } }, | |
{ Attribute = { Italic = true } }, | |
{ Text = " ﲵ : " .. tab.active_pane.title .. " " }, | |
} | |
end | |
return tab.actvie_pane.id .. tab.active_pane.title | |
end) | |
return { | |
-- color_scheme = "Catppuccin Frappe", | |
-- color_scheme = "Dracula+", | |
color_scheme = "Aura (Gogh)", | |
colors = { | |
selection_bg = "#7CCBFA", | |
}, | |
--color_scheme = "tokyonight", | |
font_size = 12.0, | |
font = wezterm.font_with_fallback({ "Maple Mono" }), | |
window_background_opacity = 0.7, | |
-- Smart tab bar [distraction-free mode] | |
hide_tab_bar_if_only_one_tab = true, | |
mouse_bindings = mouse_bindings, | |
keys = keys, | |
use_ime = true, | |
window_padding = { | |
bottom = 0, | |
}, | |
-- tab_bar_at_bottom = true, | |
inactive_pane_hsb = { | |
hue = 1.0, | |
saturation = 1.0, | |
brightness = 1.0, | |
}, | |
} |
. "$HOME/.cargo/env"
export IDEA_HOME=/opt/idea
export PATH=:$PATH:${IDEA_HOME}/bin
export GOPATH=/home/like/go
export PATH=:$PATH:${GOPATH}/bin
export JAVA_HOME=/opt/jdk/jdk19
export PATH=$PATH:${JAVA_HOME}/bin
export MAVEN_HOME=/opt/maven
export PATH=$PATH:${MAVEN_HOME}/bin
get name xprop WM_CLASS
alias chrome="wmctrl -x -a google-chrome || google-chrome-stable > /dev/null 2>&1 &"
alias note="wmctrl -x -a obsidian || /opt/obsidian/obsidian > /dev/null 2>&1 &"
alias music="wmctrl -x -a yesplaymusic || /opt/YesPlayMusic/yesplaymusic > /dev/null 2>&1 &"
alias idea="wmctrl -x -a jetbrains-idea || /opt/idea/bin/idea.sh > /dev/null 2>&1 &"
alias autoremove="sudo pacman -Qqdt | sudo pacman -Rs -"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
安装git zsh