built with nix and LaTeX. source code
# calculation are based on http://www.esreality.com/index.php?a=post&id=1945096 | |
# assuming windows 10 uses the same calculation as windows 7. | |
# guesses have been made calculation is not accurate | |
# touchpad users make sure your touchpad is calibrated with `sudo libinput measure touchpad-size` | |
# import matplotlib.pyplot as plt | |
import struct | |
# set according to your device: | |
xinput_device_id = 13 | |
device_dpi = 1000 # mouse dpi |
There are some articles you want to read first:
- https://www.tweag.io/blog/2020-05-25-flakes/
- https://www.tweag.io/blog/2020-06-25-eval-cache/
- https://www.tweag.io/blog/2020-07-31-nixos-flakes/
Nix Flakes is currently an experimental feature, so this tutorial assumes that you are using the unstable
channel.
Nix is a package manager that you can install in parallel with your system package manager on Linux or MacOS. It allows you to effortlesly build any of the thousands of packages defined in the nixpkgs repository or write your own package expressions. Packages in the nixpkgs repository get periodically built by our CI server so the GIMP dependencies will be obtained from binary cache saving you time.
To obtain Nix, you can simply run an installation script, or use your package manager if it is packaged in your distro repositories. Notably, there is a package in Arch’s AUR and Debian Unstable.
The pull request containing changes for the latest changes for GIMP master is NixOS/nixpkgs#67576. I usually update the branch several times a month to point to t
import Control.Applicative | |
import Control.Monad | |
import Control.Concurrent | |
import Data.String | |
import Data.Char | |
import Data.List | |
import Data.Monoid | |
import Control.Monad.IO.Class |