diff options
author | B. Stack <bgstack15@gmail.com> | 2022-10-08 16:34:20 -0400 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2022-10-09 16:45:23 -0400 |
commit | dcdbbc74d4ea4340b18b77369c7512bb167b43f1 (patch) | |
tree | e7b52877678abcc81243f0b016d2cacad33af2e8 /experimental/keyboard-leds-trayicons.h | |
parent | change #ifdef DEBUG to if(debug) to use -d (diff) | |
download | keyboard-leds-trayicons-dcdbbc74d4ea4340b18b77369c7512bb167b43f1.tar.gz keyboard-leds-trayicons-dcdbbc74d4ea4340b18b77369c7512bb167b43f1.tar.bz2 keyboard-leds-trayicons-dcdbbc74d4ea4340b18b77369c7512bb167b43f1.zip |
almost-production-worthy KLT.cexperimental
added sockets, fifos, click-to-switch, libxdo support
Diffstat (limited to 'experimental/keyboard-leds-trayicons.h')
-rw-r--r-- | experimental/keyboard-leds-trayicons.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/experimental/keyboard-leds-trayicons.h b/experimental/keyboard-leds-trayicons.h new file mode 100644 index 0000000..bafb06f --- /dev/null +++ b/experimental/keyboard-leds-trayicons.h @@ -0,0 +1,49 @@ +// startdate: 2022-10-07-6 20:45 +// goal: header for KLT + +// protection header +#ifndef HEADER_KLT +#define HEADER_LKT 20221007204837 + +#include <ctype.h> +#include <fcntl.h> +#include <glib.h> +#include <gtk/gtk.h> +#include <ini.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/stat.h> +#include <unistd.h> +#include <X11/XKBlib.h> +#include <X11/Xlib.h> +#include <signal.h> +#ifdef ENABLE_SOCKETS +#include <sys/un.h> +#include <netinet/in.h> +#include <sys/socket.h> +#endif +#ifdef ENABLE_LIBXDO +#include <xdo.h> +#endif + +void *send_fifo_message(FILE *stream, const char *message); +void *send_fifo_icon_message(FILE *stream, const char *iconfile); +void sigfun_main(int sig); +void sigfun_child(int sig); +void klt_reverse(char s[]); +void itoa(int n, char s[]); +int get_indicator(Display* dpy, char* indicator); +static int handler(void* user, const char* section, const char* name, const char* value); +int send_message(char *message, const int sock, FILE *stream, const pid_t child_pid, const char *fifo, const int quit); +void *send_fifo_message(FILE *stream, const char *message); +void *send_fifo_icon_message(FILE *stream, const char *iconfile); +void sig_usr(int signo); +#ifdef ENABLE_SOCKETS +void remove_first_newline(char *string); +void *send_sock_message(int socket, const char *message); +void *send_sock_icon_message(int socket, const char *iconfile); +#endif + +// protection header +#endif |