From 6dc6cb52faf242e89c5f19293fc0470d89b31dd8 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 30 Nov 2018 14:04:42 +0100 Subject: tv bash: use XMONAD_SPAWN_WORKSPACE only for tv change directory only for interactivetv user --- tv/2configs/bash/default.nix | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'tv/2configs/bash') diff --git a/tv/2configs/bash/default.nix b/tv/2configs/bash/default.nix index b75ad8b..3b4a4aa 100644 --- a/tv/2configs/bash/default.nix +++ b/tv/2configs/bash/default.nix @@ -13,6 +13,18 @@ with import ; shopt -s histappend histreedit histverify shopt -s no_empty_cmd_completion complete -d cd + + case $UID in + ${shell.escape (toString config.krebs.users.tv.uid)}) + if test ''${SHLVL-1} = 1; then + case ''${XMONAD_SPAWN_WORKSPACE-} in + stockholm) + cd ~/stockholm + ;; + esac + fi + ;; + esac ''; promptInit = /* sh */ '' case $UID in @@ -32,14 +44,6 @@ with import ; if test -n "$SSH_AGENT_PID"; then PS1="ssh-agent[$SSH_AGENT_PID] $PS1" fi - - if test ''${SHLVL-1} = 1; then - case ''${XMONAD_SPAWN_WORKSPACE-} in - stockholm) - cd ~/stockholm - ;; - esac - fi ''; }; } -- cgit v1.2.3 From 8beba5e3c4241948090f5af5c9a328f5bfba9d90 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 30 Nov 2018 14:07:58 +0100 Subject: tv bash: redefine for tv --- tv/2configs/bash/default.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tv/2configs/bash') diff --git a/tv/2configs/bash/default.nix b/tv/2configs/bash/default.nix index 3b4a4aa..d767393 100644 --- a/tv/2configs/bash/default.nix +++ b/tv/2configs/bash/default.nix @@ -23,6 +23,8 @@ with import ; ;; esac fi + + export NIX_PATH="stockholm=$HOME/stockholm:$NIX_PATH" ;; esac ''; -- cgit v1.2.3