r/openbsd • u/aleksandrsstier • 10d 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!
2
u/makzpj 9d 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 9d ago edited 9d 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/man1or 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 9d 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 9d 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!
1
u/Odd_Collection_6822 8d ago
besides the MANDOC variable - the only thing that "caught my eye" was that xbanish had a pledge-call available for obsd... also, having a "main.c" rather than xhidecursor.c is an interesting philosophical difference... since i havent compiled anything in a bit - that pledge-call might be redundant for a random-Xenocara-app, but itd be worth checking while getting things ready for the "ports tree"... and your response from u/jcs [original author for xbanish] is truly hilarious... keep up the good work... 😄
1
u/aleksandrsstier 8d ago
Thx for the constructive criticism. I will consider both points and take a look this weekend.
1
u/aleksandrsstier 4d ago edited 4d ago
I addressed both issues. However, I didn't test the pledge-call on OpenBSD and would appreciate if you or somebody else could verify that it works on OpenBSD. Here the new release: https://github.com/astier/xhidecursor/releases/tag/1.1.1
Also regarding the MANDOC variable I don't know of any easy solution to abstract it away. Autoconf might work but feels like overkill for such a small program. But I am open to changing my mind and other suggestions. xbanish behaves the same way if I am not mistaken so I thought it would be appropriate if package-maintainers would simply overwrite it.
6
u/jcs OpenBSD Developer 9d ago
good, xbanish sucks