diff --git a/nvim/init.lua b/nvim/init.lua index 1131c03..26f32c6 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -229,27 +229,26 @@ local function toggle_pim() return end - local H = vim.o.lines - 2 - local col_w = math.min(vim.o.columns, math.max(90, math.floor(vim.o.columns * 0.45))) + -- full-screen: alot left, abook top-right, calendar bottom-right + local H = vim.o.lines - 2 + local W = vim.o.columns + local left_w = math.max(1, math.floor(W * 0.55)) + local right_w = math.max(1, W - left_w) + local top_h = math.max(1, math.floor(H / 2)) + local bot_h = math.max(1, H - top_h) - -- abook gets a fixed 24-line minimum; mail/calendar split the rest 57/43 - local ab_h = math.max(24, math.floor(H * 0.30)) - local rest = math.max(2, H - ab_h) - local mail_h = math.max(1, math.floor(rest * 0.57)) - local cal_h = math.max(1, rest - mail_h) - - local w1 = _pim_float(0, 0, mail_h, col_w) + local w1 = _pim_float(0, 0, H, left_w) local ok, err = pcall(vim.cmd, "terminal alot") if not ok then _pim_scratch("alot", err) end - local w2 = _pim_float(mail_h, 0, cal_h, col_w) - ok, err = pcall(vim.cmd, "Calendar -position=here") - if not ok then _pim_scratch("calendar.vim", err) end - - local w3 = _pim_float(mail_h + cal_h, 0, ab_h, col_w) + local w2 = _pim_float(0, left_w, top_h, right_w) ok, err = pcall(vim.cmd, "terminal abook") if not ok then _pim_scratch("abook", err) end + local w3 = _pim_float(top_h, left_w, bot_h, right_w) + ok, err = pcall(vim.cmd, "Calendar -position=here") + if not ok then _pim_scratch("calendar.vim", err) end + _pim_wins = { w1, w2, w3 } vim.api.nvim_set_current_win(w1) end diff --git a/setup/modules/optional-Modules/apps/mail-notmuch.sh b/setup/modules/optional-Modules/apps/mail-notmuch.sh index 4d59c78..2668631 100755 --- a/setup/modules/optional-Modules/apps/mail-notmuch.sh +++ b/setup/modules/optional-Modules/apps/mail-notmuch.sh @@ -97,6 +97,16 @@ cat > ~/.config/alot/config << EOF sendmail_command = msmtp -a main sent_box = maildir://$MAILDIR/Sent draft_box = maildir://$MAILDIR/Drafts + +[bindings] + [[search]] + esc = exit + [[thread]] + esc = exit + [[taglist]] + esc = exit + [[bufferlist]] + esc = exit EOF # ── systemd timer for periodic sync ───────────────────────────────────────────