summaryrefslogtreecommitdiff
path: root/modules/basic-tools/multiplexers.nix
diff options
context:
space:
mode:
authorGrigory Shipunov2023-02-14 22:00:22 +0100
committerGrigory Shipunov2023-02-14 22:00:22 +0100
commitfc21e3a1b2255d82afcc45770704920da875cbfc (patch)
treee3c0d0d1a02ae790fae34e1d20cec3b517d62fa6 /modules/basic-tools/multiplexers.nix
parentf3ef2e058ce050af259a650d587bb47138333567 (diff)
refactor basic tools a bit
Diffstat (limited to 'modules/basic-tools/multiplexers.nix')
-rw-r--r--modules/basic-tools/multiplexers.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/modules/basic-tools/multiplexers.nix b/modules/basic-tools/multiplexers.nix
new file mode 100644
index 0000000..c089128
--- /dev/null
+++ b/modules/basic-tools/multiplexers.nix
@@ -0,0 +1,43 @@
+{ pkgs, ... }: {
+ programs.tmux = {
+ enable = true;
+ keyMode = "vi";
+ escapeTime = 0;
+ historyLimit = 500000;
+ aggressiveResize = true;
+ terminal = "tmux-256color";
+ };
+
+ programs.zsh.interactiveShellInit = ''
+ # create new tmux session with $1 as a name
+ # if no arguments supplied, use name of current dir
+
+ function tn {
+ if [ $# -eq 0 ]
+ then
+ tmux new-session -s $(basename $(pwd))
+ else
+ tmux new-session -s $1
+ fi
+ }
+ '';
+
+ environment.shellAliases = {
+ tl = "tmux list-sessions";
+ ta = "tmux attach -t";
+ };
+
+ environment.systemPackages = [
+ pkgs.screen
+ ];
+
+ programs.screen.screenrc = ''
+ defscrollback 10000
+
+ startup_message off
+
+ hardstatus on
+ hardstatus alwayslastline
+ hardstatus string "%w"
+ '';
+}