aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Jamison <jackqjamison@gmail.com>2025-10-18 01:36:29 -0400
committerJack Jamison <jackqjamison@gmail.com>2025-10-18 01:36:29 -0400
commit4ec95c0bc1223aee10449bf831d29f4f683faff7 (patch)
tree9b0bbe206daacf19fecdcc74093c06f1cdf0f89f
parentb6db9c7c1b8e2cef958b892b067aa565f4c5e403 (diff)
fix output and swenu-run
-rw-r--r--README.md17
-rw-r--r--config.h2
-rw-r--r--graphics.c4
-rw-r--r--registry.c2
-rwxr-xr-xswenu-run.sh9
5 files changed, 24 insertions, 10 deletions
diff --git a/README.md b/README.md
index f21a1da..4f16dc2 100644
--- a/README.md
+++ b/README.md
@@ -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
diff --git a/config.h b/config.h
index 61d0e7b..494ae97 100644
--- a/config.h
+++ b/config.h
@@ -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
diff --git a/graphics.c b/graphics.c
index d7b630a..e2f06a1 100644
--- a/graphics.c
+++ b/graphics.c
@@ -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);
diff --git a/registry.c b/registry.c
index 8230339..204281d 100644
--- a/registry.c
+++ b/registry.c
@@ -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)