aboutsummaryrefslogtreecommitdiff
path: root/profile
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2021-10-11 17:19:22 +0200
committerKarel Kočí <cynerd@email.cz>2021-10-11 17:19:22 +0200
commitb20162bc7503d4b91604748b5b5dbd96dce0ef5c (patch)
treef38de20b9f135d8ab5381d6195bf9592c0c15153 /profile
parent9a902662fc4a7afda2a1f3000f9ec07b2e0c3c79 (diff)
downloadmyconfigs-b20162bc7503d4b91604748b5b5dbd96dce0ef5c.tar.gz
myconfigs-b20162bc7503d4b91604748b5b5dbd96dce0ef5c.tar.bz2
myconfigs-b20162bc7503d4b91604748b5b5dbd96dce0ef5c.zip
sway: some more investigation to using sway
Diffstat (limited to 'profile')
-rw-r--r--profile23
1 files changed, 12 insertions, 11 deletions
diff --git a/profile b/profile
index 92ea6ef..e2e3407 100644
--- a/profile
+++ b/profile
@@ -9,6 +9,11 @@ export CT_LOCAL_TARBALLS_DIR="~/src/ct-ng"
# Python caching
export PYTHONPYCACHEPREFIX="$HOME/.cache/pycache"
+# Nix
+[ -f "$HOME/.nix-profile/etc/profile.d/nix.sh" ] && \
+ . "$HOME/.nix-profile/etc/profile.d/nix.sh" # added by Nix installer
+
+
# Rest of the profile run only if login is from linux console
[[ "$(tty)" != /dev/tty* ]] && return
@@ -19,18 +24,14 @@ eval "$(ssh-agent -s)"
# And if we are on first terminal also automatically start x server
if [ "$(tty)" = "/dev/tty1" ]; then
- exec startx -- vt1
+ PROFILE_SELECTION=1
+else
+ echo
+ echo "(1) i3"
+ echo "(2) sway"
+ echo -n "Select or pass to shell: "
+ read -r PROFILE_SELECTION
fi
-
-# Nix
-[ -f "$HOME/.nix-profile/etc/profile.d/nix.sh" ] && \
- . "$HOME/.nix-profile/etc/profile.d/nix.sh" # added by Nix installer
-
-echo
-echo "(1) i3"
-echo "(2) sway"
-echo -n "Select or pass to shell: "
-read -r PROFILE_SELECTION
if [ "$PROFILE_SELECTION" -eq 1 ]; then
exec startx -- "vt$XDG_VTNR"
elif [ "$PROFILE_SELECTION" -eq 2 ]; then