From da2f4e0da94803a794099aa11d25b06fa1259000 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 14 Oct 2021 16:16:38 -0400 Subject: Add tmux fzf plugin --- lib/common.nix | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/common.nix b/lib/common.nix index 95f072f..2f70cc6 100644 --- a/lib/common.nix +++ b/lib/common.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: let locale = "en_US.UTF-8"; @@ -153,6 +153,41 @@ in done ''; }) + (pkgs.tmuxPlugins.mkTmuxPlugin { + pluginName = "tmux-fzf"; + rtpFilePath = "main.tmux"; + version = "unstable-2020-12-07"; + src = pkgs.fetchFromGitHub { + owner = "sainnhe"; + repo = "tmux-fzf"; + rev = "5efeb91086040a3becf5372fb38258acd0579954"; + sha256 = "1z0zmsf8asxs9wbwvkiyd81h93wb2ikl8nxxc26sdpi6l333q5s9"; + }; + postInstall = '' + find $target -type f -print0 | xargs -0 sed -i -e 's|fzf |${pkgs.fzf}/bin/fzf |g' + find $target -type f -print0 | xargs -0 sed -i -e 's|sed |${pkgs.gnused}/bin/sed |g' + find $target -type f -print0 | xargs -0 sed -i -e 's|tput |${pkgs.ncurses}/bin/tput |g' + ''; + meta = { + homepage = "https://github.com/sainnhe/tmux-fzf"; + description = "Use fzf to manage your tmux work environment! "; + longDescription = + '' + Features: + * Manage sessions (attach, detach*, rename, kill*). + * Manage windows (switch, link, move, swap, rename, kill*). + * Manage panes (switch, break, join*, swap, layout, kill*, resize). + * Multiple selection (support for actions marked by *). + * Search commands and append to command prompt. + * Search key bindings and execute. + * User menu. + * Popup window support. + ''; + license = lib.licenses.mit; + platforms = lib.platforms.unix; + maintainers = with lib.maintainers; [ kyleondy ]; + }; + }) ]; }; -- cgit v1.2.3