diff --git a/modules/tmux/default.nix b/modules/tmux/default.nix index 40c4c49..1b3de49 100644 --- a/modules/tmux/default.nix +++ b/modules/tmux/default.nix @@ -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"