Doom Luancher Script

17 Dec, 2020 - 19:01:22

By

Matthew Deig

#!/usr/bin/env bash

PWADDIR='/home/notptr/doom_stuff/pwad/'
PWADDIR='/home/notptr/doom_stuff/pwad/'
IWADDIR='/home/notptr/doom_stuff/iwad/'
DOOMPORT='/home/notptr/doom_stuff/eternity-bin/eternity'

IWADSEL=$IWADDIR$(ls $IWADDIR | dmenu -l 30 -p "Select Doom Iwad" -i)

CONPWADADD='Yes'
PWADSEL=''
while [ $CONPWADADD = 'Yes' ]
do
    NEWPWAD=$PWADDIR$(ls $PWADDIR | dmenu -l 30 -p "Select Doom Pwad" -i)
    PWADSEL=$PWADSEL' '$NEWPWAD
    CONPWADADD=$(echo -e "Yes\n\nNo" | dmenu -p "Want to add more Doom Pwads?" -i)
done

if [ -z $PWADSEL ]
then
    $DOOMPORT -iwad $IWADSEL
else
    $DOOMPORT -iwad $IWADSEL -file $PWADSEL
fi
exit