From 07cf0fa4daff74e9d3d9916da4c4056c6f1b7c7f Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 30 Sep 2021 15:36:29 +0200 Subject: [PATCH] home: wm: i3: launch tmux when starting terminal Similarly to the `zsh` snippet, launch tmux unless I explicitly do not want it. The reason I also add it in `i3` is to make the launch happen sooner, and to avoid doing double work on some shell startup shenanigans if I can. --- home/wm/i3/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/home/wm/i3/default.nix b/home/wm/i3/default.nix index f8080ad..2a99958 100644 --- a/home/wm/i3/default.nix +++ b/home/wm/i3/default.nix @@ -157,7 +157,9 @@ in keybindings = lib.my.recursiveMerge [ { # The basics - "${modifier}+Return" = "exec ${terminal}"; + "${modifier}+Return" = "exec ${terminal} ${ + lib.optionalString config.my.home.tmux.enable "-e tmux new-session" + }"; "${modifier}+Shift+Return" = "exec env TMUX=nil ${terminal}"; "${modifier}+Shift+q" = "kill"; "${modifier}+f" = "fullscreen toggle";