{"id":13440338,"url":"https://github.com/Toxblh/MTMR","last_synced_at":"2025-03-20T09:32:56.918Z","repository":{"id":37484145,"uuid":"125547624","full_name":"Toxblh/MTMR","owner":"Toxblh","description":"🌟 [My TouchBar My rules]. The Touch Bar Customisation App for your MacBook Pro","archived":false,"fork":false,"pushed_at":"2024-03-13T19:07:04.000Z","size":9880,"stargazers_count":4215,"open_issues_count":202,"forks_count":219,"subscribers_count":55,"default_branch":"master","last_synced_at":"2024-10-29T15:38:48.659Z","etag":null,"topics":["applescript","bar","custom-touchbar","customization","customization-app","dock","macbook","macos","statusbar","touch","touch-bar-customization","touch-bar-customization-app","touchbar"],"latest_commit_sha":null,"homepage":"https://mtmr.app","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Toxblh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"issuehunt":"Toxblh","patreon":"toxblh","ko_fi":"toxblh","custom":"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=WUAAG2HH58WE4"}},"created_at":"2018-03-16T17:17:30.000Z","updated_at":"2024-10-28T15:29:21.000Z","dependencies_parsed_at":"2022-07-12T21:01:23.225Z","dependency_job_id":"97e70b1a-d301-4e9e-9e05-a2273260de35","html_url":"https://github.com/Toxblh/MTMR","commit_stats":{"total_commits":509,"total_committers":40,"mean_commits":12.725,"dds":0.6424361493123771,"last_synced_commit":"dd99e9d73d89fd6f27abb525193cf9efc13f40e0"},"previous_names":[],"tags_count":56,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Toxblh%2FMTMR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Toxblh%2FMTMR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Toxblh%2FMTMR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Toxblh%2FMTMR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Toxblh","download_url":"https://codeload.github.com/Toxblh/MTMR/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244386090,"owners_count":20444221,"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":["applescript","bar","custom-touchbar","customization","customization-app","dock","macbook","macos","statusbar","touch","touch-bar-customization","touch-bar-customization-app","touchbar"],"created_at":"2024-07-31T03:01:21.840Z","updated_at":"2025-03-20T09:32:56.880Z","avatar_url":"https://github.com/Toxblh.png","language":"Swift","readme":"# My touchbar. My rules. [![GitHub release](https://img.shields.io/github/release/toxblh/MTMR.svg)](https://github.com/Toxblh/MTMR/releases) [![license](https://img.shields.io/github/license/Toxblh/MTMR.svg)](https://github.com/Toxblh/MTMR/blob/master/LICENSE) ![minimal system requirements](https://img.shields.io/badge/required-macOS%2010.12.2-blue.svg) ![travis](https://travis-ci.org/Toxblh/MTMR.svg?branch=master)\n\n\u003cimg src=\"Resources/logo.png\" align=\"right\"\n     title=\"MTMR by Toxblh\" width=\"110\" height=\"110\"\u003e\n\n_The TouchBar Customization App for your MacBook Pro_\n\nMy idea is to create a platform for creating plugins to customize the TouchBar. I very much like BTT and having a full custom TouchBar (my BTT preset), and I wanted to create it. It's my first Swift project for MacOS :)\n\n**Share your presets [here](https://github.com/Toxblh/MTMR-presets)**\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./Resources/aaaaa-acc6-17fee7572ed0.png\" alt=\"Mackbook with touchbar\" width=\"800\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://discord.gg/CmNcDuQ\"\u003e\u003cimg height=\"20px\" src=\"https://assets-global.website-files.com/6257adef93867e50d84d30e2/62fddf0fde45a8baedcc7ee5_847541504914fd33810e70a0ea73177e%20(2)-1.png\"\u003e Discord\u003c/a\u003e\n\u003ca href=\"https://t.me/joinchat/AmVYGg8vW38c13_3MxdE_g\"\u003e\u003cimg height=\"20px\" src=\"https://telegram.org/img/t_logo.png\" /\u003e Telegram\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\u003ca href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=WUAAG2HH58WE4\" title=\"Donate via Paypal\"\u003e\u003cimg height=\"36px\" src=\"Resources/support_paypal.svg\" alt=\"PayPal donate button\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://www.buymeacoffee.com/toxblh\" target=\"_blank\"\u003e\u003cimg src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" alt=\"Buy Me A Coffee\" height=\"36px\" \u003e\u003c/a\u003e\n\u003ca href=\"https://www.patreon.com/bePatron?u=9900748\"\u003e\u003cimg height=\"36px\"  src=\"https://c5.patreon.com/external/logo/become_a_patron_button.png\" srcset=\"https://c5.patreon.com/external/logo/become_a_patron_button@2x.png 2x\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.producthunt.com/posts/my-touchbar-my-rules-mtmr\"\u003e\n    \u003cimg src=\"https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=my-touchbar-my-rules-mtmr\u0026theme=light\" alt=\"My TouchBar My Rules (MTMR)\" height=\"36px\" style=\"max-width:100%\"\u003e\n\u003c/a\u003e\u003c/p\u003e\n\n## Installation\n\n- Download latest [release](https://github.com/Toxblh/MTMR/releases) (.dmg) from github\n- Or via Homebrew `brew install --cask mtmr`\n- [Dario Prski](https://medium.com/@urdigitalpulse) has written a [fantastic article on medium](https://medium.com/@urdigitalpulse/customise-your-macbook-pro-touch-bar-966998e606b5) that goes into more detail on installing MTMR\n\n**On first install** you need to allow access for MTMR in Accessibility otherwise buttons like \u003ckbd\u003eEsc\u003c/kbd\u003e, \u003ckbd\u003eVolume\u003c/kbd\u003e, \u003ckbd\u003eBrightness\u003c/kbd\u003e and other system keys won't work.\n\n\u003cp align=\"center\"\u003e\n\u003cimg width=\"450\" alt=\"screenshot 2019-02-24 at 23 19 20\" src=\"https://user-images.githubusercontent.com/2198153/53307057-2b078200-388c-11e9-8212-8c2b1aff0aa6.png\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n🍏→ System Preferences → Security and Privacy → tab Privacy → Accessibility → MTMR\n\u003c/p\u003e\n\n## Examples\n\n[MTMR presets](https://github.com/Toxblh/MTMR-presets)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./Resources/Artboard.png\" alt=\"Presets for touchbar\" width=\"800\"\u003e\n\u003c/p\u003e\n\n## Customization\n\nMTMR preferences are stored in `~/Library/Application\\ Support/MTMR/items.json`.\n\nThe pre-installed configuration contains less or more than you'll probably want, try to configure:\n\n## Built-in button types:\n\n\u003e Buttons\n\n- escape\n- exitTouchbar\n- brightnessUp\n- brightnessDown\n- illuminationUp (keyboard illumination)\n- illuminationDown (keyboard illumination)\n- volumeDown\n- volumeUp\n- mute\n\n\u003e Native Plugins\n\n- timeButton\n- battery\n- cpu\n- currency\n- weather\n- yandexWeather\n- inputsource\n- music (tap for pause, longTap for next)\n- dock (half-long click to open app, full-long click to kill app)\n- nightShift\n- dnd (Don't disturb)\n- darkMode\n- pomodoro\n- network\n- upnext (Calendar events)\n\n\u003e Media Keys\n\n- previous\n- play\n- next\n\n\u003e AppleScript plugins\n\n- sleep\n- displaySleep\n\n\u003e Custom buttons\n\n- staticButton\n- appleScriptTitledButton\n- shellScriptTitledButton\n\n## Gestures\n\nBy default you can enable basic gestures from application menu (status bar -\u003e MTMR icon -\u003e Volume/Brightness gestures):\n- two finger slide: change you Volume\n- three finger slide: change you Brightness\n\n### Custom gestures\n\nYou can add custom actions for two/three/four finger swipes. To do it, you need to use `swipe` type:\n\n```json\n    \"type\": \"swipe\",\n    \"fingers\": 2,            // number of fingers required (2,3 or 4)\n    \"direction\": \"right\",    // direction of swipe (right/left)\n    \"minOffset\": 10,          // optional: minimal required offset for gesture to emit event\n    \"sourceApple\": {         // optional: apple script to run\n        \"inline\": \"beep\"\n    },\n    \"sourceBash\": {          // optional: bash script to run\n        \"inline\": \"touch /Users/lobster/test\"\n    }\n```\n\nYou may create as many `swipe` objects in the preset as you want.\n\n## Built-in slider types:\n\n- brightness\n- volume\n\n### You can also make custom buttons using these types\n\n#### `staticButton`\n\n```json\n \"type\": \"staticButton\",\n \"title\": \"esc\",\n```\n\n#### `appleScriptTitledButton`\n\n```js\n  {\n    \"type\": \"appleScriptTitledButton\",\n    \"refreshInterval\": 60, //optional\n    \"source\": {\n      \"filePath\": \"~/Library/Application Support/MTMR/iTunes.nowPlaying.scpt\",\n      // or\n      \"inline\": \"tell application \\\"Finder\\\"\\rif not (exists window 1) then\\rmake new Finder window\\rset target of front window to path to home folder as string\\rend if\\ractivate\\rend tell\",\n      // or\n      \"base64\": \"StringInbase64\"\n    },\n  }\n```\n\n\u003e Note: You can change appleScriptTitledButton's icon by following these steps:\n1. Declare dictionary of icons in `alternativeImages` field\n2. Make you script return array of two values - `{\"TITLE\", \"IMAGE_LABEL\"}`\n3. Make sure that your `IMAGE_LABEL` is declared in `alternativeImages` field\n\nExample:\n```js\n  {\n    \"type\": \"appleScriptTitledButton\",\n    \"source\": {\n      \"inline\": \"if (random number from 1 to 2) = 1 then\\n\\tset val to {\\\"title\\\", \\\"play\\\"}\\nelse\\n\\tset val to {\\\"title\\\", \\\"pause\\\"}\\nend if\\nreturn val\"\n    },\n    \"refreshInterval\": 1,\n    \"image\": {\n      \"base64\": \"iVBORw0KGgoAAAANSUhEUgA...\"\n    },\n    \"alternativeImages\": {\n      \"play\": {\n        \"base64\": \"iVBORw0KGgoAAAANSUhEUgAAAAAA...\"\n      },\n      \"pause\": {\n        \"base64\": \"iVBORw0KGgoAAAANSUhEUgAAAIAA...\"\n      }\n    }\n  },\n```\n\n#### `shellScriptTitledButton`\n\u003e Note: script may also use escape sequences to return colors (read https://misc.flogisoft.com/bash/tip_colors_and_formatting for more information)\n\u003e \"16 Colors\" is the only mode supported presently. Buttons will set their own background color to the color returned.\n\nExample of \"CPU load\" button which also changes color based on load value (Note: The native `cpu` plugin runs runs better):\n```js\n{\n  \"type\": \"shellScriptTitledButton\",\n  \"width\": 80,\n  \"refreshInterval\": 2,\n  \"source\": {\n    \"inline\": \"top -l 2 -n 0 -F | egrep -o ' \\\\d*\\\\.\\\\d+% idle' | tail -1 | awk -F% '{p = 100 - $1; if (p \u003e 30) c = \\\"\\\\033[33m\\\"; if (p \u003e 70) c = \\\"\\\\033[30;43m\\\"; printf \\\"%s%4.1f%%\\\\n\\\", c, p}'\"\n  },\n  \"actions\": [\n    {\n      \"trigger\": \"singleTap\",\n      \"action\": \"appleScript\",\n      \"actionAppleScript\": {\n        \"inline\": \"activate application \\\"Activity Monitor\\\"\\rtell application \\\"System Events\\\"\\r\\ttell process \\\"Activity Monitor\\\"\\r\\t\\ttell radio button \\\"CPU\\\" of radio group 1 of group 2 of toolbar 1 of window 1 to perform action \\\"AXPress\\\"\\r\\tend tell\\rend tell\"\n      }\n    }\n  ],\n  \"align\": \"right\",\n  \"image\": {\n    // Or you can specify a filePath here.\n    // Images will be resized to 24x24.\n    // \"filePath\": \"~/myproject/myimage.jpg\" // or \"/fixed/path/to/the.png\"\n    \"base64\":\n    \"iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAA/1BMVEUAAADaACbYACfYACfjABzXACjYACfXACjYACfYACfYACfYACfdACLYACfXACjYACfVACv/AADXACjYACfYACfXACjYACfXACjaACXYACfYACfVACvYACfYACfZACbZACbYACfYACfZACb/AADYACfYACfVACrXACjVACu/AEDYACfYACfYACfXACjXACjYACfXACjYACfYACfYACfXACjYACfXACjYACfYACfZACbYACfYACfMADPYACfYACfYACfYACfYACfZACbXACjYACfYACfRAC7XACjYACfZACbWACnXACjXACjYACfTACzZACb/AADYACfYACfYACcAAAA+zneGAAAAU3RSTlMAItK+CVPjh3xUxPwPiGDQGAMtSKmN3Vk+wPQG/e26oIJBnwJCdiuAHgTmw+6BX+IgfaqLUvKOW8VKnagK+vBwYrhlc/urCznvhSyUbOEXPAFjGh/ektAAAAABYktHRACIBR1IAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4ggWETQWgEDcSgAAAqVJREFUWMPtl4ly2jAQhsUNNlcw5r4SICEHLSQhCQRyX73T/u//LpUlLIyxbMAznWmn/0ywo5U+27tr7ZoQuwLBUJidRKIxPhKLRtgxHAoGiLfiQIKdKFCTxjGpQmEDCSC+BiAFpNlJBsgaxyyQYQNpIPUf8AcAOzktD+iaoQJQNI5FoMAGdCCv5XZclpfKFXiqUi5Jllf1mvdyQzW96gigd4h6o+mhRp1O0x3vvwa1VSWeqrZU1Jyeogy01ggSVQsoO/i/gjq9/u6u+2LDXq2jshqLHNCgdsCVwO0NILdi0oDmuoAmoImhQDzFRPNnb36L7U43NVfc2EH2D9h5t9OePyIF5IU9uIhvkyN7iiXmQUIOj8x/lB6f0bTaQ3ZA+9iaNCH2Lpg6btsBIRJOpJl0E9ABTvof5kqEGeCjMaN/AnRMgM5XJcI2J1J1gf6S48Tb2Ae6JkAjdgmAeJ1XAOJ1Xg8wGJ6elXwAzkeGjy62BgxG3MuXnoCIkmEq8EQyAUPgajyhPxJAga9SIiRqzwMOuAbGZDrDjQRgKkpiqiPgFphM74B7d4BKy2cyy1RcBvSodUb/HiSAIl+VlEfh8cm4wvPL9nnw+gbc+kkkUVioO95etwe8PBuP8vQoBzg7UQAe5t7syZwoCaMA3AN30wlzh3MYJYkkADeYTckYuJYlkiSVBeCKZtSY/gxlqezlxEt+pdFg6zBesPXn1ih8Aj5vkAels9PhYCkPsl++kg0AQu4dyuqmugIQm+qS5Nv6N+D7wm7d1skPc4xu666Fhd6BxU6r+jub8tNaWNxK29EhsdpR/sVn7FlLm0txPdgni+JrFNd3p+K67MQtyrsp3w2G7xbHd5Plv83z3Wj6b3V9N9ssFv7afaa//ZPn3wD4/vje8PP/N7TebS0hgZhEAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTA4LTIyVDE3OjUyOjIyKzAyOjAwc2qUYAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0wOC0yMlQxNzo1MjoyMiswMjowMAI3LNwAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC\"\n  },\n  \"bordered\": false\n}\n```\n\n## Groups\n\n```js\n{\n  \"type\": \"group\",\n  \"align\": \"center\",\n  \"bordered\": true,\n  \"title\": \"stats\",\n  \"items\": [\n    { \"type\": \"play\" },\n    { \"type\": \"mute\" },\n    ...\n  ]\n}\n```\n\nTo close a group, use the button:\n\n```\n{\n  \"type\": \"close\",\n  \"width\": 64\n},\n```\n\n## Native plugins\n\n#### `cpu`\n\n\u003e Shows current CPU load in percent, changes color based on load value. \n\u003e Has lower power consumption and higher stability than the shell-based solution.\n\n```js\n{\n  \"type\": \"cpu\",\n  \"refreshInterval\": 3,\n  \"width\": 80\n}\n```\n\n#### `timeButton`\n\n\u003e NOTE: Some values don't work properly: https://en.wikipedia.org/wiki/List_of_time_zone_abbreviations\n\n\u003e formatTemplate examples: https://www.datetimeformatter.com/how-to-format-date-time-in-swift/\n\n\u003e locale examples: https://gist.github.com/jacobbubu/1836273\n\n```js\n{\n  \"type\": \"timeButton\",\n  \"formatTemplate\": \"dd HH:mm\",\n  \"locale\": \"en_GB\",\n  \"timeZone\": \"UTC\"\n}\n```\n\n#### `weather`\n\n\u003e Provider: https://openweathermap.org \\\n\u003e Note: Register at https://openweathermap.org to get your API key \\\n\u003e Note: Wait for 20 minutes or so for Openweathermap to activate your API key.\\\n\u003e Note: Enable MTMR in \"Location Services\" in the \"Security \u0026 Privacy\" System Preferences pane\n\n```js\n  \"type\": \"weather\",\n  \"refreshInterval\": 600, // in seconds\n  \"units\": \"metric\", // or imperial\n  \"icon_type\": \"text\", // or images\n  \"api_key\": \"\" // you can get the key on openweather\n```\n\n#### `yandexWeather` (experimental)\n\n\u003e Provider: https://yandex.ru/pogoda. One click to open up weather forecast in your browser. \\\n\u003e Note: Enable MTMR in \"Location Services\" in the \"Security \u0026 Privacy\" System Preferences pane\n\n```js\n  \"type\": \"yandexWeather\",\n  \"refreshInterval\": 600 // in seconds\n```\n\n#### `currency`\n\n\u003e Provider: https://coinbase.com\n\n```js\n  \"type\": \"currency\",\n  \"refreshInterval\": 600, // in seconds\n  \"align\": \"right\",\n  \"from\": \"BTC\",\n  \"to\": \"USD\",\n  \"full\": true // £‣1.29$\n```\n\n#### `music`\n\n```js\n{\n  \"type\": \"music\",\n  \"align\": \"center\",\n  \"width\": 80, // Optional\n  \"bordered\": false, // Optional\n  \"refreshInterval\": 2, // in seconds. Optional. Default 5 seconds\n  \"disableMarquee\": true // to disable marquee effect. Optional. Default false\n},\n```\n\n#### `pomodoro`\n\n\u003e Pomodoro plugin. One tap starts the work timer, long-press to start the rest timer. Tap an in-progress timer to reset.\n\n```js\n{\n  \"type\": \"pomodoro\",\n  \"workTime\": 1200, // set time work in seconds. Default 1500 (25 min)\n  \"restTime\": 600 // set time rest in seconds. Default 300 (5 min)\n},\n```\n\n#### `network`\n\n\u003e Network plugin. The plugin to show network usage\n\n```js\n{\n  \"type\": \"network\",\n  \"flip\": true,\n  \"units\": \"dynamic\" // or B/s, KB/s, MB/s, GB/s\n},\n```\n\n#### `dock`\n\n\u003e Dock plugin\n\n```js\n{\n  \"type\": \"dock\",\n  \"filter\": \"(^Xcode$)|(Safari)|(.*player)\",\n  \"autoResize\": true\n},\n```\n\n#### `upnext`\n\n\u003e Calendar next event plugin\nDisplays upcoming events from macOS Calendar.  Does not display current event.\n\n```js\n{\n  \"type\": \"upnext\",\n  \"from\": 0, // Lower bound of search range for next event in hours.        Default 0 (current time)(can be negative to view events in the past)\n  \"to\": 12, // Upper bounds of search range for next event in hours.        Default 12 (12 hours in the future)\n  \"maxToShow\": 3, // Limits the maximum number of events displayed.          Default 3 (the first 3 upcoming events)\n  \"autoResize\": false // If true, widget will expand to display all events. Default false (scrollable view within \"width\")\n},\n```\n\n\n\n## Actions:\n\n### Example:\n\n```js\n\"actions\": [\n  {\n    \"trigger\": \"singleTap\",\n    \"action\": \"hidKey\",\n    \"keycode\": 53\n  }\n]\n```\n\n### Triggers:\n\n- `singleTap`\n- `doubleTap`\n- `tripleTap`\n- `longTap`\n\n### Types\n\n- `hidKey`\n  \u003e https://github.com/aosm/IOHIDFamily/blob/master/IOHIDSystem/IOKit/hidsystem/ev_keymap.h use only numbers\n\n```json\n \"action\": \"hidKey\",\n \"keycode\": 53,\n```\n\n- `keyPress`\n  \u003e https://eastmanreference.com/complete-list-of-applescript-key-codes\n\n```json\n \"action\": \"keyPress\",\n \"keycode\": 1,\n```\n\n- `appleScript`\n\n```js\n \"action\": \"appleScript\",\n \"actionAppleScript\": {\n      \"inline\": \"tell application \\\"Finder\\\"\\rif not (exists window 1) then\\rmake new Finder window\\rset target of front window to path to home folder as string\\rend if\\ractivate\\rend tell\",\n    // \"filePath\" or \"base64\" will work as well\n },\n```\n\n- `shellScript`\n\n```js\n \"action\": \"shellScript\",\n \"executablePath\": \"/usr/bin/pmset\",\n \"shellArguments\": [\"sleepnow\"], // optional\n\n```\n\n- `openUrl`\n\n```js\n \"action\": \"openUrl\",\n \"url\": \"https://google.com\",\n```\n\n## Additional parameters:\n\n- `width` restrict how much room a particular button will take\n\n```json\n  \"width\": 34\n```\n\n- `align` can stick the item to the side. default is center\n\n```js\n  \"align\": \"left\" // \"left\", \"right\" or \"center\"\n```\n\n- `bordered` you can do button without border\n\n```js\n  \"bordered\": \"false\" // \"true\" or \"false\"\n```\n\n- `background` allow to specify you button background color\n\n```js\n  \"background\": \"#FF0000\",\n```\nby using background with color \"#000000\" and bordered == false you can create button without gray background but with background when the button is pressed\n\n- `title` specify button title\n\n```js\n  \"title\": \"hello\"\n```\n\n- `image` specify button icon\n\n```js\n  \"image\": {\n    //Can be either of those\n    \"base64\": \"iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAABGdB....\"\n    //or\n    \"filePath\": \"~/img.png\"\n  }\n```\n\n- `matchAppId` displays the button only when active app's id matches given regexp\n\n```json\n  \"matchAppId\": \"Safari\"\n```\n\n\n## Troubleshooting\n\n#### If you can't open preferences:\n- Opening another program which can't edit text\n    1. Open Terminal.app\n    2. Put `open -a TextEdit ~/Library/Application\\ Support/MTMR/items.json` command and press \u003ckbd\u003eEnter\u003c/kbd\u003e\n\n\n#### Buttons or gestures doesn't work:\n- \"After the last update my mtmr is not working anymore!\"\n- \"Buttons sometimes do not trigger action\"\n- \"ESC don't work\"\n- \"Gestures don't work\"\n\nRe-tick or check a tick for access 🍏→ System Preferences → Security and Privacy → tab Privacy → Accessibility → MTMR\n\n## Credits\n\nBuilt by [@Toxblh](https://patreon.com/toxblh) and [@ReDetection](http://patreon.com/ReDetection).\n\n[![Analytics](https://ga-beacon.appspot.com/UA-96373624-2/mtmr?pixel)](https://github.com/igrigorik/ga-beacon)\n","funding_links":["https://issuehunt.io/r/Toxblh","https://patreon.com/toxblh","https://ko-fi.com/toxblh","https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=WUAAG2HH58WE4","https://www.buymeacoffee.com/toxblh","https://www.patreon.com/bePatron?u=9900748","http://patreon.com/ReDetection"],"categories":["HarmonyOS","Swift","Table of Contents:","\u003e 1k ★","开发工具\u0026框架"],"sub_categories":["Windows Manager","Utility:"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FToxblh%2FMTMR","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FToxblh%2FMTMR","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FToxblh%2FMTMR/lists"}