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)))))

_______________________________________________
Stumpwm-devel mailing list
Stumpwm-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/stumpwm-devel

Reply via email to