Re: Sawfish and gnome-panel action menu
- From: mmc maruska dyndns org (Michal Maruška)
- To: Andrea Vettorello <dnc thctribe net>
- Cc: sawfish-list gnome org
- Subject: Re: Sawfish and gnome-panel action menu
- Date: Sun, 19 Dec 2004 22:46:34 +0100
Andrea Vettorello <dnc thctribe net> writes:
>
> sawfish-client -e "(send-client-message (get-window-by-name \"Top Panel\")
> '_GNOME_PANEL_ACTION (vector (x-atom '_GNOME_PANEL_ACTION_RUN_DIALOG) 0) 32)"
>
> This works binded to a key shorcut and executed as a shell script, maybe someone
> with more in depth Sawfish knowlege can suggest how to use it directly...
try this:
First, i had to change it, b/c the window title is localized/translated, so unsuitable:
(define (get-window-by-class-re re)
"Get a window by matching against its class"
(catch 'found
(map-windows
(lambda (w)
(if (string-match re (window-class w))
(throw 'found w))))))
(define-command 'invoke-gnome-run-dialog
(lambda ()
(let ((window (get-window-by-class-re "Gnome-panel")))
(if (and (windowp window)
(window-id window)) ;window could be gone
(send-client-message
window
'_GNOME_PANEL_ACTION
(vector (x-atom '_GNOME_PANEL_ACTION_RUN_DIALOG) 0)
32)
(display-message (_ "no gnome panel found"))))))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]