maccel icon indicating copy to clipboard operation
maccel copied to clipboard

Install scripts refactor/optimizing

Open lowerclasswarfare opened this issue 2 months ago • 0 comments

Not really an issue per se, but kinda.

First of all, this is a cool project.

  • Glad to see someone doing a raw accel driver for linux.
  • TUI interface is sick. (Even though it seems to have some resizing issues.)
  • Makes my mouse a lot more controllable.
  • Makes headshot go boom
  • *Dopamine intensifies*

ANYWAYS...

I decided to refactor the install script, or at least an attempt at improving it. Since I had a few hiccups getting everything working (cuz Gentoo/my specific setup).

In no particular order:

  • Removing unnecessary functions
  • Adding variables
  • Cleaning up calls to grep
  • Avoiding forking
  • Using heredocs for console messages
  • Trying to keep an 80 column limit
  • Extra ✨terminal bling✨ etc etc.

Thoughts:

I did add some bashisms in there, but I saw you already kinda had some? Which made me ask a lot of questions about the entire script in general like the shebang at the top , why it was /bin/sh, and if we're trying to be posix compatible here or what. Plus a whole bunch of other stuff haha.

Another idea was I'd have a bash specific script and a posix specific script for people with different or weird/old shells. Possibly one script to detect the user's shell, then run an appropriate script. Probably overkill though. Also some make file adjustments maybe?

I'm also considering making an ebuild for maccel, but I'm not quite there yet as that would take some work on my part. If I do, I'll probably host it on a personal overlay for anyone who's interested I guess. Or I could try to get it into guru. No promises though lol.

Just wondering what your thoughts are before I send a pull request or anything like that. I'd love to contribute any way I can!

Cheers.

lowerclasswarfare avatar Oct 20 '25 14:10 lowerclasswarfare