kitty tweaks, fix scrollback character issues

This commit is contained in:
Noah Masur 2023-07-18 23:36:09 -04:00
parent f41774f641
commit 52b86efbb1
8 changed files with 39 additions and 16 deletions

View File

@ -17,6 +17,22 @@
"type": "github"
}
},
"baleia-nvim-src": {
"flake": false,
"locked": {
"lastModified": 1681806450,
"narHash": "sha256-jxRlIzWbnSj89032msc5w+2TVt7zVyzlxdXxiH1dQqY=",
"owner": "m00qek",
"repo": "baleia.nvim",
"rev": "00bb4af31c8c3865b735d40ebefa6c3f07b2dd16",
"type": "github"
},
"original": {
"owner": "m00qek",
"repo": "baleia.nvim",
"type": "github"
}
},
"bufferline-nvim-src": {
"flake": false,
"locked": {
@ -395,6 +411,7 @@
"root": {
"inputs": {
"Comment-nvim-src": "Comment-nvim-src",
"baleia-nvim-src": "baleia-nvim-src",
"bufferline-nvim-src": "bufferline-nvim-src",
"cmp-nvim-lsp-src": "cmp-nvim-lsp-src",
"darwin": "darwin",

View File

@ -75,6 +75,10 @@
url = "github:jose-elias-alvarez/null-ls.nvim";
flake = false;
};
baleia-nvim-src = {
url = "github:m00qek/baleia.nvim";
flake = false;
};
Comment-nvim-src = {
url = "github:numToStr/Comment.nvim/v0.8.0";
flake = false;

View File

@ -73,6 +73,7 @@
"media.ffmpeg.vaapi.enabled" =
true; # Enable hardware video acceleration
"cookiebanners.ui.desktop.enabled" = true; # Reject cookie popups
"svg.context-properties.content.enabled" = true; # Sidebery styling
};
userChrome = ''
:root {

View File

@ -28,6 +28,12 @@
programs.rofi.terminal =
lib.mkIf pkgs.stdenv.isLinux "${pkgs.kitty}/bin/kitty";
# Display images in the terminal
programs.fish.shellAliases = {
icat = "kitty +kitten icat";
ssh = "kitty +kitten ssh";
};
programs.kitty = {
enable = true;
environment = { };
@ -85,7 +91,6 @@
# Scrollback
scrolling_lines = 10000;
scrollback_pager_history_size = 10; # MB
scrollback_pager = "${pkgs.neovim}/bin/nvim -c 'normal G'";
# Window
window_padding_width = 6;

View File

@ -22,6 +22,7 @@
pkgs.vimPlugins.playground # Tree-sitter experimenting
pkgs.vimPlugins.nginx-vim
pkgs.vimPlugins.vim-helm
pkgs.baleia-nvim # Clean ANSI from kitty scrollback
(pkgs.vimUtils.buildVimPluginFrom2Nix {
pname = "nmasur";
version = "0.1";

View File

@ -31,8 +31,8 @@ in {
vll = "nvim -c 'Telescope oldfiles'";
};
};
programs.kitty.settings.scrollback_pager = lib.mkForce ''
${neovim}/bin/nvim -c 'setlocal nonumber nolist showtabline=0 foldcolumn=0|Man!' -c "autocmd VimEnter * normal G" -'';
programs.kitty.settings.scrollback_pager = ''
$SHELL -c 'sed -r "s/[[:cntrl:]]\]133;[AC]..//g" | ${neovim}/bin/nvim -c "setlocal nonumber norelativenumber nolist laststatus=0" -c "lua baleia = require(\"baleia\").setup({}); baleia.once(0)" -c "map <silent> q :qa!<CR>" -c "autocmd VimEnter * normal G"' '';
xdg.desktopEntries.nvim = lib.mkIf pkgs.stdenv.isLinux {
name = "Neovim wrapper";

View File

@ -52,10 +52,6 @@ in {
};
};
programs.fish.shellAbbrs = {
cat = "bat"; # Swap cat with bat
};
programs.fish.functions = {
ping = {
description = "Improved ping";

View File

@ -7,12 +7,12 @@ let
# Use nixpkgs vimPlugin but with source directly from plugin author
withSrc = pkg: src: pkg.overrideAttrs (_: { inherit src; });
# Package plugin - disabling until in use
# plugin = pname: src:
# prev.vimUtils.buildVimPluginFrom2Nix {
# inherit pname src;
# version = "master";
# };
# Package plugin - for plugins not found in nixpkgs at all
plugin = pname: src:
prev.vimUtils.buildVimPluginFrom2Nix {
inherit pname src;
version = "master";
};
in {
@ -36,8 +36,7 @@ in {
(withSrc prev.vimPlugins.bufferline-nvim inputs.bufferline-nvim);
nvim-tree-lua = (withSrc prev.vimPlugins.nvim-tree-lua inputs.nvim-tree-lua);
# Packaging plugins with Nix
# comment-nvim = plugin "comment-nvim" comment-nvim-src;
# plenary-nvim = plugin "plenary-nvim" plenary-nvim-src;
# Packaging plugins entirely with Nix
baleia-nvim = plugin "baleia-nvim" inputs.baleia-nvim-src;
}