is there a user mailing list/group for StumpWM?

3 views
Skip to first unread message

Eric S Fraga

unread,
Aug 12, 2022, 11:58:31 AM8/12/22
to stumpw...@nongnu.org
Hello all,

I have some questions for StumpWM usage. The devel group does not seem
to be the right place to ask. Is there an equivalent user group?

Thank you and apologies for interrupting,
eric

--
Eric S Fraga via gnus (Emacs 29.0.50 2022-08-08) on Debian 11.3


Szos

unread,
Aug 12, 2022, 12:23:17 PM8/12/22
to stumpw...@nongnu.org
I dont think theres any other mailing lists, but i could be wrong. There is #stumpwm on libera irc though. For what its worth i dont mind general questions being asked here, though its likely not the "proper" place.

--sz

Eric S Fraga

unread,
Aug 12, 2022, 12:46:14 PM8/12/22
to stumpw...@nongnu.org
Okay, hoping that nobody else complains, here goes.

Simple question really (copied from Reddit where I have just posted even
though I dislike Reddit...): I like the features of dynamic groups in
StumpWM but I cannot figure out how to change the default behaviour. In
particular, I would like new windows on my main monitor to be placed to
the right, not the left. Bonus points for also helping me have different
behaviour on my second (portrait) monitor where I want the main window
at the top and supplementary ones below.

I've been using StumpWM for years and love it.

Thank you,

Gianluca Zoni

unread,
Aug 12, 2022, 2:01:09 PM8/12/22
to stumpw...@nongnu.org
Hi,

Il 12-08-22, 17:29, Eric S Fraga <e.f...@ucl.ac.uk> ha scritto:
> On Friday, 12 Aug 2022 at 16:00, Szos wrote:
> > I dont think theres any other mailing lists, but i could be
> > wrong. There is #stumpwm on libera irc though. For what its worth i
> > dont mind general questions being asked here, though its likely not
> > the "proper" place.
>
> Okay, hoping that nobody else complains, here goes.
>
> Simple question really (copied from Reddit where I have just posted even
> though I dislike Reddit...): I like the features of dynamic groups in
> StumpWM but I cannot figure out how to change the default behaviour. In
> particular, I would like new windows on my main monitor to be placed to
> the right, not the left.

you can add the following line of code to the configuration file
$HOME/.stumpwmrc:

(stumpwm: run-shell-command "xrandr --output HDMI-1 --auto --primary --output LVDS-1 --auto --right-of HDMI-1)

replace HDMI-1 (primary on the left)
and LVDS-1 (on the right)
with your own monitors

>Bonus points for also helping me have different
> behaviour on my second (portrait) monitor where I want the main window
> at the top and supplementary ones below.
>
no problem: select a window on the second monitor and proceed
with "vsplit":

<ctrl + t>
the minibuffer appears to enter the command and type:
vsplit

you can define the size in pixels or change it with
<ctrl + t> <r>

to change the windows of a monitor, you will find everything in
the fantastic manual

> I've been using StumpWM for years and love it.
>
> Thank you,
> eric
>
> --
> Eric S Fraga via gnus (Emacs 29.0.50 2022-08-08) on Debian 11.3
>

--
Z O N I N O Z
Gianluca Zoni

zon...@inventati.org
http://inventati.org/zoninoz
http://savannah.gnu.org/users/zoninoz

Szos

unread,
Aug 12, 2022, 2:47:15 PM8/12/22
to stumpw...@nongnu.org
With regard to setting up the layout of windows in dynamic groups, you can change that by setf-ing the dynamic-group-master-layout of the dynamic group to one of :left :right :top or :bottom. This is a class allocated slot so it will change it for all groups. This can also be done by the command change-default-layout.

If you want to change this for a single head, you can use the command change-layout, which will change the layout for the current group and head to whatever layout you pass in. If you want this to persist through every group and through restarts you could define an after method for group-add-head which specializes upon a dynamic group and a head, and checks which head it is and changes the heads layout when appropriate using (setf (dynamic-group-head-layout group head) :right).

I hope thats clear, i can provide more detailed explanation later if you wish.

--sz

Eric S Fraga

unread,
Aug 12, 2022, 3:26:21 PM8/12/22
to stumpw...@nongnu.org
Hi Gianluca,

On Friday, 12 Aug 2022 at 20:00, Gianluca Zoni wrote:
> you can add the following line of code to the configuration file
> $HOME/.stumpwmrc:

Thank you for your detailed response but I probably did not really
explain. I have been using StumpWM for a very long time and I have no
problem with the standard tiling approach. I was asking about dynamic
tiling groups specifically, the group layout which mimics dwm and
awesome approaches to laying out tiles automatically.

I think Szos has given me some pointers however.

Thanks again,

Eric S Fraga

unread,
Aug 12, 2022, 3:35:54 PM8/12/22
to stumpw...@nongnu.org
Hi Szos,

thank you for the long response. Unfortunately, it's not quite detailed
enough for me to actually figure out how to do what you suggest.

On Friday, 12 Aug 2022 at 18:13, Szos wrote:
> With regard to setting up the layout of windows in dynamic groups, you
> can change that by setf-ing the dynamic-group-master-layout of the
> dynamic group to one of :left :right :top or :bottom.

So, I have tried (by eval-ing)

(setf dynamic-group-master-layout :right)

and nothing changes in terms of behaviour. New windows appear on the
left. I did create another dynamic group after that setting in case it
only applied to new groups. I also tried :right in case I had things
backward.

I'm obviously missing something simple...

> This can also be done by the command change-default-layout.

If I try executing (in the : prompt)

change-default-layout :right

I get told that there is no such layout. Save with change-layout.

> If you want this to persist through every group and through restarts
> you could define an after method for group-add-head which specializes
> upon a dynamic group and a head, and checks which head it is and
> changes the heads layout when appropriate using (setf
> (dynamic-group-head-layout group head) :right).

dynamic-group-head-layout is not known, either as a method or a
variable. Again, I'm probably missing something trivial...

> I hope thats clear, i can provide more detailed explanation later if
> you wish.

Please do and thanks for your patience!

eric

PS -I will explore the source code some more in case that gives me
pointers.

PPS - for the record, I am running StumpWM from git up to date today.

Szos

unread,
Aug 12, 2022, 3:45:57 PM8/12/22
to stumpw...@nongnu.org
Dynamic-group-master-layout is an accessor, so you need to pass it the group as an argument, eg (setf (dynamic-group-master-layout (current-group)) :right) in a dynamic group. Im not sure if this is exported so you may need the package as a part of the symbol.

After a quick test it seems that the strings Left, Right, Top, and Bottom are what the commands i named accept. Eg (in the : prompt) change-layout Right. You can also just enter change-layout and then press tab to cycle through the available arguments.


> dynamic-group-head-layout is not known, either as a method or a
> variable.  Again, I'm probably missing something trivial...


Are you in the stumpwm package or the stumpwm-user package? This is a generic function defined in the stumpwm package.

If you want to peruse the source you can see the file dynamic-group.lisp. the commands begin at line 1050, and the whole implementation of dynamic groups exists (almost entirely) within this file.

I hope that clears things up a little, dont hesitate to ask more questions.

--sz

12. aug. 2022 21:35:49 Eric S Fraga <e.f...@ucl.ac.uk>:

Eric S Fraga

unread,
Aug 12, 2022, 3:47:24 PM8/12/22
to stumpw...@nongnu.org
Just a quick note that somehow (trying many different combinations), I
did manage to change the layout. Now I just have to figure out which
particular incantation did the job!
Reply all
Reply to author
Forward
0 new messages