mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-24 17:58:30 +02:00
feat: limit neovim's title length
This commit is contained in:
@@ -8,6 +8,10 @@ return {
|
|||||||
spell = false, -- Spell checking
|
spell = false, -- Spell checking
|
||||||
swapfile = false, -- Swapfile
|
swapfile = false, -- Swapfile
|
||||||
smartindent = false, -- fix https://github.com/ryan4yin/nix-config/issues/4
|
smartindent = false, -- fix https://github.com/ryan4yin/nix-config/issues/4
|
||||||
|
title = true; -- Set the title of window to `filename [+=-] (path) - NVIM`
|
||||||
|
-- The percentage of 'columns' to use for the title
|
||||||
|
-- When the title is longer, only the end of the path name is shown.
|
||||||
|
titlelen = 20;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -44,20 +44,32 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# consistent with wezterm
|
# consistent with wezterm
|
||||||
keybindings = {
|
keybindings =
|
||||||
"ctrl+shift+m" = "toggle_maximized";
|
{
|
||||||
"ctrl+shift+f" = "show_scrollback"; # search in the current window
|
"ctrl+shift+m" = "toggle_maximized";
|
||||||
"cmd+f" = "show_scrollback";
|
"ctrl+shift+f" = "show_scrollback"; # search in the current window
|
||||||
# Switch to tab 1-8(consistent with wezterm)
|
"cmd+f" = "show_scrollback";
|
||||||
"ctrl+shift+1" = "goto_tab 1";
|
# Switch to tab 1-8(consistent with wezterm)
|
||||||
"ctrl+shift+2" = "goto_tab 2";
|
"ctrl+shift+1" = "goto_tab 1";
|
||||||
"ctrl+shift+3" = "goto_tab 3";
|
"ctrl+shift+2" = "goto_tab 2";
|
||||||
"ctrl+shift+4" = "goto_tab 4";
|
"ctrl+shift+3" = "goto_tab 3";
|
||||||
"ctrl+shift+5" = "goto_tab 5";
|
"ctrl+shift+4" = "goto_tab 4";
|
||||||
"ctrl+shift+6" = "goto_tab 6";
|
"ctrl+shift+5" = "goto_tab 5";
|
||||||
"ctrl+shift+7" = "goto_tab 7";
|
"ctrl+shift+6" = "goto_tab 6";
|
||||||
"ctrl+shift+8" = "goto_tab 8";
|
"ctrl+shift+7" = "goto_tab 7";
|
||||||
};
|
"ctrl+shift+8" = "goto_tab 8";
|
||||||
|
}
|
||||||
|
// (lib.mkIf pkgs.stdenv.isDarwin {
|
||||||
|
# Switch to tab 1-8(consistent with wezterm)
|
||||||
|
"cmd+1" = "goto_tab 1";
|
||||||
|
"cmd+2" = "goto_tab 2";
|
||||||
|
"cmd+3" = "goto_tab 3";
|
||||||
|
"cmd+4" = "goto_tab 4";
|
||||||
|
"cmd+5" = "goto_tab 5";
|
||||||
|
"cmd+6" = "goto_tab 6";
|
||||||
|
"cmd+7" = "goto_tab 7";
|
||||||
|
"cmd+8" = "goto_tab 8";
|
||||||
|
});
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
background_opacity = "0.93";
|
background_opacity = "0.93";
|
||||||
@@ -74,9 +86,9 @@
|
|||||||
# https://github.com/kovidgoyal/kitty/issues/719
|
# https://github.com/kovidgoyal/kitty/issues/719
|
||||||
scrollback_pager = ''$SHELL -c 'nvim -u NONE -R -M -u ${./kitty_pager.lua} -c "lua kitty_pager(INPUT_LINE_NUMBER, CURSOR_LINE, CURSOR_COLUMN)" -' '';
|
scrollback_pager = ''$SHELL -c 'nvim -u NONE -R -M -u ${./kitty_pager.lua} -c "lua kitty_pager(INPUT_LINE_NUMBER, CURSOR_LINE, CURSOR_COLUMN)" -' '';
|
||||||
# for active tab
|
# for active tab
|
||||||
active_tab_title_template = "{fmt.fg.green}{bell_symbol}{activity_symbol}{fmt.fg.tab}{index}:{title}";
|
active_tab_title_template = "{index}:{title}";
|
||||||
# for inactive tab
|
# for inactive tab
|
||||||
tab_title_template = "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{index}:{title}";
|
tab_title_template = "{index}:{title}";
|
||||||
};
|
};
|
||||||
|
|
||||||
# macOS specific settings
|
# macOS specific settings
|
||||||
|
|||||||
Reference in New Issue
Block a user