# HG changeset patch # User Christophe Lincoln # Date 1398636371 -7200 # Node ID 185d34744e11b6449ba638b89382b32ecaaf5852 # Parent 730a96a62f3dfaf98252468b88c5a592d32e9c0e Put all config we can in $HOME/.config/sts, have an icon to show/hide a virtual keyboard diff -r 730a96a62f3d -r 185d34744e11 applications/sts-keyboard.desktop --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/applications/sts-keyboard.desktop Mon Apr 28 00:06:11 2014 +0200 @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Application +Name=Virtual Keyboard +Name[fr]=Clavier virtuel +Exec=sts keyboard +Icon=preferences-desktop-keyboard +StartupNotify=tru diff -r 730a96a62f3d -r 185d34744e11 lxpanel/sts/panels/panel --- a/lxpanel/sts/panels/panel Sun Apr 27 23:18:13 2014 +0200 +++ b/lxpanel/sts/panels/panel Mon Apr 28 00:06:11 2014 +0200 @@ -53,6 +53,15 @@ } Plugin { + type = launchbar + Config { + Button { + id=/usr/share/applications/sts-keyboard.desktop + } + } +} + +Plugin { type = space expand=1 Config { diff -r 730a96a62f3d -r 185d34744e11 openbox/autostart --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openbox/autostart Mon Apr 28 00:06:11 2014 +0200 @@ -0,0 +1,16 @@ +# This shell script is run before Openbox launches. +# Environment variables set here are passed to the Openbox session. + +# Start DBUS session. +if [ ! "$DBUS_SESSION_BUS_ADDRESS" ]; then + dbus-launch --sh-syntax --exit-with-session & +fi + +# Desktop background +hsetroot -fill /usr/share/images/sts-background.jpg & + +# Desktop panel +lxpanel -p sts & + +# Desktop icons +#(sleep 2; idesk &) & diff -r 730a96a62f3d -r 185d34744e11 openbox/rc.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openbox/rc.xml Mon Apr 28 00:06:11 2014 +0200 @@ -0,0 +1,716 @@ + + + + + 10 + 20 + + + yes + + no + + yes + + no + + 200 + + no + + + + Smart + +
yes
+ + Any + + +
+ + SliTaz + NLIMC + + yes + yes + + Sans + 8 + + Bold + + Normal + + + + Sans + 8 + + Bold + + Normal + + + + Sans + 10 + + Normal + + Normal + + + + Sans + 11 + + Normal + + Normal + + + + sans + 14 + + bold + + normal + + + + Sans + 16 + Normal + Normal + + + Sans + 8 + + + + + + + 2 + 1 + + + + 875 + + + + yes + Nonpixel + + Center + + + + 10 + + 10 + + + + + + 0 + 0 + 0 + 0 + + + TopLeft + + 0 + 0 + no + Above + + Vertical + + no + 300 + + 300 + + Middle + + + + C-g + + + + no + no + + + + + no + no + + + + + no + no + + + + + no + no + + + + + no + no + + + + + no + no + + + + + no + no + + + + + no + no + + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + + + + + + + + + + + + + client-menu + + + + + + + + + + + + yes + yes + + + + + + + true + App Launcher + + lxpanelctl run + + + + + 8 + + 200 + + 400 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + client-menu + + + + + + + + + + + + top + + + + + + + + + + + left + + + + + + + + + + + right + + + + + + + + + + + bottom + + + + + + + + + + + + client-menu + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + client-menu + + + + + + + client-menu + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + client-list-combined-menu + + + + + root-menu + + + + + + + + + + + + + + + + + + + + + + menu.xml + 200 + + no + + 100 + + yes + + yes + + + + + yes + no + + + +
diff -r 730a96a62f3d -r 185d34744e11 openbox/sts-autostart --- a/openbox/sts-autostart Sun Apr 27 23:18:13 2014 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ -# This shell script is run before Openbox launches. -# Environment variables set here are passed to the Openbox session. - -# Start DBUS session. -if [ ! "$DBUS_SESSION_BUS_ADDRESS" ]; then - dbus-launch --sh-syntax --exit-with-session & -fi - -# Desktop background -hsetroot -fill /usr/share/images/sts-background.jpg & - -# Desktop panel -lxpanel -p sts & - -# Desktop icons -#(sleep 2; idesk &) & diff -r 730a96a62f3d -r 185d34744e11 openbox/sts-rc.xml --- a/openbox/sts-rc.xml Sun Apr 27 23:18:13 2014 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,716 +0,0 @@ - - - - - 10 - 20 - - - yes - - no - - yes - - no - - 200 - - no - - - - Smart - -
yes
- - Any - - -
- - SliTaz - NLIMC - - yes - yes - - Sans - 8 - - Bold - - Normal - - - - Sans - 8 - - Bold - - Normal - - - - Sans - 10 - - Normal - - Normal - - - - Sans - 11 - - Normal - - Normal - - - - sans - 14 - - bold - - normal - - - - Sans - 16 - Normal - Normal - - - Sans - 8 - - - - - - - 2 - 1 - - - - 875 - - - - yes - Nonpixel - - Center - - - - 10 - - 10 - - - - - - 0 - 0 - 0 - 0 - - - TopLeft - - 0 - 0 - no - Above - - Vertical - - no - 300 - - 300 - - Middle - - - - C-g - - - - no - no - - - - - no - no - - - - - no - no - - - - - no - no - - - - - no - no - - - - - no - no - - - - - no - no - - - - - no - no - - - - - 1 - - - - - 2 - - - - - 3 - - - - - 4 - - - - - - - - - - - - - - - - - client-menu - - - - - - - - - - - - yes - yes - - - - - - - true - App Launcher - - lxpanelctl run - - - - - 8 - - 200 - - 400 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - client-menu - - - - - - - - - - - - top - - - - - - - - - - - left - - - - - - - - - - - right - - - - - - - - - - - bottom - - - - - - - - - - - - client-menu - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - client-menu - - - - - - - client-menu - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - client-list-combined-menu - - - - - root-menu - - - - - - - - - - - - - - - - - - - - - - menu.xml - 200 - - no - - 100 - - yes - - yes - - - - - yes - no - - - -
diff -r 730a96a62f3d -r 185d34744e11 sts --- a/sts Sun Apr 27 23:18:13 2014 +0200 +++ b/sts Mon Apr 28 00:06:11 2014 +0200 @@ -7,31 +7,40 @@ # data="/usr/share/slitaz/sts" -obconf="${XDG_CONFIG_HOME}/openbox" case "$1" in info) if [ "$STS_DESKTOP_WM" ]; then echo "STS_DESKTOP_WM : $STS_DESKTOP_WM" + echo "STS_DESKTOP_ID : $STS_DESKTOP_ID" else echo "The sts desktop is not running" fi ;; - setup) - # Setup a user session. Openbox configs are setup by sts-session + + update) + # Update a user session. Openbox configs are setup by sts-session # but on a system update only $data files are updated so users may - # want to get latest configs with --forced from cmdline or via a - # GUI box. - - # sed -i "//sts-session/" ${XDG_CONFIG_HOME}/slitaz/applications.conf - user=$(id -un) - echo "TODO: sorry $user" ;; + # want to get latest configs. + rm -rf ${XDG_CONFIG_HOME}/sts + rm -rf ${XDG_CONFIG_HOME}/lxpanel/sts + echo "Please logout and login again our STS session" ;; + kill) # Close button on panel so we can have undecorated windows xid=$(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2) pid=$(xprop -id ${xid} _NET_WM_PID | awk '{print $3}') kill ${pid} ;; + + keyboard) + # Switch on/of the OSD Keyboard powered by Cellwrite + if ps | grep -q 'cellwriter --keyboard-only'; then + cellwriter --hide-window + else + cellwriter --keyboard-only --dock-window=2 & + fi ;; + *|help) - echo "$(basename $0) [info|kill]" ;; + echo "$(basename $0) [info|kill|keyboard|update]" ;; esac exit 0 diff -r 730a96a62f3d -r 185d34744e11 sts-session --- a/sts-session Sun Apr 27 23:18:13 2014 +0200 +++ b/sts-session Mon Apr 28 00:06:11 2014 +0200 @@ -4,26 +4,28 @@ # export STS_DESKTOP_WM="openbox" +export STS_DESKTOP_ID="$$" export XDG_CACHE_HOME="$HOME/.cache" export XDG_CONFIG_HOME="$HOME/.config" export XDG_DATA_HOME="$HOME/.local/share" data="/usr/share/slitaz/sts" -obconf="${XDG_CONFIG_HOME}/openbox" +sts="${XDG_CONFIG_HOME}/sts" # Ob sts-rc.xml -if [ ! -f "${XDG_CONFIG_HOME}/openbox/sts-rc.xml" ]; then - mkdir -p ${obconf} - cp ${data}/openbox/sts-rc.xml ${obconf} +if [ ! -f "${XDG_CONFIG_HOME}/sts/rc.xml" ]; then + mkdir -p ${sts} + cp ${data}/openbox/rc.xml ${sts} fi # Ob sts-autostart -if [ ! -x "${XDG_CONFIG_HOME}/openbox/sts-autostart" ]; then - cp ${data}/openbox/sts-autostart ${obconf} +if [ ! -x "${XDG_CONFIG_HOME}/sts/autostart" ]; then + cp ${data}/openbox/autostart ${sts} + chmod +x ${sts}/autostart fi # LXpanel configs -if [ ! -d "${XDG_CONFIG_HOME}/openbox/lxpanel/sts" ]; then +if [ ! -d "${XDG_CONFIG_HOME}/lxpanel/sts" ]; then cp -rf ${data}/lxpanel ${XDG_CONFIG_HOME} fi @@ -33,5 +35,4 @@ fi # Start Openbox -exec openbox --config-file ${obconf}/sts-rc.xml \ - --startup ${obconf}/sts-autostart +exec openbox --config-file ${sts}/rc.xml --startup ${sts}/autostart