r/openbsd 1d ago

xhidecursor 1.1.0 – now OpenBSD-ready!

Hey guys! Some time ago I published xhidecursor, a minimal (fr) X11 utility that efficiently (nocap) hides the cursor on key presses and shows it again on mouse movement. I wrote it because xbanish (a popular alternative) couldn’t satisfy my OCD for minimalism.

Some people complained that it wasn’t portable to OpenBSD and FreeBSD, so I finally did the work and made it happen. I’d be happy if some OpenBSD users could try it out and report back whether it works or if there are still any issues.

Thank you!

18 Upvotes

6 comments sorted by

4

u/jcs OpenBSD Developer 1d ago

good, xbanish sucks

2

u/makzpj 1d ago

Works fine, and the code is surprisingly small, I could read it in minutes.

The only issue is that apparently make install puts the manpage in a non-standard location.

Now I need to find a use case for this.

2

u/aleksandrsstier 16h ago edited 16h ago

Thank you for testing it and letting me know. I wasn’t aware that man pages on OpenBSD have a different location than on GNU/Linux. I thought about this issue but couldn’t find any easy solution other than having users specify the man directory manually. For you this would probably be:

sh doas make install MANDIR=/usr/local/man/man1

or you can override the value directly in the Makefile. I looked at the suckless utilities and they basically expect the same. I’ll keep the Linux default for now since MANDIR is configurable, it covers most users with a sensible default, and I use Linux myself. But thanks for pointing it out!

Regarding the use case: it’s really just for people who don’t want to see the cursor while typing, for a more minimal UI. Sometimes the cursor also gets in the way when typing. But it’s mostly a matter of preference and definitely nothing that’s required. Also for mouse-phobic people who love to use the keyboard for everything haha

1

u/RabbitsandRubber 1d ago

Thanks. I have a use case for this so I'll check it out and see if I can contribute and help maintain it. I glanced at the code and understood it in under a minute. Really good work.

Have you submitted it to the ports mailing list yet? I can't check at the moment but I'll take a peek tomorrow when I sync my mail.

1

u/aleksandrsstier 16h ago

Thanks! No, I haven’t submitted it to the ports mailing list yet. I’m not really familiar with the OpenBSD ports process, so if you’d like to take a look at getting xhidecursor into ports, I’d definitely appreciate it. Let me know if you do. Otherwise, I might look into it myself at some point. This is definitely the type of help I would appreciate!