adds tmux plugins

This commit is contained in:
Dennis 2026-01-22 09:10:26 +01:00
parent ec4d11aa62
commit 0dc8277e66

View file

@ -1,16 +1,26 @@
{ config, pkgs, ... }:
# let
# tmux-current-pane-hostname = pkgs.tmuxPlugin.mkTmuxPlugin {
# pluginName = "tmux-current-pane-hostname";
# version = "1.0";
# src = pkgs.fetchFromGitHub {
# owner = "soyuka";
# repo = "tmux-current-pane-hostname";
# rev = "29dad92c8a2486e5b6f116e42883906c00a1f0a2";
# sha256 = "sha256-ymmCI6VYvf94Ot7h2GAboTRBXPIREP+EB33+px5aaJk=";
# };
# };
# in
{ pkgs, ... }:
let
tmux-current-pane-hostname = pkgs.tmuxPlugin.mkTmuxPlugin {
pluginName = "tmux-current-pane-hostname";
version = "1.0";
src = pkgs.fetchFromGitHub {
owner = "soyuka";
repo = "tmux-current-pane-hostname";
rev = "0a8a187afcdf258e32a6b014105c12d344b670a5";
hash = "sha256-t5jRUvwiwym6f7vfKD/D0Vu1UXpxRMCLNyBbY0nZciw=";
};
};
tmux-compile = pkgs.tmuxPlugin.mkTmuxPlugin {
pluginName = "tmux-compile";
version = "1.0";
src = pkgs.fetchFromGitHub {
owner = "alexekdahl";
repo = "tmux-compile";
rev = "be830d944a189fc6b209490fcb815346a3c402ca";
hash = "sha256-+b3Oc4M0xhwCo7HupAJpG68ZxMC8yMNZLl6QtEQv12o=";
};
};
in
{
programs.tmux = {
@ -27,6 +37,18 @@
keyMode = "vi";
escapeTime = 0;
plugins = with pkgs; [
tmux-current-pane-hostname
{
plugin = tmux-compile;
extraConfig = ''
set -g @compile-mode-key "C-b"
set -g @compile-mode-recompile-key "C-r"
set -g @compile-mode-kill-key "C-k"
set -g @compile-mode-height "30%"
set -g @compile-mode-history-file "$HOME/.config/tmux-compile-mode/compile-history"
set -g @compile-mode-open-file-key "Enter"
'';
}
{
plugin = tmuxPlugins.resurrect;
extraConfig = ''
@ -47,7 +69,7 @@
set -g status-position top
set -g status-style bg=#1d202f,fg=white
set -g status-left ""
set -g status-right "#[bg=default,fg=magenta]>> #S << #[bg=default,fg=white]#H "
set -g status-right "#[bg=default,fg=magenta]>> #S << #[bg=default,fg=white]#{hostname_short} "
set-window-option -g window-status-style 'fg=magenta,bg=#1d202f'
set-window-option -g window-status-format ' #I #[fg=white]#W #[fg=cyan]#F '
set-window-option -g window-status-current-style "fg=black,bg=magenta"