Code Monkey home page Code Monkey logo

maccel's Introduction

maccel

Linear mouse acceleration. image

Acceleration Function

$$V = \frac{\sqrt{dx_0^2 + dy_0^2}}{i}$$

$$dx_f = dx_0 * (1 + aV)$$

$$dy_f = dy_0 * (1 + aV)$$

Where $dx$ and $dy$ are the directional displacements read from the mouse, $i$ is the polling interval of the mouse; this would be 1ms if the polling rate is 1000Hz, and $a$ is the user provided acceleration factor

Install

Make sure to have these dependencies installed on your machine: curl, git, make, gcc, and the linux headers in /lib/modules/

curl -fsSL https://www.maccel.org/install.sh | sudo sh

Uninstall

sh /opt/maccel/uninstall.sh

Or

curl -fsSL https://www.maccel.org/uninstall.sh | sudo sh

CLI Usage

CLI to control the parameters for the maccel driver, and manage mice bindings

Usage: maccel <COMMAND>

Commands:
  tui        Open the Terminal UI to manage the parameters and see a graph of the sensitivity
  bind       Attach a device to the maccel driver
  bindall    Attach all detected mice to the maccel driver
  unbind     Detach a device from the maccel driver, reattach to the generic usbhid driver
  unbindall  Detach all detected mice from the maccel driver reattach them to the generic usbhid driver
  set        Set the value for a parameter of the maccel driver
  get        Get the value for a parameter of the maccel driver
  help       Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version

Notes

One should disable the acceleration done by default in some distros, e.g. by xset or libinput. Full Guide

Here is Breakdown of why and how I ended up making this

References

Troubleshooting Install

gcc

The version matters, it must match the version with which the kernel was built.

For example you might encounter such an error:

image

And you'll have to find a version of gcc that matches. This will be more or less annoying depending on your distro and/or how familiar you are with it.

linux headers

You want to make sure that /lib/modules/ is not empty. For example mine looks like this:

total 0
drwxr-xr-x 1 root root    114 Jan 29 17:59 .
drwxr-xr-x 1 root root 159552 Jan 29 22:39 ..
drwxr-xr-x 1 root root     10 Jan 29 17:59 6.6.14-1-lts
drwxr-xr-x 1 root root     12 Jan 29 17:59 6.7.0-zen3-1-zen
drwxr-xr-x 1 root root    494 Jan 29 17:59 6.7.2-arch1-1
drwxr-xr-x 1 root root    494 Jan 31 21:54 6.7.2-zen1-1-zen

You want to find headers that match your kernel as represented by

uname -r

On an arch based distro you list the available headers with

sudo pacman -Ss linux headers

Troubleshooting Driver

If you notice any weird behavior and are looking to investigate it, then try a debug build of the driver. Run this modified install command.

curl -fsSL https://www.maccel.org/install.sh | sudo MACCEL_DEBUG_INSTALL=1 sh

This debugging experience might be lacking still. Feel free to report any issues.

Limitations

This might not work for some mice. For all intents and purposes this is a bug.
See this issue.
If you're having an issue like this, it may help to install maccel from a different branch.

Notably, I am using this (it is working) on:
Razer Viper, Razer Deathadder V2

maccel's People

Contributors

gnarus-g avatar orhun avatar

Stargazers

sy3c4ll avatar Johannes Horner avatar Technetium1 avatar  avatar Jason Brake avatar Frozen_byte avatar  avatar Filippo Giunchedi avatar Matteo Bigoi avatar  avatar Vladimir avatar  avatar astrolemonade avatar Tiago Carvalho avatar  avatar Egor Lynov avatar Tomas Zemanovic avatar ૮༼⚆︿⚆༽つ avatar Marcus Borkenhagen avatar Rek avatar Tomasz Kapias avatar Kenn avatar Gökay Okyay avatar Jeff Carpenter avatar  avatar

Watchers

Kenn avatar Frozen_byte avatar  avatar  avatar

Forkers

orhun

maccel's Issues

Values change after closing cli interface

Hate to be that guy but I have an issue:

When I fill in my values they all look as they schould I then press q as instructed.
When I then reoppen the cli, some values a different.

Steps to reproduce
-Input:
--SensM 0.0917
--Accel 0.002048
--Offset 78.125
--OC 2.02399
-quit out of cli
-reopen cli
-see some new values:
--SensM 0.08984375
--Accel 0.00390625
--Offset 78.125
--OC 78.125

OS = arcoLinux (arch but with pasases)
Kernel = 6.8.7-zen
WM = Hyprland
Terminalemulator = kitty

My numbers are this low bc I use 10000dpi.
Relating to my dpi would it be posible to have a way to rescale the graph so higher then 1600 dpi would be easyer to use?

p.s. I am dyslexic, hope its readable and helpful

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.