{"id":17146104,"url":"https://github.com/emersion/go-autostart","last_synced_at":"2025-04-07T12:09:43.557Z","repository":{"id":54771184,"uuid":"61889197","full_name":"emersion/go-autostart","owner":"emersion","description":"A Go library to run a command after login","archived":false,"fork":false,"pushed_at":"2023-12-20T12:41:39.000Z","size":20,"stargazers_count":162,"open_issues_count":8,"forks_count":32,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-31T10:11:12.844Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/emersion.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-24T14:14:57.000Z","updated_at":"2025-03-15T04:14:21.000Z","dependencies_parsed_at":"2024-06-18T15:27:20.651Z","dependency_job_id":null,"html_url":"https://github.com/emersion/go-autostart","commit_stats":null,"previous_names":["protonmail/go-autostart"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emersion%2Fgo-autostart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emersion%2Fgo-autostart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emersion%2Fgo-autostart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emersion%2Fgo-autostart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emersion","download_url":"https://codeload.github.com/emersion/go-autostart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247648977,"owners_count":20972945,"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":"2024-10-14T21:07:50.923Z","updated_at":"2025-04-07T12:09:43.531Z","avatar_url":"https://github.com/emersion.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# go-autostart\n\n[![GoDoc](https://godoc.org/github.com/emersion/go-autostart?status.svg)](https://godoc.org/github.com/emersion/go-autostart)\n\nA Go library to run a command after login.\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"github.com/emersion/go-autostart\"\n)\n\nfunc main() {\n\tapp := \u0026autostart.App{\n\t\tName: \"test\",\n\t\tDisplayName: \"Just a Test App\",\n\t\tExec: []string{\"sh\", \"-c\", \"echo autostart \u003e\u003e ~/autostart.txt\"},\n\t}\n\n\tif app.IsEnabled() {\n\t\tlog.Println(\"App is already enabled, removing it...\")\n\n\t\tif err := app.Disable(); err != nil {\n\t\t\tlog.Fatal(err)\n\t\t}\n\t} else {\n\t\tlog.Println(\"Enabling app...\")\n\n\t\tif err := app.Enable(); err != nil {\n\t\t\tlog.Fatal(err)\n\t\t}\n\t}\n\n\tlog.Println(\"Done!\")\n}\n```\n\n## Behavior\n\n* On Linux and BSD, it creates a `.desktop` file in `$XDG_CONFIG_HOME/autostart`\n  (i.e. `$HOME/.config/autostart`). See http://askubuntu.com/questions/48321/how-do-i-start-applications-automatically-on-login\n* On macOS, it creates a `launchd` job. See http://blog.gordn.org/2015/03/implementing-run-on-login-for-your-node.html\n* On Windows, it creates a link to the program in `%USERPROFILE%\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup`\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femersion%2Fgo-autostart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femersion%2Fgo-autostart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femersion%2Fgo-autostart/lists"}