slitaz-configs view sts/sts @ rev 205

Add SliTaz Tiny/Touch Screen configs files and utils
author Christophe Lincoln <pankso@slitaz.org>
date Fri Apr 11 00:51:33 2014 +0200 (2014-04-11)
parents
children c4b498c6f50b
line source
1 #!/bin/sh
2 #
3 # This tool is used by SliTaz Tiny/Touch Screens desktop.
4 #
5 # Copyright (C) 2014 SliTaz ARM - BSD License
6 # Author: Christophe Lincoln <pankso@slitaz.org>
7 #
9 data="/usr/share/slitaz/sts"
10 obconf="${XDG_CONFIG_HOME}/openbox"
12 case "$1" in
13 info)
14 if [ "$STS_DESKTOP_WM" ]; then
15 echo "STS_DESKTOP_WM : $STS_DESKTOP_WM"
16 else
17 echo "The sts desktop is not running"
18 fi ;;
19 setup)
20 # Setup a user session. Openbox configs are setup by sts-session
21 # but on a system update only $data files are updated so users may
22 # want to get latest configs with --forced from cmdline or via a
23 # GUI box.
25 # sed -i "//sts-session/" ${XDG_CONFIG_HOME}/slitaz/applications.conf
26 user=$(id -un)
27 echo "TODO: sorry $user" ;;
28 kill)
29 # Close button on panel so we can have undecored windows
30 xid=$(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2)
31 pid=$(xprop -id ${xid} _NET_WM_PID | awk '{print $3}')
32 kill ${pid} ;;
33 *)
34 echo "$(basename $0) [setup|kill]" ;;
35 esac
37 exit 0