Browse files

Add support for user-defined cdmrc.

Remove $userconfig and related code.
  • Loading branch information...
1 parent 05c78ba commit a5df0f9c6fd83bd13bcbe5f2e9ff6c6dad8f5051 @CasperVector committed Apr 7, 2012
Showing with 8 additions and 45 deletions.
  1. +8 −17 src/cdm
  2. +0 −28 src/cdmrc
View
25 src/cdm
@@ -39,23 +39,14 @@ sysclientrc=/etc/X11/xinit/xinitrc
# userserverrc=$HOME/.xserverrc
# sysserverrc=/etc/X11/xinit/xserverrc
-# Source cdm configuration
-if [[ -f /etc/X11/cdm/cdmrc ]]; then
- source /etc/X11/cdm/cdmrc
- count=0
- while [[ ${count} -lt ${#userconfig[@]} ]]; do
- if [[ "$USER" == "${userconfig[${count}]}" ]]; then
- ${userconfig[${count}]}
- fi
- let count=count+1
- done
- countfrom=${countfrom:-0}
- cktimeout=${cktimeout:-30}
-else
- eerror "A valid cdm configuration was not found!"
- ewarn "Logging out."
- sleep 3
- exit 1
+# Source cdm configurations.
+
+if [[ -n "$1" ]]; then
+ source "$1"
+elif [[ -f "$HOME/.cdmrc" ]]; then
+ source "$HOME/.cdmrc"
+elif [[ -f /etc/cdmrc ]]; then
+ source /etc/cdmrc
fi
# Offer all available sessions in /etc/X11/Sessions
View
28 src/cdmrc
@@ -32,34 +32,6 @@ suspendcommand='sudo pm-suspend'
allowhibernate=no
hibernatecommand='sudo pm-hibernate'
-# Set configuration for specific users?
-userconfig=(courtney)
-
-##########################
-### USER CONFIGURATION ###
-##########################
-
-courtney() {
- # Set CDM theme
- theme=lime
-
- # List user allowed WM binary names
- wmbinlist=(openbox-session)
-
- # List user allowed WM display names
- wmdisplist=(Openbox)
-
- # Allow console login?
- allowconsole=yes
-
- # Allow shutdown?
- allowshutdown=no
-
- # Set specific display for user
- # (Not honored unless locktty=yes)
- # display=1
-}
-
############################
### SYSTEM CONFIGURATION ###
############################

0 comments on commit a5df0f9

Please sign in to comment.