Skip to content

Commit

Permalink
feat(wezterm): add settings
Browse files Browse the repository at this point in the history
  • Loading branch information
tekumara committed Aug 19, 2024
1 parent c5b6e53 commit ff99bd4
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions dotfiles/.wezterm.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
-- Pull in the wezterm API
local wezterm = require 'wezterm'

-- This will hold the configuration.
local config = wezterm.config_builder()

-- This is where you actually apply your config choices

local act = wezterm.action

config.keys = {
{ key = 'PageUp', mods = 'SHIFT', action = act.ScrollByPage(-1) },
{ key = 'PageDown', mods = 'SHIFT', action = act.ScrollByPage(1) },
-- clear scroll back and viewport
{ key = 'k', mods = 'CMD', action = act.ClearScrollback("ScrollbackAndViewport") },
-- https://wezfurlong.org/wezterm/config/lua/keyassignment/SendKey.html
-- Rebind OPT-Left, OPT-Right as ALT-b, ALT-f respectively to match Terminal.app behavior
{ key = 'LeftArrow', mods = 'OPT', action = act.SendKey { key = 'b', mods = 'ALT', }, },
{ key = 'RightArrow', mods = 'OPT', action = act.SendKey { key = 'f', mods = 'ALT' }, },
}

-- and finally, return the configuration to wezterm
return config

0 comments on commit ff99bd4

Please sign in to comment.