# HG changeset patch # User Christophe Lincoln # Date 1397170293 -7200 # Node ID fb332406ca97f342a4b97b42cb1487ead15e3e47 # Parent c7c084e84dd483d23404736bd88769649227e126 Add SliTaz Tiny/Touch Screen configs files and utils diff -r c7c084e84dd4 -r fb332406ca97 Makefile --- a/Makefile Wed Apr 02 10:10:26 2014 +0200 +++ b/Makefile Fri Apr 11 00:51:33 2014 +0200 @@ -1,15 +1,28 @@ # Makefile for SliTaz Openbox menu. +PREFIX?=/usr +DESTDIR?= DOMAIN=slitaz-ob-menu MENU?=ob-menu/menu.xml.in LINGUAS?=fr hu pt_BR ru +BINDIR=$(DESTDIR)$(PREFIX)/bin +STSDATA=$(DESTDIR)$(PREFIX)/share/slitaz/sts all: help help: @echo "make [ pot | msgmerge | menu | clean ]" +install-sts: + install -m 0777 -d $(BINDIR) + install -m 0777 -d $(STSDATA) + install -m 0755 sts/sts $(BINDIR)/sts + install -m 0755 sts/sts-session $(BINDIR)/sts-session + cp -a sts/applications $(DESTDIR)$(PREFIX)/usr/share + cp -a sts/lxpanel $(STSDATA) + cp -a sts/openbox $(STSDATA) + pot: xgettext -o po/$(DOMAIN).pot --force-po --copyright-holder=SliTaz \ --package-name=$(DOMAIN) --package-version=5.1.6 -L Shell $(MENU) diff -r c7c084e84dd4 -r fb332406ca97 sts/README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sts/README Fri Apr 11 00:51:33 2014 +0200 @@ -0,0 +1,16 @@ +SliTaz Tiny/Touch Screen desktop +=============================================================================== + + +The goals of the sts desktop is to provide a nice experience on realy small +screens such as 320x240 2.8" TFT or 800x480 5" HDMI/VGA. The desktop use +Openbox window manager and LXpanel. Apps are started maximized and undecored. +The top panel provide icons of opened applications and the hidden bottom panel +provide desktop switch and a close button for the current running application. + +Sts can be used on any screen but was coded for custom i486/ARM flavors. These +flavors use a custom /etc/slitaz/applications.conf with sts-session as WM. Sts +can also be started by Slim or with startx and an appropriate ~/.xsession file. + + +=============================================================================== diff -r c7c084e84dd4 -r fb332406ca97 sts/applications/sts-kill.desktop --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sts/applications/sts-kill.desktop Fri Apr 11 00:51:33 2014 +0200 @@ -0,0 +1,6 @@ +[Desktop Entry] +Type=Application +Name=Close application +Name=Fermer l'application +Exec=sts kill +Icon=gtk-close diff -r c7c084e84dd4 -r fb332406ca97 sts/lxpanel/sts/config --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sts/lxpanel/sts/config Fri Apr 11 00:51:33 2014 +0200 @@ -0,0 +1,4 @@ +[Command] +FileManager=spacefm %s +Terminal=xterm +Logout=tazbox logout diff -r c7c084e84dd4 -r fb332406ca97 sts/lxpanel/sts/panels/bottom --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sts/lxpanel/sts/panels/bottom Fri Apr 11 00:51:33 2014 +0200 @@ -0,0 +1,54 @@ +# lxpanel config file. Manually editing is not recommended. +# Use preference dialog in lxpanel to adjust config when you can. + +Global { + edge=bottom + allign=center + margin=0 + widthtype=percent + width=100 + height=28 + transparent=1 + tintcolor=#ffffff + alpha=0 + autohide=1 + heightwhenhidden=2 + setdocktype=1 + setpartialstrut=0 + usefontcolor=0 + fontsize=11 + fontcolor=#000000 + usefontsize=0 + background=0 + iconsize=28 + loglevel=2 +} + +Plugin { + type = space + Config { + Size=2 + } +} + +Plugin { + type = pager +} + +Plugin { + type = space + expand=1 + Config { + Size=2 + } +} + +Plugin { + type = launchbar + Config { + Button { + id=/usr/share/applications/sts-kill.desktop + } + } +} + diff -r c7c084e84dd4 -r fb332406ca97 sts/lxpanel/sts/panels/panel --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sts/lxpanel/sts/panels/panel Fri Apr 11 00:51:33 2014 +0200 @@ -0,0 +1,117 @@ +# lxpanel config file. Manually editing is not recommended. +# Use preference dialog in lxpanel to adjust config when you can. + +Global { + edge=top + allign=center + margin=0 + widthtype=percent + width=100 + height=26 + transparent=1 + tintcolor=#222222 + alpha=255 + autohide=0 + heightwhenhidden=4 + setdocktype=1 + setpartialstrut=1 + usefontcolor=1 + fontsize=11 + fontcolor=#ffffff + usefontsize=1 + background=0 + iconsize=26 + loglevel=2 +} + +Plugin { + type = space + Config { + Size=4 + } +} + +Plugin { + type = menu + Config { + image=/usr/share/pixmaps/slitaz-menu.png + system { + } + separator { + } + item { + image=exec + command=run + } + separator { + } + item { + image=logout + command=logout + } + } +} + +Plugin { + type = space + Config { + Size=6 + } +} + +Plugin { + type = space + Config { + Size=2 + } +} + +Plugin { + type = taskbar + expand=1 + Config { + tooltips=1 + IconsOnly=1 + ShowAllDesks=0 + UseMouseWheel=0 + UseUrgencyHint=1 + FlatButton=1 + MaxTaskWidth=200 + spacing=4 + GroupedTasks=1 + } +} + +Plugin { + type = tray +} + +Plugin { + type = space + Config { + Size=4 + } +} + +Plugin { + type = volumealsa +} + +Plugin { + type = space + Config { + Size=4 + } +} + +Plugin { + type = dclock + Config { + ClockFmt=%R + TooltipFmt=%A %x + BoldFont=1 + IconOnly=0 + CenterText=0 + } +} + diff -r c7c084e84dd4 -r fb332406ca97 sts/openbox/sts-autostart --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sts/openbox/sts-autostart Fri Apr 11 00:51:33 2014 +0200 @@ -0,0 +1,13 @@ +# 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/slitaz-arm-background.png & + +# Desktop panel +lxpanel -p sts & diff -r c7c084e84dd4 -r fb332406ca97 sts/openbox/sts-rc.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sts/openbox/sts-rc.xml Fri Apr 11 00:51:33 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 c7c084e84dd4 -r fb332406ca97 sts/sts --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sts/sts Fri Apr 11 00:51:33 2014 +0200 @@ -0,0 +1,37 @@ +#!/bin/sh +# +# This tool is used by SliTaz Tiny/Touch Screens desktop. +# +# Copyright (C) 2014 SliTaz ARM - BSD License +# Author: Christophe Lincoln +# + +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" + else + echo "The sts desktop is not running" + fi ;; + setup) + # Setup 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" ;; + kill) + # Close button on panel so we can have undecored 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} ;; + *) + echo "$(basename $0) [setup|kill]" ;; +esac + +exit 0 diff -r c7c084e84dd4 -r fb332406ca97 sts/sts-session --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sts/sts-session Fri Apr 11 00:51:33 2014 +0200 @@ -0,0 +1,26 @@ +#!/bin/sh +# +# Start SliTaz Tiny/Touch Screens desktop session +# + +export XDG_CONFIG_HOME="$HOME/.config" +export STS_DESKTOP_WM="openbox" + +data="/usr/share/slitaz/sts" +obconf="${XDG_CONFIG_HOME}/openbox" + +# sts-rc.xml +if [ ! -f "${XDG_CONFIG_HOME}/openbox/sts-rc.xml" ]; then + mkdir -p ${obconf} + cp ${data}/openbox/sts-rc.xml ${obconf} +fi + +# sts-autostart +if [ ! -x "${XDG_CONFIG_HOME}/openbox/sts-autostart" ]; then + cp ${data}/openbox/sts-autostart ${obconf} +fi + +# Start Openbox +exec openbox \ + --config-file ${XDG_CONFIG_HOME}/openbox/sts-rc.xml \ + --startup ${XDG_CONFIG_HOME}/openbox/sts-autostart