diff --git a/src/cdm b/src/cdm index d5aead5..9c641a8 100755 --- a/src/cdm +++ b/src/cdm @@ -58,6 +58,14 @@ else exit 1 fi +# Offer all available sessions in /etc/X11/Sessions +# if wmbinlist if not explicitly set in cdmrc + +if [[ "${#wmbinlist[@]}" -eq 0 ]]; then + wmbinlist=($(ls /etc/X11/Sessions)) + wmdisplist=($(echo ${wmbinlist[@]^})) +fi + unset DIALOGRC # Source theme file if [[ ! -z ${theme} ]]; then diff --git a/src/cdmrc b/src/cdmrc index 7126dbf..161bce8 100644 --- a/src/cdmrc +++ b/src/cdmrc @@ -7,10 +7,12 @@ theme=cdm countfrom=1 # List all WM binary names -wmbinlist=(awesome openbox-session) +# If this is not set all sessions in +# /etc/X11/Sessions are offered as choices. +wmbinlist=() # List all WM display names -wmdisplist=(Awesome Openbox) +wmdisplist=() # Allow console login? allowconsole=yes