[EMAIL PROTECTED]: Bug#506803: awesome: naughty's notify should return 'notification']
koniu ? - Forwarded message from Bernd Zeimetz [EMAIL PROTECTED] - From: Bernd Zeimetz [EMAIL PROTECTED] To: Debian Bug Tracking System [EMAIL PROTECTED] Subject: Bug#506803: awesome: naughty's notify should return 'notification' Date: Mon, 24 Nov 2008 22:52:42 +0100 X-Mailer: reportbug 3.47 X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.5 Package: awesome Version: 3.1~rc3-1 Severity: normal Tags: patch Hi! Since a48e71af18644af61fbbb536d88fb1dcad856631 destroy() takes a notification object instead. Unfortunately notify() doesn't return the created notification, so destroy() is pretty much useless at the moment. The attached patch fixes the api doc of destroy and adds an according return statement to notify(). Cheers, Bernd -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.27.2-think (SMP w/2 CPU cores; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages awesome depends on: ii libc6 2.7-16 GNU C Library: Shared libraries ii libcairo2 1.8.2-2The Cairo 2D vector graphics libra ii libdbus-1-3 1.2.1-4simple interprocess messaging syst ii libev33.43-1 high-performance event loop librar ii libglib2.0-0 2.18.2-1 The GLib library of C routines ii libimlib2 1.4.0-1.1 powerful image loading and renderi ii liblua5.1-0 5.1.4-1Simple, extensible, embeddable pro ii libncurses5 5.7-2 shared libraries for terminal hand ii libpango1.0-0 1.22.2-1 Layout and rendering of internatio ii libreadline5 5.2-3 GNU readline and history libraries ii libx11-6 2:1.1.5-2 X11 client-side library ii libx11-xcb1 2:1.1.5-2 Xlib/XCB interface library ii libxcb-atom1 0.3.0-1utility libraries for X C Binding ii libxcb-aux0 0.3.0-1utility libraries for X C Binding ii libxcb-event1 0.3.0-1utility libraries for X C Binding ii libxcb-icccm1 0.3.0-1utility libraries for X C Binding ii libxcb-keysyms0 0.3.0-1utility libraries for X C Binding ii libxcb-property1 0.3.0-1utility libraries for X C Binding ii libxcb-randr0 1.1-1.1X C Binding, randr extension ii libxcb-render-util0 0.3.0-1utility libraries for X C Binding ii libxcb-render01.1-1.1X C Binding, render extension ii libxcb-xinerama0 1.1-1.1X C Binding, xinerama extension ii libxcb1 1.1-1.1X C Binding ii menu 2.1.41 generates programs menu for all me Versions of packages awesome recommends: ii x11-xserver-utils 7.3+5 X server utilities awesome suggests no packages. -- no debconf information From 532c79671848b80163eaadbd2e2f6b0ed53a25a6 Mon Sep 17 00:00:00 2001 From: Bernd Zeimetz [EMAIL PROTECTED] Date: Mon, 24 Nov 2008 22:44:55 +0100 Subject: [PATCH] naughty: notify() needs to return notification destroy() takes a notification object since a48e71af18644af61fbbb536d88fb1dcad856631. So we need to return the created object in notify(). --- lib/naughty.lua.in |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/naughty.lua.in b/lib/naughty.lua.in index 04686da..31879f9 100644 --- a/lib/naughty.lua.in +++ b/lib/naughty.lua.in @@ -136,8 +136,7 @@ local function arrange(screen) end --- Destroy notification by index --- @param idx Index of the notification --- @param position One of 4 keys in notification dictionary: top_right, top_left, bottom_right, bottom_left +-- @param notification Notification object -- @return True if the popup was successfully destroyed, nil otherwise function destroy(notification) if notification then @@ -164,6 +163,7 @@ end -- @param run Function to run on left click -- @param width The popup width -- @usage naughty.notify({ title = 'Achtung!', text = 'You\'re idling', timeout = 0 }) +-- @return notification Created notification object function notify(args) -- gather variables together local timeout = args.timeout or config.timeout @@ -249,6 +249,8 @@ function notify(args) -- insert the notification to the table table.insert(notifications[screen][notification.position],notification) + +return notification end -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 --
Re: [EMAIL PROTECTED]: Bug#506803: awesome: naughty's notify should return 'notification']
Subject: Bug#506803: awesome: naughty's notify should return 'notification' Since a48e71af18644af61fbbb536d88fb1dcad856631 destroy() takes a notification object instead. Unfortunately notify() doesn't return the created notification, so destroy() is pretty much useless at the moment. The attached patch fixes the api doc of destroy and adds an according return statement to notify(). koniu ? Whoa, I made a bug in debian \o/ Anyway, I see you got the returning notification that I pushed earlier http://git.naquadah.org/?p=awesome.git;a=commit;h=a1008c1506885b973287a4e8b6224058b3ee2852 Luadoc fix for destroy is in the branch now: http://git.mercenariesguild.net/?p=awesome.git;a=commit;h=0cbdd6e17ecec8755f85b602e15bb4742115f35a thanks for heads up koniu -- To unsubscribe, send mail to [EMAIL PROTECTED]
[awesome bugs] #387 - setting and getting selection buffer
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY. A new Flyspray task has been opened. Details are below. User who did this - koniu (koniu) Attached to Project - awesome Summary - setting and getting selection buffer Task Type - Feature Request Category - Core Status - New Assigned To - Operating System - All Severity - Low Priority - Normal Reported Version - git/master Due in Version - Undecided Due Date - Undecided Details - It would be cool if there was a lua-way to set/get selection buffer (clipboard). Currently I'm spawning xsel(1) for a few things but an awful.util or whatever function would be marvelous :) More information can be found at the following URL: http://awesome.naquadah.org/bugs/index.php?do=detailstask_id=387 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]
Unfocus handling in move-not-unmap patch
Hi, This is mainly for Maarten. There's something you did not think about and I just found. When unmapping a window, they do lose its focus because in X world, a unmapped window can't have focus. Now that awesome only move them, they just keep focus. That means that if you switch to an empty tag, that latest window focused stil has the focus and still receive keys event. :) Cheers, -- Julien Danjou // ᐰ [EMAIL PROTECTED] http://julien.danjou.info // 9A0D 5FD9 EB42 22F6 8974 C95C A462 B51E C2FE E5CD signature.asc Description: Digital signature
Re: Unfocus handling in move-not-unmap patch
On Tue, Nov 25, 2008 at 10:32, Julien Danjou [EMAIL PROTECTED] wrote: Now that awesome only move them, they just keep focus. That means that if you switch to an empty tag, that latest window focused stil has the focus and still receive keys event. :) Hey, I noticed this behaviour just recently and thought that it was me messing something up with shifty. Good to read an explanation :P k -- To unsubscribe, send mail to [EMAIL PROTECTED]
[awesome bugs] #390 - awesome doesn't grab the floating GTK+ Open file dialog
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY. A new Flyspray task has been opened. Details are below. User who did this - Michal Nowak (mnowak) Attached to Project - awesome Summary - awesome doesn't grab the floating GTK+ Open file dialog Task Type - Bug Report Category - Core Status - Unconfirmed Assigned To - Operating System - All Severity - Low Priority - Normal Reported Version - 3.1-rc3 Due in Version - Undecided Due Date - Undecided Details - 0) In Firefox 3.0.4 1) Go to e.g. http://awesome.naquadah.org/bugs/index.php?do=newtaskproject=1 2) Press Attach a file 3) Press Browse... 4) If the pointer was in the area of the newly emerged Open file dialog before the window is actually opened, pressing Mod4 and Left Mouse Button and trying to *move* the window _fails_. When went out and in w.r.t the dialog the focus is gained correctly and window moved. More information can be found at the following URL: http://awesome.naquadah.org/bugs/index.php?do=detailstask_id=390 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] suit: Add suit module
* the suit module may be used as a completion wrapper. Its goal is to provide a generic completion function for textboxes. See lib/suit.lua for a full example. Signed-off-by: Sébastien Gross [EMAIL PROTECTED] --- lib/suit.lua.in | 130 +++ 1 files changed, 130 insertions(+), 0 deletions(-) create mode 100755 lib/suit.lua.in diff --git a/lib/suit.lua.in b/lib/suit.lua.in new file mode 100755 index 000..07bdbe4 --- /dev/null +++ b/lib/suit.lua.in @@ -0,0 +1,130 @@ + +-- @author Sébastien Gross lt;[EMAIL PROTECTED]gt; +-- @copyright 2008 Sébastien Gross +-- @release @AWESOME_VERSION@ + + +--[[ + +usage example: A goto client function with completion + +function get_clients() +ret = {} +table.foreach(capi.client.get(), function(k,v) +if v.name then +ret[v.name .. '' .. k .. ''] = v +end +end) +return ret +end + +function focus_client(client, name) +print(Switching to .. name) +if client then +local s = capi.client.focus and capi.client.focus.screen +or capi.mouse.screen +if s ~= client.screen then +capi.mouse.screen = client.screen +end +awful.tag.viewonly(client:tags()[1]) +capi.client.focus = client +client:raise() +end +end + +keybinding({ modkey }, g, function +suit.up( +Go to: , mypromptbox, get_clients, focus_client +os.getenv(HOME) .. /.cache/awesome/client) +end) +]] + + + +-- Package environment +local setmetatable = setmetatable +local table = table +local string = string +local math = math + +local awful = { +prompt = require(awful.prompt), +} +local capi = { +mouse = mouse +} + +--- Completion library +module(suit) + +--- The suit library may be used as a wrapper to awful.prompt.run +-- its goal is to provide a generic completion tool for prompt boxes. +-- +-- The useful function is up(). All you need to do is to provide a function that +-- would generate a keywords/data dictionnary. +-- +-- The completion match is run against the dictionnay indexes. Once the prompt +-- is validated, the exe_callback function is run with 2 parameters: +-- the data-value and the text the user has typed. +-- Note: data-value may be nil + + +-- the keyword hash. +-- Format is +-- kw[keyword] = key word data +-- Completion is run against keyword +-- the keyword-data is passed to the exe_callback function +local kw_hash = {} +local kw = {} + +--- Run the completion. This function is called by awful.prompt.run +-- @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 +local function pickup(text, cur_pos, ncomp) +-- if no text had been typed yet, then we could start cycling around all +-- keywords with out filtering and move the cursor at the end of keyword +if text == nil or #text == 0 then +ncomp = math.mod(ncomp - 1, #kw) + 1 +return kw[ncomp], #kw[ncomp] + 2 +end + +-- Filter out only keywords starting with text +local matches = {} +table.foreach(kw, function(_, x) +if string.sub(x, 1 , #text) == text then +table.insert(matches, x) +end +end) + +-- if there are no matches just leave out with the current text and position +if #matches == 0 then +return text, #text + 1 +end + +-- cycle around all matches +ncomp = math.mod(ncomp - 1, #matches) + 1 +return matches[ncomp], #matches[ncomp] + 1 +end + +--- Wrap awful.prompt.run with a generic completion function +-- @param prompt Ptompt to display +-- @param box The texbox widget table to be used for the prompt +-- @param kw_feeder The call back fonction to feed the keyword list +-- @param exe_callback The function to run if completion is done +-- @param history The history file +function up(prompt, box, kw_feeder, exe_callback, history) +kw_hash = kw_feeder() +kw = {} +table.foreach(kw_hash, function(k, _) table.insert(kw, k) end) +table.sort(kw) + +awful.prompt.run( +{ prompt = prompt }, +box[capi.mouse.screen], +function(x) exe_callback(kw_hash[x], x) end, +pickup, +history) +end + +-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 -- 1.5.6.5 -- To unsubscribe, send mail to [EMAIL PROTECTED]
Re: [PATCH] suit: Add suit module
On Tue, Nov 25, 2008 at 04:56:37PM +0100, [EMAIL PROTECTED] wrote: +function focus_client(client, name) +print(Switching to .. name) Please, a comment, not a print ;) Damn quick commit ! +keybinding({ modkey }, g, function +suit.up( +Go to: , mypromptbox, get_clients, focus_client +os.getenv(HOME) .. /.cache/awesome/client) Even if it's an example, use rather awful.util.getdir() Would be a v2.0 feature :-) The rest seems rather OK to me. But seeing how short the code, I'd rather merge it inside awful.completion. Yep could be done in awful. My pleasure was to call suit.up ! Nevermind What do you think? It's up to you I will check on how to merge it in awful.completion. see you old git ! -- Sébastien Gross -- To unsubscribe, send mail to [EMAIL PROTECTED]
[awesome bugs] #387 - setting and getting selection buffer
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY. The following task has a new comment added: FS#387 - setting and getting selection buffer User who did this - koniu (koniu) -- Hmm, maybe you could do an educate rip off xsel source, it seems quite simple and vaguely documented: http://svn.kfish.org/xsel/trunk/xsel.c The references are here: http://tronche.com/gui/x/icccm/sec-2.html http://www.jwz.org/doc/x-cut-and-paste.html -- More information can be found at the following URL: http://awesome.naquadah.org/bugs/index.php?do=detailstask_id=387#comment917 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)
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) -- Steps to reproduce: start grellm, configure set windows type to be dock or panel to true, restart that gkrellm. -there should be no gkrellm on the statusbar. start a second gkrellm instance (e.g. grellm -c testconfig), configure set windows type to be dock or panel to true, restart that gkrellm. -1 of the 2 instances is showing in the statusbar. Shut down either 1, none will show, start it again 1 will show. I have checked with xprop and attached the outputs. (e.g. xprop -display 0:0 -name gkrellm server_local.txt) I did this on 2 separate machines, the first running gentoo ~x86 (unstable) and gkrellm 2.3.2, these test were done with new gkrellm configs created using the gkrellm -c test1 command and are named test1 - test3 for the 3 instances. test#-dock.txt was with the set windows type to be dock or panel setting. (must restart gkrellm) test#-skip.txt was with the Do not included on the taskbar and Do not include in the pager settings. test1-skip-solo.txt was with only test1 running (skip setting) before loading the second and third instance. xprops for test1-skip-solo and test1-skip are identical; though test1-skip had test1 showing in the statusbar. The second machine is running gentoo x86 (stable) - with awesome 3.1_rc3 (and libs) pulled in via keyword hacks and gkrellm 2.3.1. server_local.txt is the local gkrellm instance for monitoring the server. server_gate.txt is the remote instance monitoring gkrellmd on the gateway. server_cludge.txt is the remote instance monitoring gkrellmd on the system the test# tests were done on. None of them show any significant differences in their xprops; both systems have 1 of the 3 instances appear in the statusbar (is this the same as a taskbar?) and that instance will also take focus with mod4+k while the hidden instance do not take focus. I can not see any pattern in which of the 3 instance show up, this will change from time to time, but possibly only when instances are started and stopped. With 4 instances running I had 2 on the taskbar, with 6 I had 3 and with 9 I had 4. Let me know if you want to do any other tests or provide any other data. -- 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#comment918 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]