feat: add option to set default scratchpad size

This commit is contained in:
DreamMaoMao 2025-07-04 12:29:49 +08:00
parent bc85232985
commit 263e2e4260
4 changed files with 22 additions and 4 deletions

View file

@ -1695,10 +1695,12 @@ void show_scratchpad(Client *c) {
/* return if fullscreen */
if (!c->isfloating) {
setfloating(c, 1);
c->geom.width = c->scratchpad_geom.width ? c->scratchpad_geom.width
: c->mon->w.width * 0.7;
c->geom.height = c->scratchpad_geom.height ? c->scratchpad_geom.height
: c->mon->w.height * 0.8;
c->geom.width = c->scratchpad_geom.width
? c->scratchpad_geom.width
: c->mon->w.width * scratchpad_width_ratio;
c->geom.height = c->scratchpad_geom.height
? c->scratchpad_geom.height
: c->mon->w.height * scratchpad_height_ratio;
// 重新计算居中的坐标
c->oldgeom = c->geom = c->animainit_geom = c->animation.current =
setclient_coordinate_center(c, c->geom, 0, 0);