summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2018-11-30 14:04:42 +0100
committertv <tv@krebsco.de>2018-11-30 14:04:42 +0100
commited44b2dacdb33156921a859733991295dc4c2502 (patch)
tree71b82527f4abe5c0f76632de6bb5f787a5c11e8b
parent127a259584232f0fcc2c6e9c0ce919a74c747fe3 (diff)
tv bash: use XMONAD_SPAWN_WORKSPACE only for tv
change directory only for interactivetv user
-rw-r--r--tv/2configs/bash/default.nix20
1 files changed, 12 insertions, 8 deletions
diff --git a/tv/2configs/bash/default.nix b/tv/2configs/bash/default.nix
index b75ad8bfc..3b4a4aadb 100644
--- a/tv/2configs/bash/default.nix
+++ b/tv/2configs/bash/default.nix
@@ -13,6 +13,18 @@ with import <stockholm/lib>;
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 <stockholm/lib>;
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
'';
};
}