{"id":26665433,"url":"https://github.com/elsehow/miractl-nixos","last_synced_at":"2025-03-25T17:37:11.602Z","repository":{"id":186837003,"uuid":"635981942","full_name":"elsehow/miractl-nixos","owner":"elsehow","description":"Controlling Boox e-ink monitors from Python","archived":false,"fork":false,"pushed_at":"2023-05-03T22:02:20.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-15T07:13:49.306Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elsehow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-05-03T21:58:56.000Z","updated_at":"2023-05-03T22:47:44.000Z","dependencies_parsed_at":"2023-08-07T23:35:11.807Z","dependency_job_id":"b91597b7-1606-49ae-be43-c2d0a4de9cf1","html_url":"https://github.com/elsehow/miractl-nixos","commit_stats":null,"previous_names":["elsehow/miractl-nixos"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsehow%2Fmiractl-nixos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsehow%2Fmiractl-nixos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsehow%2Fmiractl-nixos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsehow%2Fmiractl-nixos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elsehow","download_url":"https://codeload.github.com/elsehow/miractl-nixos/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245511395,"owners_count":20627383,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-25T17:37:10.976Z","updated_at":"2025-03-25T17:37:11.594Z","avatar_url":"https://github.com/elsehow.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# miractl\n\n*Forked from [~elithper/miractl](https://git.sr.ht/~elithper/miractl) - many shouts!*\n\nA simple Python script for controlling Boox e-ink monitors on NixOS – both the Boox Mira 13.3\" and Boox Mira Pro 25.3\" are supported. \n\nThe script has been tested on Linux, Mac and Windows using Python 3.11.\n\nThis project is inspired by the excellent [mira-js](https://github.com/ipodnerd3019/mira-js) CLI tool.\n\n## Install\n\n``` sh\nshell nix-shell\n./miractl.py --help\n```\n\n## Setup\n\nIf you are using Linux, you will also need to modify your udev rules.\n\nCreate a new file called `58-hid.rules`.\n\n```\nsudo touch /etc/udev/rules.d/58-hid.rules\n```\n\nThen open the file in a text editor and paste the following content.\n\n```\nSUBSYSTEM==\"input\", GROUP=\"input\", MODE=\"0666\"\nSUBSYSTEM==\"usb\", ATTRS{idVendor}==\"0416\", ATTRS{idProduct}==\"5020\", MODE:=\"666\", GROUP=\"plugdev\"\nKERNEL==\"hidraw*\", ATTRS{idVendor}==\"0416\", ATTRS{idProduct}==\"5020\", MODE=\"0666\", GROUP=\"plugdev\"\n```\n\nFinally, reload your udev rules.\n\n```\nsudo udevadm control --reload-rules\nsudo udevadm trigger\n```\n\n## Usage\n\n\u003e Note: replace `./miractl.py` with `miractl` if you have added the script to your $PATH as described in Setup.\n\nGet help:\n\n```\n./miractl.py -h\n```\n\nSimple refresh:\n\n```\n./miractl.py --clear\n```\n\nConfigure monitor settings:\n\n```\n./miractl.py --refresh-mode {direct_update,grey_update,a2}\n             --speed [1-7]\n             --contrast [0-15]\n             --dither-mode [0-3]\n             --white-filter [0-254]\n             --black-filter [0-254]\n             --cool-light [0-254]\n             --warm-light [0-254]\n             --antiflicker {disabled,low,middle,high}\n```\n\nAny number of settings can be set in a single command, e.g.\n\n```\n./miractl.py --speed 5 --contrast 11 --cool-light 127\n```\n\nHowever, `--white-filter` and `--black-filter` must be set together.\n\n```\n./miractl.py --white-filter 80 --black-filter 120\n```\n\n## Display modes\n\nThere are 5 display modes which can be set using the `--display-mode` flag: `speed`, `text`, `image`, `video` and `read`.\n\n```\n./miractl.py --display-mode text\n```\n\nSince display modes are simply combinations of other flags, the display mode overrides any other settings in your command. For example, in the following command the values for `--contrast` and `--dither-mode` are ignored – the display mode takes precedence.\n\n```\n./miractl.py --display-mode speed --contrast 10 --dither-mode 2\n```\n\nThe only exceptions to this are `--cool-light` and `--warm-light`. Display modes never adjust the frontlight, so they can both be configured in a single command.\n\n```\n./miractl.py --display-mode speed --warm-light 110\n```\n\n## Antiflicker\n\nSetting `--antiflicker` allows you to select the autodithering algorithm used by the display. While there are several options (`disabled`, `low`, `middle` and `high`), only `high` is recommended.\n\nIt is especially important to set this option to `high` on newer ARM-based Macs, which often cause flickering issues otherwise.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felsehow%2Fmiractl-nixos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felsehow%2Fmiractl-nixos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felsehow%2Fmiractl-nixos/lists"}