23 lines
533 B
C
23 lines
533 B
C
#include "../mod.h"
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
uint8_t version_major(void) { return 0; }
|
|
uint8_t version_minor(void) { return 1; }
|
|
uint8_t version_patch(void) { return 0; }
|
|
const char *module_name(void) { return "desktop"; }
|
|
|
|
void init(char **config) {
|
|
(void)config;
|
|
}
|
|
|
|
const char *get(void) {
|
|
char *ret;
|
|
|
|
if (asprintf(&ret, "Desktop: %s", getenv("XDG_CURRENT_DESKTOP")) < 0) {
|
|
fprintf(stderr, "error: failed formatting (this shouldn't happen)");
|
|
exit(EXIT_FAILURE);
|
|
}
|
|
|
|
return ret;
|
|
}
|