From a15a9c6c4d268f3cb667219c79778ff476ec0a5e Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 16 May 2022 19:15:54 -0700 Subject: zsh: manage tmux and start sway If login, start sway. If tmux is not running, start it. --- home/zsh/default.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'home/zsh/default.nix') diff --git a/home/zsh/default.nix b/home/zsh/default.nix index 392ccfc..0ee9e43 100644 --- a/home/zsh/default.nix +++ b/home/zsh/default.nix @@ -31,13 +31,25 @@ in { REPORTTIME = 5; }; - shellAliases = { ll = "ls -l --color=auto"; }; + shellAliases = { + ll = "ls -l --color=auto"; + lt = "ls -ltrh --color=auto"; + drone = "DRONE_TOKEN=$(pass api/drone.fcuny.xyz) drone"; + }; defaultKeymap = "emacs"; + + initExtraFirst = '' + if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then + exec sway + fi + ''; + initExtra = lib.concatMapStrings builtins.readFile [ ./completion-style.zsh ./options.zsh ./prompt.zsh + ./tmux.zsh ]; }; }; -- cgit v1.2.3