diff options
| author | Andreas Müller <schnitzeltony@googlemail.com> | 2012-10-19 01:46:12 +0000 |
|---|---|---|
| committer | Koen Kooi <koen@dominion.thruhere.net> | 2012-10-24 08:26:41 +0200 |
| commit | 4a0066557bcf3af2a9516b523efbfba7387db063 (patch) | |
| tree | 9ec846b63d594b4b48a32cc4da2e3df270aaaead /meta-oe/recipes-graphics/devilspie/files/default.lua | |
| parent | eb66e508e33ccbec8299041265eef183913a3a8c (diff) | |
| download | meta-openembedded-4a0066557bcf3af2a9516b523efbfba7387db063.tar.gz | |
devilspie2: initial add 0.24
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-oe/recipes-graphics/devilspie/files/default.lua')
| -rw-r--r-- | meta-oe/recipes-graphics/devilspie/files/default.lua | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/meta-oe/recipes-graphics/devilspie/files/default.lua b/meta-oe/recipes-graphics/devilspie/files/default.lua new file mode 100644 index 0000000000..22a17fe98e --- /dev/null +++ b/meta-oe/recipes-graphics/devilspie/files/default.lua | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | -- Copyright (c) 2012 Andreas Müller <schnitzeltony@googlemail.com> | ||
| 2 | -- | ||
| 3 | -- this is an example | ||
| 4 | -- * undecorating all windows opened maximized | ||
| 5 | -- * maximizing and undecorating all appplication's windows in apps_list | ||
| 6 | -- for further information see | ||
| 7 | -- http://www.gusnan.se/devilspie2/manual.php | ||
| 8 | |||
| 9 | wnd_type = get_window_type() | ||
| 10 | |||
| 11 | if(wnd_type == "WINDOW_TYPE_NORMAL") then | ||
| 12 | |||
| 13 | -- add only applications you want maximized+undecorated and | ||
| 14 | -- which don't keep maximized state | ||
| 15 | apps_list = | ||
| 16 | { | ||
| 17 | "Terminal", | ||
| 18 | "ristretto", | ||
| 19 | "xarchiver", | ||
| 20 | } | ||
| 21 | |||
| 22 | app_name = get_application_name() | ||
| 23 | |||
| 24 | -- to have some informational output, start devilspie2 with --debug | ||
| 25 | -- option and uncomment the following lines: | ||
| 26 | |||
| 27 | --debug_print ("Window Name: " .. get_window_name()) | ||
| 28 | --debug_print ("Application name: " .. app_name) | ||
| 29 | --debug_print ("window-type: " .. wnd_type) | ||
| 30 | |||
| 31 | -- undecorate all windows starting maximized | ||
| 32 | if (get_window_is_maximized()) then | ||
| 33 | undecorate_window() | ||
| 34 | |||
| 35 | -- maximize/undecorate all windows in apps_list | ||
| 36 | -- (unfortunately for some also their settings) | ||
| 37 | else | ||
| 38 | for line, str in ipairs(apps_list) do | ||
| 39 | if (string.find(app_name, str)) then | ||
| 40 | maximize() | ||
| 41 | undecorate_window() | ||
| 42 | break | ||
| 43 | end | ||
| 44 | end | ||
| 45 | end | ||
| 46 | end | ||
