feat(nix): enhance WezTerm and Fish configuration
- Enabled scroll bar and added conditional fullscreen key handling in `wezterm.lua` for better usability. - Updated Fish shell to set global `LESS` mouse support for improved navigation.
This commit is contained in:
parent
dee480b574
commit
267be620cf
2 changed files with 22 additions and 0 deletions
|
|
@ -75,8 +75,29 @@
|
|||
xdg.configFile."wezterm/wezterm.lua".text = ''
|
||||
local wezterm = require("wezterm")
|
||||
local config = wezterm.config_builder()
|
||||
local act = wezterm.action
|
||||
|
||||
config.enable_kitty_keyboard = true
|
||||
config.enable_scroll_bar = true
|
||||
|
||||
local function action_unless_fullscreen(action, key)
|
||||
return wezterm.action_callback(function(win, pane)
|
||||
if pane:is_alt_screen_active() then
|
||||
-- a program is full screen, passthrough the key
|
||||
win:perform_action(act.SendKey { key = key, mods = 'NONE' }, pane)
|
||||
else
|
||||
-- do the action
|
||||
win:perform_action(action, pane)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
-- config.keys = {
|
||||
-- { key = 'PageUp', mods = 'NONE', action = action_unless_fullscreen(act.ScrollByPage(-0.5), 'PageUp') },
|
||||
-- { key = 'PageDown', mods = 'NONE', action = action_unless_fullscreen(act.ScrollByPage(0.5), 'PageDown') },
|
||||
-- }
|
||||
|
||||
config.term = 'wezterm'
|
||||
|
||||
return config
|
||||
'';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue