|
View:
New views
18 Messages
—
Rating Filter:
Alert me
|
|
|
Correct format for two-windows window-matcherHi all,
Screenlets (for those who didn't know) are Desktop Widgets (and an Engine), I want to match specific stuff on all Screenlets (everything except position and fixed-position), so I tried that: ( add-window-matcher 'WM_NAME "FolderViewScreenlet.py" 'WM_NAME "VolumeControlScreenlet.py" '( sticky . t ) '( sticky-viewport . t ) '( cycle-skip . t ) '( depth . -2 ) '( never-maximize . t ) '( never-iconify . t ) ) I wonder if this is correct, I guess not (getting a `bad closure' on the FolderViewScreenlet), So, what is the correct syntax for this? Thanks in advance, Chris |
|
|
Re: Correct format for two-windows window-matcherHi.
On Sun, 11 Oct 2009 11:30:53 +0200, Christopher Roy Bratusek wrote: > I tried that: > > ( add-window-matcher 'WM_NAME "FolderViewScreenlet.py" > 'WM_NAME "VolumeControlScreenlet.py" > '( sticky . t ) > [...] > '( never-iconify . t ) ) > > I wonder if this is correct, I guess not (getting a `bad closure' on the > FolderViewScreenlet), > > So, what is the correct syntax for this? Pretty simple: ( add-window-matcher 'WM_NAME "FolderViewScreenlet.py" '( sticky . t ) ;; ... ) ( add-window-matcher 'WM_NAME "VolumeControlScreenlet.py" '( sticky . t ) ; ... ) Or, you can use regex to combine them. I couldn't figure out how to specify both name and class. ;; This doesn't work: (add-window-matcher 'WM_NAME "FolderViewScreenlet.py" '( WM_CLASS . "someclass") '( sticky . t ) Teika (Teika kazura) |
|
|
Re: Correct format for two-windows window-matcherTeika Kazura <teika@...> writes:
> Or, you can use regex to combine them. > I couldn't figure out how to specify both name and class. > > ;; This doesn't work: > (add-window-matcher 'WM_NAME "FolderViewScreenlet.py" > '( WM_CLASS . "someclass") > '( sticky . t ) The only way I know to set both is to set the match-window-profile variable directly. I have this in my .sawfishrc before any calls to add-window-matcher: (setq match-window-profile '((((WM_CLASS . "^XTerm/xterm$") (WM_NAME . "^shell$")) (maximized . vertical) (frame-type . normal)) (((WM_CLASS . "^Gajim.py/gajim.py$") (WM_NAME . "^Gajim$")) (iconified . t) (position . center)))) -- Jeremy Hankins <nowan@...> |
|
|
Re: Correct format for two-windows window-matcherAm Dienstag, den 13.10.2009, 08:01 -0500 schrieb Jeremy Hankins:
> Teika Kazura <teika@...> writes: > > > Or, you can use regex to combine them. > > I couldn't figure out how to specify both name and class. > > > > ;; This doesn't work: > > (add-window-matcher 'WM_NAME "FolderViewScreenlet.py" > > '( WM_CLASS . "someclass") > > '( sticky . t ) > > The only way I know to set both is to set the match-window-profile > variable directly. I have this in my .sawfishrc before any calls to > add-window-matcher: > > (setq match-window-profile > '((((WM_CLASS . "^XTerm/xterm$") > (WM_NAME . "^shell$")) > (maximized . vertical) > (frame-type . normal)) > (((WM_CLASS . "^Gajim.py/gajim.py$") > (WM_NAME . "^Gajim$")) > (iconified . t) > (position . center)))) > |
|
|
Re: Correct format for two-windows window-matcherAm Dienstag, den 13.10.2009, 17:27 +0900 schrieb Teika Kazura:
> Hi. > > On Sun, 11 Oct 2009 11:30:53 +0200, Christopher Roy Bratusek wrote: > > I tried that: > > > > ( add-window-matcher 'WM_NAME "FolderViewScreenlet.py" > > 'WM_NAME "VolumeControlScreenlet.py" > > '( sticky . t ) > > [...] > > '( never-iconify . t ) ) > > > > I wonder if this is correct, I guess not (getting a `bad closure' on the > > FolderViewScreenlet), > > > > So, what is the correct syntax for this? > > Pretty simple: > ( add-window-matcher 'WM_NAME "FolderViewScreenlet.py" > '( sticky . t ) ;; ... > ) > ( add-window-matcher 'WM_NAME "VolumeControlScreenlet.py" > '( sticky . t ) ; ... > ) (except the position the same for all screenlets, this would make my SawfishRC blow up. > Or, you can use regex to combine them. > I couldn't figure out how to specify both name and class. > > ;; This doesn't work: > (add-window-matcher 'WM_NAME "FolderViewScreenlet.py" > '( WM_CLASS . "someclass") > '( sticky . t ) > > Teika (Teika kazura) > > |
|
|
Re: Correct format for two-windows window-matcherAm Dienstag, den 13.10.2009, 08:01 -0500 schrieb Jeremy Hankins:
> Teika Kazura <teika@...> writes: > > > Or, you can use regex to combine them. > > I couldn't figure out how to specify both name and class. > > > > ;; This doesn't work: > > (add-window-matcher 'WM_NAME "FolderViewScreenlet.py" > > '( WM_CLASS . "someclass") > > '( sticky . t ) > > The only way I know to set both is to set the match-window-profile > variable directly. I have this in my .sawfishrc before any calls to > add-window-matcher: > > (setq match-window-profile > '((((WM_CLASS . "^XTerm/xterm$") > (WM_NAME . "^shell$")) > (maximized . vertical) > (frame-type . normal)) > (((WM_CLASS . "^Gajim.py/gajim.py$") > (WM_NAME . "^Gajim$")) > (iconified . t) > (position . center)))) > ( define ( add-screenlets-matcher wm-name pos) ( add-window-matcher 'WM_NAME wm-name '( position . pos ) '( fixed-position . t ) '( sticky . t ) '( sticky-viewport . t ) '( cycle-skip . t ) '( depth . -2 ) '( never-maximize . t ) '( never-iconify . t ) ) ) except that I'm not sure how to pass pos, as neither ( add-screenlets-matcher "FolderViewScreenlet.py" "south-west" ) or ( add-screenlets-matcher "FolderViewScreenlet.py" 'south-west ) work ... In December, while my holidays, I'll spend some more time on RTFM, but for now any help is appreciated :) Chris |
|
|
Re: Correct format for two-windows window-matcherOn Tue, Oct 13, 2009 at 12:23 PM, Christopher Roy Bratusek
<zanghar@...> wrote: > Well I've figured out a better thing for my purpose: > > ( define ( add-screenlets-matcher wm-name pos) > ( add-window-matcher 'WM_NAME wm-name > '( position . pos ) > '( fixed-position . t ) > '( sticky . t ) > '( sticky-viewport . t ) > '( cycle-skip . t ) > '( depth . -2 ) > '( never-maximize . t ) > '( never-iconify . t ) ) ) > > except that I'm not sure how to pass pos, as neither > > ( add-screenlets-matcher "FolderViewScreenlet.py" "south-west" ) > > or > > ( add-screenlets-matcher "FolderViewScreenlet.py" 'south-west ) Maybe that's because you need to use `(position . ,pos) ? -Nathan |
|
|
Re: Correct format for two-windows window-matcherChristopher Roy Bratusek <zanghar@...> writes:
> Well I've figured out a better thing for my purpose: > > ( define ( add-screenlets-matcher wm-name pos) > ( add-window-matcher 'WM_NAME wm-name > '( position . pos ) I think this is what you want, to except pos from the quoting: `( position . ,pos ) > '( fixed-position . t ) > '( sticky . t ) > '( sticky-viewport . t ) > '( cycle-skip . t ) > '( depth . -2 ) > '( never-maximize . t ) > '( never-iconify . t ) ) ) And this: > ( add-screenlets-matcher "FolderViewScreenlet.py" 'south-west ) -- Jeremy Hankins <nowan@...> |
|
|
Re: Correct format for two-windows window-matcherAm Dienstag, den 13.10.2009, 12:26 -0400 schrieb Nathan Froyd:
> On Tue, Oct 13, 2009 at 12:23 PM, Christopher Roy Bratusek > <zanghar@...> wrote: > > Well I've figured out a better thing for my purpose: > > > > ( define ( add-screenlets-matcher wm-name pos) > > ( add-window-matcher 'WM_NAME wm-name > > '( position . pos ) > > '( fixed-position . t ) > > '( sticky . t ) > > '( sticky-viewport . t ) > > '( cycle-skip . t ) > > '( depth . -2 ) > > '( never-maximize . t ) > > '( never-iconify . t ) ) ) > > > > except that I'm not sure how to pass pos, as neither > > > > ( add-screenlets-matcher "FolderViewScreenlet.py" "south-west" ) > > > > or > > > > ( add-screenlets-matcher "FolderViewScreenlet.py" 'south-west ) > > Maybe that's because you need to use `(position . ,pos) ? ... bad argument: #<subr move-window-to>, backquote-unquote, 2 `( position instead of '( position (as you did) also doesn't really help > -Nathan > |
|
|
Re: Correct format for two-windows window-matcherAm Dienstag, den 13.10.2009, 18:30 +0200 schrieb Christopher Roy
Bratusek: > Am Dienstag, den 13.10.2009, 12:26 -0400 schrieb Nathan Froyd: > > On Tue, Oct 13, 2009 at 12:23 PM, Christopher Roy Bratusek > > <zanghar@...> wrote: > > > Well I've figured out a better thing for my purpose: > > > > > > ( define ( add-screenlets-matcher wm-name pos) > > > ( add-window-matcher 'WM_NAME wm-name > > > '( position . pos ) > > > '( fixed-position . t ) > > > '( sticky . t ) > > > '( sticky-viewport . t ) > > > '( cycle-skip . t ) > > > '( depth . -2 ) > > > '( never-maximize . t ) > > > '( never-iconify . t ) ) ) > > > > > > except that I'm not sure how to pass pos, as neither > > > > > > ( add-screenlets-matcher "FolderViewScreenlet.py" "south-west" ) > > > > > > or > > > > > > ( add-screenlets-matcher "FolderViewScreenlet.py" 'south-west ) > > > > Maybe that's because you need to use `(position . ,pos) ? > > I've already tried ,pos and ',pos none of both are working. > > ... bad argument: #<subr move-window-to>, backquote-unquote, 2 > > `( position instead of '( position (as you did) also doesn't really help Thanks a lot you two. Chris > > -Nathan > > > |
|
|
Re: Correct format for two-windows window-matcherChristopher Roy Bratusek <zanghar@...> writes:
>> Maybe that's because you need to use `(position . ,pos) ? > > I've already tried ,pos and ',pos none of both are working. > > ... bad argument: #<subr move-window-to>, backquote-unquote, 2 > > `( position instead of '( position (as you did) also doesn't really help You tried both of these together -- the backtick to quote and the comma to except pos? How about: (cons 'position pos) Or does that generate the same error? How about, from sawfish-client: (setq pos 'south-east) `(position . ,pos) What's the second of those give? Should be: (position . south-east) -- Jeremy Hankins <nowan@...> |
|
|
Re: Correct format for two-windows window-matcherAm Dienstag, den 13.10.2009, 11:39 -0500 schrieb Jeremy Hankins:
> Christopher Roy Bratusek <zanghar@...> writes: > > >> Maybe that's because you need to use `(position . ,pos) ? > > > > I've already tried ,pos and ',pos none of both are working. > > > > ... bad argument: #<subr move-window-to>, backquote-unquote, 2 > > > > `( position instead of '( position (as you did) also doesn't really help > > You tried both of these together -- the backtick to quote and the comma > to except pos? How about: > > (cons 'position pos) > > Or does that generate the same error? > > How about, from sawfish-client: > > (setq pos 'south-east) > > `(position . ,pos) Ahhh and I've add add-screenlet-matcher to the wikis Snippets page (and v0.90.1 of the window snooper, which I just trimmed down) > What's the second of those give? Should be: > > (position . south-east) > |
|
|
Re: Correct format for two-windows window-matcherChristopher Roy Bratusek <zanghar@...> writes:
> I've just said that this one works with 'south-west ;) > > Ahhh and I've add add-screenlet-matcher to the wikis Snippets page (and > v0.90.1 of the window snooper, which I just trimmed down) Yup... I saw that. ;P The dangers of responding to emails too quickly.... -- Jeremy Hankins <nowan@...> |
|
|
Re: Correct format for two-windows window-matcherAm Dienstag, den 13.10.2009, 12:08 -0500 schrieb Jeremy Hankins:
> Christopher Roy Bratusek <zanghar@...> writes: > > > I've just said that this one works with 'south-west ;) > > > > Ahhh and I've add add-screenlet-matcher to the wikis Snippets page (and > > v0.90.1 of the window snooper, which I just trimmed down) > > Yup... I saw that. ;P > > The dangers of responding to emails too quickly.... > ;; Helper for Screenlets ( define ( add-screenlets-matcher win pos ) ( add-window-matcher 'WM_NAME win `( position . ,pos ) '( fixed-position . t ) '( cycle-skip . t ) '( depth . -2 ) '( never-maximize . t ) '( never-iconify . t ) '( no-group . t ) ) ) ( make-window-sticky ( get-window-by-name-re win ) t ) ( make-window-sticky/viewport ( get-window-by-name-re win ) t ) ) ( add-screenlets-matcher "VolumeControlScreenlet.py" 'north-east ) just gives me "invalid arguement" ahh f#!k, I'll begin reading the librep/sawfish docs earlier than my winter-holidays. ;) Chris |
|
|
Re: Correct format for two-windows window-matcherAm Mittwoch, den 14.10.2009, 19:33 +0200 schrieb Christopher Roy
Bratusek: > Am Dienstag, den 13.10.2009, 12:08 -0500 schrieb Jeremy Hankins: > > Christopher Roy Bratusek <zanghar@...> writes: > > > > > I've just said that this one works with 'south-west ;) > > > > > > Ahhh and I've add add-screenlet-matcher to the wikis Snippets page (and > > > v0.90.1 of the window snooper, which I just trimmed down) > > > > Yup... I saw that. ;P > > > > The dangers of responding to emails too quickly.... > > > > One more thingy: > > ;; Helper for Screenlets > ( define ( add-screenlets-matcher win pos ) > ( add-window-matcher 'WM_NAME win > `( position . ,pos ) > '( fixed-position . t ) > '( cycle-skip . t ) > '( depth . -2 ) > '( never-maximize . t ) > '( never-iconify . t ) > '( no-group . t ) ) ) > ( make-window-sticky ( get-window-by-name-re win ) t ) > ( make-window-sticky/viewport ( get-window-by-name-re win ) t ) ) > > ( add-screenlets-matcher "VolumeControlScreenlet.py" 'north-east ) > > just gives me "invalid arguement" > > ahh f#!k, I'll begin reading the librep/sawfish docs earlier than my > winter-holidays. ;) > > Chris when the screenlets are created together with sawfish (sawfishrc starts them), I first want to try above, then match-window-profile, when using gnome-session and autostart entries for the screenlets, one of that must work Chris |
|
|
Re: Correct format for two-windows window-matcherAm Mittwoch, den 14.10.2009, 19:35 +0200 schrieb Christopher Roy
Bratusek: > Am Mittwoch, den 14.10.2009, 19:33 +0200 schrieb Christopher Roy > Bratusek: > > Am Dienstag, den 13.10.2009, 12:08 -0500 schrieb Jeremy Hankins: > > > Christopher Roy Bratusek <zanghar@...> writes: > > > > > > > I've just said that this one works with 'south-west ;) > > > > > > > > Ahhh and I've add add-screenlet-matcher to the wikis Snippets page (and > > > > v0.90.1 of the window snooper, which I just trimmed down) > > > > > > Yup... I saw that. ;P > > > > > > The dangers of responding to emails too quickly.... > > > > > > > One more thingy: > > > > ;; Helper for Screenlets > > ( define ( add-screenlets-matcher win pos ) > > ( add-window-matcher 'WM_NAME win > > `( position . ,pos ) > > '( fixed-position . t ) > > '( cycle-skip . t ) > > '( depth . -2 ) > > '( never-maximize . t ) > > '( never-iconify . t ) > > '( no-group . t ) ) ) > > ( make-window-sticky ( get-window-by-name-re win ) t ) > > ( make-window-sticky/viewport ( get-window-by-name-re win ) t ) ) > > > > ( add-screenlets-matcher "VolumeControlScreenlet.py" 'north-east ) > > > > just gives me "invalid arguement" > > > > ahh f#!k, I'll begin reading the librep/sawfish docs earlier than my > > winter-holidays. ;) > > > > Chris > > ahh, you may wonder why not sticky/sticky-viewport .t: that doesn't work > when the screenlets are created together with sawfish (sawfishrc starts > them), I first want to try above, then match-window-profile, when using > gnome-session and autostart entries for the screenlets, one of that must > work > > Chris windows sticky, but that should work without it too (I guess gDesklets also are effected, and those don't have a function like that) Chris |
|
|
Re: Correct format for two-windows window-matcherChristopher Roy Bratusek <zanghar@...> writes:
> Am Mittwoch, den 14.10.2009, 19:35 +0200 schrieb Christopher Roy > Bratusek: >> Am Mittwoch, den 14.10.2009, 19:33 +0200 schrieb Christopher Roy >> Bratusek: >> > One more thingy: >> > >> > ;; Helper for Screenlets >> > ( define ( add-screenlets-matcher win pos ) >> > ( add-window-matcher 'WM_NAME win >> > `( position . ,pos ) >> > '( fixed-position . t ) >> > '( cycle-skip . t ) >> > '( depth . -2 ) >> > '( never-maximize . t ) >> > '( never-iconify . t ) >> > '( no-group . t ) ) ) >> > ( make-window-sticky ( get-window-by-name-re win ) t ) >> > ( make-window-sticky/viewport ( get-window-by-name-re win ) t ) ) >> > >> > ( add-screenlets-matcher "VolumeControlScreenlet.py" 'north-east ) >> > >> > just gives me "invalid arguement" Is it that there's no window matching "VolumeControlScreenlet.py" at the time that add-screenlets-matcher is run? Try: ( define ( add-screenlets-matcher win pos ) ( add-window-matcher 'WM_NAME win `( position . ,pos ) '( fixed-position . t ) '( cycle-skip . t ) '( depth . -2 ) '( never-maximize . t ) '( never-iconify . t ) '( no-group . t ) ) ) (let ((w (get-window-by-name-re win))) (when w (make-window-sticky w t) (make-window-sticky/viewport w t))) If that eliminates the error that's probably what's going on. >> ahh, you may wonder why not sticky/sticky-viewport .t: that doesn't >> work when the screenlets are created together with sawfish (sawfishrc >> starts them), I first want to try above, then match-window-profile, >> when using gnome-session and autostart entries for the screenlets, >> one of that must work Why not? Would it work to start the screenlets from after-initialization-hook? > Temporarily I'm using the built-in screenlets function to make the > windows sticky, but that should work without it too (I guess gDesklets > also are effected, and those don't have a function like that) > > Chris > -- Jeremy Hankins <nowan@...> |
|
|
Re: Correct format for two-windows window-matcherAm Mittwoch, den 14.10.2009, 13:13 -0500 schrieb Jeremy Hankins:
> Christopher Roy Bratusek <zanghar@...> writes: > > Am Mittwoch, den 14.10.2009, 19:35 +0200 schrieb Christopher Roy > > Bratusek: > >> Am Mittwoch, den 14.10.2009, 19:33 +0200 schrieb Christopher Roy > >> Bratusek: > > >> > One more thingy: > >> > > >> > ;; Helper for Screenlets > >> > ( define ( add-screenlets-matcher win pos ) > >> > ( add-window-matcher 'WM_NAME win > >> > `( position . ,pos ) > >> > '( fixed-position . t ) > >> > '( cycle-skip . t ) > >> > '( depth . -2 ) > >> > '( never-maximize . t ) > >> > '( never-iconify . t ) > >> > '( no-group . t ) ) ) > >> > ( make-window-sticky ( get-window-by-name-re win ) t ) > >> > ( make-window-sticky/viewport ( get-window-by-name-re win ) t ) ) > >> > > >> > ( add-screenlets-matcher "VolumeControlScreenlet.py" 'north-east ) > >> > > >> > just gives me "invalid arguement" > > Is it that there's no window matching "VolumeControlScreenlet.py" at the > time that add-screenlets-matcher is run? Try: > > ( define ( add-screenlets-matcher win pos ) > ( add-window-matcher 'WM_NAME win > `( position . ,pos ) > '( fixed-position . t ) > '( cycle-skip . t ) > '( depth . -2 ) > '( never-maximize . t ) > '( never-iconify . t ) > '( no-group . t ) ) ) > (let ((w (get-window-by-name-re win))) > (when w > (make-window-sticky w t) > (make-window-sticky/viewport w t))) > > If that eliminates the error that's probably what's going on. > > >> ahh, you may wonder why not sticky/sticky-viewport .t: that doesn't > >> work when the screenlets are created together with sawfish (sawfishrc > >> starts them), I first want to try above, then match-window-profile, > >> when using gnome-session and autostart entries for the screenlets, > >> one of that must work > > Why not? Would it work to start the screenlets from > after-initialization-hook? > > > Temporarily I'm using the built-in screenlets function to make the > > windows sticky, but that should work without it too (I guess gDesklets > > also are effected, and those don't have a function like that) > > > > Chris > > > have a is_sticky value in their .ini file ... I guess setting it to false (or having it unset) overrides sawfishs setting... Chris |
| Free embeddable forum powered by Nabble | Forum Help |