From 8396d5a35ed9fb1d260ac739b8da8c2037cc4560 Mon Sep 17 00:00:00 2001 From: buffet Date: Tue, 2 Oct 2018 23:29:47 +0200 Subject: [PATCH] Renamed to kiwmi and seed --- .gitignore | 4 +-- Makefile | 46 +++++++++++++++++----------------- README.adoc | 8 +++--- lit/{wmaffle.lit => kiwmi.lit} | 20 +++++++-------- lit/{syrup.lit => seed.lit} | 12 ++++----- 5 files changed, 45 insertions(+), 45 deletions(-) rename lit/{wmaffle.lit => kiwmi.lit} (95%) rename lit/{syrup.lit => seed.lit} (93%) diff --git a/.gitignore b/.gitignore index bd8aba9..cfefc78 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -/syrup -/wmaffle +/kiwmi +/seed /*.c /*.d /*.html diff --git a/Makefile b/Makefile index d0ebd94..5f4e2db 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,16 @@ include config.mk -WFLIT = wmaffle.lit -WFSRC = wmaffle.c -WFTARGET = wmaffle +KWLIT = kiwmi.lit +KWSRC = kiwmi.c +KWTARGET = kiwmi -SYLIT = syrup.lit -SYSRC = syrup.c -SYTARGET = syrup +SELIT = seed.lit +SESRC = seed.c +SETARGET = seed -SRC = $(WFSRC) $(SYSRC) +SRC = $(KWSRC) $(SESRC) DEPS = $(SRC:.c=.d) -TARGETS = $(WFTARGET) $(SYTARGET) +TARGETS = $(KWTARGET) $(SETARGET) VPATH = $(SRCPREFIX)/lit @@ -26,44 +26,44 @@ all: all-nodoc doc all-nodoc: $(TARGETS) -$(WFTARGET): $(WFSRC) +$(KWTARGET): $(KWSRC) @echo " [CC] $@..." $(HIDE) $(CC) -o "$@" "$<" $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -$(SYTARGET): $(SYSRC) +$(SETARGET): $(SESRC) @echo " [CC] $@..." $(HIDE) $(CC) -o "$@" "$<" $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -$(WFSRC): $(WFLIT) +$(KWSRC): $(KWLIT) @echo " [LIT] $@..." $(HIDE) $(LIT) -t "$<" -$(SYSRC): $(SYLIT) +$(SESRC): $(SELIT) @echo " [LIT] $@..." $(HIDE) $(LIT) -t "$<" doc: books -books: syrup.html wmaffle.html +books: seed.html kiwmi.html -wmaffle.html: $(WFLIT) +kiwmi.html: $(KWLIT) @echo " [LIT] $@..." $(HIDE) $(LIT) -w "$<" -syrup.html: $(SYLIT) +seed.html: $(SELIT) @echo " [LIT] $@..." $(HIDE) $(LIT) -w "$<" install: install -d "$(DESTDIR)$(BINPREFIX)" - install -m 755 "$(WFTARGET)" "$(DESTDIR)$(BINPREFIX)" - install -m 755 "$(SYTARGET)" "$(DESTDIR)$(BINPREFIX)" + install -m 755 "$(KWTARGET)" "$(DESTDIR)$(BINPREFIX)" + install -m 755 "$(SETARGET)" "$(DESTDIR)$(BINPREFIX)" uninstall: - @echo " [RM] $(WFTARGET)..." - $(HIDE) $(RM) "$(DESTDIR)$(BINPREFIX)/$(WFTARGET)" - @echo " [RM] $(SYTARGET)..." - $(HIDE) $(RM) "$(DESTDIR)$(BINPREFIX)/$(SYTARGET)"" + @echo " [RM] $(KWTARGET)..." + $(HIDE) $(RM) "$(DESTDIR)$(BINPREFIX)/$(KWTARGET)" + @echo " [RM] $(SETARGET)..." + $(HIDE) $(RM) "$(DESTDIR)$(BINPREFIX)/$(SETARGET)"" clean: @echo " [RM] $(DEPS)..." @@ -72,7 +72,7 @@ clean: $(HIDE) $(RM) $(SRC) @echo " [RM] $(TARGETS)..." $(HIDE) $(RM) $(TARGETS) - @echo " [RM] wmaffle.html syrup.html..." - $(HIDE) $(RM) wmaffle.html syrup.html + @echo " [RM] kiwmi.html seed.html..." + $(HIDE) $(RM) kiwmi.html seed.html -include $(DEPS) diff --git a/README.adoc b/README.adoc index 103d0f1..c567f52 100644 --- a/README.adoc +++ b/README.adoc @@ -1,5 +1,5 @@ -wmaffle -======= +kiwmi +===== A fully manual tiling window manager for the X window system. @@ -15,7 +15,7 @@ Where's the source at? In `lit/`. -wmaffle is a literate program. It's a cool thing by Knuth. I'm not going to explain this, since https://en.wikipedia.org/wiki/Literate_programming[this] does it better anyways. +kiwmi is a literate program. It's a cool thing by Knuth. I'm not going to explain this, since https://en.wikipedia.org/wiki/Literate_programming[this] does it better anyways. I'm using the https://github.com/zyedidia/Literate[Literate] utility for this, since it gets the job done, while keeping a light syntax for me. Why? Literate programming is awesome. This allows people to learn from my stuff while making it easy to contribute. @@ -38,7 +38,7 @@ Configuration ------------- Configuration languages suck and they add a lot of complexity to a program. -`wmaffle` listens to a socket and offers a basic client (called `syrup`) to communicate with the WM. +`kiwmi` listens to a socket and offers a basic client (called `seed`) to communicate with the WM. This allows you to write your configuration in any language you want, while also removing the task of listening to keybinds for me, since you can use tools like https://github.com/baskerville/sxhkd[sxhkd] to do that. diff --git a/lit/wmaffle.lit b/lit/kiwmi.lit similarity index 95% rename from lit/wmaffle.lit rename to lit/kiwmi.lit index f39e6b6..d86b789 100644 --- a/lit/wmaffle.lit +++ b/lit/kiwmi.lit @@ -1,16 +1,16 @@ @code_type c .c @comment_type /* %s */ -@title wmaffle +@title kiwmi @s Introduction -This is the source code for wmaffle. +This is the source code for kiwmi. It parses it's arguments and prints either help / info text, or runs the window manager. Here's an overview: ---- wmaffle.c +--- kiwmi.c @{copyright notice} @{c headers} @@ -142,7 +142,7 @@ I can clearly see how a user doesn't specify a config path. This was a design decision to make, whether to load a default config. I decided to go with it. -It loads `"${XDG_CONFIG_HOME:-$HOME/.config}/wmaffle/wmafflerc"`. +It loads `"${XDG_CONFIG_HOME:-$HOME/.config}/kiwmi/kiwmirc"`. ---get default config path const char *config_home = getenv("XDG_CONFIG_HOME"); @@ -153,7 +153,7 @@ if (config_home) { sizeof(config_path), "%s/%s", config_home, - "wmafflw/wmafflerc" + "kiwmi/kiwmirc" ); } else { snprintf( @@ -161,7 +161,7 @@ if (config_home) { sizeof(config_path), "%s/%s", getenv("HOME"), - ".config/wmaffle/wmafflerc" + ".config/kiwmi/kiwmi" ); } --- @@ -216,15 +216,15 @@ This requires this header file. @s Get socket path -We default to `/tmp/wmaffle.sock` if `WMAFFLE_SOCKET` isn't set. +We default to `/tmp/kiwmi.sock` if `KIWMI_SOCKET` isn't set. --- get socket path -sock_path = getenv("WMAFFLE_SOCKET"); +sock_path = getenv("KIWMI_SOCKET"); if (sock_path) { strncpy(sock_addr.sun_path, sock_path, sizeof(sock_addr.sun_path)); } else { - strncpy(sock_addr.sun_path, "/tmp/wmaffle.sock", sizeof(sock_addr.sun_path)); + strncpy(sock_addr.sun_path, "/tmp/kiwmi.sock", sizeof(sock_addr.sun_path)); } --- @@ -302,7 +302,7 @@ exec_config(config_path); @s Main loop -This is the heart of wmaffle. +This is the heart of kiwmi. A pretty basic loop: fetch event, decide if it's from X or the client, handle it. `select` is used for the first two steps. diff --git a/lit/syrup.lit b/lit/seed.lit similarity index 93% rename from lit/syrup.lit rename to lit/seed.lit index b5f90ad..27ceb2a 100644 --- a/lit/syrup.lit +++ b/lit/seed.lit @@ -1,14 +1,14 @@ @code_type c .c @comment_type /* %s */ -@title syrup +@title seed @s Introduction -Using syrup is rather straight forward. The syntax is as follows: `syrup COMMAND`. +Using seed is rather straight forward. The syntax is as follows: `seed COMMAND`. The program is also simple. Here is an outline. ---- syrup.c +--- seed.c @{copyright notice} @{c headers} @{posix headers} @@ -96,15 +96,15 @@ We're going to store the path in `sock_path`, local to main. const char *sock_path; --- -We check if `WMAFFLE_SOCKET` is set, and use it, or default to `/tmp/wmaffle.sock`. +We check if `KIWMI_SOCKET` is set, and use it, or default to `/tmp/kiwmi.sock`. --- get socket path -sock_path = getenv("WMAFFLE_SOCKET"); +sock_path = getenv("KIWMI_SOCKET"); if (sock_path) { strncpy(sock_addr.sun_path, sock_path, sizeof(sock_addr.sun_path)); } else { - strncpy(sock_addr.sun_path, "/tmp/wmaffle.sock", sizeof(sock_addr.sun_path)); + strncpy(sock_addr.sun_path, "/tmp/kiwmi.sock", sizeof(sock_addr.sun_path)); } ---