aboutsummaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-09-09 17:00:30 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-09-09 17:00:30 +0000
commit99023cae99d97c6965de19ff38d2f0516153a37e (patch)
tree241a7714296d46ef9f9dc5e9f420b23850224504 /config.h
parentMerge branch 'keymap-shift-return' into master (diff)
parentAdd -W,--window-size-chars, and foot.ini:initial-window-size-chars (diff)
Merge branch 'window-size-in-characters' into master
Diffstat (limited to 'config.h')
-rw-r--r--config.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/config.h b/config.h
index bffb4776..782314e6 100644
--- a/config.h
+++ b/config.h
@@ -9,6 +9,8 @@
#include "user-notification.h"
#include "wayland.h"
+enum conf_size_type {CONF_SIZE_PX, CONF_SIZE_CELLS};
+
struct config_font {
char *pattern;
double pt_size;
@@ -52,10 +54,24 @@ struct config {
char *title;
char *app_id;
bool login_shell;
- unsigned width;
- unsigned height;
+
+ struct {
+ enum conf_size_type type;
+ union {
+ struct {
+ unsigned width;
+ unsigned height;
+ } px;
+ struct {
+ unsigned width;
+ unsigned height;
+ } cells;
+ };
+ } size;
+
unsigned pad_x;
unsigned pad_y;
+
enum { STARTUP_WINDOWED, STARTUP_MAXIMIZED, STARTUP_FULLSCREEN } startup_mode;
tll(struct config_font) fonts;
@@ -156,7 +172,9 @@ struct config {
user_notifications_t notifications;
};
-bool config_load(struct config *conf, const char *path, bool errors_are_fatal);
+bool config_load(
+ struct config *conf, const char *path,
+ user_notifications_t *initial_user_notifications, bool errors_are_fatal);
void config_free(struct config conf);
struct config_font config_font_parse(const char *pattern);