Added --monitor

This commit is contained in:
Scoopta
2020-07-18 13:32:05 -07:00
parent e7672ff694
commit 3ab6a0d668
4 changed files with 30 additions and 2 deletions

View File

@@ -1617,6 +1617,7 @@ void wofi_init(struct map* _config) {
bool hide_search = strcmp(config_get(config, "hide_search", "false"), "true") == 0;
char* search = map_get(config, "search");
dynamic_lines = strcmp(config_get(config, "dynamic_lines", "false"), "true") == 0;
char* monitor = map_get(config, "monitor");
keys = map_init_void();
@@ -1713,6 +1714,13 @@ void wofi_init(struct map* _config) {
break;
}
}
} else if(monitor != NULL) {
wl_list_for_each(node, &outputs, link) {
if(strcmp(monitor, node->name) == 0) {
output = node->output;
break;
}
}
}
GdkWindow* gdk_win = gtk_widget_get_window(window);