Compare commits

...

2 commits

Author SHA1 Message Date
Bruno BELANYI 07cf0fa4da home: wm: i3: launch tmux when starting terminal
All checks were successful
continuous-integration/drone/push Build is passing
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.
2021-09-30 15:38:43 +02:00
Bruno BELANYI 24de1890fc home: zsh: launch tmux when starting a shell 2021-09-30 15:34:16 +02:00
2 changed files with 13 additions and 1 deletions

View file

@ -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";

View file

@ -46,6 +46,16 @@ in
# Modal editing is life, but CLI benefits from emacs gymnastics
defaultKeymap = "emacs";
# Make those happen early to avoid doing double the work
initExtraFirst =
lib.optionalString config.my.home.tmux.enable ''
# Launch tmux unless already inside one
if [ -z "$TMUX" ]; then
exec tmux new-session
fi
''
;
initExtra = lib.concatMapStrings builtins.readFile [
./completion-styles.zsh
./extra-mappings.zsh