nix-conf/user/config/bash/startup

17 lines
485 B
Bash

#!/usr/bin/env bash
# Startup script to run when logging in on tty1
SXRC=~/.config/sx/sxrc
printf "\e[31mSelect environment:\n\e[0m"
SELECTIONS=( "sx $SXRC awesome" "sx $SXRC qtile" "sway" )
SELECTION_NAMES=( "awesome" "qtile" "Sway" "tty" )
for (( i=0; i<${#SELECTION_NAMES[@]}; i++ )); do
echo " "$((i + 1)) - ${SELECTION_NAMES[$i]}
done
read -sn1 WM_SELECTION
echo $WM_SELECTION | grep "^[0-9]$" > /dev/null
if [ $? -eq 0 ]; then
${SELECTIONS[$(($WM_SELECTION - 1))]}
fi