wezterm: use multiplexer
This commit is contained in:
parent
dcf02aff92
commit
d4605f5a55
3 changed files with 55 additions and 7 deletions
14
.config/wezterm/shelman-dark.toml
Normal file
14
.config/wezterm/shelman-dark.toml
Normal file
|
@ -0,0 +1,14 @@
|
|||
[metadata]
|
||||
name = "Shelman Dark"
|
||||
origin_url = ""
|
||||
|
||||
[colors]
|
||||
ansi = ["#000000", "#ff0035", "#85ff00", "#ffc900", "#00a7ff", "#cb01ff", "#00e0ff", "#f0f0f0"]
|
||||
brights = ["#000000", "#ffb4af", "#d2ffba", "#ffebb7", "#b1deff", "#edb5ff", "#bdf4ff", "#ffffff"]
|
||||
background = "#1e2835"
|
||||
foreground = "#e0e0e0"
|
||||
cursor_bg = "#ffcc00"
|
||||
cursor_fg = "#000000"
|
||||
cursor_border = "#ffcc00"
|
||||
selection_bg = "#d7d7d7"
|
||||
selection_fg = "#000000"
|
14
.config/wezterm/shelman-light.toml
Normal file
14
.config/wezterm/shelman-light.toml
Normal file
|
@ -0,0 +1,14 @@
|
|||
[metadata]
|
||||
name = "Shelman Light"
|
||||
origin_url = ""
|
||||
|
||||
[colors]
|
||||
ansi = ["#000000", "#9e001d", "#509e00", "#ffc900", "#00669e", "#7d009e", "#008a9e", "#f0f0f0"]
|
||||
brights = ["#000000", "#ff0035", "#85ff00", "#ffc900", "#00a7ff", "#cb01ff", "#00e0ff", "#ffffff"]
|
||||
background = "#fefeff"
|
||||
foreground = "#000000"
|
||||
cursor_bg = "#aa0000"
|
||||
cursor_fg = "#ffffff"
|
||||
cursor_border = "#aa0000"
|
||||
selection_bg = "#d7d7d7"
|
||||
selection_fg = "#000000"
|
|
@ -1,12 +1,27 @@
|
|||
local wezterm = require("wezterm")
|
||||
local io = require("io")
|
||||
local os = require("os")
|
||||
local mux = wezterm.mux
|
||||
local act = wezterm.action
|
||||
|
||||
function font_with_fallback(name, params)
|
||||
local function font_with_fallback(name, params)
|
||||
local names = { name, "Noto Color Emoji" }
|
||||
return wezterm.font_with_fallback(names, params)
|
||||
end
|
||||
|
||||
wezterm.on("gui-startup", function(cmd)
|
||||
local tab, pane, window = mux.spawn_window(cmd or {})
|
||||
window:spawn_tab({})
|
||||
window:spawn_tab({})
|
||||
window:spawn_tab({})
|
||||
window:spawn_tab({})
|
||||
window:spawn_tab({})
|
||||
window:spawn_tab({})
|
||||
window:spawn_tab({})
|
||||
window:spawn_tab({})
|
||||
window:spawn_tab({})
|
||||
end)
|
||||
|
||||
wezterm.on("mux-startup", function()
|
||||
local tab, pane, window = mux.spawn_window({})
|
||||
window:spawn_tab({})
|
||||
|
@ -20,20 +35,25 @@ wezterm.on("mux-startup", function()
|
|||
window:spawn_tab({})
|
||||
end)
|
||||
|
||||
function scheme_for_appearance(appearance)
|
||||
local function scheme_for_appearance(appearance)
|
||||
if appearance:find("Dark") then
|
||||
-- return "Shelman Light"
|
||||
return "Shelman Dark"
|
||||
else
|
||||
return "Shelman Dark"
|
||||
-- return "Shelman Light"
|
||||
return "Shelman Light"
|
||||
end
|
||||
end
|
||||
|
||||
local function _get_scheme()
|
||||
-- if wezterm.gui then
|
||||
-- return return scheme_for_appearance(wezterm.gui.get_appearance())
|
||||
-- end
|
||||
return "Shelman Dark"
|
||||
end
|
||||
|
||||
local is_server = wezterm.hostname() == "dln-dev"
|
||||
|
||||
return {
|
||||
color_scheme = (is_server and "Shelman Dark" or scheme_for_appearance(wezterm.gui.get_appearance())),
|
||||
color_scheme = _get_scheme(),
|
||||
color_scheme_dirs = { "/home/dln/.config/wezterm" },
|
||||
font = font_with_fallback("Iosevka Shelman SS09", { weight = "Regular" }),
|
||||
font_rules = {
|
||||
|
@ -139,7 +159,7 @@ return {
|
|||
{
|
||||
name = "dln-dev",
|
||||
local_echo_threshold_ms = 100,
|
||||
proxy_command = is_server == false and { "ssh", "dln-dev", "wezterm", "cli", "proxy" } or null,
|
||||
proxy_command = is_server == false and { "ssh", "dln-dev", "wezterm", "cli", "proxy" } or nil,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue