stumpwm-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[STUMP] Tags: regexp search by tag function


From: Michael Raskin
Subject: [STUMP] Tags: regexp search by tag function
Date: Wed, 07 Jul 2010 12:44:44 +0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.4) Gecko/20100626 Thunderbird/2.0.0.12; Google GoogleBot

                Hello.
        I noticed that when I try out new software (which is not yet added to
my automatic group tagging) typing long class names becomes boring. So I
implemented a command that uses regular expressions to find needed windows.
        I think this could be a useful addition to my contrib/window-tags.lisp
module.
        Does anyone else need this? Any comments? Should it be edited in any
way before being added to contrib/window-tags.lisp? Should I send it as
a patch that just adds this function in window-tags.lisp?

Michael Raskin

The code itself:

(defcommand pull+push-tag-regexp (tag-regex) ((:rest "Tag regex to
select: "))
  (only)
  (fclear)
  (let*
   (
    (current (current-group (current-screen)))
    (tag-store (find-group (current-screen) ".tag-store")))
   (loop for w in (screen-windows (current-screen)) do
         (if
          (find-if (lambda (s) (cl-ppcre:scan (concatenate 'string
"(?i)" tag-regex) s)) (window-tags w))
          (move-window-to-group w current)
          (move-window-to-group w tag-store)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]