Merge pull request #2507 from stapelberg/autotools
Switch to autotools (GNU build system)
This commit is contained in:
commit
f58dde2850
|
@ -34,3 +34,30 @@ i3-command-parser.stamp
|
||||||
i3-config-parser.stamp
|
i3-config-parser.stamp
|
||||||
.clang_complete
|
.clang_complete
|
||||||
LAST_VERSION
|
LAST_VERSION
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# https://raw.githubusercontent.com/github/gitignore/master/Autotools.gitignore
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# http://www.gnu.org/software/automake
|
||||||
|
|
||||||
|
Makefile.in
|
||||||
|
/ar-lib
|
||||||
|
/test-driver
|
||||||
|
|
||||||
|
# http://www.gnu.org/software/autoconf
|
||||||
|
|
||||||
|
/autom4te.cache
|
||||||
|
/autoscan.log
|
||||||
|
/autoscan-*.log
|
||||||
|
/aclocal.m4
|
||||||
|
/compile
|
||||||
|
/config.h.in
|
||||||
|
/config.guess
|
||||||
|
/config.sub
|
||||||
|
/configure
|
||||||
|
/configure.scan
|
||||||
|
/depcomp
|
||||||
|
/install-sh
|
||||||
|
/missing
|
||||||
|
/stamp-h1
|
||||||
|
|
|
@ -32,7 +32,7 @@ install:
|
||||||
script:
|
script:
|
||||||
- docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${BASENAME} ./travis/check-safe-wrappers.sh
|
- docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${BASENAME} ./travis/check-safe-wrappers.sh
|
||||||
- docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${BASENAME} ./travis/check-formatting.sh
|
- docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${BASENAME} ./travis/check-formatting.sh
|
||||||
- docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 -e CC -e CFLAGS="-Wformat -Wformat-security -Wextra -Wno-unused-parameter -Werror" ${BASENAME} make all mans -j ASAN=1
|
- docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 -e CC ${BASENAME} /bin/sh -c 'autoreconf -fi && mkdir -p build && cd build && (../configure || (cat config.log; false)) && make -j CFLAGS="-Wformat -Wformat-security -Wextra -Wno-unused-parameter -Werror"'
|
||||||
- docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${BASENAME} ./travis/check-spelling.pl
|
- docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${BASENAME} ./travis/check-spelling.pl
|
||||||
- docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 -e CC ${BASENAME} ./travis/run-tests.sh
|
- docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 -e CC ${BASENAME} ./travis/run-tests.sh
|
||||||
- ./travis/skip-pkg.sh || docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${BASENAME} ./travis/debian-build.sh deb/debian-amd64/DIST
|
- ./travis/skip-pkg.sh || docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${BASENAME} ./travis/debian-build.sh deb/debian-amd64/DIST
|
||||||
|
|
70
Makefile
70
Makefile
|
@ -1,70 +0,0 @@
|
||||||
TOPDIR=$(shell pwd)
|
|
||||||
|
|
||||||
include $(TOPDIR)/common.mk
|
|
||||||
|
|
||||||
SUBDIRS:=
|
|
||||||
|
|
||||||
ALL_TARGETS =
|
|
||||||
INSTALL_TARGETS =
|
|
||||||
CLEAN_TARGETS =
|
|
||||||
DISTCLEAN_TARGETS =
|
|
||||||
|
|
||||||
all: real-all
|
|
||||||
|
|
||||||
include libi3/libi3.mk
|
|
||||||
include src/i3.mk
|
|
||||||
include i3-config-wizard/i3-config-wizard.mk
|
|
||||||
include i3-msg/i3-msg.mk
|
|
||||||
include i3-input/i3-input.mk
|
|
||||||
include i3-nagbar/i3-nagbar.mk
|
|
||||||
include i3bar/i3bar.mk
|
|
||||||
include i3-dump-log/i3-dump-log.mk
|
|
||||||
include docs/docs.mk
|
|
||||||
include man/man.mk
|
|
||||||
|
|
||||||
# Update $(TOPDIR)/LAST_VERSION if it differs from $I3_VERSION
|
|
||||||
CACHED_VERSION := '$(shell [ -f $(TOPDIR)/LAST_VERSION ] && cat $(TOPDIR)/LAST_VERSION)'
|
|
||||||
ifneq ($(CACHED_VERSION),$(I3_VERSION))
|
|
||||||
$(shell echo -n ${I3_VERSION} > $(TOPDIR)/LAST_VERSION)
|
|
||||||
endif
|
|
||||||
|
|
||||||
real-all: $(ALL_TARGETS)
|
|
||||||
|
|
||||||
install: $(INSTALL_TARGETS)
|
|
||||||
|
|
||||||
store_git_version:
|
|
||||||
echo -n ${I3_VERSION} > I3_VERSION
|
|
||||||
|
|
||||||
dist: distclean
|
|
||||||
[ ! -d i3-${VERSION} ] || rm -rf i3-${VERSION}
|
|
||||||
[ ! -e i3-${VERSION}.tar.bz2 ] || rm i3-${VERSION}.tar.bz2
|
|
||||||
mkdir i3-${VERSION}
|
|
||||||
cp i3-migrate-config-to-v4 i3-save-tree generate-command-parser.pl i3-sensible-* i3-dmenu-desktop i3.config.keycodes DEPENDS LICENSE PACKAGE-MAINTAINER RELEASE-NOTES-${VERSION} i3.config i3.xsession.desktop i3-with-shmlog.xsession.desktop i3.applications.desktop pseudo-doc.doxygen common.mk Makefile i3-${VERSION}
|
|
||||||
cp -r src libi3 i3-msg i3-nagbar i3-config-wizard i3bar i3-dump-log include man parser-specs testcases i3-${VERSION}
|
|
||||||
# Only copy toplevel documentation (important stuff)
|
|
||||||
mkdir i3-${VERSION}/docs
|
|
||||||
# Pre-generate documentation
|
|
||||||
$(MAKE) docs
|
|
||||||
# Cleanup τεχ output files
|
|
||||||
find docs -regex ".*\.\(aux\|out\|log\|toc\|bm\|dvi\|log\)" -exec rm '{}' \;
|
|
||||||
find docs -maxdepth 1 -type f ! \( -name "*.xcf" -or -name "*.svg" \) -exec cp '{}' i3-${VERSION}/docs \;
|
|
||||||
# Only copy source code from i3-input
|
|
||||||
mkdir i3-${VERSION}/i3-input
|
|
||||||
find i3-input -maxdepth 1 -type f \( -name "*.c" -or -name "*.mk" -or -name "*.h" -or -name "Makefile" \) -exec cp '{}' i3-${VERSION}/i3-input \;
|
|
||||||
cp I3_VERSION i3-${VERSION}/I3_VERSION
|
|
||||||
# Pre-generate a manpage to allow distributors to skip this step and save some dependencies
|
|
||||||
$(MAKE) mans
|
|
||||||
cp man/*.1 i3-${VERSION}/man/
|
|
||||||
tar cfj i3-${VERSION}.tar.bz2 i3-${VERSION}
|
|
||||||
rm -rf i3-${VERSION}
|
|
||||||
|
|
||||||
clean: $(CLEAN_TARGETS)
|
|
||||||
(which lcov >/dev/null 2>&1 && lcov -d . --zerocounters) || true
|
|
||||||
|
|
||||||
distclean: clean $(DISTCLEAN_TARGETS)
|
|
||||||
|
|
||||||
coverage:
|
|
||||||
rm -f /tmp/i3-coverage.info
|
|
||||||
rm -rf /tmp/i3-coverage
|
|
||||||
lcov -d . -b . --capture -o /tmp/i3-coverage.info
|
|
||||||
genhtml -o /tmp/i3-coverage/ /tmp/i3-coverage.info
|
|
|
@ -0,0 +1,563 @@
|
||||||
|
@CODE_COVERAGE_RULES@
|
||||||
|
|
||||||
|
echo-version:
|
||||||
|
@echo "@I3_VERSION@"
|
||||||
|
|
||||||
|
bin_PROGRAMS = \
|
||||||
|
i3 \
|
||||||
|
i3bar/i3bar \
|
||||||
|
i3-config-wizard/i3-config-wizard \
|
||||||
|
i3-dump-log/i3-dump-log \
|
||||||
|
i3-input/i3-input \
|
||||||
|
i3-msg/i3-msg \
|
||||||
|
i3-nagbar/i3-nagbar
|
||||||
|
|
||||||
|
install-exec-hook:
|
||||||
|
$(LN_S) -f i3 $(DESTDIR)$(bindir)/i3-with-shmlog
|
||||||
|
|
||||||
|
uninstall-hook:
|
||||||
|
rm -f $(DESTDIR)$(bindir)/i3-with-shmlog
|
||||||
|
|
||||||
|
i3includedir=$(includedir)/i3
|
||||||
|
i3include_HEADERS = \
|
||||||
|
include/i3/ipc.h
|
||||||
|
|
||||||
|
dist_bin_SCRIPTS = \
|
||||||
|
i3-dmenu-desktop \
|
||||||
|
i3-migrate-config-to-v4 \
|
||||||
|
i3-save-tree \
|
||||||
|
i3-sensible-editor \
|
||||||
|
i3-sensible-pager \
|
||||||
|
i3-sensible-terminal
|
||||||
|
|
||||||
|
i3confdir = $(sysconfdir)/i3
|
||||||
|
dist_i3conf_DATA = \
|
||||||
|
etc/config \
|
||||||
|
etc/config.keycodes
|
||||||
|
|
||||||
|
applicationsdir = $(datarootdir)/applications
|
||||||
|
xsessionsdir = $(datarootdir)/xsessions
|
||||||
|
dist_applications_DATA = \
|
||||||
|
share/applications/i3.desktop
|
||||||
|
dist_xsessions_DATA = \
|
||||||
|
share/xsessions/i3.desktop \
|
||||||
|
share/xsessions/i3-with-shmlog.desktop
|
||||||
|
|
||||||
|
noinst_LIBRARIES = libi3.a
|
||||||
|
|
||||||
|
check_PROGRAMS = test.commands_parser test.config_parser
|
||||||
|
|
||||||
|
check_SCRIPTS = \
|
||||||
|
testcases/complete-run.pl
|
||||||
|
|
||||||
|
clean-check:
|
||||||
|
rm -rf testsuite-* latest i3-cfg-for-* _Inline
|
||||||
|
clean-local: clean-check
|
||||||
|
|
||||||
|
TESTS = testcases/complete-run.pl
|
||||||
|
|
||||||
|
EXTRA_DIST = \
|
||||||
|
$(dist_docs_toc_DATA:.html=) \
|
||||||
|
$(dist_docs_notoc_DATA:.html=) \
|
||||||
|
docs/asciidoc-git.conf \
|
||||||
|
docs/bigpicture.png \
|
||||||
|
docs/i3-pod2html \
|
||||||
|
docs/i3-sync.dia \
|
||||||
|
docs/i3-sync.png \
|
||||||
|
docs/i3-sync-working.dia \
|
||||||
|
docs/i3-sync-working.png \
|
||||||
|
docs/keyboard-layer1.png \
|
||||||
|
docs/keyboard-layer2.png \
|
||||||
|
docs/layout-saving-1.png \
|
||||||
|
docs/logo-30.png \
|
||||||
|
docs/modes.png \
|
||||||
|
docs/refcard.html \
|
||||||
|
docs/refcard_style.css \
|
||||||
|
docs/single_terminal.png \
|
||||||
|
docs/snapping.png \
|
||||||
|
docs/tree-layout1.png \
|
||||||
|
docs/tree-layout2.png \
|
||||||
|
docs/tree-shot1.png \
|
||||||
|
docs/tree-shot2.png \
|
||||||
|
docs/tree-shot3.png \
|
||||||
|
docs/tree-shot4.png \
|
||||||
|
docs/two_columns.png \
|
||||||
|
docs/two_terminals.png \
|
||||||
|
docs/wsbar.dia \
|
||||||
|
docs/wsbar.png \
|
||||||
|
i3bar/LICENSE \
|
||||||
|
libi3/README \
|
||||||
|
$(asciidoc_MANS:.1=.man) \
|
||||||
|
$(asciidoc_MANS:.1=.man) \
|
||||||
|
man/asciidoc.conf.in \
|
||||||
|
DEPENDS \
|
||||||
|
I3_VERSION \
|
||||||
|
LICENSE \
|
||||||
|
PACKAGE-MAINTAINER \
|
||||||
|
RELEASE-NOTES-4.12 \
|
||||||
|
generate-command-parser.pl \
|
||||||
|
parser-specs/commands.spec \
|
||||||
|
parser-specs/config.spec \
|
||||||
|
parser-specs/highlighting.vim \
|
||||||
|
pseudo-doc.doxygen \
|
||||||
|
testcases/complete-run.pl.in \
|
||||||
|
testcases/i3-test.config \
|
||||||
|
testcases/lib/i3test/Test.pm \
|
||||||
|
testcases/lib/i3test/Util.pm \
|
||||||
|
testcases/lib/i3test/XTEST.pm \
|
||||||
|
testcases/lib/i3test.pm.in \
|
||||||
|
testcases/lib/SocketActivation.pm \
|
||||||
|
testcases/lib/StartXServer.pm \
|
||||||
|
testcases/lib/StatusLine.pm \
|
||||||
|
testcases/lib/TestWorker.pm \
|
||||||
|
testcases/Makefile.PL \
|
||||||
|
testcases/new-test \
|
||||||
|
testcases/restart-state.golden \
|
||||||
|
testcases/t \
|
||||||
|
testcases/valgrind.supp
|
||||||
|
|
||||||
|
# dirstamps contains directories which we want to be created in $(top_builddir)
|
||||||
|
# so that our custom rules can store files in them.
|
||||||
|
dirstamp = .dirstamp
|
||||||
|
dirstamps = \
|
||||||
|
docs/$(dirstamp) \
|
||||||
|
man/$(dirstamp) \
|
||||||
|
parser/$(dirstamp)
|
||||||
|
DISTCLEANFILES = $(dirstamps)
|
||||||
|
|
||||||
|
$(dirstamps):
|
||||||
|
@stamp='$@'; $(MKDIR_P) "$${stamp%/*}"
|
||||||
|
@: > $@
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# docs generation
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
docs_tocdir = ${docdir}
|
||||||
|
docs_notocdir = ${docdir}
|
||||||
|
docs_poddir = ${docdir}
|
||||||
|
if BUILD_DOCS
|
||||||
|
dist_docs_toc_DATA = \
|
||||||
|
docs/hacking-howto.html \
|
||||||
|
docs/userguide.html \
|
||||||
|
docs/ipc.html \
|
||||||
|
docs/multi-monitor.html \
|
||||||
|
docs/wsbar.html \
|
||||||
|
docs/testsuite.html \
|
||||||
|
docs/i3bar-protocol.html \
|
||||||
|
docs/layout-saving.html
|
||||||
|
|
||||||
|
dist_docs_notoc_DATA = \
|
||||||
|
docs/debugging.html
|
||||||
|
|
||||||
|
dist_docs_pod_DATA = \
|
||||||
|
docs/lib-i3test.html \
|
||||||
|
docs/lib-i3test-test.html
|
||||||
|
|
||||||
|
$(dist_docs_toc_DATA): docs/%.html: docs/% docs/$(dirstamp)
|
||||||
|
$(AM_V_GEN) @PATH_ASCIIDOC@ -a toc -n -o $@ $<
|
||||||
|
|
||||||
|
$(dist_docs_notoc_DATA): docs/%.html: docs/% docs/$(dirstamp)
|
||||||
|
$(AM_V_GEN) @PATH_ASCIIDOC@ -n -o $@ $<
|
||||||
|
|
||||||
|
docs/lib-i3test.html: testcases/lib/i3test.pm docs/$(dirstamp)
|
||||||
|
$(AM_V_GEN) $(top_srcdir)/docs/i3-pod2html $< $@
|
||||||
|
|
||||||
|
docs/lib-i3test-test.html: testcases/lib/i3test/Test.pm docs/$(dirstamp)
|
||||||
|
$(AM_V_GEN) $(top_srcdir)/docs/i3-pod2html $< $@
|
||||||
|
|
||||||
|
else
|
||||||
|
dist_docs_toc_DATA =
|
||||||
|
dist_docs_notoc_DATA =
|
||||||
|
dist_docs_pod_DATA =
|
||||||
|
endif
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# manpage generation
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
if BUILD_MANS
|
||||||
|
dist_man1_MANS = \
|
||||||
|
$(asciidoc_MANS) \
|
||||||
|
$(pod_MANS)
|
||||||
|
|
||||||
|
asciidoc_MANS = \
|
||||||
|
man/i3.1 \
|
||||||
|
man/i3bar.1 \
|
||||||
|
man/i3-msg.1 \
|
||||||
|
man/i3-input.1 \
|
||||||
|
man/i3-nagbar.1 \
|
||||||
|
man/i3-config-wizard.1 \
|
||||||
|
man/i3-migrate-config-to-v4.1 \
|
||||||
|
man/i3-sensible-editor.1 \
|
||||||
|
man/i3-sensible-pager.1 \
|
||||||
|
man/i3-sensible-terminal.1 \
|
||||||
|
man/i3-dump-log.1
|
||||||
|
|
||||||
|
pod_MANS = \
|
||||||
|
man/i3-dmenu-desktop.1 \
|
||||||
|
man/i3-save-tree.1
|
||||||
|
|
||||||
|
$(asciidoc_MANS): man/%.1: man/%.xml man/$(dirstamp)
|
||||||
|
$(AM_V_GEN) out='$@'; @PATH_XMLTO@ man -o "$${out%/*}" $<
|
||||||
|
@stamp='$@'; $(MKDIR_P) "$${stamp%/*}"
|
||||||
|
|
||||||
|
man/%.xml: man/%.man man/asciidoc.conf man/$(dirstamp)
|
||||||
|
$(AM_V_GEN) @PATH_ASCIIDOC@ -d manpage -b docbook -f $(top_builddir)/man/asciidoc.conf -o $@ $<
|
||||||
|
|
||||||
|
$(pod_MANS): man/%.1: % man/$(dirstamp)
|
||||||
|
$(AM_V_GEN) @PATH_POD2MAN@ --utf8 $< > $@
|
||||||
|
else
|
||||||
|
asciidoc_MANS =
|
||||||
|
endif
|
||||||
|
|
||||||
|
AM_CPPFLAGS = \
|
||||||
|
-I$(top_builddir)/parser \
|
||||||
|
-I$(top_srcdir)/include \
|
||||||
|
@AX_EXTEND_SRCDIR_CPPFLAGS@
|
||||||
|
|
||||||
|
i3_CFLAGS = \
|
||||||
|
$(AM_CFLAGS) \
|
||||||
|
$(libi3_CFLAGS) \
|
||||||
|
$(LIBSN_CFLAGS) \
|
||||||
|
$(XCB_CFLAGS) \
|
||||||
|
$(XCB_UTIL_CURSOR_CFLAGS) \
|
||||||
|
$(XCB_UTIL_KEYSYM_CFLAGS) \
|
||||||
|
$(XCB_UTIL_WM_CFLAGS) \
|
||||||
|
$(XCB_UTIL_XRM_CFLAGS) \
|
||||||
|
$(XKBCOMMON_CFLAGS) \
|
||||||
|
$(YAJL_CFLAGS) \
|
||||||
|
$(LIBPCRE_CFLAGS) \
|
||||||
|
$(PTHREAD_CFLAGS) \
|
||||||
|
$(CODE_COVERAGE_CFLAGS)
|
||||||
|
|
||||||
|
i3_CPPFLAGS = \
|
||||||
|
$(AM_CPPFLAGS) \
|
||||||
|
$(CODE_COVERAGE_CPPFLAGS)
|
||||||
|
|
||||||
|
i3_LDADD = \
|
||||||
|
$(libi3_LIBS) \
|
||||||
|
$(LIBSN_LIBS) \
|
||||||
|
$(XCB_LIBS) \
|
||||||
|
$(XCB_UTIL_CURSOR_LIBS) \
|
||||||
|
$(XCB_UTIL_KEYSYMS_LIBS) \
|
||||||
|
$(XCB_UTIL_WM_LIBS) \
|
||||||
|
$(XCB_UTIL_XRM_LIBS) \
|
||||||
|
$(XKBCOMMON_LIBS) \
|
||||||
|
$(YAJL_LIBS) \
|
||||||
|
$(LIBPCRE_LIBS) \
|
||||||
|
$(PANGOCAIRO_LIBS) \
|
||||||
|
$(PTHREAD_LIBS) \
|
||||||
|
$(CODE_COVERAGE_LDFLAGS)
|
||||||
|
|
||||||
|
libi3_CFLAGS = \
|
||||||
|
$(AM_CFLAGS) \
|
||||||
|
$(XCB_CFLAGS) \
|
||||||
|
$(XCB_UTIL_CFLAGS) \
|
||||||
|
$(XCB_UTIL_XRM_CFLAGS) \
|
||||||
|
$(YAJL_CFLAGS) \
|
||||||
|
$(PANGOCAIRO_CFLAGS)
|
||||||
|
|
||||||
|
libi3_LIBS = \
|
||||||
|
$(top_builddir)/libi3.a \
|
||||||
|
$(XCB_LIBS) \
|
||||||
|
$(XCB_UTIL_LIBS) \
|
||||||
|
$(XCB_UTIL_XRM_LIBS) \
|
||||||
|
$(YAJL_LIBS) \
|
||||||
|
$(PANGOCAIRO_LIBS)
|
||||||
|
|
||||||
|
libi3_a_CFLAGS = \
|
||||||
|
$(libi3_CFLAGS)
|
||||||
|
|
||||||
|
libi3_a_SOURCES = \
|
||||||
|
include/libi3.h \
|
||||||
|
libi3/dpi.c \
|
||||||
|
libi3/draw_util.c \
|
||||||
|
libi3/fake_configure_notify.c \
|
||||||
|
libi3/font.c \
|
||||||
|
libi3/format_placeholders.c \
|
||||||
|
libi3/get_colorpixel.c \
|
||||||
|
libi3/get_config_path.c \
|
||||||
|
libi3/get_exe_path.c \
|
||||||
|
libi3/get_mod_mask.c \
|
||||||
|
libi3/get_process_filename.c \
|
||||||
|
libi3/get_visualtype.c \
|
||||||
|
libi3/ipc_connect.c \
|
||||||
|
libi3/ipc_recv_message.c \
|
||||||
|
libi3/ipc_send_message.c \
|
||||||
|
libi3/is_debug_build.c \
|
||||||
|
libi3/mkdirp.c \
|
||||||
|
libi3/resolve_tilde.c \
|
||||||
|
libi3/root_atom_contents.c \
|
||||||
|
libi3/safewrappers.c \
|
||||||
|
libi3/string.c \
|
||||||
|
libi3/strndup.c \
|
||||||
|
libi3/ucs2_conversion.c
|
||||||
|
|
||||||
|
i3_dump_log_i3_dump_log_CFLAGS = \
|
||||||
|
$(AM_CFLAGS) \
|
||||||
|
$(PTHREAD_CFLAGS) \
|
||||||
|
$(libi3_CFLAGS)
|
||||||
|
|
||||||
|
i3_dump_log_i3_dump_log_LDADD = \
|
||||||
|
$(PTHREAD_LIBS) \
|
||||||
|
$(libi3_LIBS)
|
||||||
|
|
||||||
|
i3_dump_log_i3_dump_log_SOURCES = \
|
||||||
|
i3-dump-log/main.c
|
||||||
|
|
||||||
|
i3_input_i3_input_CFLAGS = \
|
||||||
|
$(AM_CFLAGS) \
|
||||||
|
$(libi3_CFLAGS)
|
||||||
|
|
||||||
|
i3_input_i3_input_LDADD = \
|
||||||
|
$(libi3_LIBS) \
|
||||||
|
$(XCB_UTIL_KEYSYMS_LIBS)
|
||||||
|
|
||||||
|
i3_input_i3_input_SOURCES = \
|
||||||
|
i3-input/i3-input.h \
|
||||||
|
i3-input/keysym2ucs.c \
|
||||||
|
i3-input/keysym2ucs.h \
|
||||||
|
i3-input/main.c
|
||||||
|
|
||||||
|
i3_msg_i3_msg_CFLAGS = \
|
||||||
|
$(AM_CFLAGS) \
|
||||||
|
$(libi3_CFLAGS)
|
||||||
|
|
||||||
|
i3_msg_i3_msg_LDADD = \
|
||||||
|
$(libi3_LIBS)
|
||||||
|
|
||||||
|
i3_msg_i3_msg_SOURCES = \
|
||||||
|
i3-msg/main.c
|
||||||
|
|
||||||
|
i3_nagbar_i3_nagbar_CFLAGS = \
|
||||||
|
$(AM_CFLAGS) \
|
||||||
|
$(libi3_CFLAGS)
|
||||||
|
|
||||||
|
i3_nagbar_i3_nagbar_LDADD = \
|
||||||
|
$(libi3_LIBS) \
|
||||||
|
$(XCB_UTIL_CURSOR_LIBS)
|
||||||
|
|
||||||
|
i3_nagbar_i3_nagbar_SOURCES = \
|
||||||
|
i3-nagbar/atoms.xmacro \
|
||||||
|
i3-nagbar/i3-nagbar.h \
|
||||||
|
i3-nagbar/main.c
|
||||||
|
|
||||||
|
i3bar_i3bar_CPPFLAGS = \
|
||||||
|
$(AM_CPPFLAGS) \
|
||||||
|
-I$(top_srcdir)/i3bar/include
|
||||||
|
|
||||||
|
i3bar_i3bar_CFLAGS = \
|
||||||
|
$(AM_CFLAGS) \
|
||||||
|
$(libi3_CFLAGS) \
|
||||||
|
$(XCB_CFLAGS) \
|
||||||
|
$(XKBCOMMON_CFLAGS) \
|
||||||
|
$(PANGOCAIRO_CFLAGS) \
|
||||||
|
$(YAJL_CFLAGS)
|
||||||
|
|
||||||
|
i3bar_i3bar_LDADD = \
|
||||||
|
$(libi3_LIBS) \
|
||||||
|
$(XCB_LIBS) \
|
||||||
|
$(XCB_UTIL_CURSOR_LIBS) \
|
||||||
|
$(XKBCOMMON_LIBS) \
|
||||||
|
$(PANGOCAIRO_LIBS) \
|
||||||
|
$(YAJL_LIBS)
|
||||||
|
|
||||||
|
i3bar_i3bar_SOURCES = \
|
||||||
|
i3bar/include/child.h \
|
||||||
|
i3bar/include/common.h \
|
||||||
|
i3bar/include/configuration.h \
|
||||||
|
i3bar/include/ipc.h \
|
||||||
|
i3bar/include/mode.h \
|
||||||
|
i3bar/include/outputs.h \
|
||||||
|
i3bar/include/parse_json_header.h \
|
||||||
|
i3bar/include/trayclients.h \
|
||||||
|
i3bar/include/util.h \
|
||||||
|
i3bar/include/workspaces.h \
|
||||||
|
i3bar/include/xcb_atoms.def \
|
||||||
|
i3bar/include/xcb.h \
|
||||||
|
i3bar/src/child.c \
|
||||||
|
i3bar/src/config.c \
|
||||||
|
i3bar/src/ipc.c \
|
||||||
|
i3bar/src/main.c \
|
||||||
|
i3bar/src/mode.c \
|
||||||
|
i3bar/src/outputs.c \
|
||||||
|
i3bar/src/parse_json_header.c \
|
||||||
|
i3bar/src/workspaces.c \
|
||||||
|
i3bar/src/xcb.c
|
||||||
|
|
||||||
|
i3_config_wizard_i3_config_wizard_CFLAGS = \
|
||||||
|
$(AM_CFLAGS) \
|
||||||
|
$(libi3_CFLAGS) \
|
||||||
|
$(XKBCOMMON_CFLAGS)
|
||||||
|
|
||||||
|
i3_config_wizard_i3_config_wizard_LDADD = \
|
||||||
|
$(libi3_LIBS) \
|
||||||
|
$(XCB_UTIL_KEYSYMS_LIBS) \
|
||||||
|
$(XKBCOMMON_LIBS)
|
||||||
|
|
||||||
|
i3_config_wizard_i3_config_wizard_SOURCES = \
|
||||||
|
i3-config-wizard/atoms.xmacro \
|
||||||
|
i3-config-wizard/main.c \
|
||||||
|
i3-config-wizard/xcb.h
|
||||||
|
|
||||||
|
test_commands_parser_CPPFLAGS = \
|
||||||
|
$(AM_CPPFLAGS) \
|
||||||
|
-DTEST_PARSER
|
||||||
|
|
||||||
|
test_commands_parser_CFLAGS = \
|
||||||
|
$(AM_CFLAGS) \
|
||||||
|
$(i3_CFLAGS)
|
||||||
|
|
||||||
|
test_commands_parser_SOURCES = \
|
||||||
|
src/commands_parser.c
|
||||||
|
|
||||||
|
test_commands_parser_LDADD = \
|
||||||
|
$(i3_LDADD)
|
||||||
|
|
||||||
|
test_config_parser_CPPFLAGS = \
|
||||||
|
$(AM_CPPFLAGS) \
|
||||||
|
-DTEST_PARSER
|
||||||
|
|
||||||
|
test_config_parser_CFLAGS = \
|
||||||
|
$(AM_CFLAGS) \
|
||||||
|
$(i3_CFLAGS)
|
||||||
|
|
||||||
|
test_config_parser_SOURCES = \
|
||||||
|
src/config_parser.c
|
||||||
|
|
||||||
|
test_config_parser_LDADD = \
|
||||||
|
$(i3_LDADD)
|
||||||
|
|
||||||
|
command_parser_SOURCES = \
|
||||||
|
parser/GENERATED_command_enums.h \
|
||||||
|
parser/GENERATED_command_tokens.h \
|
||||||
|
parser/GENERATED_command_call.h
|
||||||
|
|
||||||
|
config_parser_SOURCES = \
|
||||||
|
parser/GENERATED_config_enums.h \
|
||||||
|
parser/GENERATED_config_tokens.h \
|
||||||
|
parser/GENERATED_config_call.h
|
||||||
|
|
||||||
|
i3_SOURCES = \
|
||||||
|
$(command_parser_SOURCES) \
|
||||||
|
$(config_parser_SOURCES) \
|
||||||
|
include/all.h \
|
||||||
|
include/assignments.h \
|
||||||
|
include/atoms_NET_SUPPORTED.xmacro \
|
||||||
|
include/atoms_rest.xmacro \
|
||||||
|
include/atoms.xmacro \
|
||||||
|
include/bindings.h \
|
||||||
|
include/click.h \
|
||||||
|
include/cmdparse.h \
|
||||||
|
include/commands.h \
|
||||||
|
include/commands_parser.h \
|
||||||
|
include/config_directives.h \
|
||||||
|
include/configuration.h \
|
||||||
|
include/config_parser.h \
|
||||||
|
include/con.h \
|
||||||
|
include/data.h \
|
||||||
|
include/debug.h \
|
||||||
|
include/display_version.h \
|
||||||
|
include/ewmh.h \
|
||||||
|
include/fake_outputs.h \
|
||||||
|
include/floating.h \
|
||||||
|
include/handlers.h \
|
||||||
|
include/i3.h \
|
||||||
|
include/ipc.h \
|
||||||
|
include/key_press.h \
|
||||||
|
include/load_layout.h \
|
||||||
|
include/log.h \
|
||||||
|
include/main.h \
|
||||||
|
include/manage.h \
|
||||||
|
include/match.h \
|
||||||
|
include/move.h \
|
||||||
|
include/output.h \
|
||||||
|
include/queue.h \
|
||||||
|
include/randr.h \
|
||||||
|
include/regex.h \
|
||||||
|
include/render.h \
|
||||||
|
include/resize.h \
|
||||||
|
include/restore_layout.h \
|
||||||
|
include/scratchpad.h \
|
||||||
|
include/sd-daemon.h \
|
||||||
|
include/shmlog.h \
|
||||||
|
include/sighandler.h \
|
||||||
|
include/startup.h \
|
||||||
|
include/tree.h \
|
||||||
|
include/util.h \
|
||||||
|
include/window.h \
|
||||||
|
include/workspace.h \
|
||||||
|
include/xcb.h \
|
||||||
|
include/xcursor.h \
|
||||||
|
include/x.h \
|
||||||
|
include/xinerama.h \
|
||||||
|
include/yajl_utils.h \
|
||||||
|
src/assignments.c \
|
||||||
|
src/bindings.c \
|
||||||
|
src/click.c \
|
||||||
|
src/commands.c \
|
||||||
|
src/commands_parser.c \
|
||||||
|
src/con.c \
|
||||||
|
src/config.c \
|
||||||
|
src/config_directives.c \
|
||||||
|
src/config_parser.c \
|
||||||
|
src/debug.c \
|
||||||
|
src/display_version.c \
|
||||||
|
src/ewmh.c \
|
||||||
|
src/fake_outputs.c \
|
||||||
|
src/floating.c \
|
||||||
|
src/handlers.c \
|
||||||
|
src/ipc.c \
|
||||||
|
src/key_press.c \
|
||||||
|
src/load_layout.c \
|
||||||
|
src/log.c \
|
||||||
|
src/main.c \
|
||||||
|
src/manage.c \
|
||||||
|
src/match.c \
|
||||||
|
src/move.c \
|
||||||
|
src/output.c \
|
||||||
|
src/randr.c \
|
||||||
|
src/regex.c \
|
||||||
|
src/render.c \
|
||||||
|
src/resize.c \
|
||||||
|
src/restore_layout.c \
|
||||||
|
src/scratchpad.c \
|
||||||
|
src/sd-daemon.c \
|
||||||
|
src/sighandler.c \
|
||||||
|
src/startup.c \
|
||||||
|
src/tree.c \
|
||||||
|
src/util.c \
|
||||||
|
src/version.c \
|
||||||
|
src/window.c \
|
||||||
|
src/workspace.c \
|
||||||
|
src/x.c \
|
||||||
|
src/xcb.c \
|
||||||
|
src/xcursor.c \
|
||||||
|
src/xinerama.c
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# parser generation
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
$(command_parser_SOURCES): %.h: i3-command-parser.stamp
|
||||||
|
|
||||||
|
$(config_parser_SOURCES): %.h: i3-config-parser.stamp
|
||||||
|
|
||||||
|
src/i3-commands_parser.$(OBJEXT): i3-command-parser.stamp
|
||||||
|
|
||||||
|
src/i3-config_parser.$(OBJEXT): i3-config-parser.stamp
|
||||||
|
|
||||||
|
i3-command-parser.stamp: parser/$(dirstamp) generate-command-parser.pl parser-specs/commands.spec
|
||||||
|
$(AM_V_GEN) $(top_srcdir)/generate-command-parser.pl --input=$(top_srcdir)/parser-specs/commands.spec --prefix=command
|
||||||
|
$(AM_V_at) mv GENERATED_command_* $(top_builddir)/parser
|
||||||
|
$(AM_V_at) touch $@
|
||||||
|
|
||||||
|
i3-config-parser.stamp: parser/$(dirstamp) generate-command-parser.pl parser-specs/config.spec
|
||||||
|
$(AM_V_GEN) $(top_srcdir)/generate-command-parser.pl --input=$(top_srcdir)/parser-specs/config.spec --prefix=config
|
||||||
|
$(AM_V_at) mv GENERATED_config_* $(top_builddir)/parser
|
||||||
|
$(AM_V_at) touch $@
|
||||||
|
|
||||||
|
CLEANFILES = \
|
||||||
|
i3-command-parser.stamp \
|
||||||
|
i3-config-parser.stamp
|
|
@ -23,14 +23,10 @@ x-terminal-emulator symlink in Debian, please use it in i3-sensible-terminal.
|
||||||
|
|
||||||
On debian, compilation and installing the manpages looks like this:
|
On debian, compilation and installing the manpages looks like this:
|
||||||
|
|
||||||
# Compilation
|
autoreconf -fi
|
||||||
$(MAKE)
|
mkdir -p build && cd build
|
||||||
$(MAKE) -C man
|
../configure
|
||||||
|
make -j8 install
|
||||||
# Installation
|
|
||||||
$(MAKE) DESTDIR=$(CURDIR)/debian/i3-wm/ install
|
|
||||||
mkdir -p $(CURDIR)/debian/i3-wm/usr/share/man/man1
|
|
||||||
cp man/*.1 $(CURDIR)/debian/i3-wm/usr/share/man/man1
|
|
||||||
|
|
||||||
Please make sure that i3-migrate-config-to-v4 and i3-config-wizard are
|
Please make sure that i3-migrate-config-to-v4 and i3-config-wizard are
|
||||||
installed with i3. The Perl script is necessary to (automatically) convert v3
|
installed with i3. The Perl script is necessary to (automatically) convert v3
|
||||||
|
|
218
common.mk
218
common.mk
|
@ -1,218 +0,0 @@
|
||||||
UNAME=$(shell uname)
|
|
||||||
DEBUG=1
|
|
||||||
ASAN=0
|
|
||||||
INSTALL=install
|
|
||||||
LN=ln
|
|
||||||
PKG_CONFIG=pkg-config
|
|
||||||
ifndef PREFIX
|
|
||||||
PREFIX=/usr
|
|
||||||
endif
|
|
||||||
ifndef EXEC_PREFIX
|
|
||||||
EXEC_PREFIX=$(PREFIX)
|
|
||||||
endif
|
|
||||||
ifndef SYSCONFDIR
|
|
||||||
ifeq ($(PREFIX),/usr)
|
|
||||||
SYSCONFDIR=/etc
|
|
||||||
else
|
|
||||||
SYSCONFDIR=$(PREFIX)/etc
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
# In dist and snapshot tarballs, use the I3_VERSION and VERSION files. Otherwise use git information.
|
|
||||||
ifeq ($(wildcard .git),)
|
|
||||||
# not in git repository
|
|
||||||
VERSION := $(shell [ -f $(TOPDIR)/I3_VERSION ] && cat $(TOPDIR)/I3_VERSION | cut -d '-' -f 1)
|
|
||||||
I3_VERSION := '$(shell [ -f $(TOPDIR)/I3_VERSION ] && cat $(TOPDIR)/I3_VERSION)'
|
|
||||||
else
|
|
||||||
VERSION := $(shell git describe --tags --abbrev=0)
|
|
||||||
I3_VERSION := '$(shell git describe --tags --always) ($(shell git log --pretty=format:%cd --date=short -n1), branch \"$(shell git describe --tags --always --all | sed s:heads/::)\")'
|
|
||||||
endif
|
|
||||||
|
|
||||||
MAJOR_VERSION := $(shell echo ${VERSION} | cut -d '.' -f 1)
|
|
||||||
MINOR_VERSION := $(shell echo ${VERSION} | cut -d '.' -f 2)
|
|
||||||
PATCH_VERSION := $(shell echo ${VERSION} | cut -d '.' -f 3)
|
|
||||||
ifeq (${PATCH_VERSION},)
|
|
||||||
PATCH_VERSION := 0
|
|
||||||
endif
|
|
||||||
|
|
||||||
## Generic flags
|
|
||||||
|
|
||||||
# Default CFLAGS that users should be able to override
|
|
||||||
ifeq ($(DEBUG),1)
|
|
||||||
# Extended debugging flags, macros shall be available in gcc
|
|
||||||
CFLAGS ?= -pipe -gdwarf-2 -g3
|
|
||||||
else
|
|
||||||
CFLAGS ?= -pipe -O2 -freorder-blocks-and-partition
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(ASAN),1)
|
|
||||||
CFLAGS += -fsanitize=address -DI3_ASAN_ENABLED
|
|
||||||
LDFLAGS += -fsanitize=address
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Default LDFLAGS that users should be able to override
|
|
||||||
LDFLAGS ?= $(as_needed_LDFLAG)
|
|
||||||
|
|
||||||
# Common CFLAGS for all i3 related binaries
|
|
||||||
I3_CFLAGS = -std=c99
|
|
||||||
I3_CFLAGS += -Wall
|
|
||||||
# unused-function, unused-label, unused-variable are turned on by -Wall
|
|
||||||
# We don’t want unused-parameter because of the use of many callbacks
|
|
||||||
I3_CFLAGS += -Wunused-value
|
|
||||||
I3_CFLAGS += -Iinclude
|
|
||||||
|
|
||||||
I3_CPPFLAGS = -DI3_VERSION=\"${I3_VERSION}\"
|
|
||||||
I3_CPPFLAGS += -DMAJOR_VERSION=${MAJOR_VERSION}
|
|
||||||
I3_CPPFLAGS += -DMINOR_VERSION=${MINOR_VERSION}
|
|
||||||
I3_CPPFLAGS += -DPATCH_VERSION=${PATCH_VERSION}
|
|
||||||
I3_CPPFLAGS += -DSYSCONFDIR=\"${SYSCONFDIR}\"
|
|
||||||
I3_CPPFLAGS += -DI3__FILE__=__FILE__
|
|
||||||
|
|
||||||
|
|
||||||
## Libraries flags
|
|
||||||
|
|
||||||
ifeq ($(shell which $(PKG_CONFIG) 2>/dev/null 1>/dev/null || echo 1),1)
|
|
||||||
$(error "pkg-config was not found")
|
|
||||||
endif
|
|
||||||
|
|
||||||
# An easier way to get CFLAGS and LDFLAGS falling back in case there's
|
|
||||||
# no pkg-config support for certain libraries.
|
|
||||||
#
|
|
||||||
# NOTE that you must not use a blank after comma when calling this:
|
|
||||||
# $(call ldflags_for_lib name, fallback) # bad
|
|
||||||
# $(call ldflags_for_lib name,fallback) # good
|
|
||||||
# Otherwise, the compiler will get -l foo instead of -lfoo
|
|
||||||
#
|
|
||||||
# We redirect stderr to /dev/null because pkg-config prints an error if support
|
|
||||||
# for gnome-config was enabled but gnome-config is not actually installed.
|
|
||||||
cflags_for_lib = $(shell $(PKG_CONFIG) --silence-errors --cflags $(1) 2>/dev/null)
|
|
||||||
ldflags_for_lib = $(shell $(PKG_CONFIG) --exists 2>/dev/null $(1) && $(PKG_CONFIG) --libs $(1) 2>/dev/null || echo -l$(2))
|
|
||||||
|
|
||||||
# XCB common stuff
|
|
||||||
XCB_CFLAGS := $(call cflags_for_lib, xcb)
|
|
||||||
XCB_CFLAGS += $(call cflags_for_lib, xcb-event)
|
|
||||||
XCB_LIBS := $(call ldflags_for_lib, xcb,xcb)
|
|
||||||
XCB_LIBS += $(call ldflags_for_lib, xcb-event,xcb-event)
|
|
||||||
XCB_CFLAGS += $(call cflags_for_lib, xcb-util)
|
|
||||||
XCB_LIBS += $(call ldflags_for_lib, xcb-util)
|
|
||||||
ifneq ($(shell $(PKG_CONFIG) --atleast-version=0.3.8 xcb-util 2>/dev/null && echo 1),1)
|
|
||||||
$(error "xcb-util >= 0.3.8 not found")
|
|
||||||
endif
|
|
||||||
XCB_XKB_LIBS := $(call ldflags_for_lib, xcb-xkb,xcb-xkb)
|
|
||||||
|
|
||||||
# XCB keyboard stuff
|
|
||||||
XCB_KBD_CFLAGS := $(call cflags_for_lib, xcb-keysyms)
|
|
||||||
XCB_KBD_LIBS := $(call ldflags_for_lib, xcb-keysyms,xcb-keysyms)
|
|
||||||
|
|
||||||
# XCB WM stuff
|
|
||||||
XCB_WM_CFLAGS := $(call cflags_for_lib, xcb-icccm)
|
|
||||||
XCB_WM_CFLAGS += $(call cflags_for_lib, xcb-xinerama)
|
|
||||||
XCB_WM_CFLAGS += $(call cflags_for_lib, xcb-randr)
|
|
||||||
XCB_WM_LIBS := $(call ldflags_for_lib, xcb-icccm,xcb-icccm)
|
|
||||||
XCB_WM_LIBS += $(call ldflags_for_lib, xcb-xinerama,xcb-xinerama)
|
|
||||||
XCB_WM_LIBS += $(call ldflags_for_lib, xcb-randr,xcb-randr)
|
|
||||||
|
|
||||||
# XCB cursor
|
|
||||||
XCB_CURSOR_CFLAGS := $(call cflags_for_lib, xcb-cursor)
|
|
||||||
XCB_CURSOR_LIBS := $(call ldflags_for_lib, xcb-cursor,xcb-cursor)
|
|
||||||
|
|
||||||
XKB_COMMON_CFLAGS := $(call cflags_for_lib, xkbcommon,xkbcommon)
|
|
||||||
XKB_COMMON_LIBS := $(call ldflags_for_lib, xkbcommon,xkbcommon)
|
|
||||||
XKB_COMMON_X11_CFLAGS := $(call cflags_for_lib, xkbcommon-x11,xkbcommon-x11)
|
|
||||||
XKB_COMMON_X11_LIBS := $(call ldflags_for_lib, xkbcommon-x11,xkbcommon-x11)
|
|
||||||
|
|
||||||
# XCB xrm
|
|
||||||
XCB_XRM_CFLAGS := $(call cflags_for_lib, xcb-xrm)
|
|
||||||
XCB_XRM_LIBS := $(call ldflags_for_lib, xcb-xrm,xcb-xrm)
|
|
||||||
|
|
||||||
# yajl
|
|
||||||
YAJL_CFLAGS := $(call cflags_for_lib, yajl)
|
|
||||||
YAJL_LIBS := $(call ldflags_for_lib, yajl,yajl)
|
|
||||||
|
|
||||||
#libev
|
|
||||||
LIBEV_CFLAGS := $(call cflags_for_lib, libev)
|
|
||||||
LIBEV_LIBS := $(call ldflags_for_lib, libev,ev)
|
|
||||||
|
|
||||||
# libpcre
|
|
||||||
PCRE_CFLAGS := $(call cflags_for_lib, libpcre)
|
|
||||||
ifneq ($(shell $(PKG_CONFIG) --atleast-version=8.10 libpcre 2>/dev/null && echo 1),1)
|
|
||||||
$(error "libpcre >= 8.10 not found")
|
|
||||||
endif
|
|
||||||
PCRE_LIBS := $(call ldflags_for_lib, libpcre,pcre)
|
|
||||||
|
|
||||||
# startup-notification
|
|
||||||
LIBSN_CFLAGS := $(call cflags_for_lib, libstartup-notification-1.0)
|
|
||||||
LIBSN_LIBS := $(call ldflags_for_lib, libstartup-notification-1.0,startup-notification-1)
|
|
||||||
|
|
||||||
# Pango
|
|
||||||
PANGO_CFLAGS := $(call cflags_for_lib, cairo)
|
|
||||||
PANGO_CFLAGS += $(call cflags_for_lib, pangocairo)
|
|
||||||
ifneq ($(shell $(PKG_CONFIG) --atleast-version=1.14.4 cairo 2>/dev/null && echo 1),1)
|
|
||||||
$(error "cairo >= 1.14.4 missing")
|
|
||||||
endif
|
|
||||||
PANGO_LIBS := $(call ldflags_for_lib, cairo)
|
|
||||||
PANGO_LIBS += $(call ldflags_for_lib, pangocairo)
|
|
||||||
|
|
||||||
# libi3
|
|
||||||
LIBS = -L$(TOPDIR) -li3 -lm
|
|
||||||
|
|
||||||
## Platform-specific flags
|
|
||||||
|
|
||||||
# Please test if -Wl,--as-needed works on your platform and send me a patch.
|
|
||||||
# it is known not to work on Darwin (Mac OS X)
|
|
||||||
ifneq (,$(filter Linux GNU GNU/%, $(UNAME)))
|
|
||||||
as_needed_LDFLAG = -Wl,--as-needed
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(UNAME),NetBSD)
|
|
||||||
# We need -idirafter instead of -I to prefer the system’s iconv over GNU libiconv
|
|
||||||
I3_CFLAGS += -idirafter /usr/pkg/include
|
|
||||||
I3_LDFLAGS += -Wl,-rpath,/usr/local/lib -Wl,-rpath,/usr/pkg/lib
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(UNAME),OpenBSD)
|
|
||||||
I3_CFLAGS += -I${X11BASE}/include
|
|
||||||
LIBS += -liconv
|
|
||||||
I3_LDFLAGS += -L${X11BASE}/lib
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(UNAME),FreeBSD)
|
|
||||||
LIBS += -liconv
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(UNAME),Darwin)
|
|
||||||
LIBS += -liconv
|
|
||||||
else ifneq ($(UNAME),OpenBSD)
|
|
||||||
# Darwin (Mac OS X) and OpenBSD do not have librt
|
|
||||||
LIBS += -lrt
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(UNAME),SunOS)
|
|
||||||
LIBS += -lsocket -liconv -lgen
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq (,$(filter Linux GNU GNU/%, $(UNAME)))
|
|
||||||
I3_CPPFLAGS += -D_GNU_SOURCE
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(COVERAGE),1)
|
|
||||||
I3_CFLAGS += -fprofile-arcs -ftest-coverage
|
|
||||||
LIBS += -lgcov
|
|
||||||
endif
|
|
||||||
|
|
||||||
V ?= 0
|
|
||||||
ifeq ($(V),0)
|
|
||||||
# Don’t print command lines which are run
|
|
||||||
.SILENT:
|
|
||||||
|
|
||||||
# echo-ing vars
|
|
||||||
V_ASCIIDOC = echo ASCIIDOC $@;
|
|
||||||
V_POD2HTML = echo POD2HTML $@;
|
|
||||||
V_POD2MAN = echo POD2MAN $@;
|
|
||||||
V_A2X = echo A2X $@;
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Always remake the following targets
|
|
||||||
.PHONY: install clean dist distclean
|
|
||||||
|
|
|
@ -0,0 +1,165 @@
|
||||||
|
# -*- Autoconf -*-
|
||||||
|
# Run autoreconf -fi to generate a configure script from this file.
|
||||||
|
|
||||||
|
AC_PREREQ([2.69])
|
||||||
|
AC_INIT([i3], [4.12], [https://github.com/i3/i3/issues])
|
||||||
|
# For AX_EXTEND_SRCDIR
|
||||||
|
AX_ENABLE_BUILDDIR
|
||||||
|
AM_INIT_AUTOMAKE([foreign subdir-objects -Wall no-dist-gzip dist-bzip2])
|
||||||
|
# Default to silent rules, use V=1 to get verbose compilation output.
|
||||||
|
AM_SILENT_RULES([yes])
|
||||||
|
# Make it possible to disable maintainer mode to disable re-generation of build
|
||||||
|
# system files.
|
||||||
|
AM_MAINTAINER_MODE([enable])
|
||||||
|
AC_CONFIG_SRCDIR([libi3/ipc_recv_message.c])
|
||||||
|
AC_CONFIG_HEADERS([config.h])
|
||||||
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
|
|
||||||
|
# Verify we are using GNU make because we use '%'-style pattern rules in
|
||||||
|
# Makefile.am, which are a GNU make extension. Pull requests to replace
|
||||||
|
# '%'-style pattern rules with a more portable alternative are welcome.
|
||||||
|
AX_CHECK_GNU_MAKE
|
||||||
|
AS_VAR_IF([_cv_gnu_make_command], [""], [AC_MSG_ERROR([the i3 Makefile.am requires GNU make])])
|
||||||
|
|
||||||
|
AX_EXTEND_SRCDIR
|
||||||
|
|
||||||
|
AS_IF([test -d ${srcdir}/.git],
|
||||||
|
[
|
||||||
|
VERSION="$(git describe --tags --abbrev=0)"
|
||||||
|
I3_VERSION="$(git describe --tags --always) ($(git log --pretty=format:%cd --date=short -n1), branch \\\"$(git describe --tags --always --all | sed s:heads/::)\\\")"
|
||||||
|
# Mirrors what libi3/is_debug_build.c does:
|
||||||
|
is_release=$(test $(echo "${I3_VERSION}" | cut -d '(' -f 1 | wc -m) -lt 10 && echo yes || echo no)
|
||||||
|
],
|
||||||
|
[
|
||||||
|
VERSION="$(cut -d '-' -f 1 ${srcdir}/I3_VERSION | cut -d ' ' -f 1)"
|
||||||
|
I3_VERSION="$(cat ${srcdir}/I3_VERSION)"
|
||||||
|
is_release="$(grep -q non-git ${srcdir}/I3_VERSION && echo no || echo yes)"
|
||||||
|
])
|
||||||
|
AC_SUBST([I3_VERSION], [$I3_VERSION])
|
||||||
|
MAJOR_VERSION="$(echo ${VERSION} | cut -d '.' -f 1)"
|
||||||
|
MINOR_VERSION="$(echo ${VERSION} | cut -d '.' -f 2)"
|
||||||
|
PATCH_VERSION="$(echo ${VERSION} | cut -d '.' -f 3)"
|
||||||
|
AS_IF([test "x${PATCH_VERSION}" = x], [PATCH_VERSION=0])
|
||||||
|
AC_DEFINE_UNQUOTED([I3_VERSION], ["${I3_VERSION}"], [i3 version])
|
||||||
|
AC_DEFINE_UNQUOTED([MAJOR_VERSION], [${MAJOR_VERSION}], [i3 major version])
|
||||||
|
AC_DEFINE_UNQUOTED([MINOR_VERSION], [${MINOR_VERSION}], [i3 minor version])
|
||||||
|
AC_DEFINE_UNQUOTED([PATCH_VERSION], [${PATCH_VERSION}], [i3 patch version])
|
||||||
|
|
||||||
|
AX_CODE_COVERAGE
|
||||||
|
|
||||||
|
dnl is_release must be lowercase because AX_CHECK_ENABLE_DEBUG calls m4_tolower
|
||||||
|
dnl on its fourth argument.
|
||||||
|
AX_CHECK_ENABLE_DEBUG([yes], , [UNUSED_NDEBUG], [$is_release])
|
||||||
|
|
||||||
|
AC_PROG_CC_C99
|
||||||
|
|
||||||
|
AC_DEFINE_UNQUOTED(SYSCONFDIR, "`eval echo $sysconfdir`", [Location of system configuration files])
|
||||||
|
|
||||||
|
# For strnlen() and vasprintf().
|
||||||
|
AC_USE_SYSTEM_EXTENSIONS
|
||||||
|
|
||||||
|
# Checks for typedefs, structures, and compiler characteristics.
|
||||||
|
AC_CHECK_HEADER_STDBOOL
|
||||||
|
dnl The error message should include the specific type which could not be
|
||||||
|
dnl found, but I do not see a way to achieve that.
|
||||||
|
AC_CHECK_TYPES([mode_t, off_t, pid_t, size_t, ssize_t], , [AC_MSG_FAILURE([cannot find required type])])
|
||||||
|
|
||||||
|
# Checks for library functions.
|
||||||
|
AC_FUNC_FORK
|
||||||
|
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
|
||||||
|
AC_FUNC_STRNLEN
|
||||||
|
AC_CHECK_FUNCS([atexit dup2 ftruncate getcwd gettimeofday localtime_r memchr memset mkdir rmdir setlocale socket strcasecmp strchr strdup strerror strncasecmp strndup strrchr strspn strstr strtol strtoul], , [AC_MSG_FAILURE([cannot find the $ac_func function, which i3 requires])])
|
||||||
|
|
||||||
|
# Checks for libraries.
|
||||||
|
|
||||||
|
AC_SEARCH_LIBS([floor], [m], , [AC_MSG_FAILURE([cannot find the required floor() function despite trying to link with -lm])])
|
||||||
|
|
||||||
|
# libev does not ship with a pkg-config file :(.
|
||||||
|
AC_SEARCH_LIBS([ev_run], [ev], , [AC_MSG_FAILURE([cannot find the required ev_run() function despite trying to link with -lev])])
|
||||||
|
|
||||||
|
AC_SEARCH_LIBS([shm_open], [rt])
|
||||||
|
|
||||||
|
AX_PTHREAD
|
||||||
|
|
||||||
|
dnl Each prefix corresponds to a source tarball which users might have
|
||||||
|
dnl downloaded in a newer version and would like to overwrite.
|
||||||
|
PKG_CHECK_MODULES([LIBSN], [libstartup-notification-1.0])
|
||||||
|
PKG_CHECK_MODULES([XCB], [xcb xcb-xkb xcb-xinerama xcb-randr])
|
||||||
|
PKG_CHECK_MODULES([XCB_UTIL], [xcb-event xcb-util])
|
||||||
|
PKG_CHECK_MODULES([XCB_UTIL_CURSOR], [xcb-cursor])
|
||||||
|
PKG_CHECK_MODULES([XCB_UTIL_KEYSYMS], [xcb-keysyms])
|
||||||
|
PKG_CHECK_MODULES([XCB_UTIL_WM], [xcb-icccm])
|
||||||
|
PKG_CHECK_MODULES([XCB_UTIL_XRM], [xcb-xrm])
|
||||||
|
PKG_CHECK_MODULES([XKBCOMMON], [xkbcommon xkbcommon-x11])
|
||||||
|
PKG_CHECK_MODULES([YAJL], [yajl])
|
||||||
|
PKG_CHECK_MODULES([LIBPCRE], [libpcre >= 8.10])
|
||||||
|
PKG_CHECK_MODULES([PANGOCAIRO], [cairo >= 1.14.4 pangocairo])
|
||||||
|
|
||||||
|
# Checks for programs.
|
||||||
|
AC_PROG_AWK
|
||||||
|
AC_PROG_CPP
|
||||||
|
AC_PROG_INSTALL
|
||||||
|
AC_PROG_MAKE_SET
|
||||||
|
AC_PROG_RANLIB
|
||||||
|
AC_PROG_LN_S
|
||||||
|
|
||||||
|
AC_PATH_PROG([PATH_ASCIIDOC], [asciidoc])
|
||||||
|
AC_PATH_PROG([PATH_XMLTO], [xmlto])
|
||||||
|
AC_PATH_PROG([PATH_POD2MAN], [pod2man])
|
||||||
|
|
||||||
|
AM_CONDITIONAL([BUILD_MANS], [test x$PATH_ASCIIDOC != x && test x$PATH_XMLTO != x && test x$PATH_POD2MAN != x])
|
||||||
|
AM_CONDITIONAL([BUILD_DOCS], [test x$PATH_ASCIIDOC != x])
|
||||||
|
|
||||||
|
AM_PROG_AR
|
||||||
|
|
||||||
|
AX_FLAGS_WARN_ALL
|
||||||
|
AX_CHECK_COMPILE_FLAG([-Wunused-value], [AX_APPEND_FLAG([-Wunused-value], [AM_CFLAGS])])
|
||||||
|
AC_SUBST(AM_CFLAGS)
|
||||||
|
|
||||||
|
# Checks for header files.
|
||||||
|
AC_CHECK_HEADERS([fcntl.h float.h inttypes.h limits.h locale.h netinet/in.h paths.h stddef.h stdint.h stdlib.h string.h sys/param.h sys/socket.h sys/time.h unistd.h], , [AC_MSG_FAILURE([cannot find the $ac_header header, which i3 requires])])
|
||||||
|
|
||||||
|
AC_CONFIG_FILES([Makefile testcases/lib/i3test.pm man/asciidoc.conf])
|
||||||
|
AC_CONFIG_FILES([testcases/complete-run.pl], [chmod +x testcases/complete-run.pl])
|
||||||
|
|
||||||
|
# Enable address sanitizer for non-release builds. The performance hit is a
|
||||||
|
# 50% increase of wallclock time for the testsuite on my machine.
|
||||||
|
if test x$is_release = xyes; then
|
||||||
|
default_sanitizers=
|
||||||
|
else
|
||||||
|
default_sanitizers=address
|
||||||
|
fi
|
||||||
|
AX_SANITIZERS(, [$default_sanitizers], [AC_DEFINE([I3_ASAN_ENABLED], [], [Enable ASAN])])
|
||||||
|
|
||||||
|
AC_OUTPUT
|
||||||
|
|
||||||
|
if test -z "${BUILD_DOCS_TRUE}"; then
|
||||||
|
print_BUILD_DOCS=yes
|
||||||
|
else
|
||||||
|
print_BUILD_DOCS=no
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if test -z "${BUILD_MANS_TRUE}"; then
|
||||||
|
print_BUILD_MANS=yes
|
||||||
|
else
|
||||||
|
print_BUILD_MANS=no
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo \
|
||||||
|
"--------------------------------------------------------------------------------
|
||||||
|
build configured:
|
||||||
|
|
||||||
|
AS_HELP_STRING([i3 version:], [`echo ${I3_VERSION} | sed 's,\\\\,,g'`])
|
||||||
|
AS_HELP_STRING([is release version:], [${is_release}])
|
||||||
|
|
||||||
|
AS_HELP_STRING([build manpages:], [${print_BUILD_MANS}])
|
||||||
|
AS_HELP_STRING([build docs:], [${print_BUILD_DOCS}])
|
||||||
|
AS_HELP_STRING([enable debug flags:], [${ax_enable_debug}])
|
||||||
|
AS_HELP_STRING([code coverage:], [${CODE_COVERAGE_ENABLED}])
|
||||||
|
AS_HELP_STRING([enabled sanitizers:], [${ax_enabled_sanitizers}])
|
||||||
|
|
||||||
|
To compile, run:
|
||||||
|
|
||||||
|
cd `pwd` && make -j8
|
||||||
|
--------------------------------------------------------------------------------"
|
|
@ -4,14 +4,14 @@
|
||||||
export V:=1
|
export V:=1
|
||||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||||
|
|
||||||
override_dh_auto_build:
|
|
||||||
dh_auto_build -- all docs mans
|
|
||||||
|
|
||||||
override_dh_installchangelogs:
|
override_dh_installchangelogs:
|
||||||
dh_installchangelogs RELEASE-NOTES-*
|
dh_installchangelogs RELEASE-NOTES-*
|
||||||
|
|
||||||
override_dh_strip:
|
override_dh_strip:
|
||||||
dh_strip --dbg-package=i3-wm-dbg
|
dh_strip --dbg-package=i3-wm-dbg
|
||||||
|
|
||||||
|
override_dh_auto_test:
|
||||||
|
# TODO: enable tests
|
||||||
|
|
||||||
%:
|
%:
|
||||||
dh $@ --parallel
|
dh $@ --parallel --builddirectory=build --with=autoreconf
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
all:
|
|
||||||
$(MAKE) -C .. docs
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(MAKE) -C .. clean-docs
|
|
||||||
|
|
||||||
.PHONY: all clean
|
|
46
docs/docs.mk
46
docs/docs.mk
|
@ -1,46 +0,0 @@
|
||||||
DISTCLEAN_TARGETS += clean-docs
|
|
||||||
|
|
||||||
# To pass additional parameters for asciidoc
|
|
||||||
ASCIIDOC = asciidoc
|
|
||||||
I3POD2HTML = ./docs/i3-pod2html
|
|
||||||
|
|
||||||
ASCIIDOC_NOTOC_TARGETS = \
|
|
||||||
docs/debugging.html
|
|
||||||
|
|
||||||
ASCIIDOC_TOC_TARGETS = \
|
|
||||||
docs/hacking-howto.html \
|
|
||||||
docs/userguide.html \
|
|
||||||
docs/ipc.html \
|
|
||||||
docs/multi-monitor.html \
|
|
||||||
docs/wsbar.html \
|
|
||||||
docs/testsuite.html \
|
|
||||||
docs/i3bar-protocol.html \
|
|
||||||
docs/layout-saving.html
|
|
||||||
|
|
||||||
ASCIIDOC_TARGETS = \
|
|
||||||
$(ASCIIDOC_TOC_TARGETS) \
|
|
||||||
$(ASCIIDOC_NOTOC_TARGETS)
|
|
||||||
|
|
||||||
ASCIIDOC_CALL = $(V_ASCIIDOC)$(ASCIIDOC) -n $(ASCIIDOC_FLAGS) -o $@ $<
|
|
||||||
ASCIIDOC_TOC_CALL = $(V_ASCIIDOC)$(ASCIIDOC) -a toc -n $(ASCIIDOC_FLAGS) -o $@ $<
|
|
||||||
|
|
||||||
POD2HTML_TARGETS = \
|
|
||||||
docs/lib-i3test.html \
|
|
||||||
docs/lib-i3test-test.html
|
|
||||||
|
|
||||||
docs/lib-i3test.html: testcases/lib/i3test.pm
|
|
||||||
$(V_POD2HTML)$(I3POD2HTML) $< $@
|
|
||||||
|
|
||||||
docs/lib-i3test-test.html: testcases/lib/i3test/Test.pm
|
|
||||||
$(V_POD2HTML)$(I3POD2HTML) $< $@
|
|
||||||
|
|
||||||
docs: $(ASCIIDOC_TARGETS) $(POD2HTML_TARGETS)
|
|
||||||
|
|
||||||
$(ASCIIDOC_TOC_TARGETS): docs/%.html: docs/%
|
|
||||||
$(ASCIIDOC_TOC_CALL)
|
|
||||||
|
|
||||||
$(ASCIIDOC_NOTOC_TARGETS): docs/%.html: docs/%
|
|
||||||
$(ASCIIDOC_CALL)
|
|
||||||
|
|
||||||
clean-docs:
|
|
||||||
rm -f $(ASCIIDOC_TARGETS) $(POD2HTML_TARGETS)
|
|
|
@ -1,10 +0,0 @@
|
||||||
all:
|
|
||||||
$(MAKE) -C .. i3-config-wizard/i3-config-wizard
|
|
||||||
|
|
||||||
install:
|
|
||||||
$(MAKE) -C .. install-i3-config-wizard
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(MAKE) -C .. clean-i3-config-wizard
|
|
||||||
|
|
||||||
.PHONY: all install clean
|
|
|
@ -1,28 +0,0 @@
|
||||||
ALL_TARGETS += i3-config-wizard/i3-config-wizard
|
|
||||||
INSTALL_TARGETS += install-i3-config-wizard
|
|
||||||
CLEAN_TARGETS += clean-i3-config-wizard
|
|
||||||
|
|
||||||
i3_config_wizard_SOURCES := $(wildcard i3-config-wizard/*.c)
|
|
||||||
i3_config_wizard_HEADERS := $(wildcard i3-config-wizard/*.h)
|
|
||||||
i3_config_wizard_CFLAGS = $(XCB_CFLAGS) $(XCB_KBD_CFLAGS) $(PANGO_CFLAGS) $(XCB_XRM_CFLAGS) $(XKB_COMMON_CFLAGS) $(XKB_COMMON_X11_CFLAGS)
|
|
||||||
i3_config_wizard_LIBS = $(XCB_LIBS) $(XCB_KBD_LIBS) $(PANGO_LIBS) $(XCB_XRM_LIBS) $(XKB_COMMON_LIBS) $(XKB_COMMON_X11_LIBS)
|
|
||||||
|
|
||||||
i3_config_wizard_OBJECTS := $(i3_config_wizard_SOURCES:.c=.o)
|
|
||||||
|
|
||||||
|
|
||||||
i3-config-wizard/%.o: i3-config-wizard/%.c $(i3_config_wizard_HEADERS) i3-config-parser.stamp
|
|
||||||
echo "[i3-config-wizard] CC $<"
|
|
||||||
$(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3_config_wizard_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
|
|
||||||
|
|
||||||
i3-config-wizard/i3-config-wizard: libi3.a $(i3_config_wizard_OBJECTS)
|
|
||||||
echo "[i3-config-wizard] Link i3-config-wizard"
|
|
||||||
$(CC) $(I3_LDFLAGS) $(LDFLAGS) -o $@ $(filter-out libi3.a,$^) $(LIBS) $(i3_config_wizard_LIBS)
|
|
||||||
|
|
||||||
install-i3-config-wizard: i3-config-wizard/i3-config-wizard
|
|
||||||
echo "[i3-config-wizard] Install"
|
|
||||||
$(INSTALL) -d -m 0755 $(DESTDIR)$(EXEC_PREFIX)/bin
|
|
||||||
$(INSTALL) -m 0755 i3-config-wizard/i3-config-wizard $(DESTDIR)$(EXEC_PREFIX)/bin/
|
|
||||||
|
|
||||||
clean-i3-config-wizard:
|
|
||||||
echo "[i3-config-wizard] Clean"
|
|
||||||
rm -f $(i3_config_wizard_OBJECTS) $(i3_config_wizard_SOURCES_GENERATED) i3-config-wizard/i3-config-wizard i3-config-wizard/cfgparse.*
|
|
|
@ -8,6 +8,8 @@
|
||||||
* keysyms.
|
* keysyms.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#if defined(__FreeBSD__)
|
#if defined(__FreeBSD__)
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
all:
|
|
||||||
$(MAKE) -C .. i3-dump-log/i3-dump-log
|
|
||||||
|
|
||||||
install:
|
|
||||||
$(MAKE) -C .. install-i3-dump-log
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(MAKE) -C .. clean-i3-dump-log
|
|
||||||
|
|
||||||
.PHONY: all install clean
|
|
|
@ -1,28 +0,0 @@
|
||||||
ALL_TARGETS += i3-dump-log/i3-dump-log
|
|
||||||
INSTALL_TARGETS += install-i3-dump-log
|
|
||||||
CLEAN_TARGETS += clean-i3-dump-log
|
|
||||||
|
|
||||||
i3_dump_log_SOURCES := $(wildcard i3-dump-log/*.c)
|
|
||||||
i3_dump_log_HEADERS := $(wildcard i3-dump-log/*.h)
|
|
||||||
i3_dump_log_CFLAGS = $(XCB_CFLAGS) $(PANGO_CFLAGS)
|
|
||||||
i3_dump_log_LIBS = $(XCB_LIBS)
|
|
||||||
|
|
||||||
i3_dump_log_OBJECTS := $(i3_dump_log_SOURCES:.c=.o)
|
|
||||||
|
|
||||||
|
|
||||||
i3-dump-log/%.o: i3-dump-log/%.c $(i3_dump_log_HEADERS)
|
|
||||||
echo "[i3-dump-log] CC $<"
|
|
||||||
$(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3_dump_log_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
|
|
||||||
|
|
||||||
i3-dump-log/i3-dump-log: libi3.a $(i3_dump_log_OBJECTS)
|
|
||||||
echo "[i3-dump-log] Link i3-dump-log"
|
|
||||||
$(CC) $(I3_LDFLAGS) $(LDFLAGS) -o $@ $(filter-out libi3.a,$^) $(LIBS) $(i3_dump_log_LIBS)
|
|
||||||
|
|
||||||
install-i3-dump-log: i3-dump-log/i3-dump-log
|
|
||||||
echo "[i3-dump-log] Install"
|
|
||||||
$(INSTALL) -d -m 0755 $(DESTDIR)$(EXEC_PREFIX)/bin
|
|
||||||
$(INSTALL) -m 0755 i3-dump-log/i3-dump-log $(DESTDIR)$(EXEC_PREFIX)/bin/
|
|
||||||
|
|
||||||
clean-i3-dump-log:
|
|
||||||
echo "[i3-dump-log] Clean"
|
|
||||||
rm -f $(i3_dump_log_OBJECTS) i3-dump-log/i3-dump-log
|
|
|
@ -7,6 +7,8 @@
|
||||||
* i3-dump-log/main.c: Dumps the i3 SHM log to stdout.
|
* i3-dump-log/main.c: Dumps the i3 SHM log to stdout.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
all:
|
|
||||||
$(MAKE) -C .. i3-input/i3-input
|
|
||||||
|
|
||||||
install:
|
|
||||||
$(MAKE) -C .. install-i3-input
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(MAKE) -C .. clean-i3-input
|
|
||||||
|
|
||||||
.PHONY: all install clean
|
|
|
@ -1,5 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include <err.h>
|
#include <err.h>
|
||||||
|
|
||||||
#define die(...) errx(EXIT_FAILURE, __VA_ARGS__);
|
#define die(...) errx(EXIT_FAILURE, __VA_ARGS__);
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
ALL_TARGETS += i3-input/i3-input
|
|
||||||
INSTALL_TARGETS += install-i3-input
|
|
||||||
CLEAN_TARGETS += clean-i3-input
|
|
||||||
|
|
||||||
i3_input_SOURCES := $(wildcard i3-input/*.c)
|
|
||||||
i3_input_HEADERS := $(wildcard i3-input/*.h)
|
|
||||||
i3_input_CFLAGS = $(XCB_CFLAGS) $(XCB_KBD_CFLAGS) $(PANGO_CFLAGS) $(XCB_XRM_CFLAGS)
|
|
||||||
i3_input_LIBS = $(XCB_LIBS) $(XCB_KBD_LIBS) $(PANGO_LIBS) $(XCB_XRM_LIBS)
|
|
||||||
|
|
||||||
i3_input_OBJECTS := $(i3_input_SOURCES:.c=.o)
|
|
||||||
|
|
||||||
|
|
||||||
i3-input/%.o: i3-input/%.c $(i3_input_HEADERS)
|
|
||||||
echo "[i3-input] CC $<"
|
|
||||||
$(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3_input_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
|
|
||||||
|
|
||||||
i3-input/i3-input: libi3.a $(i3_input_OBJECTS)
|
|
||||||
echo "[i3-input] Link i3-input"
|
|
||||||
$(CC) $(I3_LDFLAGS) $(LDFLAGS) -o $@ $(filter-out libi3.a,$^) $(LIBS) $(i3_input_LIBS)
|
|
||||||
|
|
||||||
install-i3-input: i3-input/i3-input
|
|
||||||
echo "[i3-input] Install"
|
|
||||||
$(INSTALL) -d -m 0755 $(DESTDIR)$(EXEC_PREFIX)/bin
|
|
||||||
$(INSTALL) -m 0755 i3-input/i3-input $(DESTDIR)$(EXEC_PREFIX)/bin/
|
|
||||||
|
|
||||||
clean-i3-input:
|
|
||||||
echo "[i3-input] Clean"
|
|
||||||
rm -f $(i3_input_OBJECTS) i3-input/i3-input
|
|
|
@ -8,6 +8,8 @@
|
||||||
* to i3.
|
* to i3.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#include "libi3.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -31,8 +33,6 @@
|
||||||
|
|
||||||
#include "i3-input.h"
|
#include "i3-input.h"
|
||||||
|
|
||||||
#include "libi3.h"
|
|
||||||
|
|
||||||
/* IPC format string. %s will be replaced with what the user entered, then
|
/* IPC format string. %s will be replaced with what the user entered, then
|
||||||
* the command will be sent to i3 */
|
* the command will be sent to i3 */
|
||||||
static char *format;
|
static char *format;
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
all:
|
|
||||||
$(MAKE) -C .. i3-msg/i3-msg
|
|
||||||
|
|
||||||
install:
|
|
||||||
$(MAKE) -C .. install-i3-msg
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(MAKE) -C .. clean-i3-msg
|
|
||||||
|
|
||||||
.PHONY: all install clean
|
|
|
@ -1,28 +0,0 @@
|
||||||
ALL_TARGETS += i3-msg/i3-msg
|
|
||||||
INSTALL_TARGETS += install-i3-msg
|
|
||||||
CLEAN_TARGETS += clean-i3-msg
|
|
||||||
|
|
||||||
i3_msg_SOURCES := $(wildcard i3-msg/*.c)
|
|
||||||
i3_msg_HEADERS := $(wildcard i3-msg/*.h)
|
|
||||||
i3_msg_CFLAGS = $(XCB_CFLAGS) $(PANGO_CFLAGS) $(YAJL_CFLAGS)
|
|
||||||
i3_msg_LIBS = $(XCB_LIBS) $(YAJL_LIBS)
|
|
||||||
|
|
||||||
i3_msg_OBJECTS := $(i3_msg_SOURCES:.c=.o)
|
|
||||||
|
|
||||||
|
|
||||||
i3-msg/%.o: i3-msg/%.c $(i3_msg_HEADERS)
|
|
||||||
echo "[i3-msg] CC $<"
|
|
||||||
$(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3_msg_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
|
|
||||||
|
|
||||||
i3-msg/i3-msg: libi3.a $(i3_msg_OBJECTS)
|
|
||||||
echo "[i3-msg] Link i3-msg"
|
|
||||||
$(CC) $(I3_LDFLAGS) $(LDFLAGS) -o $@ $(filter-out libi3.a,$^) $(LIBS) $(i3_msg_LIBS)
|
|
||||||
|
|
||||||
install-i3-msg: i3-msg/i3-msg
|
|
||||||
echo "[i3-msg] Install"
|
|
||||||
$(INSTALL) -d -m 0755 $(DESTDIR)$(EXEC_PREFIX)/bin
|
|
||||||
$(INSTALL) -m 0755 i3-msg/i3-msg $(DESTDIR)$(EXEC_PREFIX)/bin/
|
|
||||||
|
|
||||||
clean-i3-msg:
|
|
||||||
echo "[i3-msg] Clean"
|
|
||||||
rm -f $(i3_msg_OBJECTS) i3-msg/i3-msg
|
|
|
@ -14,6 +14,8 @@
|
||||||
* Additionally, it’s even useful sometimes :-).
|
* Additionally, it’s even useful sometimes :-).
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#include "libi3.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@ -34,7 +36,6 @@
|
||||||
#include <xcb/xcb.h>
|
#include <xcb/xcb.h>
|
||||||
#include <xcb/xcb_aux.h>
|
#include <xcb/xcb_aux.h>
|
||||||
|
|
||||||
#include "libi3.h"
|
|
||||||
#include <i3/ipc.h>
|
#include <i3/ipc.h>
|
||||||
|
|
||||||
static char *socket_path;
|
static char *socket_path;
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
all:
|
|
||||||
$(MAKE) -C .. i3-nagbar/i3-nagbar
|
|
||||||
|
|
||||||
install:
|
|
||||||
$(MAKE) -C .. install-i3-nagbar
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(MAKE) -C .. clean-i3-nagbar
|
|
||||||
|
|
||||||
.PHONY: all install clean
|
|
|
@ -1,5 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include <err.h>
|
#include <err.h>
|
||||||
|
|
||||||
#define die(...) errx(EXIT_FAILURE, __VA_ARGS__);
|
#define die(...) errx(EXIT_FAILURE, __VA_ARGS__);
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
ALL_TARGETS += i3-nagbar/i3-nagbar
|
|
||||||
INSTALL_TARGETS += install-i3-nagbar
|
|
||||||
CLEAN_TARGETS += clean-i3-nagbar
|
|
||||||
|
|
||||||
i3_nagbar_SOURCES := $(wildcard i3-nagbar/*.c)
|
|
||||||
i3_nagbar_HEADERS := $(wildcard i3-nagbar/*.h)
|
|
||||||
i3_nagbar_CFLAGS = $(XCB_CFLAGS) $(XCB_CURSOR_CFLAGS) $(XCB_WM_CFLAGS) $(PANGO_CFLAGS) $(XCB_XRM_CFLAGS)
|
|
||||||
i3_nagbar_LIBS = $(XCB_LIBS) $(XCB_CURSOR_LIBS) $(XCB_WM_LIBS) $(PANGO_LIBS) $(XCB_XRM_LIBS)
|
|
||||||
|
|
||||||
i3_nagbar_OBJECTS := $(i3_nagbar_SOURCES:.c=.o)
|
|
||||||
|
|
||||||
|
|
||||||
i3-nagbar/%.o: i3-nagbar/%.c $(i3_nagbar_HEADERS)
|
|
||||||
echo "[i3-nagbar] CC $<"
|
|
||||||
$(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3_nagbar_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
|
|
||||||
|
|
||||||
i3-nagbar/i3-nagbar: libi3.a $(i3_nagbar_OBJECTS)
|
|
||||||
echo "[i3-nagbar] Link i3-nagbar"
|
|
||||||
$(CC) $(I3_LDFLAGS) $(LDFLAGS) -o $@ $(filter-out libi3.a,$^) $(LIBS) $(i3_nagbar_LIBS)
|
|
||||||
|
|
||||||
install-i3-nagbar: i3-nagbar/i3-nagbar
|
|
||||||
echo "[i3-nagbar] Install"
|
|
||||||
$(INSTALL) -d -m 0755 $(DESTDIR)$(EXEC_PREFIX)/bin
|
|
||||||
$(INSTALL) -m 0755 i3-nagbar/i3-nagbar $(DESTDIR)$(EXEC_PREFIX)/bin/
|
|
||||||
|
|
||||||
clean-i3-nagbar:
|
|
||||||
echo "[i3-nagbar] Clean"
|
|
||||||
rm -f $(i3_nagbar_OBJECTS) i3-nagbar/i3-nagbar
|
|
|
@ -8,6 +8,8 @@
|
||||||
* when the user has an error in their configuration file.
|
* when the user has an error in their configuration file.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#include "libi3.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
@ -30,7 +32,6 @@
|
||||||
#include <xcb/randr.h>
|
#include <xcb/randr.h>
|
||||||
#include <xcb/xcb_cursor.h>
|
#include <xcb/xcb_cursor.h>
|
||||||
|
|
||||||
#include "libi3.h"
|
|
||||||
#include "i3-nagbar.h"
|
#include "i3-nagbar.h"
|
||||||
|
|
||||||
/** This is the equivalent of XC_left_ptr. I’m not sure why xcb doesn’t have a
|
/** This is the equivalent of XC_left_ptr. I’m not sure why xcb doesn’t have a
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
all:
|
|
||||||
$(MAKE) -C .. i3bar/i3bar
|
|
||||||
|
|
||||||
install:
|
|
||||||
$(MAKE) -C .. install-i3bar
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(MAKE) -C .. clean-i3bar
|
|
||||||
|
|
||||||
.PHONY: all install clean
|
|
|
@ -1,28 +0,0 @@
|
||||||
ALL_TARGETS += i3bar/i3bar
|
|
||||||
INSTALL_TARGETS += install-i3bar
|
|
||||||
CLEAN_TARGETS += clean-i3bar
|
|
||||||
|
|
||||||
i3bar_SOURCES := $(wildcard i3bar/src/*.c)
|
|
||||||
i3bar_HEADERS := $(wildcard i3bar/include/*.h)
|
|
||||||
i3bar_CFLAGS = $(XCB_CFLAGS) $(XCB_CURSOR_CFLAGS) $(PANGO_CFLAGS) $(XCB_XRM_CFLAGS) $(YAJL_CFLAGS) $(LIBEV_CFLAGS)
|
|
||||||
i3bar_LIBS = $(XCB_LIBS) $(XCB_CURSOR_LIBS) $(PANGO_LIBS) $(XCB_XRM_LIBS) $(YAJL_LIBS) $(LIBEV_LIBS) $(XCB_XKB_LIBS)
|
|
||||||
|
|
||||||
i3bar_OBJECTS := $(i3bar_SOURCES:.c=.o)
|
|
||||||
|
|
||||||
|
|
||||||
i3bar/src/%.o: i3bar/src/%.c $(i3bar_HEADERS)
|
|
||||||
echo "[i3bar] CC $<"
|
|
||||||
$(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3bar_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -Ii3bar/include -c -o $@ $<
|
|
||||||
|
|
||||||
i3bar/i3bar: libi3.a $(i3bar_OBJECTS)
|
|
||||||
echo "[i3bar] Link i3bar"
|
|
||||||
$(CC) $(I3_LDFLAGS) $(LDFLAGS) -o $@ $(filter-out libi3.a,$^) $(LIBS) $(i3bar_LIBS)
|
|
||||||
|
|
||||||
install-i3bar: i3bar/i3bar
|
|
||||||
echo "[i3bar] Install"
|
|
||||||
$(INSTALL) -d -m 0755 $(DESTDIR)$(EXEC_PREFIX)/bin
|
|
||||||
$(INSTALL) -m 0755 i3bar/i3bar $(DESTDIR)$(EXEC_PREFIX)/bin/
|
|
||||||
|
|
||||||
clean-i3bar:
|
|
||||||
echo "[i3bar] Clean"
|
|
||||||
rm -f $(i3bar_OBJECTS) i3bar/i3bar
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#define STDIN_CHUNK_SIZE 1024
|
#define STDIN_CHUNK_SIZE 1024
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <xcb/xcb.h>
|
#include <xcb/xcb.h>
|
||||||
#include <xcb/xproto.h>
|
#include <xcb/xproto.h>
|
||||||
|
@ -85,6 +87,6 @@ TAILQ_HEAD(statusline_head, status_block) statusline_head;
|
||||||
#include "mode.h"
|
#include "mode.h"
|
||||||
#include "trayclients.h"
|
#include "trayclients.h"
|
||||||
#include "xcb.h"
|
#include "xcb.h"
|
||||||
#include "config.h"
|
#include "configuration.h"
|
||||||
#include "libi3.h"
|
#include "libi3.h"
|
||||||
#include "parse_json_header.h"
|
#include "parse_json_header.h"
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include <xcb/xproto.h>
|
#include <xcb/xproto.h>
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include <xcb/xcb.h>
|
#include <xcb/xcb.h>
|
||||||
#include <cairo/cairo-xcb.h>
|
#include <cairo/cairo-xcb.h>
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include "queue.h"
|
#include "queue.h"
|
||||||
|
|
||||||
/* Get the maximum/minimum of x and y */
|
/* Get the maximum/minimum of x and y */
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <xcb/xproto.h>
|
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
|
#include <xcb/xproto.h>
|
||||||
|
|
||||||
typedef struct i3_ws i3_ws;
|
typedef struct i3_ws i3_ws;
|
||||||
|
|
||||||
TAILQ_HEAD(ws_head, i3_ws);
|
TAILQ_HEAD(ws_head, i3_ws);
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
//#include "outputs.h"
|
//#include "outputs.h"
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
* child.c: Getting input for the statusline
|
* child.c: Getting input for the statusline
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@ -25,8 +27,6 @@
|
||||||
#include <yajl/yajl_gen.h>
|
#include <yajl/yajl_gen.h>
|
||||||
#include <paths.h>
|
#include <paths.h>
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
/* Global variables for child_*() */
|
/* Global variables for child_*() */
|
||||||
i3bar_child child;
|
i3bar_child child;
|
||||||
|
|
||||||
|
@ -105,7 +105,9 @@ __attribute__((format(printf, 1, 2))) static void set_statusline_error(const cha
|
||||||
char *message;
|
char *message;
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, format);
|
va_start(args, format);
|
||||||
(void)vasprintf(&message, format, args);
|
if (vasprintf(&message, format, args) == -1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
struct status_block *err_block = scalloc(1, sizeof(struct status_block));
|
struct status_block *err_block = scalloc(1, sizeof(struct status_block));
|
||||||
err_block->full_text = i3string_from_utf8("Error: ");
|
err_block->full_text = i3string_from_utf8("Error: ");
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
* config.c: Parses the configuration (received from i3).
|
* config.c: Parses the configuration (received from i3).
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -17,8 +19,6 @@
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
static char *cur_key;
|
static char *cur_key;
|
||||||
static bool parsing_bindings;
|
static bool parsing_bindings;
|
||||||
static bool parsing_tray_outputs;
|
static bool parsing_tray_outputs;
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
* ipc.c: Communicating with i3
|
* ipc.c: Communicating with i3
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -21,8 +23,6 @@
|
||||||
#include <sanitizer/lsan_interface.h>
|
#include <sanitizer/lsan_interface.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
ev_io *i3_connection;
|
ev_io *i3_connection;
|
||||||
|
|
||||||
const char *sock_path;
|
const char *sock_path;
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
* © 2010 Axel Wagner and contributors (see also: LICENSE)
|
* © 2010 Axel Wagner and contributors (see also: LICENSE)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <i3/ipc.h>
|
#include <i3/ipc.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -15,8 +17,6 @@
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <glob.h>
|
#include <glob.h>
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Having verboselog(), errorlog() and debuglog() is necessary when using libi3.
|
* Having verboselog(), errorlog() and debuglog() is necessary when using libi3.
|
||||||
*
|
*
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
* mode.c: Handle mode event and show current binding mode in the bar
|
* mode.c: Handle mode event and show current binding mode in the bar
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -14,8 +16,6 @@
|
||||||
#include <yajl/yajl_parse.h>
|
#include <yajl/yajl_parse.h>
|
||||||
#include <yajl/yajl_version.h>
|
#include <yajl/yajl_version.h>
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
/* A datatype to pass through the callbacks to save the state */
|
/* A datatype to pass through the callbacks to save the state */
|
||||||
struct mode_json_params {
|
struct mode_json_params {
|
||||||
char *json;
|
char *json;
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
* outputs.c: Maintaining the outputs list
|
* outputs.c: Maintaining the outputs list
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -15,8 +17,6 @@
|
||||||
#include <yajl/yajl_parse.h>
|
#include <yajl/yajl_parse.h>
|
||||||
#include <yajl/yajl_version.h>
|
#include <yajl/yajl_version.h>
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
/* A datatype to pass through the callbacks to save the state */
|
/* A datatype to pass through the callbacks to save the state */
|
||||||
struct outputs_json_params {
|
struct outputs_json_params {
|
||||||
struct outputs_head *outputs;
|
struct outputs_head *outputs;
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
* protocol version and features.
|
* protocol version and features.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@ -25,8 +27,6 @@
|
||||||
#include <yajl/yajl_parse.h>
|
#include <yajl/yajl_parse.h>
|
||||||
#include <yajl/yajl_version.h>
|
#include <yajl/yajl_version.h>
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
static enum {
|
static enum {
|
||||||
KEY_VERSION,
|
KEY_VERSION,
|
||||||
KEY_STOP_SIGNAL,
|
KEY_STOP_SIGNAL,
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
* workspaces.c: Maintaining the workspace lists
|
* workspaces.c: Maintaining the workspace lists
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -14,8 +16,6 @@
|
||||||
#include <yajl/yajl_parse.h>
|
#include <yajl/yajl_parse.h>
|
||||||
#include <yajl/yajl_version.h>
|
#include <yajl/yajl_version.h>
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
/* A datatype to pass through the callbacks to save the state */
|
/* A datatype to pass through the callbacks to save the state */
|
||||||
struct workspaces_json_params {
|
struct workspaces_json_params {
|
||||||
struct ws_head *workspaces;
|
struct ws_head *workspaces;
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
* xcb.c: Communicating with X
|
* xcb.c: Communicating with X
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
#include <xcb/xcb.h>
|
#include <xcb/xcb.h>
|
||||||
#include <xcb/xkb.h>
|
#include <xcb/xkb.h>
|
||||||
#include <xcb/xproto.h>
|
#include <xcb/xproto.h>
|
||||||
|
@ -32,7 +34,6 @@
|
||||||
#include <sanitizer/lsan_interface.h>
|
#include <sanitizer/lsan_interface.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
#include "libi3.h"
|
#include "libi3.h"
|
||||||
|
|
||||||
/** This is the equivalent of XC_left_ptr. I’m not sure why xcb doesn’t have a
|
/** This is the equivalent of XC_left_ptr. I’m not sure why xcb doesn’t have a
|
||||||
|
|
|
@ -10,8 +10,9 @@
|
||||||
* compile-time.
|
* compile-time.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#ifndef I3_ALL_H
|
#pragma once
|
||||||
#define I3_ALL_H
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
@ -51,7 +52,7 @@
|
||||||
#include "click.h"
|
#include "click.h"
|
||||||
#include "key_press.h"
|
#include "key_press.h"
|
||||||
#include "floating.h"
|
#include "floating.h"
|
||||||
#include "config.h"
|
#include "configuration.h"
|
||||||
#include "handlers.h"
|
#include "handlers.h"
|
||||||
#include "randr.h"
|
#include "randr.h"
|
||||||
#include "xinerama.h"
|
#include "xinerama.h"
|
||||||
|
@ -81,5 +82,3 @@
|
||||||
#include "display_version.h"
|
#include "display_version.h"
|
||||||
#include "restore_layout.h"
|
#include "restore_layout.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks the list of assignments for the given window and runs all matching
|
* Checks the list of assignments for the given window and runs all matching
|
||||||
* ones (unless they have already been run for this specific window).
|
* ones (unless they have already been run for this specific window).
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
extern pid_t command_error_nagbar_pid;
|
extern pid_t command_error_nagbar_pid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The button press X callback. This function determines whether the floating
|
* The button press X callback. This function determines whether the floating
|
||||||
* modifier is pressed and where the user clicked (decoration, border, inside
|
* modifier is pressed and where the user clicked (decoration, border, inside
|
||||||
|
|
|
@ -9,4 +9,6 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
char *parse_cmd(const char *new);
|
char *parse_cmd(const char *new);
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include "commands_parser.h"
|
#include "commands_parser.h"
|
||||||
|
|
||||||
/** The beginning of the prototype for every cmd_ function. */
|
/** The beginning of the prototype for every cmd_ function. */
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include <yajl/yajl_gen.h>
|
#include <yajl/yajl_gen.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new container (and attach it to the given parent, if not NULL).
|
* Create a new container (and attach it to the given parent, if not NULL).
|
||||||
* This function only initializes the data structures.
|
* This function only initializes the data structures.
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include "config_parser.h"
|
#include "config_parser.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include <yajl/yajl_gen.h>
|
#include <yajl/yajl_gen.h>
|
||||||
|
|
||||||
SLIST_HEAD(variables_head, Variable);
|
SLIST_HEAD(variables_head, Variable);
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* i3 - an improved dynamic tiling window manager
|
* i3 - an improved dynamic tiling window manager
|
||||||
* © 2009 Michael Stapelberg and contributors (see also: LICENSE)
|
* © 2009 Michael Stapelberg and contributors (see also: LICENSE)
|
||||||
*
|
*
|
||||||
* include/config.h: Contains all structs/variables for the configurable
|
* include/configuration.h: Contains all structs/variables for the configurable
|
||||||
* part of i3 as well as functions handling the configuration file (calling
|
* part of i3 as well as functions handling the configuration file (calling
|
||||||
* the parser (src/config_parse.c) with the correct path, switching key
|
* the parser (src/config_parse.c) with the correct path, switching key
|
||||||
* bindings mode).
|
* bindings mode).
|
||||||
|
@ -12,10 +12,11 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "libi3.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "queue.h"
|
#include "queue.h"
|
||||||
#include "i3.h"
|
#include "i3.h"
|
||||||
#include "libi3.h"
|
|
||||||
|
|
||||||
typedef struct Config Config;
|
typedef struct Config Config;
|
||||||
typedef struct Barconfig Barconfig;
|
typedef struct Barconfig Barconfig;
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "libi3.h"
|
||||||
|
|
||||||
#define SN_API_NOT_YET_FROZEN 1
|
#define SN_API_NOT_YET_FROZEN 1
|
||||||
#include <libsn/sn-launcher.h>
|
#include <libsn/sn-launcher.h>
|
||||||
|
|
||||||
|
@ -17,7 +19,6 @@
|
||||||
#include <pcre.h>
|
#include <pcre.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
||||||
#include "libi3.h"
|
|
||||||
#include "queue.h"
|
#include "queue.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -10,4 +10,6 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
int handle_event(void *ignored, xcb_connection_t *c, xcb_generic_event_t *e);
|
int handle_event(void *ignored, xcb_connection_t *c, xcb_generic_event_t *e);
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connects to i3 to find out the currently running version. Useful since it
|
* Connects to i3 to find out the currently running version. Useful since it
|
||||||
* might be different from the version compiled into this binary (maybe the
|
* might be different from the version compiled into this binary (maybe the
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates _NET_CURRENT_DESKTOP with the current desktop number.
|
* Updates _NET_CURRENT_DESKTOP with the current desktop number.
|
||||||
*
|
*
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates outputs according to the given specification.
|
* Creates outputs according to the given specification.
|
||||||
* The specification must be in the format wxh+x+y, for example 1024x768+0+0,
|
* The specification must be in the format wxh+x+y, for example 1024x768+0+0,
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include "tree.h"
|
#include "tree.h"
|
||||||
|
|
||||||
/** Callback for dragging */
|
/** Callback for dragging */
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include <xcb/randr.h>
|
#include <xcb/randr.h>
|
||||||
|
|
||||||
extern int randr_base;
|
extern int randr_base;
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include <ev.h>
|
#include <ev.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <yajl/yajl_gen.h>
|
#include <yajl/yajl_gen.h>
|
||||||
|
@ -16,7 +18,7 @@
|
||||||
|
|
||||||
#include "data.h"
|
#include "data.h"
|
||||||
#include "tree.h"
|
#include "tree.h"
|
||||||
#include "config.h"
|
#include "configuration.h"
|
||||||
|
|
||||||
#include "i3/ipc.h"
|
#include "i3/ipc.h"
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* There was a key press. We compare this key code with our bindings table and pass
|
* There was a key press. We compare this key code with our bindings table and pass
|
||||||
* the bound action to parse_command().
|
* the bound action to parse_command().
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -89,7 +91,7 @@ void errorlog(char *fmt, ...)
|
||||||
#if !defined(DLOG)
|
#if !defined(DLOG)
|
||||||
void debuglog(char *fmt, ...)
|
void debuglog(char *fmt, ...)
|
||||||
__attribute__((format(printf, 1, 2)));
|
__attribute__((format(printf, 1, 2)));
|
||||||
#define DLOG(fmt, ...) debuglog("%s:%s:%d - " fmt, I3__FILE__, __FUNCTION__, __LINE__, ##__VA_ARGS__)
|
#define DLOG(fmt, ...) debuglog("%s:%s:%d - " fmt, STRIPPED__FILE__, __FUNCTION__, __LINE__, ##__VA_ARGS__)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
// We could not determine the content of the JSON file. This typically
|
// We could not determine the content of the JSON file. This typically
|
||||||
// means it’s unreadable or contains garbage.
|
// means it’s unreadable or contains garbage.
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
@ -27,7 +29,7 @@
|
||||||
is, delete the preceding comma */
|
is, delete the preceding comma */
|
||||||
#define LOG(fmt, ...) verboselog(fmt, ##__VA_ARGS__)
|
#define LOG(fmt, ...) verboselog(fmt, ##__VA_ARGS__)
|
||||||
#define ELOG(fmt, ...) errorlog("ERROR: " fmt, ##__VA_ARGS__)
|
#define ELOG(fmt, ...) errorlog("ERROR: " fmt, ##__VA_ARGS__)
|
||||||
#define DLOG(fmt, ...) debuglog("%s:%s:%d - " fmt, I3__FILE__, __FUNCTION__, __LINE__, ##__VA_ARGS__)
|
#define DLOG(fmt, ...) debuglog("%s:%s:%d - " fmt, STRIPPED__FILE__, __FUNCTION__, __LINE__, ##__VA_ARGS__)
|
||||||
|
|
||||||
extern char *errorfilename;
|
extern char *errorfilename;
|
||||||
extern char *shmlogname;
|
extern char *shmlogname;
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable or disable the main X11 event handling function.
|
* Enable or disable the main X11 event handling function.
|
||||||
* This is used by drag_pointer() which has its own, modal event handler, which
|
* This is used by drag_pointer() which has its own, modal event handler, which
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include "data.h"
|
#include "data.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -13,6 +13,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initializes the Match data structure. This function is necessary because the
|
* Initializes the Match data structure. This function is necessary because the
|
||||||
* members representing boolean values (like dock) need to be initialized with
|
* members representing boolean values (like dock) need to be initialized with
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Moves the given container in the given direction (TOK_LEFT, TOK_RIGHT,
|
* Moves the given container in the given direction (TOK_LEFT, TOK_RIGHT,
|
||||||
* TOK_UP, TOK_DOWN from cmdparse.l)
|
* TOK_UP, TOK_DOWN from cmdparse.l)
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the output container below the given output container.
|
* Returns the output container below the given output container.
|
||||||
*
|
*
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include "data.h"
|
#include "data.h"
|
||||||
#include <xcb/randr.h>
|
#include <xcb/randr.h>
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new 'regex' struct containing the given pattern and a PCRE
|
* Creates a new 'regex' struct containing the given pattern and a PCRE
|
||||||
* compiled regular expression. Also, calls pcre_study because this regex will
|
* compiled regular expression. Also, calls pcre_study because this regex will
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
/* This is used to keep a state to pass around when rendering a con in render_con(). */
|
/* This is used to keep a state to pass around when rendering a con in render_con(). */
|
||||||
typedef struct render_params {
|
typedef struct render_params {
|
||||||
/* A copy of the coordinates of the container which is being rendered. */
|
/* A copy of the coordinates of the container which is being rendered. */
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
bool resize_find_tiling_participants(Con **current, Con **other, direction_t direction);
|
bool resize_find_tiling_participants(Con **current, Con **other, direction_t direction);
|
||||||
|
|
||||||
int resize_graphical_handler(Con *first, Con *second, orientation_t orientation, const xcb_button_press_event_t *event);
|
int resize_graphical_handler(Con *first, Con *second, orientation_t orientation, const xcb_button_press_event_t *event);
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Opens a separate connection to X11 for placeholder windows when restoring
|
* Opens a separate connection to X11 for placeholder windows when restoring
|
||||||
* layouts. This is done as a safety measure (users can xkill a placeholder
|
* layouts. This is done as a safety measure (users can xkill a placeholder
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Moves the specified window to the __i3_scratch workspace, making it floating
|
* Moves the specified window to the __i3_scratch workspace, making it floating
|
||||||
* and setting the appropriate scratchpad_state.
|
* and setting the appropriate scratchpad_state.
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#if !defined(__OpenBSD__)
|
#if !defined(__OpenBSD__)
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Setup signal handlers to safely handle SIGSEGV and SIGFPE
|
* Setup signal handlers to safely handle SIGSEGV and SIGFPE
|
||||||
*
|
*
|
||||||
|
|
|
@ -12,6 +12,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#define SN_API_NOT_YET_FROZEN 1
|
#define SN_API_NOT_YET_FROZEN 1
|
||||||
#include <libsn/sn-monitor.h>
|
#include <libsn/sn-monitor.h>
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
extern Con *croot;
|
extern Con *croot;
|
||||||
/* TODO: i am not sure yet how much access to the focused container should
|
/* TODO: i am not sure yet how much access to the focused container should
|
||||||
* be permitted to source files */
|
* be permitted to source files */
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include <err.h>
|
#include <err.h>
|
||||||
|
|
||||||
#include "data.h"
|
#include "data.h"
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Frees an i3Window and all its members.
|
* Frees an i3Window and all its members.
|
||||||
*
|
*
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include "data.h"
|
#include "data.h"
|
||||||
#include "tree.h"
|
#include "tree.h"
|
||||||
#include "randr.h"
|
#include "randr.h"
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
/** Stores the X11 window ID of the currently focused window */
|
/** Stores the X11 window ID of the currently focused window */
|
||||||
extern xcb_window_t focused_id;
|
extern xcb_window_t focused_id;
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include "data.h"
|
#include "data.h"
|
||||||
#include "xcursor.h"
|
#include "xcursor.h"
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include <xcb/xcb_cursor.h>
|
#include <xcb/xcb_cursor.h>
|
||||||
|
|
||||||
enum xcursor_cursor_t {
|
enum xcursor_cursor_t {
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include "data.h"
|
#include "data.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
#include <yajl/yajl_gen.h>
|
#include <yajl/yajl_gen.h>
|
||||||
#include <yajl/yajl_parse.h>
|
#include <yajl/yajl_parse.h>
|
||||||
#include <yajl/yajl_version.h>
|
#include <yajl/yajl_version.h>
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
all:
|
|
||||||
$(MAKE) -C .. libi3.a
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(MAKE) -C .. clean-libi3
|
|
||||||
|
|
||||||
.PHONY: all clean
|
|
|
@ -6,6 +6,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include "libi3.h"
|
#include "libi3.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <xcb/xcb_xrm.h>
|
#include <xcb/xcb_xrm.h>
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
* draw.c: Utility for drawing.
|
* draw.c: Utility for drawing.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
#include "libi3.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <err.h>
|
#include <err.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -13,8 +15,6 @@
|
||||||
#include <xcb/xcb_aux.h>
|
#include <xcb/xcb_aux.h>
|
||||||
#include <cairo/cairo-xcb.h>
|
#include <cairo/cairo-xcb.h>
|
||||||
|
|
||||||
#include "libi3.h"
|
|
||||||
|
|
||||||
/* The default visual_type to use if none is specified when creating the surface. Must be defined globally. */
|
/* The default visual_type to use if none is specified when creating the surface. Must be defined globally. */
|
||||||
xcb_visualtype_t *visual_type;
|
xcb_visualtype_t *visual_type;
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue