-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdot_wezterm.lua.tmpl
More file actions
53 lines (48 loc) · 1.61 KB
/
dot_wezterm.lua.tmpl
File metadata and controls
53 lines (48 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
-- vi: ft=lua
local wezterm = require('wezterm')
local rose_pine = wezterm.plugin.require("https://github.com/raindev/rose-pine-wezterm")
local function change_tmux_theme(theme)
local home = os.getenv('HOME')
local sed_cmd = string.format(
[[{{ lookPath "sed" }} -i "s/@rose_pine_variant '.*'/@rose_pine_variant '%s'/" %s/.tmux.conf]],
theme, home)
local tmux_cmd = string.format('{{ lookPath "tmux" }} source %s/.tmux.conf', home)
os.execute(sed_cmd .. ' && ' .. tmux_cmd .. ' &')
end
local function theme_for_appearance(appearance)
if appearance:find 'Dark' then
change_tmux_theme('main')
return rose_pine.main
else
change_tmux_theme('dawn')
return rose_pine.dawn
end
end
local theme = theme_for_appearance(wezterm.gui.get_appearance())
return {
-- use full binary path as macOS doesn't source ~/.profile on login
default_prog = { '{{ lookPath "tmux" }}', 'new', '-A' },
-- adjust based on hostname {{- if eq .chezmoi.hostname "black" }}
font_size = 14,
-- {{- else }}
font_size = 16,
-- {{- end }}
font = wezterm.font('Source Code Pro'),
use_fancy_tab_bar = false,
window_decorations = "RESIZE",
window_frame = theme.window_frame(),
colors = theme.colors(),
keys = {
{
key = 'F11',
action = wezterm.action.ToggleFullScreen
}
},
check_for_updates = false,
-- the system log from systemd-core-dump includes \u{1f855} prefix
warn_about_missing_glyphs = false,
audible_bell = "Disabled",
-- make both Option keys behave as Meta on macOS
send_composed_key_when_left_alt_is_pressed = false,
send_composed_key_when_right_alt_is_pressed = false
}