rotate windows

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

rotate windows

Eric Abrahamsen-2
I've seen a couple of functions online for rotating top windows through
frames, but none of the code seems to work with StumpWM from git. Here's
what I've got, but at least `group-frames' is undefined:

;(defun shift-windows-forward (frames win)
;  (when frames
;          (let ((frame (car frames)))
;                 (shift-windows-forward (cdr frames)
;                                        (frame-window frame))
;                 (when win
;                         (pull-window win frame)))))

;(defcommand rotate-windows () ()
;  (let* ((frames (group-frames (current-group)))
;           (win (frame-window (car (last frames)))))
;          (shift-windows-forward frames win)))

Can anyone tell me how I might update this for the most recent version
of stump?

Thanks!
Eric


_______________________________________________
Stumpwm-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/stumpwm-devel
Reply | Threaded
Open this post in threaded view
|

Re: rotate windows

Diogo F. S. Ramos
Eric Abrahamsen <[hidden email]> writes:

> I've seen a couple of functions online for rotating top windows through
> frames, but none of the code seems to work with StumpWM from git. Here's
> what I've got, but at least `group-frames' is undefined:
>
> ;(defun shift-windows-forward (frames win)
> ;  (when frames
> ;          (let ((frame (car frames)))
> ;                 (shift-windows-forward (cdr frames)
> ;                                        (frame-window frame))
> ;                 (when win
> ;                         (pull-window win frame)))))
>
> ;(defcommand rotate-windows () ()
> ;  (let* ((frames (group-frames (current-group)))
> ;           (win (frame-window (car (last frames)))))
> ;          (shift-windows-forward frames win)))
>
> Can anyone tell me how I might update this for the most recent version
> of stump?

I'm running the following :version of stumpwm: 0.9.7-80-gb1271a9

Those procedures work here. What is the behavior you are experiencing?

I don't know if you're using them as marks of code, but `;' are suppose
to mark comments, so if you're using that code the way you presented,
it's no surprise nothing happens.

--
Diogo F. S. Ramos

_______________________________________________
Stumpwm-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/stumpwm-devel
Reply | Threaded
Open this post in threaded view
|

Re: rotate windows

Eric Abrahamsen-2
On Wed, Feb 22 2012, Diogo F. S. Ramos wrote:

> Eric Abrahamsen <[hidden email]> writes:
>
>> I've seen a couple of functions online for rotating top windows through
>> frames, but none of the code seems to work with StumpWM from git. Here's
>> what I've got, but at least `group-frames' is undefined:
>>
>> ;(defun shift-windows-forward (frames win)
>> ;  (when frames
>> ;          (let ((frame (car frames)))
>> ;                 (shift-windows-forward (cdr frames)
>> ;                                        (frame-window frame))
>> ;                 (when win
>> ;                         (pull-window win frame)))))
>>
>> ;(defcommand rotate-windows () ()
>> ;  (let* ((frames (group-frames (current-group)))
>> ;           (win (frame-window (car (last frames)))))
>> ;          (shift-windows-forward frames win)))
>>
>> Can anyone tell me how I might update this for the most recent version
>> of stump?
>
> I'm running the following :version of stumpwm: 0.9.7-80-gb1271a9
>
> Those procedures work here. What is the behavior you are experiencing?
>
> I don't know if you're using them as marks of code, but `;' are suppose
> to mark comments, so if you're using that code the way you presented,
> it's no surprise nothing happens.

Ha, no, I do know that much -- I've just commented them out for the time
being because they're weren't working.

The error message I get is "The function STUMPWM-USER::GROUP-FRAMES is
undefined"

Come to think of it, perhaps this is because I've got
(in-package :stumpwm) at the top of my config file, and that's not the
right package for accessing those functions? I have to admit I'm still
baffled by Lisp namespaces…

Thanks,
Eric


_______________________________________________
Stumpwm-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/stumpwm-devel
Reply | Threaded
Open this post in threaded view
|

Re: rotate windows

Diogo F. S. Ramos
Eric Abrahamsen <[hidden email]> writes:

> The error message I get is "The function STUMPWM-USER::GROUP-FRAMES is
> undefined"
>
> Come to think of it, perhaps this is because I've got
> (in-package :stumpwm) at the top of my config file, and that's not the
> right package for accessing those functions? I have to admit I'm still
> baffled by Lisp namespaces…

Yeah, I too think them confusing at times.

Anyway, GROUP-FRAMES is not define inside STUMPWM-USER, but STUMPWM.

If you're using a REPL, try to change packages `(in-package "STUMPWM")'
and look for GROUP-FRAMES `#'GROUP-FRAMES'.

--
Diogo F. S. Ramos

_______________________________________________
Stumpwm-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/stumpwm-devel
Reply | Threaded
Open this post in threaded view
|

Re: rotate windows

Eric Abrahamsen-2
On Thu, Feb 23 2012, Diogo F. S. Ramos wrote:

> Eric Abrahamsen <[hidden email]> writes:
>
>> The error message I get is "The function STUMPWM-USER::GROUP-FRAMES is
>> undefined"
>>
>> Come to think of it, perhaps this is because I've got
>> (in-package :stumpwm) at the top of my config file, and that's not the
>> right package for accessing those functions? I have to admit I'm still
>> baffled by Lisp namespaces…
>
> Yeah, I too think them confusing at times.
>
> Anyway, GROUP-FRAMES is not define inside STUMPWM-USER, but STUMPWM.
>
> If you're using a REPL, try to change packages `(in-package "STUMPWM")'
> and look for GROUP-FRAMES `#'GROUP-FRAMES'.

Thanks for this! I guess I'm still a little confused -- I've got
(in-package :stumpwm) at the top of my init file, so wouldn't that mean
I had access to functions defined in "stumpwm"? Also, the sample init
files I've seen online look just like mine (the same in-package
statement, the same unqualified calls to `group-frames') -- what do I
put in my init file so that the correct functions are exposed?

Thanks again,
Eric


_______________________________________________
Stumpwm-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/stumpwm-devel