{"id":15567834,"url":"https://github.com/lucki/macro-manager","last_synced_at":"2025-03-29T05:41:25.987Z","repository":{"id":84596720,"uuid":"395980707","full_name":"Lucki/macro-manager","owner":"Lucki","description":"Searches and executes a script that is associated with the given ID and SET","archived":false,"fork":false,"pushed_at":"2024-12-20T23:46:40.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-03T16:56:20.876Z","etag":null,"topics":["macro","macros","manager","script","scripting","scripts"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lucki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2021-08-14T10:59:06.000Z","updated_at":"2024-12-20T23:46:44.000Z","dependencies_parsed_at":"2023-03-12T23:45:42.267Z","dependency_job_id":null,"html_url":"https://github.com/Lucki/macro-manager","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"65a76ed754e617b4b7270608869d22dbacf15701"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lucki%2Fmacro-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lucki%2Fmacro-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lucki%2Fmacro-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lucki%2Fmacro-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lucki","download_url":"https://codeload.github.com/Lucki/macro-manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246144978,"owners_count":20730493,"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":["macro","macros","manager","script","scripting","scripts"],"created_at":"2024-10-02T17:13:34.008Z","updated_at":"2025-03-29T05:41:25.966Z","avatar_url":"https://github.com/Lucki.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Macro-Manager\nSearches and executes a script that is associated with the given *ID* and *SET* for the active application.\n\nIf the current current executable isn't configured or a fallback is allowed for the current set it will try to use the default as fallback if available.\n\nIf the script config says the current script is switchable it will stop already running instance of that script or otherwise start a new one.\nThis is intended for turning infinite running scripts on and off.\n\nMake sure your script is marked as executable.\n\n* Config file location: `$XDG_CONFIG_HOME/macro-manager/config.toml`\n* Script search location: `$XDG_DATA_HOME/macro-manager/`\n\nIt exposes the following environment variables to called scripts when optional dependencies are available:\n~~~\nMACRO_MANAGER_WINDOW\nMACRO_MANAGER_WINDOW_BIN\nMACRO_MANAGER_WINDOW_PID\nMACRO_MANAGER_WINDOW_WIDTH\nMACRO_MANAGER_WINDOW_HEIGHT\nMACRO_MANAGER_MOUSE_X        // Only on X11\nMACRO_MANAGER_MOUSE_Y        // Only on X11\nMACRO_MANAGER_MOUSE_SCREEN   // Only on X11\n~~~\n\n* On X11 [`xdotool`](https://www.semicomplete.com/projects/xdotool/) will request the information.\n* On Gnome Wayland the extension [Window Calls](https://github.com/ickyicky/window-calls) will request the information. `dbus` is required for this.\n\n## Installation\nBuild with `make build` or directly with `cargo build --release`.\u003cbr\u003e\nThe executable is in `target/release/macro-manager`.\n\nInstall with `make install`.\u003cbr\u003e\nAdjust `PREFIX` and `DESTDIR` as needed.\n\nBy default the library `libmacro_manager.so` will be installed which exposes the `Manager::new()` object together with `get_macro(set: String, id: String)`.\nThe Macro object runs with the `run()` method.\n\n### Example config\n~~~ toml\n[default.set1.id3]\nscript = \"autoclicker.sh\"\ntoggle = true\n\n[\"program.exe\".set1]\ndefault_fallback = true\n\n[\"program.exe\".set1.id8]\nscript = \"awesome_script1.sh\"\n\n[firefox.m1]\ng13.script = \"awesome_script2.sh\"\ng14.script = \"subfolder/awesome_script3.sh\"\n~~~\n\n### Example autoclicker script\n~~~ sh\n#!/bin/bash\n\n# define signal handler\nterm_handler() {\n\t# make sure we're not stuck in a mousedown event\n\txdotool mouseup 1\n\n\texit 0\n}\n\n# register signal handler\ntrap term_handler SIGTERM\n\nwhile true; do\n\t# we 're not using xdotool click 1 here because that adds\n\t# a 12ms delay between mousedown and mouseup\n\txdotool mousedown 1\n\n\t# this adjusts the click speed\n\tsleep 0.025\n\n\txdotool mouseup 1\ndone\n~~~\n\n### Example emergency script - close all currently running scripts\n~~~ sh\n#!/bin/sh\n\nfind \"$XDG_RUNTIME_DIR/macro-manager\" -name \"*.pid\" -exec pkill -TERM -F {} \\; -exec rm {} \\;\n~~~\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucki%2Fmacro-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucki%2Fmacro-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucki%2Fmacro-manager/lists"}