1%
2% anyremote configuration file for Gwenview/KDE4 management. (Server-mode)
3%
4
5% STATUS non-stable
6% XTEST no
7% SOUND no
8% ENV no
9% FBROWSER v.4i
10% IPC DBUS
11% DEF_PIX_VIEWER
12% ALL_IN_ONE
13% MEDIACENTER photo
14
15GuiAppName=Gwenview/KDE4
16GuiAppBinary=gwenview
17GuiAppVersion=echo 'V=`gwenview -v|grep KDE|tr -d " "|cut -f 2 -d ":"|cut -f 1 -d "."`; if [ "x$V" = "x4" ]; then echo OK; else echo NOK; fi'|sh -s
18GuiAppRun=echo 'A=`pgrep gwenview`; if [ "x$A" = "x" ]; then echo NOK; else echo OK; fi'|sh -s
19GuiAppIcon=gwenview.png
20GuiAppType=Application
21GuiAppProtocols=Server
22GuiAppDesc=Gwenview is a fast and easy to use image viewer for KDE. This configuration file is for Gwenview/KDE4.
23
24[Protocol]=Server
25
26(Init)=\
27	Include($(CfgDir)/Utils/aliases-server.cfg);\
28	Include($(CfgDir)/Utils/aliases-server-fbrowser-v4i.cfg);\
29	Macro(FBROWSER_IC_INIT);\
30	Include($(CfgDir)/Utils/aliases-server-pix-viewer.cfg);\
31	Make(var,app_name,by_value,Gwenview);\
32	Make(var,open_file,by_value,);\
33	Make(var,kde4_app,by_value,gwenview);\
34	Macro(TEST_KDE4_APP);\
35	Make(var,app_manage_mode,by_value,gwenview_manage);
36
37
38(Exit)=\
39	Macro(FBROWSER_IC_EXIT);
40
41(Connect)=\
42	Make(mode,gwenview_init);
43
44[Mode]=gwenview_init: default_pixviewer_init
45
46APP_IS_RUN=\
47	Make(var,app_run,pgrep -u `id -u` gwenview|head -1|wc -l);
48
49[ModeEnd]
50
51[Mode]=gwenview_manage : default_pixviewer
52
53% (EnterMode) by Utils/aliases-server-pix-viewer.cfg
54
55GETPID=\
56	Make(var,gw_pid,pgrep -u `id -u` gwenview|head -1);
57
58APP_START_IF=\
59	Make(var,app_run,pgrep -u `id -u` gwenview|head -1|wc -l);\
60	Exec(if [ "x$(app_run)" = "x0" ]; then cd "$(fbrowser_dir)";gwenview "$(open_file)" & fi 2> /dev/null);
61
62APP_RAISE=\
63	Exec($(CfgDir)/Utils/run-or-switch-to.sh -switch gwenview);
64
65APP_QUIT=\
66	Macro(GETPID);\
67	Exec(if [ "x$(gw_pid)" != "x" ]; then dbus-send --type=method_call --dest=org.kde.gwenview-$(gw_pid) /MainApplication org.kde.KApplication.quit; fi)
68
69APP_FULLSCREEN=\
70	Macro(GETPID);\
71	Exec(if [ "x$(gw_pid)" != "x" ]; then dbus-send --type=method_call --dest=org.kde.gwenview-$(gw_pid) /gwenview/MainWindow_1/actions/fullscreen com.trolltech.Qt.QAction.trigger; fi)
72
73PIX_PREV=\
74	Macro(GETPID);\
75	Exec(if [ "x$(gw_pid)" != "x" ]; then dbus-send --type=method_call --dest=org.kde.gwenview-$(gw_pid) /gwenview/MainWindow_1/actions/go_previous com.trolltech.Qt.QAction.trigger; fi)
76
77PIX_NEXT=\
78	Macro(GETPID);\
79	Exec(if [ "x$(gw_pid)" != "x" ]; then dbus-send --type=method_call --dest=org.kde.gwenview-$(gw_pid) /gwenview/MainWindow_1/actions/go_next com.trolltech.Qt.QAction.trigger; fi)
80
81PIX_FIRST=\
82	Macro(GETPID);\
83	Exec(if [ "x$(gw_pid)" != "x" ]; then dbus-send --type=method_call --dest=org.kde.gwenview-$(gw_pid) /gwenview/MainWindow_1/actions/go_first com.trolltech.Qt.QAction.trigger; fi)
84
85PIX_LAST=\
86	Macro(GETPID);\
87	Exec(if [ "x$(gw_pid)" != "x" ]; then dbus-send --type=method_call --dest=org.kde.gwenview-$(gw_pid) /gwenview/MainWindow_1/actions/go_last com.trolltech.Qt.QAction.trigger; fi)
88
89PIX_ZOOM_IN=\
90	Macro(GETPID);\
91	Exec(if [ "x$(gw_pid)" != "x" ]; then dbus-send --type=method_call --dest=org.kde.gwenview-$(gw_pid) /gwenview/MainWindow_1/actions/view_zoom_in com.trolltech.Qt.QAction.trigger; fi)
92
93PIX_ZOOM_OUT=\
94	Macro(GETPID);\
95	Exec(if [ "x$(gw_pid)" != "x" ]; then dbus-send --type=method_call --dest=org.kde.gwenview-$(gw_pid) /gwenview/MainWindow_1/actions/view_zoom_out com.trolltech.Qt.QAction.trigger; fi)
96
97PIX_FIT=\
98	Macro(GETPID);\
99	Exec(if [ "x$(gw_pid)" != "x" ]; then dbus-send --type=method_call --dest=org.kde.gwenview-$(gw_pid) /gwenview/MainWindow_1/actions/view_zoom_to_fit com.trolltech.Qt.QAction.trigger; fi)
100
101PIX_ROTATE=\
102	Macro(GETPID);\
103	Exec(if [ "x$(gw_pid)" != "x" ]; then dbus-send --type=method_call --dest=org.kde.gwenview-$(gw_pid) /gwenview/MainWindow_1/actions/rotate_left com.trolltech.Qt.QAction.trigger; fi)
104
105[ModeEnd]
106
107[End]
108