stumpwm-devel
[Top][All Lists]
Advanced

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

Re: [STUMP] select a window from all the group


From: Andrea De Michele
Subject: Re: [STUMP] select a window from all the group
Date: Wed, 27 Jul 2016 16:36:24 +0200
User-agent: Gnus v5.13

Hi,

thank you for your answer, I tried your code and it works.

Meanwhile I had written other two solutions.

1) The first is very simple:

(windowlist *window-format* (screen-windows (current-screen)))


but doesn't work because I think there is a bug in the windowlist
command for which it is impossible change the focus on a window in
another group.

2) The second works and presents the windows ordered by group like vgroup
command does. I will use this one with a keybinding on Menu key:

(defcommand vgrouplist () (:rest)
  (let* ((groups (sort-groups (current-screen)))
         (selection (second (select-from-menu
                             (current-screen)
                             (mapcan (lambda (g)
                                       (list* (list (format-expand 
*group-formatters* *group-format* g) g)
                                              (mapcar (lambda (w)
                                                        (list (format-expand 
*window-formatters* (concatenate 'string "  " *window-format*) w) w))
                                                      (sort-windows g))))
                                     groups)
                             nil))))
    (if selection
        (typecase selection
          (group (switch-to-group selection))
          (window (progn (switch-to-group (window-group selection)) 
(group-focus-window (current-group) selection))))
        (throw 'error :abort))))
        
(define-key *top-map* (kbd "Menu") "vgrouplist")

Ciao,
Andrea De Michele.

Piotr Klibert <address@hidden> writes:

> Hi,
>
> I don't know if there is a built-in way to do this, but I just wrote a 
> command and after some crude testing it appears to work:
>
> (defun concat-list (lst)
>   (apply #'concatenate 'list lst))
>
> (defcommand fullwinlist () ()
>   (let
>       ((selected-win (stumpwm::select-window-from-menu
>                       (concat-list (mapcar #'group-windows
>                                            (screen-groups (current-screen))))
>                       *window-format*)))
>     (stumpwm::switch-to-group (window-group selected-win))
>     (stumpwm::group-focus-window (current-group) selected-win)))
>
> Best regards,
> Piotr Klibert
>
> 2016-07-26 12:03 GMT+02:00 Andrea De Michele <address@hidden>:
>
>     Hi,
>    
>     there is a way to select a window like comand: windowlist but from all 
> the windows in all group?
>
>     --
>     Andrea De Michele
>
>     _______________________________________________
>     Stumpwm-devel mailing list
>     address@hidden
>     https://lists.nongnu.org/mailman/listinfo/stumpwm-devel
>
> _______________________________________________
> Stumpwm-devel mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/stumpwm-devel

-- 
Andrea De Michele



reply via email to

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