pandora-skel: Add latest /etc/skel scripts for xmodmap and alsa.
authorDavid-John Willis <John.Willis@Distant-earth.com>
Tue, 2 Mar 2010 15:59:09 +0000 (15:59 +0000)
committerDavid-John Willis <John.Willis@Distant-earth.com>
Tue, 2 Mar 2010 15:59:09 +0000 (15:59 +0000)
recipes/pandora-system/pandora-skel.bb
recipes/pandora-system/pandora-skel/.xinitrc
recipes/pandora-system/pandora-skel/asoundrc [new file with mode: 0644]
recipes/pandora-system/pandora-skel/pndXmodmap [new file with mode: 0644]

index b9be30c..f24f54f 100644 (file)
@@ -5,15 +5,17 @@ COMPATIBLE_MACHINE = "omap3-pandora"
 # /etc/skel is used by Shadow's useradd so you really have that installed for this to make sense ;)
 RDEPENDS = "shadow"
 
 # /etc/skel is used by Shadow's useradd so you really have that installed for this to make sense ;)
 RDEPENDS = "shadow"
 
-PR = "r6"
+PR = "r1"
 
 SRC_URI = " \
   file://.xinitrc \     
   file://bashrc \
   file://profile \
   file://mplayconfig \
 
 SRC_URI = " \
   file://.xinitrc \     
   file://bashrc \
   file://profile \
   file://mplayconfig \
-  file://pam_environment \ 
+  file://pam_environment \
   file://xsettings.xml \
   file://xsettings.xml \
+  file://pndXmodmap \
+  file://asoundrc \
 "
 
 # xsettings.xml is a hack until I can figure out why XDG configs are not setting the icon theme for Xfce/GTK+
 "
 
 # xsettings.xml is a hack until I can figure out why XDG configs are not setting the icon theme for Xfce/GTK+
@@ -24,6 +26,8 @@ do_install() {
   install -m 0644 ${WORKDIR}/bashrc ${D}${sysconfdir}/skel/.bashrc
   install -m 0644 ${WORKDIR}/profile ${D}${sysconfdir}/skel/.profile
   install -m 0644 ${WORKDIR}/pam_environment ${D}${sysconfdir}/skel/.pam_environment
   install -m 0644 ${WORKDIR}/bashrc ${D}${sysconfdir}/skel/.bashrc
   install -m 0644 ${WORKDIR}/profile ${D}${sysconfdir}/skel/.profile
   install -m 0644 ${WORKDIR}/pam_environment ${D}${sysconfdir}/skel/.pam_environment
+  install -m 0644 ${WORKDIR}/pndXmodmap ${D}${sysconfdir}/skel/.pndXmodmap
+  install -m 0644 ${WORKDIR}/asoundrc ${D}${sysconfdir}/skel/.asoundrc
   
   install -d ${D}${sysconfdir}/skel/Applications/Settings/xfce4/xfconf/xfce-perchannel-xml
   install -m 0644 ${WORKDIR}/xsettings.xml ${D}${sysconfdir}/skel/Applications/Settings/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
   
   install -d ${D}${sysconfdir}/skel/Applications/Settings/xfce4/xfconf/xfce-perchannel-xml
   install -m 0644 ${WORKDIR}/xsettings.xml ${D}${sysconfdir}/skel/Applications/Settings/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
index 9a71928..0be7790 100644 (file)
@@ -38,26 +38,51 @@ if [ -d /etc/X11/Xsession.d ]; then
     done
 fi
 
     done
 fi
 
+#Load up the proper keymap for X
+xmodmap ~/.pndXmodmap
+
 # HUP pndnotifyd to make sure it picks up the users home.
 kill -1 pndnotifyd &
 
 # HUP pndnotifyd to make sure it picks up the users home.
 kill -1 pndnotifyd &
 
-
-# Bring up the Bluetooth hardware. No point starting it before login.
-/usr/pandora/scripts/op_bluetooth.sh &
-
 # The following variable defines the session which is started if the user
 # doesn't explicitely select a session in SLiM.
 
 DEFAULT_SESSION=startxfce4
 
 # The following variable defines the session which is started if the user
 # doesn't explicitely select a session in SLiM.
 
 DEFAULT_SESSION=startxfce4
 
-case $1 in
-xfce4)
-       exec startxfce4
-       ;;
-pmenu)
-       exec pmenu
-       ;;
-*)
-       exec $DEFAULT_SESSION
-       ;;
-esac
+# Write the default session into a temporary file.
+# This way, we can easily add new sessions in the future by just
+# setting the DEFAULT_SESSION to the executable or script.
+
+echo $DEFAULT_SESSION > /tmp/gui.load
+
+# If SLiM does pass a variable, use that. Otherwise use our DEFAULT_SESSION.
+
+SESSION=$1
+
+if [ "$SESSION" == "" ]
+
+       then
+       SESSION=$(cat /tmp/gui.load)
+fi
+
+# Starts our session and checks if a new session should be loaded
+# after the old one is quit by simply executing the command that's in /tmp/gui.load
+
+# This way, we can easily do a quick switch from any session to the next one by simply
+# echo'ing the new session executable into /tmp/gui.load and exiting.
+
+while true
+do
+       rm /tmp/gui.load
+
+       if [ "$SESSION" == "" ]
+
+       then
+               exit 0;
+       fi
+
+       $SESSION
+
+       SESSION=$(cat /tmp/gui.load)
+
+done
diff --git a/recipes/pandora-system/pandora-skel/asoundrc b/recipes/pandora-system/pandora-skel/asoundrc
new file mode 100644 (file)
index 0000000..5d95b99
--- /dev/null
@@ -0,0 +1,47 @@
+pcm.dmixed {
+    type dmix
+    ipc_key 1234
+    slave {
+         pcm "hw:0"
+         buffer_size 8192
+         period_size 2048
+         #periods 128
+         period_time 0
+         buffer_time 0
+         rate 44100
+    }
+}
+
+
+pcm.softvol {
+    type softvol
+    slave {
+          pcm      "dmixed"
+    }
+    control {
+          name     "Master"
+          card 0
+    }
+}
+
+pcm.!default {
+    type     plug
+    slave.pcm   "softvol"
+}
+
+pcm.dsp0 {
+    type plug
+    slave {
+          pcm "hw:0"
+    }
+}
+
+ctl.dsp0 {
+    type plug
+    slave.pcm "hw:0"
+}
+
+ctl.mixer0 {
+    type plug
+    slave.pcm "hw:0"
+}
diff --git a/recipes/pandora-system/pandora-skel/pndXmodmap b/recipes/pandora-system/pandora-skel/pndXmodmap
new file mode 100644 (file)
index 0000000..77c4c2a
--- /dev/null
@@ -0,0 +1,88 @@
+keycode   9 = Escape NoSymbol Escape
+keycode  10 = 1 section 1 section
+keycode  11 = 2 braceleft 2 braceleft
+keycode  12 = 3 braceright 3 braceright
+keycode  13 = 4 asciitilde 4 asciitilde
+keycode  14 = 5 percent 5 percent
+keycode  15 = 6 asciicircum 6 asciicircum
+keycode  16 = 7 ampersand 7 ampersand
+keycode  17 = 8 asterisk 8 asterisk
+keycode  18 = 9 bracketleft 9 bracketleft
+keycode  19 = 0 bracketright 0 bracketright
+keycode  22 = BackSpace Delete BackSpace Delete
+keycode  24 = q Q q Q
+keycode  25 = w W w W
+keycode  26 = e E e E
+keycode  27 = r R r R
+keycode  28 = t T t T
+keycode  29 = y Y y Y
+keycode  30 = u U u U
+keycode  31 = i I i I
+keycode  32 = o O o O
+keycode  33 = p P p P
+keycode  34 = parenleft NoSymbol parenleft
+keycode  35 = parenright NoSymbol parenright
+keycode  36 = Return Multi_key Return
+keycode  37 = Control_L NoSymbol Control_L
+keycode  38 = a A a A
+keycode  39 = s S s S
+keycode  40 = d D d D
+keycode  41 = f F f F
+keycode  42 = g G g G
+keycode  43 = h H h H
+keycode  44 = j J j J
+keycode  45 = k K k K
+keycode  46 = l L l L
+keycode  47 = semicolon NoSymbol semicolon
+keycode  48 = apostrophe NoSymbol apostrophe
+keycode  49 = grave NoSymbol grave
+keycode  50 = Shift_L NoSymbol Shift_L
+keycode  52 = z Z z Z
+keycode  53 = x X x X
+keycode  54 = c C c C
+keycode  55 = v V v V
+keycode  56 = b B b B
+keycode  57 = n N n N
+keycode  58 = m M m M
+keycode  59 = comma less comma less
+keycode  60 = period greater period greater
+keycode  61 = slash NoSymbol slash
+keycode  62 = Shift_R NoSymbol Shift_R
+keycode  64 = Alt_L NoSymbol Alt_L
+keycode  65 = space NoSymbol space
+keycode  66 = Caps_Lock NoSymbol Caps_Lock
+keycode  67 = F1 NoSymbol F1
+keycode  68 = F2 NoSymbol F2
+keycode  69 = F3 NoSymbol F3
+keycode  70 = F4 NoSymbol F4
+keycode  71 = F5 NoSymbol F5
+keycode  72 = F6 NoSymbol F6
+keycode  73 = F7 NoSymbol F7
+keycode  74 = F8 NoSymbol F8
+keycode  75 = F9 NoSymbol F9
+keycode  76 = F10 NoSymbol F10
+keycode  82 = minus NoSymbol minus NoSymbol
+keycode  83 = Home quotedbl Home quotedbl
+keycode  86 = plus NoSymbol plus NoSymbol
+keycode  87 = Prior Multi_key Prior Multi_key
+keycode  88 = End XF86_Switch_VT_2 End XF86_Switch_VT_2
+keycode  89 = Next XF86_Switch_VT_1 Next XF86_Switch_VT_1
+keycode  95 = F11 NoSymbol F11
+keycode  96 = F12 NoSymbol F12
+keycode 118 = Insert NoSymbol Insert
+keycode 132 = yen NoSymbol yen
+keycode 187 = parenleft NoSymbol parenleft
+keycode 188 = parenright NoSymbol parenright
+keycode 191 = acute NoSymbol acute
+keycode 192 = bar NoSymbol bar
+keycode 193 = underscore NoSymbol underscore
+keycode 194 = numbersign NoSymbol numbersign
+keycode 195 = exclam NoSymbol exclam
+keycode 196 = sterling NoSymbol sterling
+keycode 197 = quotedbl NoSymbol quotedbl
+keycode 198 = at NoSymbol at
+keycode 199 = colon NoSymbol colon
+keycode 200 = dollar NoSymbol dollar
+keycode 201 = EuroSign NoSymbol EuroSign
+keycode 222 = question NoSymbol question
+keycode 235 = Tab NoSymbol Tab