Commit ebc0a51e3877

Vincent Demeester <vincent@sbr.pm>
2018-08-06 19:17:43
Try to configure tmux-plugin/tpm automagically
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 261d981
overlays/sbr.nix
@@ -1,6 +1,9 @@
 self: super:
 {
-	prm = import ../pkgs/prm {
-	    inherit (super) stdenv lib buildGoPackage fetchgit;
-	};
-}
\ No newline at end of file
+  prm = import ../pkgs/prm {
+      inherit (super) stdenv lib buildGoPackage fetchgit;
+  };
+  tmux-tpm = import ../pkgs/tmux-tpm {
+    inherit (super) stdenv lib fetchFromGitHub;
+  };
+}
tmux/keybindings
@@ -29,16 +29,16 @@ set -g mode-key vi
 # `PREFIX`-`ESCAPE` for going into copy mode
 bind-key ESCAPE copy-mode
 # Rebinding some vi-copy keys in a more bepoish fashion.
-bind-key -t vi-copy 'v' begin-selection
-bind-key -t vi-copy 'y' copy-selection
-bind-key -t vi-copy 'C' top-line
-bind-key -t vi-copy 'T' scroll-down
-bind-key -t vi-copy 'S' scroll-up
-bind-key -t vi-copy 'R' bottom-line
-bind-key -t vi-copy 'c' cursor-left
-bind-key -t vi-copy 't' cursor-down
-bind-key -t vi-copy 's' cursor-up
-bind-key -t vi-copy 'r' cursor-right
+#bind-key -Tvi-copy 'v' begin-selection
+#bind-key -Tvi-copy 'y' copy-selection
+#bind-key -Tvi-copy 'C' top-line
+#bind-key -Tvi-copy 'T' scroll-down
+#bind-key -Tvi-copy 'S' scroll-up
+#bind-key -Tvi-copy 'R' bottom-line
+#bind-key -Tvi-copy 'c' cursor-left
+#bind-key -Tvi-copy 't' cursor-down
+#bind-key -Tvi-copy 's' cursor-up
+#bind-key -Tvi-copy 'r' cursor-right
 # Telling childs that this is a 256 terminal multiplexer
 set -g default-terminal "screen-256color"
 # Maximizing/Restoring panes (useful for *a lot* of workflows)
tmux/tmux.conf
@@ -120,16 +120,6 @@ set -g message-fg colour232
 set -g message-bg colour166
 
 # }
-set-environment -g TMUX_PLUGIN_MANAGER_PATH '$HOME/.config/tmux/plugins'
-
-set -g @plugin 'tmux-plugins/tpm'
-set -g @plugin 'tmux-plugins/tmux-resurrect'
-set -g @plugin 'tmux-plugins/tmux-continuum'
-set -g @plugin 'tmux-plugins/tmux-copycat'
- 
-set -g @continuum-restore 'on'
-
-run '~/.config/tmux/plugins/tpm/tpm'
 
 if 'command -v fish >/dev/null' \
    'set -g default-shell ~/.nix-profile/bin/fish'
\ No newline at end of file
base.nix
@@ -10,7 +10,20 @@ rec {
       path = https://github.com/vdemeester/home-manager/archive/fish-module.tar.gz;
     };
   };
-  home.file.".tmux.conf".source = ./tmux/tmux.conf;
+  home.file.".tmux.conf".text = ''
+    source-file $HOME/.config/tmux/tmux.conf
+    set-environment -g TMUX_PLUGIN_MANAGER_PATH '$HOME/.config/tmux/plugins'
+
+    set -g @plugin 'tmux-plugins/tpm'
+    set -g @plugin 'tmux-plugins/tmux-resurrect'
+    set -g @plugin 'tmux-plugins/tmux-continuum'
+    set -g @plugin 'tmux-plugins/tmux-copycat'
+
+    set -g @continuum-restore 'on'
+
+    run '${pkgs.tmux-tpm}/tpm'
+'';
+  xdg.configFile."tmux/tmux.conf".source = ./tmux/tmux.conf;
   xdg.configFile."tmux/commons/keybindings".source = ./tmux/keybindings;
   home.packages = with pkgs; [
     jq
hokkaido.nix
@@ -13,6 +13,5 @@
   ];
   home.packages = with pkgs; [
     vscode
-    weechat weechat-xmpp
   ];
 }