[PATCH] naughty: set screen first and opacity afterwards
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I just noticed opacity for naughty was not working as expected. Anyway with changed order it works as suggested. However this wont fix other missbehaviours concerning composite managers like xcompmgr (no borders e.g.) - -lwi -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkngnOoACgkQ3qn9m9SfDYdNFwCfesmGSUR1MiERJIsPeq/5GMh9 cy4An3rerEZteBzhVgP8nz5iNbJQw8Ap =m3f5 -END PGP SIGNATURE- -- To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.
Re: [PATCH] naughty: set screen first and opacity afterwards
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 sometimes its better to attach something :F Leon Winter wrote: Hi, I just noticed opacity for naughty was not working as expected. Anyway with changed order it works as suggested. However this wont fix other missbehaviours concerning composite managers like xcompmgr (no borders e.g.) -lwi -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkngnXoACgkQ3qn9m9SfDYcctwCfWlpgRDRB0rUmvBZ5PPi8L2O4 ZscAn3Zf6+00pHiuNYbD+ZuRqOV+pKi5 =Pe28 -END PGP SIGNATURE- From 6f0949e55468d3fb13296bcf603f4477cf3116b1 Mon Sep 17 00:00:00 2001 From: Leon Winter leon.win...@informatik.uni-oldenburg.de Date: Thu, 8 Jan 2009 13:59:19 +0100 Subject: [PATCH] awesomerc: open clients menu only once --- awesomerc.lua.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/awesomerc.lua.in b/awesomerc.lua.in index 6b85b54..765c445 100644 --- a/awesomerc.lua.in +++ b/awesomerc.lua.in @@ -123,7 +123,7 @@ mytaglist.buttons = { button({ }, 1, awful.tag.viewonly), button({ }, 5, awful.tag.viewprev) } mytasklist = {} mytasklist.buttons = { button({ }, 1, function (c) client.focus = c; c:raise() end), - button({ }, 3, function () awful.menu.clients({ width=250 }) end), + button({ }, 3, function () if instance then instance:hide() end instance = awful.menu.clients({ width=250 }) end), button({ }, 4, function () awful.client.focus.byidx(1) end), button({ }, 5, function () awful.client.focus.byidx(-1) end) } -- 1.5.6.5
Re: [PATCH] naughty: set screen first and opacity afterwards
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 this time it should be the right one Leon Winter wrote: sometimes its better to attach something :F Leon Winter wrote: Hi, I just noticed opacity for naughty was not working as expected. Anyway with changed order it works as suggested. However this wont fix other missbehaviours concerning composite managers like xcompmgr (no borders e.g.) -lwi -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkngtscACgkQ3qn9m9SfDYdxfwCgjire35SB4ZTG7eAKSbKp19lY D+QAn2zNW7UT1xFhifFRvKxDQfAk9cm+ =otva -END PGP SIGNATURE- From a14eccc3d4d67b967e0e896eed4bc83fd00069b0 Mon Sep 17 00:00:00 2001 From: Leon Winter leon.win...@informatik.uni-oldenburg.de Date: Sat, 11 Apr 2009 15:26:34 +0200 Subject: [PATCH] naughty: set screen first and opacity afterwards --- lib/naughty.lua.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/naughty.lua.in b/lib/naughty.lua.in index d763ed0..0a0e749 100644 --- a/lib/naughty.lua.in +++ b/lib/naughty.lua.in @@ -383,8 +383,8 @@ function notify(args) x = offset.x, y = offset.y }) notification.box.ontop = ontop -notification.box.opacity = opacity notification.box.screen = screen +notification.box.opacity = opacity -- populate widgets notification.box.widgets = { iconbox, textbox } -- 1.6.2.1
Re: [PATCH] awful-xml-escaping.patch
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Julien Danjou wrote: At 1233085574 time_t, Matthew Wild wrote: The current routines for escaping XML in awful.util.[escape/unescape] are not too good, both in terms of performance and accuracy. They use multiple gsubs, generating a new string each time, which is instantly discarded and must then be garbage-collected, etc. Thanks, commited! Cheers, Hi, maybe we should stop implementing integrated functions over and over again and use CGI.escapeHTML() instead. However we have to require 'cgi' for this and we have to decide if this is too much overhead or not. Regards, Leon Winter -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmEn48ACgkQ3qn9m9SfDYcVwwCghS6zZLPMDugNh7F7PUANKiO9 lcMAoOrtOKYTjgxR/rZj52E2Gn6v5lo0 =tlaQ -END PGP SIGNATURE- -- To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.
Re: [PATCH] awful-xml-escaping.patch
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Leon Winter wrote: Julien Danjou wrote: At 1233085574 time_t, Matthew Wild wrote: The current routines for escaping XML in awful.util.[escape/unescape] are not too good, both in terms of performance and accuracy. They use multiple gsubs, generating a new string each time, which is instantly discarded and must then be garbage-collected, etc. Thanks, commited! Cheers, Hi, maybe we should stop implementing integrated functions over and over again and use CGI.escapeHTML() instead. However we have to require 'cgi' for this and we have to decide if this is too much overhead or not. Regards, Leon Winter Ignore this, this in only possible in Ruby. I was just confused about the same syntax :F Regards, Leon Winter -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmEqrEACgkQ3qn9m9SfDYfDtgCg1CuIgMtRyQwsO30fdeqHWLe+ cDwAn2mm7qfvOWP/A6V/CJieB3Zdt1xw =+X7V -END PGP SIGNATURE- -- To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.
[PATCH] awesomerc: open clients menu only once
Hi, I always wondered why the clients menu (default rightclick on the tasklist) fires up a menu every time, so i could open it hundred time. I guess nobody wants that ;) Patch attached. Regards and Happy 2k9, Leon Winter From 6f0949e55468d3fb13296bcf603f4477cf3116b1 Mon Sep 17 00:00:00 2001 From: Leon Winter leon.win...@informatik.uni-oldenburg.de Date: Thu, 8 Jan 2009 13:59:19 +0100 Subject: [PATCH] awesomerc: open clients menu only once --- awesomerc.lua.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/awesomerc.lua.in b/awesomerc.lua.in index 6b85b54..765c445 100644 --- a/awesomerc.lua.in +++ b/awesomerc.lua.in @@ -123,7 +123,7 @@ mytaglist.buttons = { button({ }, 1, awful.tag.viewonly), button({ }, 5, awful.tag.viewprev) } mytasklist = {} mytasklist.buttons = { button({ }, 1, function (c) client.focus = c; c:raise() end), - button({ }, 3, function () awful.menu.clients({ width=250 }) end), + button({ }, 3, function () if instance then instance:hide() end instance = awful.menu.clients({ width=250 }) end), button({ }, 4, function () awful.client.focus.byidx(1) end), button({ }, 5, function () awful.client.focus.byidx(-1) end) } -- 1.5.6.5
Re: [PATCH] awesomerc: open clients menu only once
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Julien Danjou wrote: At 1231420035 time_t, Leon Winter wrote: I guess nobody wants that ;) Patch attached. Did you test it? Twice. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkll/UYACgkQ3qn9m9SfDYcgcwCdFYhDs7PufjA7COPFwH1262Bw QfAAoMWrp6gL3EwuI35td55MfX8wHDsT =z/PF -END PGP SIGNATURE- -- To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.
[Patches] naughty: fix version and announce GetServerInfo over DBUS
Hi, well Julien, you modified my last patch so it did not work ;D Since you replaced @AWESOME_VERSION@ with just AWESOME_VERSION it became nil, because it is not defined, see 003: i just added in the header. The other way would be the @AWESOME_VERSION@ thing, however it dont think you like it (anyway this is 005). The last patch 006 is for naughty to announce GetServerInfo and GetServerInformation over DBUS, so we can simply test it in d-feet e.g. Since the correct version is announced gajim claims it cannot convert v3. ... into an int. Well this is not really our problem, but why is a v in the version string anyway? Regards, Leon Winter From f024841b5fc5b96a6f3e341cb0772fcd86059fe9 Mon Sep 17 00:00:00 2001 From: Leon Winter leon.win...@informatik.uni-oldenburg.de Date: Fri, 19 Dec 2008 09:34:55 +0100 Subject: [PATCH] naughty: fix returning correct awesome version --- lib/naughty.lua.in |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lib/naughty.lua.in b/lib/naughty.lua.in index 5ee3f93..785cf75 100644 --- a/lib/naughty.lua.in +++ b/lib/naughty.lua.in @@ -20,6 +20,7 @@ local bt = require(beautiful) local screen = screen local awful = awful local dbus = dbus +local AWESOME_VERSION = AWESOME_VERSION --- Notification library module(naughty) @@ -439,7 +440,7 @@ elseif data.member == CloseNotification then end elseif data.member == GetServerInfo or data.member == GetServerInformation then -- name of notification app, name of project, version of notification app, project version -return s, naughty, s, awesome, s, AWESOME_VERSION, s, 1337 +return s, naughty, s, awesome, s, 1337, s, AWESOME_VERSION end end) -- 1.5.6.5 From 0f103bbd5d69afb02fd241ed46c459a9cb546cf1 Mon Sep 17 00:00:00 2001 From: Leon Winter leon.win...@informatik.uni-oldenburg.de Date: Fri, 19 Dec 2008 09:37:13 +0100 Subject: [PATCH] naughty: fix returning correct awesome version --- lib/naughty.lua.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/naughty.lua.in b/lib/naughty.lua.in index 5ee3f93..f81abac 100644 --- a/lib/naughty.lua.in +++ b/lib/naughty.lua.in @@ -439,7 +439,7 @@ elseif data.member == CloseNotification then end elseif data.member == GetServerInfo or data.member == GetServerInformation then -- name of notification app, name of project, version of notification app, project version -return s, naughty, s, awesome, s, AWESOME_VERSION, s, 1337 +return s, naughty, s, awesome, s, 1337, s, @AWESOME_VERSION@ end end) -- 1.5.6.5 From e6e17969d8eb25939c9f8a364ad4ccd3be5f4bd3 Mon Sep 17 00:00:00 2001 From: Leon Winter leon.win...@informatik.uni-oldenburg.de Date: Fri, 19 Dec 2008 09:39:06 +0100 Subject: [PATCH] naughty: announce GetServerInfo over dbus --- lib/naughty.lua.in | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/lib/naughty.lua.in b/lib/naughty.lua.in index f81abac..ae5e93e 100644 --- a/lib/naughty.lua.in +++ b/lib/naughty.lua.in @@ -470,6 +470,18 @@ Introspection 1.0//EN arg name=timeout type=i direction=in/ arg name=return_id type=u direction=out/ /method +method name=GetServerInformation + arg name=app_name type=s direction=out/ + arg name=project_name type=s direction=out/ + arg name=app_version type=s direction=out/ + arg name=project_version type=s direction=out/ +/method +method name=GetServerInfo + arg name=app_name type=s direction=out/ + arg name=project_name type=s direction=out/ + arg name=app_version type=s direction=out/ + arg name=project_version type=s direction=out/ +/method /interface /node]=] return s, xml -- 1.5.6.5
[Patch] naughty/GetServerInfo: act according spec
Hi, i just read the DBUS spec ( http://www.galago-project.org/specs/notification/0.4/x361.html ) and noticed my implementation is not working according to it. Patch attached. I also applied a :match(), to just return a string like 1.4; this will make gajim happy. Regards, Leon Winter From 446f5c5521eb463abe7b4555f235e4bed5508898 Mon Sep 17 00:00:00 2001 From: Leon Winter leon.win...@informatik.uni-oldenburg.de Date: Fri, 19 Dec 2008 11:14:52 +0100 Subject: [PATCH] naughty/GetServerInfo: act according spec --- lib/naughty.lua.in | 20 +--- 1 files changed, 9 insertions(+), 11 deletions(-) diff --git a/lib/naughty.lua.in b/lib/naughty.lua.in index 60d4e87..407ee4f 100644 --- a/lib/naughty.lua.in +++ b/lib/naughty.lua.in @@ -439,8 +439,8 @@ elseif data.member == CloseNotification then destroy(obj) end elseif data.member == GetServerInfo or data.member == GetServerInformation then --- name of notification app, name of project, version of notification app, project version -return s, naughty, s, awesome, s, 1337, s, AWESOME_VERSION +-- name of notification app, name of vender, version +return s, naughty, s, awesome, s, AWESOME_VERSION:match(%d.%d) end end) @@ -472,17 +472,15 @@ Introspection 1.0//EN arg name=return_id type=u direction=out/ /method method name=GetServerInformation - arg name=app_name type=s direction=out/ - arg name=project_name type=s direction=out/ - arg name=app_version type=s direction=out/ - arg name=project_version type=s direction=out/ + arg name=return_name type=s direction=out/ + arg name=return_vendor type=s direction=out/ + arg name=return_version type=s direction=out/ /method method name=GetServerInfo - arg name=app_name type=s direction=out/ - arg name=project_name type=s direction=out/ - arg name=app_version type=s direction=out/ - arg name=project_version type=s direction=out/ -/method + arg name=return_name type=s direction=out/ + arg name=return_vendor type=s direction=out/ + arg name=return_version type=s direction=out/ + /method /interface /node]=] return s, xml -- 1.5.6.5
Re: awful.menu general concept issue
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Julien Danjou wrote: At 1229612705 time_t, Leon Winter wrote: b) patch the C side to check for mouse-over/leave events if menus/widgets hide b) is the right solution. How about that: diff --git a/wibox.c b/wibox.c index 9c0f8b5..87e2433 100644 --- a/wibox.c +++ b/wibox.c @@ -545,6 +545,7 @@ wibox_setvisible(wibox_t *wibox, bool v) if(v != wibox-isvisible) { wibox-isvisible = v; +wibox-mouse_over = NULL; if(wibox-screen != SCREEN_UNDEF) { @@ -587,6 +588,8 @@ wibox_detach(wibox_t *wibox) /* restore position */ wibox-isvisible = v; +wibox-mouse_over = NULL; + simplewindow_wipe(wibox-sw); for(int i = 0; i globalconf.screens[wibox-screen].wiboxes.len; i++) Looks simple, works perfectly: accepted. Regards, Leon Winter -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEUEARECAAYFAklKciIACgkQ3qn9m9SfDYck3ACdHgIKOPG5+FZ8N9/WbU/DEB8K xVsAmOcegRjoGWdEOXtWkzntubXSr9k= =HBus -END PGP SIGNATURE- -- To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.
Re: [PATCH] awful.menu: use bg_image instead of imagebox
Julien Danjou wrote: At 1229325688 time_t, Leon Winter wrote: +if icon.width tonumber(data.h) then +icon = icon:crop_and_scale(0,0,icon.height,icon.width,data.h,data.h) Pictures may not be square. Patch attached. Anyway this saves us only 2 SLOC, but also the mouse-over/leave/click-handler for the former imagebox. Regards, Leon Winter From cf899b01d0707fea89d5a475caa59908f2ce4ca2 Mon Sep 17 00:00:00 2001 From: Leon Winter leon.win...@informatik.uni-oldenburg.de Date: Thu, 18 Dec 2008 18:02:54 +0100 Subject: [PATCH] awful.menu: use bg_image instead of an imagebox --- lib/awful/menu.lua.in | 38 ++ 1 files changed, 18 insertions(+), 20 deletions(-) diff --git a/lib/awful/menu.lua.in b/lib/awful/menu.lua.in index 6a19df1..95666c7 100644 --- a/lib/awful/menu.lua.in +++ b/lib/awful/menu.lua.in @@ -17,6 +17,7 @@ local capi = { screen = screen, mouse = mouse, client = client } local util = require(awful.util) local tags = require(awful.tag) local awbeautiful = require(beautiful) +local tonumber = tonumber --- Menu module for awful module(awful.menu) @@ -113,31 +114,28 @@ local function add_item(data, num, item_info) button({}, 3, function () hide(data) end) } --- Create the item icon widget -local icon -if item_info[3] then -icon = widget({ type = imagebox, align = left }) -if type(item_info[3]) == string then -icon.image = image(item_info[3]) -else -icon.image = item_info[3] -end -else -icon = widget({type = textbox, align = left }) -icon.width = data.h -end - -icon:buttons(bindings) - -function icon.mouse_enter() mouse_enter(item, data.theme) end -function icon.mouse_leave() mouse_leave(item, data.theme) end - -- Create the item label widget local label = widget({ type = textbox, align = flex }) label.text = .. item_info[1] +label:margin{left = data.h} +-- Set icon if needed +if item_info[3] then +local icon = type(item_info[3]) == string and image(item_info[3]) or item_info[3] +if icon.width tonumber(data.h) or icon.height tonumber(data.h) then +local width, height +if ((data.h/icon.height) * icon.width) tonumber(data.h) then +width, height = data.h,(tonumber(data.h)/icon.width)*icon.height +else +width, height = (tonumber(data.h)/icon.height)*icon.width,data.h +end +icon = icon:crop_and_scale(0,0,icon.width,icon.height,width,height) +end +label.bg_image = icon +end + label:buttons(bindings) function label.mouse_enter() mouse_enter(item, data.theme) end @@ -155,7 +153,7 @@ local function add_item(data, num, item_info) end -- Add widgets to the wibox -item.widgets = { icon, label, submenu } +item.widgets = { label, submenu } item.ontop = true -- 1.5.6.5
Re: [PATCH] awful.menu: use bg_image instead of imagebox
Julien Danjou wrote: At 1229325688 time_t, Leon Winter wrote: +if icon.width tonumber(data.h) then +icon = icon:crop_and_scale(0,0,icon.height,icon.width,data.h,data.h) Pictures may not be square. Patch attached. Anyway this saves us only 2 SLOC, but also the mouse-over/leave/click-handler for the former imagebox. Regards, Leon Winter From cf899b01d0707fea89d5a475caa59908f2ce4ca2 Mon Sep 17 00:00:00 2001 From: Leon Winter leon.win...@informatik.uni-oldenburg.de Date: Thu, 18 Dec 2008 18:02:54 +0100 Subject: [PATCH] awful.menu: use bg_image instead of an imagebox --- lib/awful/menu.lua.in | 38 ++ 1 files changed, 18 insertions(+), 20 deletions(-) diff --git a/lib/awful/menu.lua.in b/lib/awful/menu.lua.in index 6a19df1..95666c7 100644 --- a/lib/awful/menu.lua.in +++ b/lib/awful/menu.lua.in @@ -17,6 +17,7 @@ local capi = { screen = screen, mouse = mouse, client = client } local util = require(awful.util) local tags = require(awful.tag) local awbeautiful = require(beautiful) +local tonumber = tonumber --- Menu module for awful module(awful.menu) @@ -113,31 +114,28 @@ local function add_item(data, num, item_info) button({}, 3, function () hide(data) end) } --- Create the item icon widget -local icon -if item_info[3] then -icon = widget({ type = imagebox, align = left }) -if type(item_info[3]) == string then -icon.image = image(item_info[3]) -else -icon.image = item_info[3] -end -else -icon = widget({type = textbox, align = left }) -icon.width = data.h -end - -icon:buttons(bindings) - -function icon.mouse_enter() mouse_enter(item, data.theme) end -function icon.mouse_leave() mouse_leave(item, data.theme) end - -- Create the item label widget local label = widget({ type = textbox, align = flex }) label.text = .. item_info[1] +label:margin{left = data.h} +-- Set icon if needed +if item_info[3] then +local icon = type(item_info[3]) == string and image(item_info[3]) or item_info[3] +if icon.width tonumber(data.h) or icon.height tonumber(data.h) then +local width, height +if ((data.h/icon.height) * icon.width) tonumber(data.h) then +width, height = data.h,(tonumber(data.h)/icon.width)*icon.height +else +width, height = (tonumber(data.h)/icon.height)*icon.width,data.h +end +icon = icon:crop_and_scale(0,0,icon.width,icon.height,width,height) +end +label.bg_image = icon +end + label:buttons(bindings) function label.mouse_enter() mouse_enter(item, data.theme) end @@ -155,7 +153,7 @@ local function add_item(data, num, item_info) end -- Add widgets to the wibox -item.widgets = { icon, label, submenu } +item.widgets = { label, submenu } item.ontop = true -- 1.5.6.5
Re: [PATCH] awful.menu: use bg_image instead of imagebox
Julien Danjou wrote: At 1229325688 time_t, Leon Winter wrote: +if icon.width tonumber(data.h) then +icon = icon:crop_and_scale(0,0,icon.height,icon.width,data.h,data.h) Pictures may not be square. 16px on default because most icons are 16px. Regards, Leon Winter From f0de1ac8f981af7d95cb060ed0e6a6d3d3b5763a Mon Sep 17 00:00:00 2001 From: Leon Winter leon.win...@informatik.uni-oldenburg.de Date: Thu, 18 Dec 2008 18:10:52 +0100 Subject: [PATCH] awful.menu: change menu height to 16px --- lib/awful/menu.lua.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/awful/menu.lua.in b/lib/awful/menu.lua.in index 95666c7..72401a7 100644 --- a/lib/awful/menu.lua.in +++ b/lib/awful/menu.lua.in @@ -35,7 +35,7 @@ local function load_theme(custom) theme.submenu_icon = custom.submenu_icon or beautiful.menu_submenu_icon -theme.menu_height = custom.height or beautiful.menu_height or 15 +theme.menu_height = custom.height or beautiful.menu_height or 16 theme.menu_width = custom.width or beautiful.menu_width or 100 theme.border = custom.border_color or beautiful.menu_border_color or beautiful.border_normal -- 1.5.6.5
Re: [PATCH] Fixed DBus version string
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Félix C. Morency wrote: I'm resending this patch because: - Not every system uses unicode; - Not every font implements those glyph, even if the font is unicode; - Not every program supports unicode (Tobias Nissen pointed this out). Feel free to discuss this. Felix --- common/version.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/version.c b/common/version.c index f6474c2..23d1511 100644 --- a/common/version.c +++ b/common/version.c @@ -49,9 +49,9 @@ eprint_version(const char *const executable) printf( (%...@%s)\n, AWESOME_COMPILE_BY, AWESOME_COMPILE_HOSTNAME); printf( • D-Bus support: ); #ifdef WITH_DBUS -printf(✔\n); +printf(Yes\n); #else -printf(✘\n); +printf(No\n); #endif exit(EXIT_SUCCESS); } Why not using both, e.g. DBUS: ✔ Yes; worst case is the glyph is hidden or displayed as unknown character. However I personally really dont care about a fancy character ;) Since awesome supports unicode (client titles etc.) the userbase probably has unicode set up. Regards, Leon Winter -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAklKrVoACgkQ3qn9m9SfDYfKDACePmJnuWQVrDaJL6B/4hdPTDI6 B9YAoLv78j3JEsc6sa4phps9e3uLCKhE =IPpG -END PGP SIGNATURE- -- To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.
[PATCH] awful.layout.set for non active tag
Hi, i just noticed it is not possible to set the layout for a non active tag without switching to him and change layout. Patch attached. Regards, Leon Winer From 498c0b3233badc143f1b0f677d39d871c1d5ac46 Mon Sep 17 00:00:00 2001 From: Leon Winter leon.win...@informatik.uni-oldenburg.de Date: Sun, 14 Dec 2008 17:09:11 +0100 Subject: [PATCH] awful.layout.set for non active tag --- lib/awful/layout/init.lua.in |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/awful/layout/init.lua.in b/lib/awful/layout/init.lua.in index 4b0bd40..acc4d23 100644 --- a/lib/awful/layout/init.lua.in +++ b/lib/awful/layout/init.lua.in @@ -51,8 +51,8 @@ end --- Set the layout function of the current tag. -- @param layout Layout name. -function set(layout) -local t = tag.selected() +function set(layout, _t) +local t = _t or tag.selected() tag.setproperty(t, layout, layout) capi.hooks.arrange()(t.screen) end -- 1.5.6.5
Re: [PATCH] awful.layout.set for non active tag
Leon Winter wrote: Hi, i just noticed it is not possible to set the layout for a non active tag without switching to him and change layout. Patch attached. Regards, Leon Winer Gregor beated me, so here is a better patch :D Regards, Leon Winter From 498c0b3233badc143f1b0f677d39d871c1d5ac46 Mon Sep 17 00:00:00 2001 From: Leon Winter leon.win...@informatik.uni-oldenburg.de Date: Sun, 14 Dec 2008 17:09:11 +0100 Subject: [PATCH] awful.layout.set for non active tag --- lib/awful/layout/init.lua.in |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/awful/layout/init.lua.in b/lib/awful/layout/init.lua.in index 4b0bd40..acc4d23 100644 --- a/lib/awful/layout/init.lua.in +++ b/lib/awful/layout/init.lua.in @@ -51,8 +51,8 @@ end --- Set the layout function of the current tag. -- @param layout Layout name. -function set(layout) -local t = tag.selected() +function set(layout, t) +t = t or tag.selected() tag.setproperty(t, layout, layout) capi.hooks.arrange()(t.screen) end -- 1.5.6.5
[PATCH] awful.menu: use bg_image instead of imagebox
Hi, i just wondered how complicated awful.menu is designed. Since we have .bg_image we can KISS :P Patch attached ;) However there is a bug in awful.menu (and was before the patch aswell): Click on an item in the menu, then reopen the menu and point over the item you clicked before - there will be no highlight background as usual. If you move your cursor elsewhere and over it again it will highlighted correctly again. Gregor could repro it, so its not only a problem to me alone. Unfortunately i was unable to find the bug yet, but i guess the bug will not survive the next days :D Regards, Leon Winter From 09ff8bcb1ce3b9cd00476de8875e651b15816fa6 Mon Sep 17 00:00:00 2001 From: Leon Winter leon.win...@informatik.uni-oldenburg.de Date: Sun, 14 Dec 2008 19:50:05 +0100 Subject: [PATCH] awful.menu: use bg_image instead of imagebox --- lib/awful/menu.lua.in | 27 +++ 1 files changed, 7 insertions(+), 20 deletions(-) diff --git a/lib/awful/menu.lua.in b/lib/awful/menu.lua.in index 6a19df1..b52d0c2 100644 --- a/lib/awful/menu.lua.in +++ b/lib/awful/menu.lua.in @@ -113,31 +113,18 @@ local function add_item(data, num, item_info) button({}, 3, function () hide(data) end) } --- Create the item icon widget -local icon -if item_info[3] then -icon = widget({ type = imagebox, align = left }) -if type(item_info[3]) == string then -icon.image = image(item_info[3]) -else -icon.image = item_info[3] -end -else -icon = widget({type = textbox, align = left }) -icon.width = data.h -end - -icon:buttons(bindings) - -function icon.mouse_enter() mouse_enter(item, data.theme) end -function icon.mouse_leave() mouse_leave(item, data.theme) end - -- Create the item label widget local label = widget({ type = textbox, align = flex }) label.text = .. item_info[1] +label:margin{left = data.h} +-- Set icon if needed +if item_info[3] then +label.bg_image = type(item_info[3]) == string and image(item_info[3]) or item_info[3] +end + label:buttons(bindings) function label.mouse_enter() mouse_enter(item, data.theme) end @@ -155,7 +142,7 @@ local function add_item(data, num, item_info) end -- Add widgets to the wibox -item.widgets = { icon, label, submenu } +item.widgets = { label, submenu } item.ontop = true -- 1.5.6.5
Re: [PATCH] awful.menu: use bg_image instead of imagebox
Leon Winter wrote: Hi, i just wondered how complicated awful.menu is designed. Since we have .bg_image we can KISS :P Patch attached ;) However there is a bug in awful.menu (and was before the patch aswell): Click on an item in the menu, then reopen the menu and point over the item you clicked before - there will be no highlight background as usual. If you move your cursor elsewhere and over it again it will highlighted correctly again. Gregor could repro it, so its not only a problem to me alone. Unfortunately i was unable to find the bug yet, but i guess the bug will not survive the next days :D Regards, Leon Winter I just noticed, icon get resized normally, but not if we use bg_image. Nevertheless i added a further patch that will resize the icon. You may merge both. I tested the patches and the icons looks pretty anoying, this crop and resize function screw my icons :F Actually i have no idea why the icons looks pretty uncool. You may look yourself and find a solution, but may not merge until icons look good again (: Regards, Leon Winter From 2e9dbbf2c42ff3ef2a70d053a0c4da6e3fafbddd Mon Sep 17 00:00:00 2001 From: Leon Winter leon.win...@informatik.uni-oldenburg.de Date: Mon, 15 Dec 2008 08:16:06 +0100 Subject: [PATCH] awful.menu: resize icon if needed --- lib/awful/menu.lua.in |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/lib/awful/menu.lua.in b/lib/awful/menu.lua.in index b52d0c2..8d50f2b 100644 --- a/lib/awful/menu.lua.in +++ b/lib/awful/menu.lua.in @@ -17,6 +17,7 @@ local capi = { screen = screen, mouse = mouse, client = client } local util = require(awful.util) local tags = require(awful.tag) local awbeautiful = require(beautiful) +local tonumber = tonumber --- Menu module for awful module(awful.menu) @@ -122,7 +123,11 @@ local function add_item(data, num, item_info) label:margin{left = data.h} -- Set icon if needed if item_info[3] then -label.bg_image = type(item_info[3]) == string and image(item_info[3]) or item_info[3] +local icon = type(item_info[3]) == string and image(item_info[3]) or item_info[3] +if icon.width tonumber(data.h) then +icon = icon:crop_and_scale(0,0,icon.height,icon.width,data.h,data.h) +end +label.bg_image = icon end label:buttons(bindings) -- 1.5.6.5
[PATCH] naughty: support for categories via mapping
Hi, the next enhancement for naughty to support more of the dbus notification specs. Regards, Leon Winter From b2dbad702cb6b85a406dfecf9b8c2e0c6781b12a Mon Sep 17 00:00:00 2001 From: Leon Winter [EMAIL PROTECTED] Date: Wed, 10 Dec 2008 18:55:18 +0100 Subject: [PATCH] naughty: support for categories via mapping --- lib/naughty.lua.in | 44 +++- 1 files changed, 31 insertions(+), 13 deletions(-) diff --git a/lib/naughty.lua.in b/lib/naughty.lua.in index 49f7275..a89b164 100644 --- a/lib/naughty.lua.in +++ b/lib/naughty.lua.in @@ -98,10 +98,6 @@ config.presets = { } } --- Counter for the notifications --- Required for later access via DBUS -local counter = 1 - -- DBUS Notification constants local urgency = { low = \0, @@ -109,6 +105,23 @@ local urgency = { critical = \2 } +--- DBUS notification to preset mapping +-- @name config.mapping +-- The first element is an object containing the filter +-- If the rules in the filter matches the associated preset will be applied +-- The rules object can contain: urgency, category, appname +-- The second element is the preset + +config.mapping = { +{{urgency = urgency.low}, config.presets.low}, +{{urgency = urgency.normal}, config.presets.normal}, +{{urgency = urgency.critical}, config.presets.critical} +} + +-- Counter for the notifications +-- Required for later access via DBUS +local counter = 1 + --- Index of notifications. See config table for valid 'position' values. -- Each element is a table consisting of: -- @field box Wibox object containing the popup @@ -371,7 +384,7 @@ end -- DBUS/Notification support -- Notify -awful.hooks.dbus.register(org.freedesktop.Notifications, function (data, arg1, replaces_id, icon, title, text, actions, hints, expire) +awful.hooks.dbus.register(org.freedesktop.Notifications, function (data, appname, replaces_id, icon, title, text, actions, hints, expire) args = {} if data.member == Notify then if text ~= then @@ -386,13 +399,18 @@ if data.member == Notify then return nil end end -if hints.urgency == urgency.low then -args.preset = config.presets.low -elseif hints.urgency == urgency.normal then -args.preset = config.presets.normal -elseif hints.urgency == urgency.critical then -args.preset = config.presets.critical -end +local score = 0 +table.foreach(config.mapping, function(i, obj) +local filter, preset, s = obj[1], obj[2], 0 +if filter.urgency and filter.urgency ~= hints.urgency then return end +if filter.category and filter.category ~= hints.category then return end +if filter.appname and filter.appname ~= appname then return end +table.foreach(filter, function(j, el) s = s + 1 end) +if s score then +score = s +args.preset = preset +end +end) if icon ~= then args.icon = icon end -- 1.5.6.5
[PATCH] naughty: introducing urgency levels and presets
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, as told in IRC here is my patch for naughty. It adds urgency level (DBUS) and maps them to according presets. I also added support for the DBUS expire field. Test with: # urgency level critical notify-send -u critical hey joe # expires in 2 seconds notify-send -t 2000 hey Patch is also available via: http://www.morpgnet.org/~leon/naughty_dbus_urgency_level_and_presets.patch Thanks to jd for enhancing DBUS support :) Regards, Leon Winter -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkktTdQACgkQ3qn9m9SfDYceBwCeNwNQ9t0UyvFWXBqrb7trPxGC mb4An0Rmc7Y+JZAu19nTiBE4LL45fPaz =vKen -END PGP SIGNATURE- diff --git a/lib/naughty.lua.in b/lib/naughty.lua.in index e84a4d8..43c6835 100644 --- a/lib/naughty.lua.in +++ b/lib/naughty.lua.in @@ -25,55 +25,90 @@ module(naughty) --- Naughty configuration - a table containing common/default popup settings. -- You can override some of these for individual popups using args to notify(). -- @name config --- @field timeout Number of seconds after which popups disappear. --- Set to 0 for no timeout. Default: 5 -- @field screen Screen on which the popups will appear number. Default: 1 -- @field position Corner of the workarea the popups will appear. -- Valid values: 'top_right', 'top_left', 'bottom_right', 'bottom_left'. -- Default: 'top_right' -- @field padding Space between popups and edge of the workarea. Default: 4 --- @field height Height of a single line of text. Default: 16 -- @field width Width of a popup. Default: 300 -- @field spacing Spacing between popups. Default: 1 -- @field ontop Boolean forcing popups to display on top. Default: true -- @field margin Space between popup edge and content. Default: 10 --- @field font Popup font. Default: beautiful.font or Verdana 8 --- @field icon Popup icon. Default: nil --- @field icon_size Size of the icon in pixels. Default: nil -- @field icon_dirs List of directories that will be checked by getIcon() -- Default: { /usr/share/pixmaps/, } -- @field icon_formats List of formats that will be checked by getIcon() -- Default: { png, gif } --- @field fg Foreground color. Default: beautiful.fg_focus or '#ff' --- @field bg Background color. Default: beautiful.bg_focus or '#535d6c' --- @field border_color Border color. --- Default: beautiful.border_focus or '#535d6c' -- @field border_width Border width. Default: 1 --- @field hover_timeout Delay in seconds after which hovered popup disappears. --- Default: nil -- @class table config = {} -config.timeout = 5 -config.screen = 1 -config.position = top_right config.padding = 4 -config.height = 16 -config.width = 300 config.spacing = 1 config.margin = 10 -config.icon = nil -config.icon_size = nil config.icon_dirs = { /usr/share/pixmaps/, } config.icon_formats = { png, gif } config.border_width = 1 -config.hover_timeout = nil + +--- Notification Presets - a table containing presets for different purposes +-- You have to pass a reference of a preset in your notify() call to use the preset +-- At least the default preset named normal has to be defined +-- The presets low, normal and critical are used for notifications over DBUS +-- @name config.presets +-- @field low The preset for notifications with low urgency level +-- @field normal The default preset for every notification without a preset that will also be used for normal urgency level +-- @field critical The preset for notifications with a critical urgency level +-- @class table + +--- Default preset for notifications +-- @name config.presets.normal +-- @field timeout Number of seconds after which popups disappear. +-- Set to 0 for no timeout. Default: 5 +-- @field hover_timeout Delay in seconds after which hovered popup disappears. +-- Default: nil +-- @field border_color Border color. +-- Default: beautiful.border_focus or '#535d6c' +-- @field fg Foreground color. Default: beautiful.fg_focus or '#ff' +-- @field bg Background color. Default: beautiful.bg_focus or '#535d6c' +-- @field font Popup font. Default: beautiful.font or Verdana 8 +-- @field height Height of a single line of text. Default: 16 +-- @field icon Popup icon. Default: nil +-- @field icon_size Size of the icon in pixels. Default: nil + +config.presets = { +low = { +timeout = 5 +}, +normal = { +timeout = 8, +hover_timeout = nil, +position = top_right, +screen = 1, +width = 300, +height = 16, +icon = nil, +icon_size = nil +}, +critical = { +bg = #ff, +fg = #ff, +timeout = 0, +height = 25 +} +} -- Counter for the notifications -- Required for later access via DBUS local counter = 1 +-- DBUS Notification constants +local urgency = { +low = \0, +normal = \1, +critical = \2 +} + --- Index of notifications. See config
Re: [PATCH] naughty: introducing urgency levels and presets
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Leon Winter wrote: Hi, as told in IRC here is my patch for naughty. It adds urgency level (DBUS) and maps them to according presets. I also added support for the DBUS expire field. Test with: # urgency level critical notify-send -u critical hey joe # expires in 2 seconds notify-send -t 2000 hey Patch is also available via: http://www.morpgnet.org/~leon/naughty_dbus_urgency_level_and_presets.patch Thanks to jd for enhancing DBUS support :) Regards, Leon Winter Hi. I just fixed a minor issue. Please use the url to receive the latest patch ;) Regards, Leon Winter -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkktUWEACgkQ3qn9m9SfDYfPAQCfZ1BXZ0lkZowYGN2ibISbnoo/ dhkAn28koUCOC42/shJWdvojODw7ftlb =BujO -END PGP SIGNATURE- -- To unsubscribe, send mail to [EMAIL PROTECTED]
[Patch] Beautiful - Using Regex instead of helper functions
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, as told in the irc channel I modified beatiful to use a regex instead of helper functions. This results in much shorter and probably cleaner code. Because LUAs regex support is really bad, I have to use a little hack: Because my regex requires a linebreak as first char for a valid line, the regex would ignore the very first line of the theme file. To fix this I add a newline to the string and exec the regex after that. Patch is available under: http://www.morpgnet.org/~leon/beautiful_regex.patch Regards, Leon Winter -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkknKXoACgkQ3qn9m9SfDYd6BwCgvfAxrt6jFxON+JpqyYXwdif0 VPQAoK51jkOu1qHb0yC/G8OGqB8Gncav =pQXG -END PGP SIGNATURE- -- To unsubscribe, send mail to [EMAIL PROTECTED]