add the window picker

This commit is contained in:
Michael Flossmann 2024-09-11 10:45:51 +02:00
parent 2e7086dc22
commit 9b81cc6cb4
3 changed files with 70 additions and 0 deletions

View file

@ -0,0 +1,46 @@
{lib, pkgs, ...}:{
extra = {
packages = [
(import ./package.nix { inherit lib pkgs; })
];
config = /*Lua*/ ''
require('window-picker').setup({
hint = 'statusline-winbar', --alternative: 'floating-big-letter',
picker_config = {
statusline_winbar_picker = {
selection_display = function(char, windowid)
return table.concat({'%=', '=== ', char, ' ===', '%='})
end
},
},
highlights = {
statusline = {
focused = {
fg = '#E67e80',
bg = '#2e383c',
bold = true,
},
unfocused = {
fg = '#a7c080',
bg = '#2e383c',
bold = true,
},
},
winbar = {
focused = {
fg = '#E67e80',
bg = '#2e383c',
bold = true,
},
unfocused = {
fg = '#a7c080',
bg = '#2e383c',
bold = true,
},
},
}
})
'';
};
}

View file

@ -0,0 +1,23 @@
{ pkgs, ...}:
let
version = "v2.0.3";
owner = "s1n7ax";
repo = "nvim-window-picker";
in
pkgs.vimUtils.buildVimPlugin {
name = "nvim-window-picker";
inherit version;
# NOTE: for my work PC, fetchFromGithub fails, due to an SSL error
src = builtins.fetchTarball {
url = "http://github.com/${owner}/${repo}/archive/${version}.tar.gz";
sha256 = "sha256:1bcjsx5qgvj1gi6zdi3fwc44x7afh35xbyrjik0dzl3hj6ds960g";
};
# src = pkgs.fetchFromGitHub {
# owner = "s1n7ax";
# repo = "nvim-window-picker";
# rev = version;
# hash = "sha256:1bcjsx5qgvj1gi6zdi3fwc44x7afh35xbyrjik0dzl3hj6ds960g";
# }
}

View file

@ -8,6 +8,7 @@ pkgs.vimUtils.buildVimPlugin {
name = "zoxide.vim"; name = "zoxide.vim";
inherit version; inherit version;
# NOTE: for my work PC, fetchFromGithub fails, due to an SSL error
src = builtins.fetchTarball { src = builtins.fetchTarball {
url = "http://github.com/${owner}/${repo}/archive/${version}.tar.gz"; url = "http://github.com/${owner}/${repo}/archive/${version}.tar.gz";
sha256 = "sha256:025rqfs0n2ryi7xwzpq5h2r7jhvxbrb2gjp6fqa072hapgqr0igb"; sha256 = "sha256:025rqfs0n2ryi7xwzpq5h2r7jhvxbrb2gjp6fqa072hapgqr0igb";