diff options
| -rw-r--r-- | README.md | 17 | ||||
| -rw-r--r-- | config.h | 2 | ||||
| -rw-r--r-- | graphics.c | 4 | ||||
| -rw-r--r-- | registry.c | 2 | ||||
| -rwxr-xr-x | swenu-run.sh | 9 |
5 files changed, 24 insertions, 10 deletions
@@ -4,9 +4,14 @@ To build: `make` ## Todo - -- [ ] "Selection" -- [ ] Output results and exit code -- [ ] Cursor -- [ ] Scrolling -- [ ] Unicode -- [ ] Kerning +- [x] "selection" +- [ ] figure out whats going on with stderr and exit code +- [ ] cursor +- [ ] fuzzy filter and sort filtering by match % +- [ ] fancy highlights +- [ ] scrolling +- [ ] unicode +- [ ] kerning +- [ ] input fluff +- [ ] config file +- [ ] emacs keybindings @@ -4,6 +4,6 @@ #include <stdint.h> static const uint32_t min_width = 600; -static const uint32_t font_size = 16; +static const uint32_t font_size = 15; #endif @@ -43,7 +43,7 @@ layout (location = 0) out vec4 frag_color;\n\ \n\ void main() {\n\ float d = texture(u_texture, o_uv).r;\n\ - float aaf = fwidth(d);\n\ + float aaf = fwidth(d) * 0.5f;\n\ float alpha = smoothstep(0.5 - aaf, 0.5 + aaf, d);\n\ frag_color = vec4(u_color, alpha);\n\ }"; @@ -113,7 +113,7 @@ bool init_gl(client_state* state) { GLint major, minor; glGetIntegerv(GL_MAJOR_VERSION, &major); glGetIntegerv(GL_MINOR_VERSION, &minor); - printf("GL version %u.%u\n", major, minor); + fprintf(stderr, "GL version %u.%u\n", major, minor); } glEnable(GL_BLEND); @@ -16,7 +16,7 @@ void setup_registry_and_globals(client_state* state) { void global(void *data, struct wl_registry *wl_registry, uint32_t name, const char *interface, uint32_t version) { client_state* state = data; - printf("iface: %s v%d\n", interface, version); + fprintf(stderr, "iface: %s v%d\n", interface, version); if (!strcmp(interface, wl_compositor_interface.name)) { state->compositor = wl_registry_bind(wl_registry, name, &wl_compositor_interface, 1); diff --git a/swenu-run.sh b/swenu-run.sh new file mode 100755 index 0000000..4ab3aa6 --- /dev/null +++ b/swenu-run.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +IFS=: +exec $( + for dir in $PATH; do + for file in "$dir"/*; do + [ -f "$file" ] && [ -x "$file" ] && printf '%s\n' "${file##*/}" + done + done | sort -u | ./swenu -a) |
