diff --git a/app.c b/app.c index c6403d7..db74cec 100644 --- a/app.c +++ b/app.c @@ -33,7 +33,11 @@ int appInit(App *app) { app->x = 0; app->w = app->sw * WIDTH_SCALE; app->h = app->sh * HEIGHT_SCALE; + #ifdef TOP + app->y = 0; + #else app->y = app->sh - app->h; + #endif XSetWindowAttributes attr = {}; #ifdef NOBORDER diff --git a/config.h.example b/config.h.example index 0e48a56..5e7cc6d 100644 --- a/config.h.example +++ b/config.h.example @@ -2,10 +2,13 @@ #define CONFIG_H + //#define NOBORDER +//#define NOTITLE //#define LOCK_SIZE //#define DOCK //#define TOP_RESIZE +//#define TOP #define WIDTH_SCALE 1/1 // (nominator)/(denomitator) #define HEIGHT_SCALE 1/3 diff --git a/layout.defs.h b/layout.defs.h index 76887a7..2cf3fa7 100644 --- a/layout.defs.h +++ b/layout.defs.h @@ -26,7 +26,7 @@ #define FW (12*W+11*S) // full width -#if defined(NOBORDER) +#if defined(NOBORDER) && !defined(NOTITLE) #define HH 30 // header height #define HEADER(fw) \ { X0, Y0, fw-S-HH, HH, 0, 0, "::: coolkbd :::", "", KF_MOVE }, \ @@ -38,6 +38,15 @@ { X0, N2, fw, HH, 0, 0, "::: resize handle :::", "", KF_SIZE }, #endif #define Y1 (Y0+HH+S2) +#elif defined(NOBORDER) && defined(NOTITLE) + #define HEADER(fw) + #ifdef LOCK_SIZE + #define FOOTER(fw) + #else + #define FOOTER(fw) \ + { X0, N2, fw, 0, 0, 0, "::: resize handle :::", "", KF_SIZE }, + #endif + #define Y1 Y0 #elif defined(TOP_RESIZE) && !defined(LOCK_SIZE) #define HH 30 // header height #define HEADER(fw) \