Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'vanilla/next' into gaps-next
Browse files Browse the repository at this point in the history
  • Loading branch information
Airblader committed Apr 30, 2020
2 parents a12c314 + 10646eb commit 22059fc
Show file tree
Hide file tree
Showing 73 changed files with 311 additions and 392 deletions.
1 change: 0 additions & 1 deletion Makefile.am
Expand Up @@ -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 = \
Expand Down
3 changes: 3 additions & 0 deletions generate-command-parser.pl
Expand Up @@ -117,6 +117,7 @@ sub slurp {
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') {
Expand All @@ -131,6 +132,7 @@ sub slurp {
# 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;
Expand Down Expand Up @@ -206,6 +208,7 @@ sub slurp {
# 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};
Expand Down
25 changes: 10 additions & 15 deletions i3-config-wizard/main.c
Expand Up @@ -10,6 +10,8 @@
*/
#include <config.h>

#include "libi3.h"

#if defined(__FreeBSD__)
#include <sys/param.h>
#endif
Expand All @@ -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 */
Expand All @@ -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)
Expand Down
27 changes: 11 additions & 16 deletions i3-dump-log/main.c
Expand Up @@ -9,27 +9,22 @@
*/
#include <config.h>

#include <stdio.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 <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <stdint.h>
#include <stdio.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 <i3/ipc.h>
#include <unistd.h>

#if !defined(__OpenBSD__)
static uint32_t offset_next_write;
Expand Down
3 changes: 2 additions & 1 deletion i3-input/keysym2ucs.c
Expand Up @@ -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;
Expand Down
20 changes: 7 additions & 13 deletions i3-input/main.c
Expand Up @@ -8,32 +8,26 @@
* to i3.
*
*/
#include <getopt.h>
#include <stdbool.h>
#include <stdint.h>
#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 <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)
Expand Down
22 changes: 6 additions & 16 deletions i3-msg/main.c
Expand Up @@ -16,27 +16,17 @@
*/
#include "libi3.h"

#include <stdio.h>
#include <err.h>
#include <getopt.h>
#include <i3/ipc.h>
#include <stdbool.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <stdint.h>
#include <stdio.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 <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.
Expand Down
18 changes: 0 additions & 18 deletions i3-nagbar/i3-nagbar.h

This file was deleted.

41 changes: 22 additions & 19 deletions i3-nagbar/main.c
Expand Up @@ -8,43 +8,46 @@
* 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)
#define BTN_GAP logical_px(20)
#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 {
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -598,7 +601,7 @@ int main(int argc, char *argv[]) {
free(event);
}

FREE(pattern);
free(pattern);
draw_util_surface_free(conn, &bar);

return 0;
Expand Down
2 changes: 0 additions & 2 deletions i3bar/include/common.h
Expand Up @@ -9,7 +9,6 @@

#include <config.h>

#include <stdbool.h>
#include <xcb/xcb.h>
#include <xcb/xproto.h>
#include "libi3.h"
Expand Down Expand Up @@ -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"
26 changes: 11 additions & 15 deletions i3bar/src/child.c
Expand Up @@ -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;
Expand Down
9 changes: 3 additions & 6 deletions i3bar/src/config.c
Expand Up @@ -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;
Expand Down

0 comments on commit 22059fc

Please sign in to comment.