2019-07-16 11:52:22 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
2019-07-21 11:06:28 +02:00
|
|
|
#include <stdint.h>
|
2019-07-17 10:12:14 +02:00
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
2019-12-01 13:43:51 +01:00
|
|
|
#include <tllist.h>
|
|
|
|
|
|
2019-07-22 20:15:14 +02:00
|
|
|
#include "terminal.h"
|
|
|
|
|
|
2019-07-16 11:52:22 +02:00
|
|
|
struct config {
|
2019-07-18 14:29:40 +02:00
|
|
|
char *term;
|
2019-07-17 09:29:56 +02:00
|
|
|
char *shell;
|
2020-02-20 18:35:10 +01:00
|
|
|
bool login_shell;
|
2019-08-23 17:26:41 +02:00
|
|
|
unsigned width;
|
|
|
|
|
unsigned height;
|
2020-02-15 19:00:56 +01:00
|
|
|
unsigned pad_x;
|
|
|
|
|
unsigned pad_y;
|
2019-08-23 17:26:41 +02:00
|
|
|
|
2019-07-30 18:04:28 +02:00
|
|
|
tll(char *) fonts;
|
2019-07-21 11:06:28 +02:00
|
|
|
|
2019-08-01 19:28:14 +02:00
|
|
|
int scrollback_lines;
|
|
|
|
|
|
2019-07-21 11:06:28 +02:00
|
|
|
struct {
|
|
|
|
|
uint32_t fg;
|
|
|
|
|
uint32_t bg;
|
|
|
|
|
uint32_t regular[8];
|
|
|
|
|
uint32_t bright[8];
|
2019-08-16 22:06:06 +02:00
|
|
|
uint16_t alpha;
|
2019-07-21 11:06:28 +02:00
|
|
|
} colors;
|
2019-07-22 20:15:14 +02:00
|
|
|
|
|
|
|
|
struct {
|
|
|
|
|
enum cursor_style style;
|
2019-07-23 18:54:58 +02:00
|
|
|
struct {
|
|
|
|
|
uint32_t text;
|
|
|
|
|
uint32_t cursor;
|
|
|
|
|
} color;
|
2019-07-22 20:15:14 +02:00
|
|
|
} cursor;
|
2019-07-29 20:13:26 +02:00
|
|
|
|
2020-03-02 18:42:49 +01:00
|
|
|
struct {
|
|
|
|
|
enum { CONF_CSD_PREFER_SERVER, CONF_CSD_PREFER_CLIENT } preferred;
|
|
|
|
|
|
|
|
|
|
int title_height;
|
|
|
|
|
int border_width;
|
2020-03-02 20:29:28 +01:00
|
|
|
int button_width;
|
2020-03-02 18:42:49 +01:00
|
|
|
|
|
|
|
|
struct {
|
|
|
|
|
bool title_set;
|
2020-03-02 20:29:28 +01:00
|
|
|
bool minimize_set;
|
|
|
|
|
bool maximize_set;
|
|
|
|
|
bool close_set;
|
2020-03-02 18:42:49 +01:00
|
|
|
uint32_t title;
|
2020-03-02 20:29:28 +01:00
|
|
|
uint32_t minimize;
|
|
|
|
|
uint32_t maximize;
|
|
|
|
|
uint32_t close;
|
2020-03-02 18:42:49 +01:00
|
|
|
} color;
|
|
|
|
|
} csd;
|
|
|
|
|
|
2019-07-29 20:13:26 +02:00
|
|
|
size_t render_worker_count;
|
2019-12-14 12:59:06 +01:00
|
|
|
char *server_socket_path;
|
2019-12-31 15:39:40 +01:00
|
|
|
bool presentation_timings;
|
2020-02-03 19:58:32 +01:00
|
|
|
bool hold_at_exit;
|
2019-07-16 11:52:22 +02:00
|
|
|
};
|
|
|
|
|
|
2019-12-17 19:08:43 +01:00
|
|
|
bool config_load(struct config *conf, const char *path);
|
2019-07-16 11:52:22 +02:00
|
|
|
void config_free(struct config conf);
|