feat(wezterm): toggleable tab bar, reformat with stylua
This commit is contained in:
parent
893241c9d8
commit
2629d175bc
5 changed files with 234 additions and 215 deletions
|
@ -1,9 +1,9 @@
|
|||
{ config, ... }:
|
||||
{ config, machine, ... }:
|
||||
|
||||
{
|
||||
xdg.configFile = {
|
||||
"wezterm" = {
|
||||
source = config.lib.file.mkOutOfStoreSymlink ./wezterm;
|
||||
source = config.lib.file.mkOutOfStoreSymlink "${machine.flakePath}/modules/wezterm";
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
|
|
7
modules/wezterm/.stylua.toml
Normal file
7
modules/wezterm/.stylua.toml
Normal file
|
@ -0,0 +1,7 @@
|
|||
column_width = 80
|
||||
line_endings = "Unix"
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
quote_style = "AutoPreferDouble"
|
||||
collapse_simple_statement = "Never"
|
||||
call_parentheses = "Always"
|
|
@ -32,7 +32,10 @@ M.get_font = function(name)
|
|||
}
|
||||
|
||||
return {
|
||||
font = wezterm.font(fonts[name].font),
|
||||
font = wezterm.font_with_fallback({
|
||||
fonts[name].font,
|
||||
"Symbols Nerd Font",
|
||||
}),
|
||||
size = fonts[name].size,
|
||||
}
|
||||
end
|
||||
|
|
|
@ -73,6 +73,17 @@ return {
|
|||
},
|
||||
-- 'z' to toggle the zoom for the current pane
|
||||
{ key = "z", mods = "LEADER", action = "TogglePaneZoomState" },
|
||||
-- 'Z' to hide the tab bar (useful for screenshots)
|
||||
{
|
||||
key = "Z",
|
||||
mods = "LEADER",
|
||||
action = wezterm.action_callback(function(window)
|
||||
wezterm.GLOBAL.enable_tab_bar = not wezterm.GLOBAL.enable_tab_bar
|
||||
window:set_config_overrides({
|
||||
enable_tab_bar = wezterm.GLOBAL.enable_tab_bar,
|
||||
})
|
||||
end),
|
||||
},
|
||||
-- 'v' to visually select in the current pane
|
||||
{ key = "v", mods = "LEADER", action = "ActivateCopyMode" },
|
||||
-- 'r' to rotate panes
|
||||
|
|
|
@ -1,22 +1,19 @@
|
|||
local wezterm = require("wezterm")
|
||||
local fonts = require("fonts")
|
||||
local theme = require("theme")
|
||||
local shortcuts = require("shortcuts")
|
||||
require("bar")
|
||||
|
||||
local font = fonts.get_font("berkeley")
|
||||
|
||||
-- wezterm.GLOBAL.smart_padding = {
|
||||
-- left = 12,
|
||||
-- right = 12,
|
||||
-- top = 0,
|
||||
-- bottom = 0,
|
||||
-- }
|
||||
wezterm.GLOBAL = {
|
||||
enable_tab_bar = true,
|
||||
}
|
||||
|
||||
return {
|
||||
-- keys
|
||||
disable_default_key_bindings = true,
|
||||
leader = { key = "s", mods = "CTRL", timeout_milliseconds = 5000 },
|
||||
keys = require("shortcuts"),
|
||||
keys = shortcuts,
|
||||
-- font
|
||||
font = font.font,
|
||||
font_size = font.size,
|
||||
|
@ -43,7 +40,8 @@ return {
|
|||
tab_max_width = 32,
|
||||
use_fancy_tab_bar = false,
|
||||
window_background_opacity = 1.00,
|
||||
-- hide_tab_bar_if_only_one_tab = true,
|
||||
hide_tab_bar_if_only_one_tab = false,
|
||||
enable_tab_bar = wezterm.GLOBAL.tab_bar_hidden,
|
||||
-- etc.
|
||||
adjust_window_size_when_changing_font_size = false,
|
||||
use_resize_increments = false,
|
||||
|
|
Loading…
Reference in a new issue