Devlog 0x004
AI Usage Disclaimer
It's been a while since the last devlog. I've got a lot to share about what I've been spending my time on, but due to IRL things unrelated to code, I had to be AFK for a week or so, so I couldn't publish this earlier.
MDNotes
I briefly discussed the initial working implementation of mdnotes in my last devlog.
Since then, I have done a lot of improvements:
- The UI now updates in real-time when synced across devices.
- There's a new UI popup for resolving merge conflicts in notes.
- Better "Preferences" UI.
- There are new pre-bundled well-known themes beyond the default
lightanddark. - Ability to "pin" notes.
- Popular
google-fontsfor UI, editor and preview. Selected font is downloaded once and cached locally until font is changed. - Automatic session renewal once the user is logged in and connected to the server. Currently, session expiry invalidates local unsynced notes. So, if you keep using this app offline for more than 6 months, all of the data will be lost, which is awful. I'll think more about this.
I've been using this to share text across devices - which I used to do earlier by sending messages to myself on Telegram, taking notes, writing draft posts - all day.
It actually feels like a native app now, and being a PWA, it works on every single device. Everything is offline-first, syncing happens via a web-worker, either periodically or after any user activity.
mousr
Another fantastic utility I've been working on is mousr. The idea is simple: I use sway window manager as my daily driver which means I use my keyboard a lot more than my mouse.
I wanted to simulate mouse controls with the keyboard - I saw this on ppy's streams. The program he uses finds potentially clickable elements on the screen selectively - either via API or OCR, not sure - but it doesn't seem to be reliable enough. He often needs to fall back to moving pointer like a joystick with keyboard - I wanted something more deterministic.
When I want to click somewhere, my eyes are already looking at the target position. So if I geohash my screen, potentially recursively if where I want to click isn't covered correctly by a rectangle, clicking doesn't take any cognitive effort to find the correct grid. I looked at existing open-source alternatives, but NONE of them allow me to simulate mouse button at any level of this recursively geohashed rectangles. I can simulate clicks only in the last level? WHY?
So I built one, currently it only supports sway. Geohashing the screen is the primary use case, but it also supports a joystick-like pointer control as a fallback too. I've been daily driving this on sway, which is the only window manager it supports, and so far it's been perfect. I'm also thinking about adding hexagonal shape would help, let's see.
This is what my sway config looks like with this tool:
# start the daemon
exec mousr daemon
# grid mode across all displays
bindsym Mod1+space exec mousr grid --scope all
# mouse mode
bindsym Mod1+Shift+space exec mousr mouse
# bind scroll up/down
bindsym --inhibited Mod4+bracketleft exec mousr scroll down --step 20
bindsym --inhibited Mod4+bracketright exec mousr scroll up --step 20BTW, this does not eliminate the mouse entirely, for a mouse-heavy workflow like drawing something. But most of the time, I just want to emulate a click at some position on my screen, and this lets me do it instantly.
I'm planning to support hyprland first, probably with a VM, and after that I'll see if macOS support is possible.
jiotv_go
I'm also maintaining a fork of jiotv_go, which adds an alternative webOS-friendly UI and some small goodies that I needed for myself.
I finally got root access to my LG TV's webOS using this script. Now I can directly run the aarch64 server binary on the TV and configure it to start the server at boot. The ipk can now use localhost, so no more network hops and cumbersome local https setup with caddy and an extra device!
Alright, that's about it for now. Also, I promised I wouldn't change fonts for the next three years on this website in my last devlog, but Recursive was too good to pass on, I'm sorry.
Interesting links
Unfortunately, nothing to share this time. Been busy with working on stuff mentioned above.
Until next time :^)
By the way, if you're interested, you can check out all devlogs here.