[awesome bugs] #384 - gkrellm showing up on taskbar if more than 1 gkrellm running

2008-11-26 Thread awesome

THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#384 - gkrellm showing up on taskbar if more than 1 gkrellm running
User who did this - Julien Danjou (jd)

--
FWIW, I'm running gkrellm 2.3.2 from Debian.

I tried your steps to reproduce this, but I still cannot reproduce, which seems 
quite ok since it has really no logical sense to me.

Your first xprop shows that you set window type to dock, and so it's not shown 
in the statusbar.

There may be a bug, but again, I think it's rather a very hard to track or one 
on gkrellm side. In either way, we would need to have a « work-each-time » 
procedure to reproduce. Since you see the behaviour behing erratic it's 
impossible for now to me to get what's going on.

If you know a bit of Lua and feels like hacking, you can try to dig around the 
awful.widget lib to see for what reason precisely your client is not ignored.
--

More information can be found at the following URL:
http://awesome.naquadah.org/bugs/index.php?do=detailstask_id=384#comment919

You are receiving this message because you have requested it from the Flyspray 
bugtracking system.  If you did not expect this message or don't want to 
receive mails in future, you can change your notification settings at the URL 
shown above.

--
To unsubscribe, send mail to [EMAIL PROTECTED]


[awesome bugs] #384 - gkrellm showing up on taskbar if more than 1 gkrellm running (Attachment added)

2008-11-26 Thread awesome

THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#384 - gkrellm showing up on taskbar if more than 1 gkrellm running
User who did this - Michael Hofmann (mh21)

--
I'm sitting on a patch for a while now that seems to fix a bug in the 
do-not-show-in-taskbar window handling. Can you test whether it solves your 
problem?

Seems like you can't iterate over a table and at the same time remove some 
entries in it.
--

One or more files have been attached.

More information can be found at the following URL:
http://awesome.naquadah.org/bugs/index.php?do=detailstask_id=384#comment921

You are receiving this message because you have requested it from the Flyspray 
bugtracking system.  If you did not expect this message or don't want to 
receive mails in future, you can change your notification settings at the URL 
shown above.

--
To unsubscribe, send mail to [EMAIL PROTECTED]


Re: Tiling Layout in next

2008-11-26 Thread Julien Danjou
At 1227637435 time_t, Gregor Best wrote:
 here I have, as promised on IRC, a simple patch for the new Lua-based tiling
 layout in next. With this, if no client windows exist, master windows share 
 the
 complete working area. Also, if nmaster is zero, the slave windows now share
 the complete working area. With more ncols set to more than 1, the previous
 version placed slave windows into the same column if there were more than 2,
 this is now also fixed. One little issue that remains is, that if you, for
 example, have ncols set to 2 and you have an uneven number of slave windows,
 there's some free space on the screen which should be occupied by slave 
 windows.

Well done buddy.
Merged in my previous commit.

Cheers,
-- 
Julien Danjou
// ᐰ [EMAIL PROTECTED]   http://julien.danjou.info
// 9A0D 5FD9 EB42 22F6 8974  C95C A462 B51E C2FE E5CD


signature.asc
Description: Digital signature


[awesome bugs] #391 - lib xcb = 1.1.0 not found in Ubuntu 8.10 even after compiling and installing from freedesktop git

2008-11-26 Thread awesome

THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#391 - lib xcb = 1.1.0 not found in Ubuntu 8.10 even after compiling and 
installing from freedesktop git
User who did this - Sias Mey (sias)

--
Well... it was.

I just did another git pull and it seems its fixed now.

I tried a pull before submitting the bug because I figured it might have been 
fixed but It seems my local changes were messing with the pull.
After a git reset --hard and a git pull all seems well.

Thanks you for your time and sorry for wasting some of it ;-).

Ooh .. damn sorry. did some digging in gitk and it was fixed some minutes after 
I did the clone that night.
5694bd8769efc23e4a0ef1ea4bc102b0ad319664 fixed it
--

More information can be found at the following URL:
http://awesome.naquadah.org/bugs/index.php?do=detailstask_id=391#comment923

You are receiving this message because you have requested it from the Flyspray 
bugtracking system.  If you did not expect this message or don't want to 
receive mails in future, you can change your notification settings at the URL 
shown above.

--
To unsubscribe, send mail to [EMAIL PROTECTED]


[awesome bugs] #391 - lib xcb = 1.1.0 not found in Ubuntu 8.10 even after compiling and installing from freedesktop git

2008-11-26 Thread awesome

THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task is now closed:

FS#391 - lib xcb = 1.1.0 not found in Ubuntu 8.10 even after compiling and 
installing from freedesktop git
User who did this - Julien Danjou (jd)

Reason for closing: Not a bug
More information can be found at the following URL:
http://awesome.naquadah.org/bugs/index.php?do=detailstask_id=391

You are receiving this message because you have requested it from the Flyspray 
bugtracking system.  If you did not expect this message or don't want to 
receive mails in future, you can change your notification settings at the URL 
shown above.

--
To unsubscribe, send mail to [EMAIL PROTECTED]


[PATCH] naughty: introducing urgency levels and presets

2008-11-26 Thread Leon Winter
-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

2008-11-26 Thread Leon Winter
-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]


[awesome bugs] #384 - gkrellm showing up on taskbar if more than 1 gkrellm running

2008-11-26 Thread awesome

THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#384 - gkrellm showing up on taskbar if more than 1 gkrellm running
User who did this - Shaun Attfield (heurist)

--
I do not know about in LUA, but iterating over a list (table in this case) and 
removing items results in skipped items, which would account for this issue.
For instance: if you start at item[1] and test it and find it needs to be 
removed; when you remove it item[2] becomes item[1] but you continue your loop 
from item[2] thus skipping the test of the new item[1] (previously item[2]).
The solution is generally to iterate it in reverse, that way you start at 
item[100] (for example) and if you remove it and move on to item[99] it is 
still the same item[99] as you started with, only higher numbered item[s] will 
be moved down when the numbers below them are removed.
This is a problem with all formal queues.
I hope that makes senses as I am very tired ATM.

I am looking around client.lua line 110 for focus handing, but am thinking of 
leaving this till I have had some rest, this does not look like the correct 
place.

--

More information can be found at the following URL:
http://awesome.naquadah.org/bugs/index.php?do=detailstask_id=384#comment924

You are receiving this message because you have requested it from the Flyspray 
bugtracking system.  If you did not expect this message or don't want to 
receive mails in future, you can change your notification settings at the URL 
shown above.

--
To unsubscribe, send mail to [EMAIL PROTECTED]


Lua layouts in next

2008-11-26 Thread Gregor Best
Hello people,

today, i took some time to write a few patches which make the functions in
awful.tag and awful.layout aware of the Lua layouts in next and one of the
assorted problems (simplified tag objects).

These patches work around the tag objects no longer having a layout property
by providing awful.tag.extended, which takes exactly the same arguments as the
old tag() function did, i.e. a table with tag properties, but it returns not a
single tag object but a table. The table has the original tag object at the
position [object], so setting screens and moving clients to tags, for
example, now work by using tags[s][i].object rather than tags[s][i].

The layouts are organized in a table which consists of 2-tuples of a string,
which is the layout name, and a function which represents the layouts arrange
function. In the patched default rc, the layout table looks like this:

layouts =
{
{ tile, awful.layout.arrange.tile },
{ tileleft, awful.layout.arrange.tileleft },
{ tilebottom, awful.layout.arrange.tilebottom },
{ tiletop, awful.layout.arrange.tiletop },
{ max, awful.layout.arrange.max },
{ fullscreen, awful.layout.arrange.fullscreen }
}

All functions manipulating layouts now take a list of tag objects and the
layout list as their arguments to be abled to determine the correct layout for
a tag object.

The patches are to be applied against a clone of the next branch from
11/26/2008 ~16:00 CET, in ascending order from 001-* to 003-*

Gregor Bestdiff --git a/lib/awful/tag.lua.in b/lib/awful/tag.lua.in
index 0aad55a..3d94294 100644
--- a/lib/awful/tag.lua.in
+++ b/lib/awful/tag.lua.in
@@ -10,7 +10,8 @@ local util = require(awful.util)
 local pairs = pairs
 local ipairs = ipairs
 local capi =
-{
+{   
+tag = tag,
 screen = screen,
 mouse = mouse
 }
@@ -201,6 +202,24 @@ function viewmore(tags, screen)
 end
 end
 
+--- Return an extended tag table
+-- @param args the parameters which usually went to tag()
+-- @return a table with a tag object located at [object] the attributes from args
+function extended(args)
+local t = capi.tag(args.name or )
+local tag = { }
+for k, v in pairs(args) do
+if k ~= name then
+tag[k] = v
+end
+end
+tag.object = t
+if not args.layout then
+tag.layout = tile
+end
+return tag
+end
+
 -- Register standards hooks
 hooks.arrange.register(history.update)
diff --git a/lib/awful/layout.lua.in b/lib/awful/layout.lua.in
index 0aa16b7..c94730b 100644
--- a/lib/awful/layout.lua.in
+++ b/lib/awful/layout.lua.in
@@ -10,6 +10,8 @@ local ipairs = ipairs
 local pairs = pairs
 local tag = require(awful.tag)
 local client = require(awful.client)
+local util = require(awful.util)
+local hooks = require(awful.hooks)
 local math = math
 local capi =
 {
@@ -23,40 +25,84 @@ arrange = {}
 
 --- Get the current layout name.
 -- @param screen The screen number.
-function get(screen)
+-- @param taglist a table with extended tags
+function get(screen, taglist)
 local t = tag.selected(screen)
-if t then
-return t.layout
+for k, v in pairs(taglist) do
+if v.object == t then
+return v.layout
+end
 end
 end
 
 --- Change the layout of the current tag.
 -- @param layouts A table of layouts.
 -- @param i Relative index.
-function inc(layouts, i)
+-- @param taglist a table with extended tags
+function inc(layouts, i, taglist)
 local t = tag.selected()
-local number_of_layouts = 0
-local rev_layouts = {}
-for i, v in ipairs(layouts) do
-rev_layouts[v] = i
-number_of_layouts = number_of_layouts + 1
+local layout
+for j, v in ipairs(taglist) do
+if v.object == t then
+layout = v.layout
+break
+end
+end
+
+local index
+for j, v in ipairs(layouts) do
+if v[1] == layout then
+index = j
+break
+end
 end
-if t then
-local cur_layout = get()
-local new_layout_index = (rev_layouts[cur_layout] + i) % number_of_layouts
-if new_layout_index == 0 then
-new_layout_index = number_of_layouts
+
+index = util.cycle(#layouts, index + i)
+for j, v in ipairs(taglist) do
+if v.object == t then
+v.layout = layouts[index][1]
+break
 end
-t.layout = layouts[new_layout_index]
 end
+
+hooks.user.call(arrange, t.screen)
 end
 
 --- Set the layout of the current tag by name.
 -- @param layout Layout name.
-function set(layout)
+-- @param taglist a table with extended tags
+function set(layout, taglist)
 local t = tag.selected()
-if t then
-t.layout = layout
+for k, v in pairs(taglist) do
+if v.object == t then
+v.layout = layout
+end
+end
+awful.hooks.user.call(arrange, t.screen)
+end
+
+--- Apply the layout of the current tag
+-- @param layouts a table containing available layouts

2 patches for next

2008-11-26 Thread Maarten Maathuis

One minor fix and one to fix that focus issue.

Maarten.
From ef34abe9a244f472a928a6bb413288d6ed400353 Mon Sep 17 00:00:00 2001
From: Maarten Maathuis [EMAIL PROTECTED]
Date: Tue, 25 Nov 2008 18:51:37 +0100
Subject: [PATCH] awful.client: fix minor luadoc issue

Signed-off-by: Maarten Maathuis [EMAIL PROTECTED]
---
 lib/awful/client.lua.in |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/awful/client.lua.in b/lib/awful/client.lua.in
index bee96e1..60984b1 100644
--- a/lib/awful/client.lua.in
+++ b/lib/awful/client.lua.in
@@ -363,7 +363,7 @@ function getmaster(screen)
 return visible(s)[1]
 end
 
--- Set the client as slave: put it at the end of other windows.
+--- Set the client as slave: put it at the end of other windows.
 -- @param c The window to set as slave.
 function setslave(c)
 local cls = visible(c.screen)
-- 
1.6.0.4

From 83ce87d590cec65450dc8cb973a71dcbffa95f6d Mon Sep 17 00:00:00 2001
From: Maarten Maathuis [EMAIL PROTECTED]
Date: Wed, 26 Nov 2008 19:18:20 +0100
Subject: [PATCH] client: focus on root window upon client_unfocus()

Signed-off-by: Maarten Maathuis [EMAIL PROTECTED]
---
 client.c |   12 +---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/client.c b/client.c
index fd2007e..2f0cc43 100644
--- a/client.c
+++ b/client.c
@@ -157,8 +157,13 @@ client_getbywin(xcb_window_t w)
 static void
 client_unfocus(client_t *c)
 {
+xcb_window_t root_win = xutil_screen_get(globalconf.connection, 
c-phys_screen)-root;
 globalconf.screens[c-phys_screen].client_focus = NULL;
 
+/* Set focus on root window, so no events leak to the current window. */
+xcb_set_input_focus(globalconf.connection, XCB_INPUT_FOCUS_POINTER_ROOT,
+root_win, XCB_CURRENT_TIME);
+
 /* Call hook */
 if(globalconf.hooks.unfocus != LUA_REFNIL)
 {
@@ -175,9 +180,6 @@ client_unfocus(client_t *c)
 void
 client_ban(client_t *c)
 {
-if (globalconf.screen_focus-client_focus == c)
-client_unfocus(c);
-
 if(!c-isbanned)
 {
 /* Move all clients out of the physical viewport into negative 
coordinate space. */
@@ -191,6 +193,10 @@ client_ban(client_t *c)
 
 c-isbanned = true;
 }
+
+/* Wait until the last moment to take away the focus from the window. */
+if (globalconf.screens[c-phys_screen].client_focus == c)
+client_unfocus(c);
 }
 
 /** Give focus to client, or to first client if client is NULL.
-- 
1.6.0.4