From b20162bc7503d4b91604748b5b5dbd96dce0ef5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 11 Oct 2021 17:19:22 +0200 Subject: sway: some more investigation to using sway --- profile | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'profile') 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 -- cgit v1.2.3