aboutsummaryrefslogtreecommitdiffstats
path: root/sway/config.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-01-30 23:09:21 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2018-01-30 23:09:21 -0500
commitb28602aa7425cf435150e6008624429737e037d3 (patch)
treedafe7d23c48457299f33803832f6b89e09a915ce /sway/config.c
parentRemove include/sway/old/ (diff)
downloadsway-b28602aa7425cf435150e6008624429737e037d3.tar.gz
sway-b28602aa7425cf435150e6008624429737e037d3.tar.zst
sway-b28602aa7425cf435150e6008624429737e037d3.zip
Implement workspaces
Diffstat (limited to 'sway/config.c')
-rw-r--r--sway/config.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/sway/config.c b/sway/config.c
index a67322d1..213e7680 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -318,10 +318,6 @@ static bool load_config(const char *path, struct sway_config *config) {
318 return true; 318 return true;
319} 319}
320 320
321static int qstrcmp(const void* a, const void* b) {
322 return strcmp(*((char**) a), *((char**) b));
323}
324
325bool load_main_config(const char *file, bool is_active) { 321bool load_main_config(const char *file, bool is_active) {
326 char *path; 322 char *path;
327 if (file != NULL) { 323 if (file != NULL) {
@@ -349,7 +345,9 @@ bool load_main_config(const char *file, bool is_active) {
349 config->reading = true; 345 config->reading = true;
350 346
351 // Read security configs 347 // Read security configs
348 // TODO: Security
352 bool success = true; 349 bool success = true;
350 /*
353 DIR *dir = opendir(SYSCONFDIR "/sway/security.d"); 351 DIR *dir = opendir(SYSCONFDIR "/sway/security.d");
354 if (!dir) { 352 if (!dir) {
355 wlr_log(L_ERROR, 353 wlr_log(L_ERROR,
@@ -392,6 +390,7 @@ bool load_main_config(const char *file, bool is_active) {
392 390
393 free_flat_list(secconfigs); 391 free_flat_list(secconfigs);
394 } 392 }
393 */
395 394
396 success = success && load_config(path, config); 395 success = success && load_config(path, config);
397 396
@@ -717,3 +716,11 @@ char *do_var_replacement(char *str) {
717 } 716 }
718 return str; 717 return str;
719} 718}
719
720// the naming is intentional (albeit long): a workspace_output_cmp function
721// would compare two structs in full, while this method only compares the
722// workspace.
723int workspace_output_cmp_workspace(const void *a, const void *b) {
724 const struct workspace_output *wsa = a, *wsb = b;
725 return lenient_strcmp(wsa->workspace, wsb->workspace);
726}