Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add support for user-defined cdmrc.

Remove $userconfig and related code.
  • Loading branch information...
commit a5df0f9c6fd83bd13bcbe5f2e9ff6c6dad8f5051 1 parent 05c78ba
Casper Ti. Vector authored

Showing 2 changed files with 8 additions and 45 deletions. Show diff stats Hide diff stats

  1. +8 17 src/cdm
  2. +0 28 src/cdmrc
25 src/cdm
@@ -39,23 +39,14 @@ sysclientrc=/etc/X11/xinit/xinitrc
39 39 # userserverrc=$HOME/.xserverrc
40 40 # sysserverrc=/etc/X11/xinit/xserverrc
41 41
42   -# Source cdm configuration
43   -if [[ -f /etc/X11/cdm/cdmrc ]]; then
44   - source /etc/X11/cdm/cdmrc
45   - count=0
46   - while [[ ${count} -lt ${#userconfig[@]} ]]; do
47   - if [[ "$USER" == "${userconfig[${count}]}" ]]; then
48   - ${userconfig[${count}]}
49   - fi
50   - let count=count+1
51   - done
52   - countfrom=${countfrom:-0}
53   - cktimeout=${cktimeout:-30}
54   -else
55   - eerror "A valid cdm configuration was not found!"
56   - ewarn "Logging out."
57   - sleep 3
58   - exit 1
  42 +# Source cdm configurations.
  43 +
  44 +if [[ -n "$1" ]]; then
  45 + source "$1"
  46 +elif [[ -f "$HOME/.cdmrc" ]]; then
  47 + source "$HOME/.cdmrc"
  48 +elif [[ -f /etc/cdmrc ]]; then
  49 + source /etc/cdmrc
59 50 fi
60 51
61 52 # Offer all available sessions in /etc/X11/Sessions
28 src/cdmrc
@@ -32,34 +32,6 @@ suspendcommand='sudo pm-suspend'
32 32 allowhibernate=no
33 33 hibernatecommand='sudo pm-hibernate'
34 34
35   -# Set configuration for specific users?
36   -userconfig=(courtney)
37   -
38   -##########################
39   -### USER CONFIGURATION ###
40   -##########################
41   -
42   -courtney() {
43   - # Set CDM theme
44   - theme=lime
45   -
46   - # List user allowed WM binary names
47   - wmbinlist=(openbox-session)
48   -
49   - # List user allowed WM display names
50   - wmdisplist=(Openbox)
51   -
52   - # Allow console login?
53   - allowconsole=yes
54   -
55   - # Allow shutdown?
56   - allowshutdown=no
57   -
58   - # Set specific display for user
59   - # (Not honored unless locktty=yes)
60   - # display=1
61   -}
62   -
63 35 ############################
64 36 ### SYSTEM CONFIGURATION ###
65 37 ############################

0 comments on commit a5df0f9

Please sign in to comment.
Something went wrong with that request. Please try again.