irongit

My wezterm configuration. Allows workspace configurations with environment variables for each new workspace pane.

lazygit opens in a maximized pane

huncholanehuncholaneauthored
parent 4ddcf36commit be8fdd630fd71e94957e94606028e940d0b3143eBrowse files

2 files changed, +16 -1

+14-0utils.lua
@@ -0,0 +1,14 @@
1+local wezterm = require("wezterm")
2+local mux = wezterm.mux
3+local M = {}
4+
5+function M.SpawnMaximizedCommandInNewWindow(args)
6+ return wezterm.action_callback(function(win, pane)
7+ local cwd_uri = pane:get_current_working_dir()
8+ local cwd = cwd_uri and cwd_uri.file_path or nil
9+ _, _, win = mux.spawn_window({ args = args, cwd = cwd })
10+ win:gui_window():maximize()
11+ end)
12+end
13+
14+return M
+2-1wezterm.lua
@@ -1,4 +1,5 @@
11 local wezterm = require("wezterm")
2+local utils = require("utils")
23 local act = wezterm.action
34 local mux = wezterm.mux
45 local config = wezterm.config_builder()
@@ -76,7 +77,7 @@ config.keys = {
7677 {
7778 key = "g",
7879 mods = "CTRL|SHIFT",
79- action = act.SpawnCommandInNewWindow({ args = { "lazygit" } }),
80+ action = utils.SpawnMaximizedCommandInNewWindow({ "lazygit" }),
8081 },
8182 }
8283