mirror of
https://github.com/swaywm/sway.git
synced 2025-11-25 06:59:48 -05:00
Allow to configure outputs by their identifier
This commit is contained in:
parent
150e145a51
commit
ead3f1e676
4 changed files with 75 additions and 51 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#define _XOPEN_SOURCE 700
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <wlr/types/wlr_output.h>
|
||||
|
|
@ -14,6 +15,13 @@ int output_name_cmp(const void *item, const void *data) {
|
|||
return strcmp(output->name, name);
|
||||
}
|
||||
|
||||
void output_get_identifier(char *identifier, size_t len,
|
||||
struct sway_output *output) {
|
||||
struct wlr_output *wlr_output = output->wlr_output;
|
||||
snprintf(identifier, len, "%s %s %s", wlr_output->make, wlr_output->model,
|
||||
wlr_output->serial);
|
||||
}
|
||||
|
||||
struct output_config *new_output_config(const char *name) {
|
||||
struct output_config *oc = calloc(1, sizeof(struct output_config));
|
||||
if (oc == NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue