Thanks for the hint.

I added this line to config.h :
        { "st",       NULL,   "center",       0,            1,             1,   
        -1 },

the command st -t center gives a floating terminal in the center of the screen.

/Severino

-- 
  Søren Christensen
  sever...@ulvedalen.dk

Den Tor 28. nov. 2019 kl. 09:45 skrev Anders Damsgaard:
> * Hiltjo Posthuma <hil...@codemadness.org> [2019-11-28 09:29:54 +0100]:
> 
> >On Wed, Nov 27, 2019 at 11:42:32PM +0100, Søren Christensen wrote:
> >> Hi
> >>
> >> I've succesfully installed dwm and added the patches, that I want.
> >>
> >> I find the information on the 'center'-patch a bit short.
> >>
> >> How do I use the center-patch to create a centered terminal with calc
> >> (or another terminalbassede application)?
> >>
> >> How do I set the 'iscentered' flag?
> >>
> >> Thanks,
> >> severino
> >>
> >
> >Hi,
> >
> >The patch seems to add an extra flag to the rule.  The field is "iscentered".
> >So probably adding some rule matching the calc application class and set
> >"iscentered" = 1.
> 
> In order for the behavior to work, it is my understanding that the WM_CLASS
> or WM_NAME values should match the rules struct definition in your
> config.h.  I don't use the centered patch for terminals, but maybe you can
> make it work by specifying a custom window name, class, or title upon
> launch (e.g., st options -n, -c, or -t).  With other X applications it
> works flawlessly on my end.  I have the following rule definition in my
> config.h,
> 
> static const Rule rules[] = {
>       /* xprop(1):
>        *      WM_CLASS(STRING) = instance, class
>        *      WM_NAME(STRING) = title
>        */
>       /* class      instance  title  tags mask  iscentered  isfloating  
> monitor */
>       { "Tor Browser", NULL,  NULL,  0,         1,          1,          -1 },
> };
> 
> and the above makes Tor Browser starts as a floating window in the middle
> of the screen.
> 
> Cheers, Anders
> -- 
> Anders Damsgaard
> https://adamsgaard.dk
> 
>

Reply via email to