-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_wezterm.lua
55 lines (41 loc) · 1.26 KB
/
dot_wezterm.lua
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
54
55
-- Pull in the wezterm API
local wezterm = require 'wezterm'
-- This table will hold the configuration.
local config = {}
-- In newer versions of wezterm, use the config_builder which will
-- help provide clearer error messages
if wezterm.config_builder then
config = wezterm.config_builder()
end
-- This is where you actually apply your config choices
-- For example, changing the color scheme:
config.color_scheme = 'Dracula'
config.font = wezterm.font 'SauceCodePro Nerd Font Mono'
config.font_size = 12.5
config.window_background_opacity = 0.95
config.macos_window_background_blur = 20
config.keys = {
{
key = '\\',
mods = 'CTRL',
action = wezterm.action.SplitHorizontal { domain = 'CurrentPaneDomain' },
},
{
key = ']',
mods = 'CTRL',
action = wezterm.action.SplitVertical { domain = 'CurrentPaneDomain' },
},
}
wezterm.on('update-right-status', function(window, pane)
-- "Wed Mar 3 08:14"
local date = wezterm.strftime '%a %b %-d %H:%M '
local bat = ''
for _, b in ipairs(wezterm.battery_info()) do
bat = '🔋 ' .. string.format('%.0f%%', b.state_of_charge * 100)
end
window:set_right_status(wezterm.format {
{ Text = bat .. ' ' .. date },
})
end)
-- and finally, return the configuration to wezterm
return config