sts view sts @ rev 14

Show all installed apps icons (executed in a single click/touch
author Christophe Lincoln <pankso@slitaz.org>
date Mon Apr 28 00:31:11 2014 +0200 (2014-04-28)
parents 185d34744e11
children ec53ffc301c4 b72b16fba4af
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"
11 case "$1" in
12 info)
13 if [ "$STS_DESKTOP_WM" ]; then
14 echo "STS_DESKTOP_WM : $STS_DESKTOP_WM"
15 echo "STS_DESKTOP_ID : $STS_DESKTOP_ID"
16 else
17 echo "The sts desktop is not running"
18 fi ;;
20 update)
21 # Update a user session. Openbox configs are setup by sts-session
22 # but on a system update only $data files are updated so users may
23 # want to get latest configs.
24 rm -rf ${XDG_CONFIG_HOME}/sts
25 rm -rf ${XDG_CONFIG_HOME}/lxpanel/sts
26 echo "Please logout and login again our STS session" ;;
28 kill)
29 # Close button on panel so we can have undecorated 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} ;;
34 keyboard)
35 # Switch on/of the OSD Keyboard powered by Cellwrite
36 if ps | grep -q 'cellwriter --keyboard-only'; then
37 cellwriter --hide-window
38 else
39 cellwriter --keyboard-only --dock-window=2 &
40 fi ;;
42 apps)
43 # Show all installed applications, use single click to launch
44 # We dont need to specify window size since it will be maximized
45 # by Openbox.
46 yad --window-icon="/usr/share/pixmaps/slitaz-menu.png" \
47 --icons --single-click --sort-by-name \
48 --read-dir=/usr/share/applications ;;
50 *|help)
51 echo "$(basename $0) [info|kill|keyboard|update]" ;;
52 esac
54 exit 0