commit
9c2b8f8b31
|
@ -379,7 +379,6 @@ i3_nagbar_i3_nagbar_LDADD = \
|
|||
|
||||
i3_nagbar_i3_nagbar_SOURCES = \
|
||||
i3-nagbar/atoms.xmacro \
|
||||
i3-nagbar/i3-nagbar.h \
|
||||
i3-nagbar/main.c
|
||||
|
||||
i3bar_i3bar_CPPFLAGS = \
|
||||
|
|
|
@ -117,6 +117,7 @@ my @keys = sort { (length($b) <=> length($a)) or ($a cmp $b) } keys %states;
|
|||
open(my $enumfh, '>', "GENERATED_${prefix}_enums.h");
|
||||
|
||||
my %statenum;
|
||||
say $enumfh '#pragma once';
|
||||
say $enumfh 'typedef enum {';
|
||||
my $cnt = 0;
|
||||
for my $state (@keys, '__CALL') {
|
||||
|
@ -131,6 +132,7 @@ close($enumfh);
|
|||
# Third step: Generate the call function.
|
||||
open(my $callfh, '>', "GENERATED_${prefix}_call.h");
|
||||
my $resultname = uc(substr($prefix, 0, 1)) . substr($prefix, 1) . 'ResultIR';
|
||||
say $callfh '#pragma once';
|
||||
say $callfh "static void GENERATED_call(const int call_identifier, struct $resultname *result) {";
|
||||
say $callfh ' switch (call_identifier) {';
|
||||
my $call_id = 0;
|
||||
|
@ -206,6 +208,7 @@ close($callfh);
|
|||
# Fourth step: Generate the token datastructures.
|
||||
|
||||
open(my $tokfh, '>', "GENERATED_${prefix}_tokens.h");
|
||||
say $tokfh '#pragma once';
|
||||
|
||||
for my $state (@keys) {
|
||||
my $tokens = $states{$state};
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
*/
|
||||
#include <config.h>
|
||||
|
||||
#include "libi3.h"
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
@ -23,37 +25,31 @@
|
|||
#define _WITH_GETLINE
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <err.h>
|
||||
#include <stdint.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <getopt.h>
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <glob.h>
|
||||
#include <assert.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/xcb_aux.h>
|
||||
#include <xcb/xcb_event.h>
|
||||
#include <xcb/xcb_keysyms.h>
|
||||
|
||||
#include <xkbcommon/xkbcommon.h>
|
||||
#include <xkbcommon/xkbcommon-x11.h>
|
||||
#include <xkbcommon/xkbcommon.h>
|
||||
|
||||
#define SN_API_NOT_YET_FROZEN 1
|
||||
#include <libsn/sn-launchee.h>
|
||||
|
||||
#include <X11/XKBlib.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/keysym.h>
|
||||
#include <X11/XKBlib.h>
|
||||
|
||||
/* We need SYSCONFDIR for the path to the keycode config template, so raise an
|
||||
* error if it’s not defined for whatever reason */
|
||||
|
@ -69,7 +65,6 @@
|
|||
|
||||
#include "xcb.h"
|
||||
xcb_visualtype_t *visual_type = NULL;
|
||||
#include "libi3.h"
|
||||
|
||||
#define TEXT_PADDING logical_px(4)
|
||||
#define WIN_POS_X logical_px(490)
|
||||
|
|
|
@ -9,27 +9,22 @@
|
|||
*/
|
||||
#include <config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <err.h>
|
||||
#include <stdint.h>
|
||||
#include <getopt.h>
|
||||
#include <limits.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include "libi3.h"
|
||||
#include "shmlog.h"
|
||||
|
||||
#include <err.h>
|
||||
#include <fcntl.h>
|
||||
#include <getopt.h>
|
||||
#include <i3/ipc.h>
|
||||
#include <signal.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if !defined(__OpenBSD__)
|
||||
static uint32_t offset_next_write;
|
||||
|
|
|
@ -31,9 +31,10 @@
|
|||
* This software is in the public domain. Share and enjoy!
|
||||
*/
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
#include "keysym2ucs.h"
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
|
||||
struct codepair {
|
||||
unsigned short keysym;
|
||||
unsigned short ucs;
|
||||
|
|
|
@ -8,32 +8,26 @@
|
|||
* to i3.
|
||||
*
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <err.h>
|
||||
#include <stdint.h>
|
||||
#include <getopt.h>
|
||||
#include <limits.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/xcb_aux.h>
|
||||
#include <xcb/xcb_event.h>
|
||||
#include <xcb/xcb_keysyms.h>
|
||||
|
||||
xcb_visualtype_t *visual_type = NULL;
|
||||
#include "i3-input.h"
|
||||
#include "keysym2ucs.h"
|
||||
#include "libi3.h"
|
||||
|
||||
#include <X11/keysym.h>
|
||||
|
||||
#include "keysym2ucs.h"
|
||||
|
||||
#include "i3-input.h"
|
||||
|
||||
#define MAX_WIDTH logical_px(500)
|
||||
#define BORDER logical_px(2)
|
||||
#define PADDING logical_px(2)
|
||||
|
|
|
@ -16,27 +16,17 @@
|
|||
*/
|
||||
#include "libi3.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <err.h>
|
||||
#include <stdint.h>
|
||||
#include <getopt.h>
|
||||
#include <limits.h>
|
||||
#include <i3/ipc.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <yajl/yajl_parse.h>
|
||||
#include <yajl/yajl_version.h>
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/xcb_aux.h>
|
||||
|
||||
#include <i3/ipc.h>
|
||||
|
||||
/*
|
||||
* Having verboselog() and errorlog() is necessary when using libi3.
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <err.h>
|
||||
|
||||
#define die(...) errx(EXIT_FAILURE, __VA_ARGS__);
|
||||
#define FREE(pointer) \
|
||||
do { \
|
||||
free(pointer); \
|
||||
pointer = NULL; \
|
||||
} while (0)
|
||||
|
||||
#define xmacro(atom) xcb_atom_t A_##atom;
|
||||
#include "atoms.xmacro"
|
||||
#undef xmacro
|
||||
|
||||
extern xcb_window_t root;
|
|
@ -8,36 +8,33 @@
|
|||
* when the user has an error in their configuration file.
|
||||
*
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/wait.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <config.h>
|
||||
|
||||
#include "libi3.h"
|
||||
|
||||
#include <err.h>
|
||||
#include <stdint.h>
|
||||
#include <fcntl.h>
|
||||
#include <getopt.h>
|
||||
#include <limits.h>
|
||||
#include <fcntl.h>
|
||||
#include <paths.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <xcb/randr.h>
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/xcb_aux.h>
|
||||
#include <xcb/xcb_event.h>
|
||||
#include <xcb/randr.h>
|
||||
#include <xcb/xcb_cursor.h>
|
||||
|
||||
xcb_visualtype_t *visual_type = NULL;
|
||||
#include "libi3.h"
|
||||
|
||||
#define SN_API_NOT_YET_FROZEN 1
|
||||
#include <libsn/sn-launchee.h>
|
||||
|
||||
#include "i3-nagbar.h"
|
||||
|
||||
#define MSG_PADDING logical_px(8)
|
||||
#define BTN_PADDING logical_px(3)
|
||||
#define BTN_BORDER logical_px(3)
|
||||
|
@ -45,6 +42,12 @@ xcb_visualtype_t *visual_type = NULL;
|
|||
#define CLOSE_BTN_GAP logical_px(15)
|
||||
#define BAR_BORDER logical_px(2)
|
||||
|
||||
#define xmacro(atom) xcb_atom_t A_##atom;
|
||||
#include "atoms.xmacro"
|
||||
#undef xmacro
|
||||
|
||||
#define die(...) errx(EXIT_FAILURE, __VA_ARGS__);
|
||||
|
||||
static char *argv0 = NULL;
|
||||
|
||||
typedef struct {
|
||||
|
@ -314,8 +317,8 @@ static xcb_rectangle_t get_window_position(void) {
|
|||
goto free_resources;
|
||||
|
||||
free_resources:
|
||||
FREE(res);
|
||||
FREE(primary);
|
||||
free(res);
|
||||
free(primary);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -598,7 +601,7 @@ int main(int argc, char *argv[]) {
|
|||
free(event);
|
||||
}
|
||||
|
||||
FREE(pattern);
|
||||
free(pattern);
|
||||
draw_util_surface_free(conn, &bar);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/xproto.h>
|
||||
#include "libi3.h"
|
||||
|
@ -94,5 +93,4 @@ extern TAILQ_HEAD(statusline_head, status_block)
|
|||
#include "trayclients.h"
|
||||
#include "xcb.h"
|
||||
#include "configuration.h"
|
||||
#include "libi3.h"
|
||||
#include "parse_json_header.h"
|
||||
|
|
|
@ -10,25 +10,21 @@
|
|||
#include "common.h"
|
||||
#include "yajl_utils.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <ev.h>
|
||||
#include <yajl/yajl_common.h>
|
||||
#include <yajl/yajl_parse.h>
|
||||
#include <yajl/yajl_version.h>
|
||||
#include <yajl/yajl_gen.h>
|
||||
#include <fcntl.h>
|
||||
#include <paths.h>
|
||||
#include <signal.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <xcb/xcb_keysyms.h>
|
||||
#include <yajl/yajl_gen.h>
|
||||
#include <yajl/yajl_parse.h>
|
||||
|
||||
/* Global variables for child_*() */
|
||||
i3bar_child child;
|
||||
|
|
|
@ -9,15 +9,12 @@
|
|||
*/
|
||||
#include "common.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <i3/ipc.h>
|
||||
#include <yajl/yajl_parse.h>
|
||||
#include <yajl/yajl_version.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <yajl/yajl_parse.h>
|
||||
|
||||
config_t config;
|
||||
static char *cur_key;
|
||||
|
|
|
@ -9,16 +9,13 @@
|
|||
*/
|
||||
#include "common.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <i3/ipc.h>
|
||||
#include <ev.h>
|
||||
#include <i3/ipc.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#ifdef I3_ASAN_ENABLED
|
||||
#include <sanitizer/lsan_interface.h>
|
||||
#endif
|
||||
|
|
|
@ -7,15 +7,13 @@
|
|||
*/
|
||||
#include "common.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <i3/ipc.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <ev.h>
|
||||
#include <getopt.h>
|
||||
#include <glob.h>
|
||||
#include <i3/ipc.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
struct ev_loop *main_loop;
|
||||
|
||||
|
|
|
@ -9,12 +9,10 @@
|
|||
*/
|
||||
#include "common.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <yajl/yajl_parse.h>
|
||||
#include <yajl/yajl_version.h>
|
||||
|
||||
/* A datatype to pass through the callbacks to save the state */
|
||||
struct mode_json_params {
|
||||
|
|
|
@ -9,13 +9,12 @@
|
|||
*/
|
||||
#include "common.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <i3/ipc.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <yajl/yajl_parse.h>
|
||||
#include <yajl/yajl_version.h>
|
||||
|
||||
/* A datatype to pass through the callbacks to save the state */
|
||||
struct outputs_json_params {
|
||||
|
|
|
@ -10,22 +10,10 @@
|
|||
*/
|
||||
#include "common.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <err.h>
|
||||
#include <ev.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <yajl/yajl_common.h>
|
||||
|
||||
#include <yajl/yajl_parse.h>
|
||||
#include <yajl/yajl_version.h>
|
||||
|
||||
static enum {
|
||||
KEY_VERSION,
|
||||
|
|
|
@ -9,12 +9,10 @@
|
|||
*/
|
||||
#include "common.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <yajl/yajl_parse.h>
|
||||
#include <yajl/yajl_version.h>
|
||||
|
||||
/* A datatype to pass through the callbacks to save the state */
|
||||
struct workspaces_json_params {
|
||||
|
|
|
@ -9,26 +9,15 @@
|
|||
*/
|
||||
#include "common.h"
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/xkb.h>
|
||||
#include <xcb/xproto.h>
|
||||
#include <err.h>
|
||||
#include <ev.h>
|
||||
#include <i3/ipc.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <xcb/xcb_aux.h>
|
||||
#include <xcb/xcb_cursor.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <i3/ipc.h>
|
||||
#include <ev.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <err.h>
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/XKBlib.h>
|
||||
#include <X11/extensions/XKB.h>
|
||||
#include <xcb/xkb.h>
|
||||
|
||||
#ifdef I3_ASAN_ENABLED
|
||||
#include <sanitizer/lsan_interface.h>
|
||||
|
|
|
@ -15,31 +15,24 @@
|
|||
#include <config.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <locale.h>
|
||||
#include <getopt.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <glob.h>
|
||||
#include <errno.h>
|
||||
#include <err.h>
|
||||
#include <stdint.h>
|
||||
#include <inttypes.h>
|
||||
#include <math.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/xcb_aux.h>
|
||||
#include <xcb/xcb_keysyms.h>
|
||||
#include <xcb/xcb_icccm.h>
|
||||
#include <xcb/xcb_keysyms.h>
|
||||
|
||||
#include <yajl/yajl_gen.h>
|
||||
#include <yajl/yajl_version.h>
|
||||
|
||||
#include "libi3.h"
|
||||
#include "data.h"
|
||||
#include "util.h"
|
||||
#include "ipc.h"
|
||||
|
@ -72,7 +65,6 @@
|
|||
#include "ewmh.h"
|
||||
#include "assignments.h"
|
||||
#include "regex.h"
|
||||
#include "libi3.h"
|
||||
#include "startup.h"
|
||||
#include "scratchpad.h"
|
||||
#include "commands.h"
|
||||
|
|
|
@ -12,9 +12,6 @@
|
|||
*/
|
||||
#pragma once
|
||||
|
||||
#include "libi3.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "queue.h"
|
||||
#include "i3.h"
|
||||
|
||||
|
|
|
@ -9,13 +9,10 @@
|
|||
*/
|
||||
#pragma once
|
||||
|
||||
#include "libi3.h"
|
||||
|
||||
#define SN_API_NOT_YET_FROZEN 1
|
||||
#include <libsn/sn-launcher.h>
|
||||
|
||||
#include <xcb/randr.h>
|
||||
#include <stdbool.h>
|
||||
#include <pcre.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include <config.h>
|
||||
|
||||
#include <ev.h>
|
||||
#include <stdbool.h>
|
||||
#include <yajl/yajl_gen.h>
|
||||
#include <yajl/yajl_parse.h>
|
||||
|
||||
|
|
|
@ -11,9 +11,6 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
/* We will include libi3.h which define its own version of LOG, ELOG.
|
||||
* We want *our* version, so we undef the libi3 one. */
|
||||
#if defined(LOG)
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#if !defined(__OpenBSD__)
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
|
||||
#include <config.h>
|
||||
|
||||
#include "data.h"
|
||||
|
||||
/**
|
||||
* We have just established a connection to the X server and need the initial
|
||||
* Xinerama information to setup workspaces for each screen.
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <xcb/xcb_xrm.h>
|
||||
|
||||
static long dpi;
|
||||
|
|
|
@ -9,11 +9,10 @@
|
|||
#include "libi3.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <err.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/xcb_aux.h>
|
||||
#include <cairo/cairo-xcb.h>
|
||||
|
||||
/* The default visual_type to use if none is specified when creating the surface. Must be defined globally. */
|
||||
extern xcb_visualtype_t *visual_type;
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "libi3.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/xproto.h>
|
||||
|
|
|
@ -8,14 +8,12 @@
|
|||
#include "libi3.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <cairo/cairo-xcb.h>
|
||||
#include <err.h>
|
||||
#include <pango/pangocairo.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
#include <err.h>
|
||||
|
||||
#include <cairo/cairo-xcb.h>
|
||||
#include <pango/pangocairo.h>
|
||||
|
||||
static const i3Font *savedFont = NULL;
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "libi3.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef CS_STARTS_WITH
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
|
||||
#include "libi3.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <glib.h>
|
||||
#include <string.h>
|
||||
|
||||
/* Copied from:
|
||||
* https://gitlab.gnome.org/GNOME/glib/blob/f928dfdf57bf92c883b53b16d7a9d49add504f52/glib/gutf8.c#L1752-1815 */
|
||||
|
|
|
@ -6,12 +6,11 @@
|
|||
*
|
||||
*/
|
||||
#include "libi3.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "queue.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
struct Colorpixel {
|
||||
char hex[8];
|
||||
uint32_t pixel;
|
||||
|
|
|
@ -7,12 +7,10 @@
|
|||
*/
|
||||
#include "libi3.h"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/*
|
||||
* This function returns the absolute path to the executable it is running in.
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/xcb_keysyms.h>
|
||||
|
||||
|
|
|
@ -7,17 +7,11 @@
|
|||
*/
|
||||
#include "libi3.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
#include <err.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <pwd.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <err.h>
|
||||
|
||||
/*
|
||||
* Returns the name of a temporary file with the specified prefix.
|
||||
|
|
|
@ -7,14 +7,12 @@
|
|||
*/
|
||||
#include "libi3.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <err.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <string.h>
|
||||
#include <err.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
/*
|
||||
* Connects to the i3 IPC socket and returns the file descriptor for the
|
||||
|
|
|
@ -7,15 +7,12 @@
|
|||
*/
|
||||
#include "libi3.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include <i3/ipc.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/*
|
||||
* Reads a message from the given socket file descriptor and stores its length
|
||||
|
|
|
@ -7,14 +7,8 @@
|
|||
*/
|
||||
#include "libi3.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <i3/ipc.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/*
|
||||
* Formats a message (payload) of the given size and type and sends it to i3 via
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "libi3.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
/*
|
||||
* Returns true if this version of i3 is a debug build (anything which is not a
|
||||
|
|
|
@ -7,12 +7,9 @@
|
|||
*/
|
||||
#include "libi3.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/xcb_aux.h>
|
||||
|
|
|
@ -7,13 +7,11 @@
|
|||
*/
|
||||
#include "libi3.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/*
|
||||
* The s* functions (safe) are wrappers around malloc, strdup, …, which exits if one of
|
||||
|
|
|
@ -11,11 +11,10 @@
|
|||
*/
|
||||
#include "libi3.h"
|
||||
|
||||
#include <glib.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
struct _i3String {
|
||||
char *utf8;
|
||||
xcb_char2b_t *ucs2;
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
*/
|
||||
#include "libi3.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef HAVE_strndup
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "libi3.h"
|
||||
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <iconv.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
|
|
@ -8,8 +8,10 @@
|
|||
*/
|
||||
#include "all.h"
|
||||
|
||||
#include <xkbcommon/xkbcommon.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <xkbcommon/xkbcommon-x11.h>
|
||||
#include <xkbcommon/xkbcommon.h>
|
||||
|
||||
static struct xkb_context *xkb_context;
|
||||
static struct xkb_keymap *xkb_keymap;
|
||||
|
|
|
@ -10,11 +10,6 @@
|
|||
#include "all.h"
|
||||
|
||||
#include <time.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <xcb/xcb_icccm.h>
|
||||
|
||||
#include <X11/XKBlib.h>
|
||||
|
||||
typedef enum { CLICK_BORDER = 0,
|
||||
CLICK_DECORATION = 1,
|
||||
|
|
|
@ -8,15 +8,12 @@
|
|||
*
|
||||
*/
|
||||
#include "all.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <float.h>
|
||||
#include <stdarg.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "shmlog.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
|
||||
// Macros to make the YAJL API a bit easier to use.
|
||||
#define y(x, ...) (cmd_output->json_gen != NULL ? yajl_gen_##x(cmd_output->json_gen, ##__VA_ARGS__) : 0)
|
||||
#define ystr(str) (cmd_output->json_gen != NULL ? yajl_gen_string(cmd_output->json_gen, (unsigned char *)str, strlen(str)) : 0)
|
||||
|
|
|
@ -25,13 +25,6 @@
|
|||
*/
|
||||
#include "all.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
// Macros to make the YAJL API a bit easier to use.
|
||||
#define y(x, ...) (command_output.json_gen != NULL ? yajl_gen_##x(command_output.json_gen, ##__VA_ARGS__) : 0)
|
||||
#define ystr(str) (command_output.json_gen != NULL ? yajl_gen_string(command_output.json_gen, (unsigned char *)str, strlen(str)) : 0)
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
*
|
||||
*/
|
||||
#include "all.h"
|
||||
|
||||
#include "yajl_utils.h"
|
||||
|
||||
static void con_on_remove_child(Con *con);
|
||||
|
|
|
@ -9,9 +9,6 @@
|
|||
*/
|
||||
#include "all.h"
|
||||
|
||||
#include <float.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
/*******************************************************************************
|
||||
* Criteria functions.
|
||||
******************************************************************************/
|
||||
|
|
|
@ -25,16 +25,17 @@
|
|||
*/
|
||||
#include "all.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <xcb/xcb_xrm.h>
|
||||
|
||||
// Macros to make the YAJL API a bit easier to use.
|
||||
|
|
|
@ -10,13 +10,9 @@
|
|||
*/
|
||||
#include "all.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <fcntl.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static bool human_readable_key, loaded_config_file_name_key;
|
||||
static char *human_readable_version, *loaded_config_file_name;
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
*/
|
||||
#include "all.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#ifndef MAX
|
||||
#define MAX(x, y) ((x) > (y) ? (x) : (y))
|
||||
#endif
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
*/
|
||||
#include "all.h"
|
||||
|
||||
#include <time.h>
|
||||
#include <float.h>
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <xcb/randr.h>
|
||||
#define SN_API_NOT_YET_FROZEN 1
|
||||
#include <libsn/sn-monitor.h>
|
||||
|
|
11
src/ipc.c
11
src/ipc.c
|
@ -7,16 +7,19 @@
|
|||
* ipc.c: UNIX domain socket IPC (initialization, client handling, protocol).
|
||||
*
|
||||
*/
|
||||
#include "all.h"
|
||||
|
||||
#include "all.h"
|
||||
#include "yajl_utils.h"
|
||||
|
||||
#include <ev.h>
|
||||
#include <fcntl.h>
|
||||
#include <libgen.h>
|
||||
#include <locale.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <fcntl.h>
|
||||
#include <libgen.h>
|
||||
#include <ev.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <yajl/yajl_gen.h>
|
||||
#include <yajl/yajl_parse.h>
|
||||
|
||||
|
|
|
@ -10,10 +10,9 @@
|
|||
*/
|
||||
#include "all.h"
|
||||
|
||||
#include <yajl/yajl_common.h>
|
||||
#include <yajl/yajl_gen.h>
|
||||
#include <locale.h>
|
||||
|
||||
#include <yajl/yajl_parse.h>
|
||||
#include <yajl/yajl_version.h>
|
||||
|
||||
/* TODO: refactor the whole parsing thing */
|
||||
|
||||
|
|
25
src/log.c
25
src/log.c
|
@ -9,27 +9,24 @@
|
|||
*/
|
||||
#include <config.h>
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#include "all.h"
|
||||
#include "shmlog.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#if !defined(__OpenBSD__)
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
#include "util.h"
|
||||
#include "log.h"
|
||||
#include "i3.h"
|
||||
#include "libi3.h"
|
||||
#include "shmlog.h"
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
|
20
src/main.c
20
src/main.c
|
@ -8,18 +8,22 @@
|
|||
*
|
||||
*/
|
||||
#include "all.h"
|
||||
#include "shmlog.h"
|
||||
|
||||
#include <ev.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <getopt.h>
|
||||
#include <libgen.h>
|
||||
#include "shmlog.h"
|
||||
#include <locale.h>
|
||||
#include <signal.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/un.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef I3_ASAN_ENABLED
|
||||
#include <sanitizer/lsan_interface.h>
|
||||
|
|
|
@ -9,10 +9,6 @@
|
|||
*/
|
||||
#include "all.h"
|
||||
|
||||
#include "yajl_utils.h"
|
||||
|
||||
#include <yajl/yajl_gen.h>
|
||||
|
||||
/*
|
||||
* Match frame and window depth. This is needed because X will refuse to reparent a
|
||||
* window whose background is ParentRelative under a window with a different depth.
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "all.h"
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include <xcb/randr.h>
|
||||
|
||||
/* Pointer to the result of the query for primary output */
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
*/
|
||||
#include "all.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
/* Forward declarations */
|
||||
static int *precalculate_sizes(Con *con, render_params *p);
|
||||
static void render_root(Con *con, Con *fullscreen);
|
||||
|
|
|
@ -28,22 +28,22 @@
|
|||
#define _GNU_SOURCE
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <netinet/in.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "sd-daemon.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <netinet/in.h>
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/un.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int sd_listen_fds(int unset_environment) {
|
||||
int r, fd;
|
||||
const char *e;
|
||||
|
|
|
@ -7,14 +7,9 @@
|
|||
*/
|
||||
#include "all.h"
|
||||
|
||||
#include <ev.h>
|
||||
#include <iconv.h>
|
||||
#include <signal.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include <xcb/xcb_event.h>
|
||||
|
||||
#include <X11/keysym.h>
|
||||
#include <unistd.h>
|
||||
|
||||
typedef struct dialog_t {
|
||||
xcb_window_t id;
|
||||
|
|
|
@ -11,12 +11,12 @@
|
|||
*
|
||||
*/
|
||||
#include "all.h"
|
||||
|
||||
#include "sd-daemon.h"
|
||||
|
||||
#include <paths.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <paths.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define SN_API_NOT_YET_FROZEN 1
|
||||
#include <libsn/sn-launcher.h>
|
||||
|
|
15
src/util.c
15
src/util.c
|
@ -10,19 +10,16 @@
|
|||
*/
|
||||
#include "all.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <fcntl.h>
|
||||
#include <inttypes.h>
|
||||
#include <libgen.h>
|
||||
#include <locale.h>
|
||||
#include <sys/wait.h>
|
||||
#include <stdarg.h>
|
||||
#include <unistd.h>
|
||||
#if defined(__OpenBSD__)
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#include <pwd.h>
|
||||
#include <yajl/yajl_version.h>
|
||||
#include <libgen.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#define SN_API_NOT_YET_FROZEN 1
|
||||
#include <libsn/sn-launcher.h>
|
||||
|
||||
int min(int a, int b) {
|
||||
return (a < b ? a : b);
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
*/
|
||||
#include "all.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
/*
|
||||
* Frees an i3Window and all its members.
|
||||
*
|
||||
|
|
2
src/x.c
2
src/x.c
|
@ -10,6 +10,8 @@
|
|||
*/
|
||||
#include "all.h"
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#ifndef MAX
|
||||
#define MAX(x, y) ((x) > (y) ? (x) : (y))
|
||||
#endif
|
||||
|
|
|
@ -9,13 +9,12 @@
|
|||
*/
|
||||
#include <config.h>
|
||||
|
||||
#include "all.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <err.h>
|
||||
#include <xcb/xcb_cursor.h>
|
||||
|
||||
#include "i3.h"
|
||||
#include "xcb.h"
|
||||
#include "xcursor.h"
|
||||
#include <xcb/xcb_cursor.h>
|
||||
|
||||
static xcb_cursor_context_t *ctx;
|
||||
static xcb_cursor_t cursors[XCURSOR_CURSOR_MAX];
|
||||
|
|
|
@ -16,15 +16,17 @@
|
|||
|
||||
#include <ev.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/wait.h>
|
||||
#include <getopt.h>
|
||||
#include <libgen.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/un.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static void uds_connection_cb(EV_P_ ev_io *w, int revents);
|
||||
static void read_client_setup_request_cb(EV_P_ ev_io *w, int revents);
|
||||
|
|
Loading…
Reference in New Issue