{"id":25126711,"url":"https://github.com/sstark/traycortex","last_synced_at":"2025-04-23T13:09:08.597Z","repository":{"id":245735733,"uuid":"819087465","full_name":"sstark/traycortex","owner":"sstark","description":"Tray application to monitor the status of borgmatic backups","archived":false,"fork":false,"pushed_at":"2024-08-07T22:33:18.000Z","size":230,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-08T14:54:36.012Z","etag":null,"topics":["appindicator","backup","borg","borgmatic","menu","python","tray","tray-application","tray-icon"],"latest_commit_sha":null,"homepage":"","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/sstark.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":"2024-06-23T18:34:22.000Z","updated_at":"2024-08-07T22:33:21.000Z","dependencies_parsed_at":"2024-08-06T14:45:12.168Z","dependency_job_id":null,"html_url":"https://github.com/sstark/traycortex","commit_stats":null,"previous_names":["sstark/traycortex"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sstark%2Ftraycortex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sstark%2Ftraycortex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sstark%2Ftraycortex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sstark%2Ftraycortex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sstark","download_url":"https://codeload.github.com/sstark/traycortex/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237794525,"owners_count":19367428,"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":["appindicator","backup","borg","borgmatic","menu","python","tray","tray-application","tray-icon"],"created_at":"2025-02-08T10:34:02.335Z","updated_at":"2025-02-08T10:34:02.851Z","avatar_url":"https://github.com/sstark.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Traycortex\n\ntraycortex is an application that will show the status of [borgmatic\nbackup](https://torsion.org/borgmatic/) in your system tray. It will also let\nyou trigger backups from the menu.\n\nFeatures:\n\n  - System **tray menu** for running borgmatic (all or single config)\n  - Client application to **integrate with borgmatic** for detecting timed backup runs\n  - **Notifications** (backup started, backup finished)\n  - Configuration file to allow customizing the borgmatic command\n  - **ssh-agent detection** to enable easy use of password protected ssh keys\n\nAlong with it comes a *traycortex-cli* application, that is used in the\nborgmatic hooks configuration to signal the tray icon. Possible states are\n`job_started`, `job_finished` and `job_error`.\n\n![screenshot of tray running](doc/tray-running.png)\n\nWhen the status of a backup is updated, a notification will be displayed and the\nicon changes accordingly.\n\n\n## Installation\n\n### Prerequisites\n\nSome packages are required to build and install traycortex (probably incomplete):\n\n  - Ubuntu: `apt install libcairo2-dev python-gi-dev libgirepository1.0-dev`\n  - Arch: `pacman -S gobject-introspection python-cairo libappindicator-gtk3`\n\nRecommended way to install:\n\n    pipx install traycortex\n\nAlso works:\n\n    pip install traycortex\n\n*Packagers welcome*\n\n\n### Configuration File\n\nLocation: `$XDG_CONFIG_HOME/traycortex.ini`\n\nIf not found, an initial basic configuration file with a random authkey will be\ncreated on first run of traycortex.\n\nThe same configuration file is used for both, traycortex and traycortex-cli.\n\n### Configuration File Options\n\nThe authentication key and port for the connection between traycortex and\ntraycortex-cli:\n\n    [connection]\n    ; no default value. Randomly set on first run.\n    authkey = ce03f7af891ebc29defc0643faf71025\n    ; default:\n    ;   port = 35234\n    port = 54321\n\nThe command used to create a backup (when selecting the \"Engage\" menu item):\n\n    [borgmatic]\n    ; default:\n    ;   command = borgmatic\n    ; For testing non-interactive ssh you can set this:\n    ;   command = ssh -oBatchMode=yes \u003cbackupserver\u003e date\n    command = systemd-inhibit --why=\"Backup is running\" /usr/local/bin/borgmatic\n\nYou may add the string `@CONFIG@` to the `command` option. For instance you\ncould set:\n\n    [borgmatic]\n    command = /bin/borgmatic @CONFIG@ create\n\n`@CONFIG@` will be replaced by `-c \u003cyamlfile\u003e` in case you selected a specific\nyaml file to be run. Otherwise it will be replaced with the empty string. The\ncommand that will be execeuted in this example will be `/bin/borgmatic create`\nif you just clicked on `Engage`, or `/bin/borgmatic -c /some/config.yml create`\nif you clicked on `Engage /some/config.yml`.\n\nIf you engage an individual yaml file without having `@CONFIG@` in your config,\nthe resulting action will be equivalent to that of just having clicked\n`Engage`.\n\n\n## Running\n\nTo start the tray application from the command line:\n\n    traycortex \u0026\n\nOr create a desktop file `~/.local/share/applications/traycortex.desktop`:\n\n    [Desktop Entry]\n    Exec=traycortex\n    ; For the icon to work you need to place borgmatic.png in `~/.icons`\n    Icon=borgmatic\n    Name=traycortex\n    Type=Application\n\nNow you can start traycortex with your usual desktop method.\n\n\n## Tray Menu\n\n  - **Engage All**: Run a borgmatic backup\n  - **Engage \u003cconfiguration\u003e**: Run a borgmatic backup for this specific\n    configuration\n  - **Discard**: Quit traycortex and remove the icon from the tray. If a backup\n    is currently running, it will be killed.\n\n\n## Integrating with borgmatic\n\nIf you want to receive notifications for borgmatic jobs that are not directly\ntriggered from traycortex, you have to configure the corresponding hooks in\nyour borgmatic configuration.\n\nExample `~/.config/borgmatic.d/home.yaml`:\n\n    [...]\n    source_directories:\n        - /home/seb\n    repositories:\n        - path: ssh://...\n    before_backup:\n        - traycortex-cli -m job_started -a \"{configuration_filename}\"\n    after_check:\n        - traycortex-cli -m job_finished -a \"{configuration_filename}\"\n    on_error:\n        - traycortex-cli -m job_error -a \"{configuration_filename}\"\n    [...]\n\n\n## ssh-agent detection\n\nWith borgmatic it is likely you use ssh to access a remote backup repository.\nYou probably have public key authentication set up for this to allow\nnon-interactive use. And probably you also want to have a passphrase set\nfor the private ssh key.\n\ntraycortex will try to detect a running ssh-agent and set the environment for\nborgmatic to have the `SSH_AUTH_SOCK` environment variable set. This makes it\nindependent from its starting environment with regard to that variable.\n\nYou will still have to add your key to the running ssh-agent.\n\nIt is recommended to use\n\n    ssh_command: ssh -oBatchMode=yes\n\nin your borgmatic configuration. This way, if ssh-agent detection fails, or you\nhave not added the necessary key to it, borgmatic will properly fail and not\nwait for input in the background.\n\nIf you have multiple ssh-agents running, traycortex currently has no way to\nknow which one is correct and will simply use the first one found.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsstark%2Ftraycortex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsstark%2Ftraycortex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsstark%2Ftraycortex/lists"}