Closed plasmoduck closed 3 years ago
Either you take the floatrules patch or you use the floatpos patch.
The Rule structure in a bare dwm looks like this:
typedef struct {
const char *class;
const char *instance;
const char *title;
unsigned int tags;
int isfloating;
int monitor;
} Rule;
and you can initialise all of these values at the same time using an array, e.g.
/* class instance title tags mask isfloating monitor */
{ "Gimp", NULL, NULL, 0, 1, -1 },
or you can use the RULE macro as defined in dwm-flexipatch to only pass in the values that are not default.
#define RULE(...) { .monitor = -1, ##__VA_ARGS__ },
In your case you could just add something like .floatpos = "800W 500H"
.
Perfect, just what I was looking for! .floatpos = "800W 500H". Thanks
How can I set a floating windows size? I use MPlayer to watch YouTube videos from surf and sometimes they take up both monitors. I'd like to set it to a decent size for all videos. I currently use this rule in config.def.h: RULE(.class = "MPlayer", .tags = 0, .iscentered = 1, .isfloating = 1)
I did have a look at https://github.com/bakkeby/patches/wiki/floatpos but the structure is different to my rules.