Re: [Patches] some enhancements for naughty

2008-12-18 Thread Julien Danjou
At 1229533204 time_t, Leon Winter wrote:
 i added callbacks to presets that will be called if naughty gets beaten
 via DBUS. this way we could update a textbox with the current song
 playing if our music player gives us the information via DBUS.

Pushed.

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


signature.asc
Description: Digital signature


[PATCH] awesomerc: raise client when awful.client.focus.history.previous() is called

2008-12-18 Thread Damien LEONE
Hi,

Small patch to fix the mod4+Tab behaviour.
Cheers,

-- 
Damien Leone
From 761e0a5f0256d5e14d68458ad275a12c156d0b41 Mon Sep 17 00:00:00 2001
From: Damien Leone damien.le...@gmail.com
Date: Thu, 18 Dec 2008 10:44:07 +0100
Subject: [PATCH] awesomerc: raise client when awful.client.focus.history.previous() is called

---
 awesomerc.lua.in |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/awesomerc.lua.in b/awesomerc.lua.in
index a4086a4..f040d1a 100644
--- a/awesomerc.lua.in
+++ b/awesomerc.lua.in
@@ -232,7 +232,7 @@ keybinding({ modkey, Control }, k, function () awful.screen.focus(-1) end):a
 keybinding({ modkey, Control }, space, awful.client.floating.toggle):add()
 keybinding({ modkey, Control }, Return, function () if client.focus then client.focus:swap(awful.client.getmaster()) end end):add()
 keybinding({ modkey }, o, awful.client.movetoscreen):add()
-keybinding({ modkey }, Tab, awful.client.focus.history.previous):add()
+keybinding({ modkey }, Tab, function () awful.client.focus.history.previous(); if client.focus then client.focus:raise() end end):add()
 keybinding({ modkey }, u, awful.client.urgent.jumpto):add()
 keybinding({ modkey, Shift }, r, function () if client.focus then client.focus:redraw() end end):add()
 
-- 
1.5.6.5



Re: [PATCH] awesomerc: raise client when awful.client.focus.history.previous() is called

2008-12-18 Thread Julien Danjou
At 1229593842 time_t, Damien LEONE wrote:
 Small patch to fix the mod4+Tab behaviour.
Pushed.

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


signature.asc
Description: Digital signature


[PATCH] [completion.lua.in]: remove keywords global variable

2008-12-18 Thread Sébastien Gross
* move keywords global variable to generic() last parameter.
  This prevents from having table clash.

  Please udate you configuration according this feature in your
  awful.prompt.run() calls.
  If keywords parameter is missing then no completion would be
  done.

  Before:
   awful.completion.keywords = kw
   awful.prompt.run( [ ... ],
 function(t, p, n) return awful.completion.generic(t, p, n) end,
 [ ... ] )

  Now:
   awful.prompt.run( [ ... ],
 function(t, p, n) return awful.completion.generic(t, p, n, kw) end,
 [ ... ] )

Signed-off-by: Sébastien Gross seb-awes...@chezwam.org
---
 lib/awful/completion.lua.in |7 ++-
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/lib/awful/completion.lua.in b/lib/awful/completion.lua.in
index 9812557..79edf20 100644
--- a/lib/awful/completion.lua.in
+++ b/lib/awful/completion.lua.in
@@ -18,10 +18,6 @@ module(awful.completion)
 local bashcomp_funcs = {}
 local bashcomp_src = /etc/bash_completion
 
 keywords table use for the generic completion
--- should not be local
-keywords = {}
-
 --- Enable programmable bash completion in awful.completion.bash at the price 
of
 -- a slight overhead
 -- @param src The bash completion source file, /etc/bash_completion by default.
@@ -130,8 +126,9 @@ end
 -- @param text The current text the user had typed yet.
 -- @param cur_pos The current cursor position.
 -- @param ncomp The number of yet requested completion using current text.
+-- @param keywords The keywords table uised for completion.
 -- @return The new match and the new cursor position.
-function generic(text, cur_pos, ncomp)
+function generic(text, cur_pos, ncomp, keywords)
 -- The keywords table may be empty
 if #keywords == 0 then
 return text, #text + 1
-- 
1.5.6.5


-- 
To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.


Re: [PATCH] [completion.lua.in]: remove keywords global variable

2008-12-18 Thread Julien Danjou
At 1229602687 time_t, Sébastien Gross wrote:

Pushed.

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


signature.asc
Description: Digital signature


Re: awful.menu general concept issue

2008-12-18 Thread Julien Danjou
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++)

-- 
Julien Danjou
// ᐰ jul...@danjou.info   http://julien.danjou.info
// 9A0D 5FD9 EB42 22F6 8974  C95C A462 B51E C2FE E5CD


signature.asc
Description: Digital signature


Re: awful.menu general concept issue

2008-12-18 Thread Leon Winter
-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

2008-12-18 Thread Leon Winter
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

2008-12-18 Thread Leon Winter
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

2008-12-18 Thread Leon Winter
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




[PATCH] Fixed DBus version string

2008-12-18 Thread Félix C. Morency
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);
 }
-- 
1.6.0.5


Re: [PATCH] Fixed DBus version string

2008-12-18 Thread Leon Winter
-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.


[awesome bugs] #157 - Allow drag'n dropping of windows over tagbar

2008-12-18 Thread awesome

THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task is now closed:

FS#157 - Allow drag'n dropping of windows over tagbar
User who did this - Gregor Best (farhaven)

Reason for closing: Implemented
Additional comments about closing: Use awful.mouse.client.dragtotag.widget(c) 
to drag a client to a tag using a widget as the target reference and use 
awful.mouse.client.dragtotag.border(c) to use the screen borders as the target 
reference

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

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 awesome-devel-unsubscr...@naquadah.org.


[awesome bugs] #404 - awful.placement typo/bugs? no_overlap disregarding titlebars 'and too many clients'

2008-12-18 Thread awesome

THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

A new Flyspray task has been opened.  Details are below. 

User who did this - sa wu (unfaehig) 


Attached to Project - awesome
Summary - awful.placement typo/bugs? no_overlap disregarding titlebars 'and too 
many clients'
Task Type - Bug Report
Category - Core
Status - Unconfirmed
Assigned To - 
Operating System - All

Severity - Low
Priority - Normal
Reported Version - git/master
Due in Version - Undecided
Due Date - Undecided
Details - I am using x11-wm/awesome-3.1
awful.placement.no_overlap seems to not consider titlebars as overlapping 
space, especially since the function works just fine without statusbars.

Replacing 'c:geometry(new)'
with 'c:fullgeometry(new)' in awful.placement.no_overlap
fixes this and is probably the intended use of the function.

As as note on the side c.floating_placement does not seem to have any effect 
anymore. I am not quite sure it ever did, but it can still be found in many 
(legacy) configuration and seems to be documented almost nowhere.
One should probably mention that awful.placement seems to offer those placement 
features.
May i assume that no_overlap does, what 'smart' did for floating.placement?

Is there a way to make a new layer of floating clients (i.e. new floating 
clients when the screen is already completely covered by floating clients) 
place itself as if the 'lower filling layer of clients' did not exist? (i.e 
floating clients place themselves in a way evenly distributing the number of 
clients over every single pixel not covered by a wibox)

Thanks a lot.

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

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 awesome-devel-unsubscr...@naquadah.org.


[awesome bugs] #405 - mplayer in non-floating layout resizing strange (Attachment added)

2008-12-18 Thread awesome

THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

A new Flyspray task has been opened.  Details are below. 

User who did this - sa wu (unfaehig) 


Attached to Project - awesome
Summary - mplayer in non-floating layout resizing strange
Task Type - Bug Report
Category - Core
Status - Unconfirmed
Assigned To - 
Operating System - All

Severity - Low
Priority - Normal
Reported Version - git/master
Due in Version - Undecided
Due Date - Undecided
Details - I am currently using x11-wm/awesome-3.1.

When using mplayer in a tiling, maximizing layout (in fact any other than 
floating with mplayer not floating) and resizing hints the placement of it 
behaves rather strange.

Without the resize hints the window feats in neatly but there seems to be no 
way to keep aspect ratio.

A screenshot of behaviour in tiling layout is attached. One can see the mplayer 
window in the right column, with the bottom getting cut off and part of the 
background showing at the right.

I was expecting behaviour similar to the one found in ion3 and wmii3 (at least 
the last time i used them):
mplayer always keeping aspect ratio and empty space not occupied by video, but 
still belonging to the 'client' filled black.

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=405

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 awesome-devel-unsubscr...@naquadah.org.