{"id":15543731,"url":"https://github.com/amiel/pomo-event","last_synced_at":"2025-04-05T04:25:40.254Z","repository":{"id":66642256,"uuid":"416476538","full_name":"amiel/pomo-event","owner":"amiel","description":"An experiment in rust to listen to the socket and react to events published by https://github.com/kevinschoon/pomo","archived":false,"fork":false,"pushed_at":"2024-08-24T06:45:32.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-03T12:33:03.777Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/amiel.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-10-12T19:48:13.000Z","updated_at":"2024-08-24T06:45:35.000Z","dependencies_parsed_at":"2024-05-20T22:57:15.392Z","dependency_job_id":"6d0d6753-a5ec-4cc7-9d02-908d1a6175a5","html_url":"https://github.com/amiel/pomo-event","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amiel%2Fpomo-event","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amiel%2Fpomo-event/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amiel%2Fpomo-event/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amiel%2Fpomo-event/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amiel","download_url":"https://codeload.github.com/amiel/pomo-event/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247288900,"owners_count":20914454,"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-02T12:28:11.131Z","updated_at":"2025-04-05T04:25:40.227Z","avatar_url":"https://github.com/amiel.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Amiel's convoluted pomodoro setup\n\nThis rust script reacts to events published to a unix socket by https://github.com/kevinschoon/pomo.\n\nCurrently, this customizes the behavior of pomo with:\n\n* Enable/disable os-wide Do Not Disturb \"Focus\"\n\n  ...to prevent being distracted by notifications.\n\n* Set slack status with :tomato: icon and number of minutes remaining,\n\n  ...so that my co-workers know I'm focussed and how soon they can expect a response.\n\n* Display a dialog and use system beep when the pomodoro is complete\n\n  ...to encourage me to actually stop working at the break by being extra annoying\n\n\n## Requirements\n\n* [pomo](https://github.com/kevinschoon/pomo)\n* `Focus` and `Unfocus` shortcuts\n* `slack_status` [script](https://github.com/amiel/dotfiles/blob/master/bin/slack_status)\n\n### Setup\n\n#### Install and configure pomo\n\n1. Follow instructions from https://github.com/kevinschoon/pomo to install.\n2. Configure to use a socket by putting the following in `~/.pomo/config.json` (don't forget to update `\u003cyour-username\u003e` so that the path accurately reflects your home directory)\n\n```json\n{\n  \"publish\": true,\n  \"publishJson\": true,\n  \"publishSocketPath\": \"/Users/\u003cyour-username\u003e/.pomo/publish.sock\"\n}\n```\n\n#### Set up Focus shortcuts\n\nUse Shortcuts.app to create two shortcuts. Each uses the \"Set Focus\" action. I used the \"Do Not Disturb\" Focus, but you could use another, you'll just want to make sure that Focus silences Slack notifications.\n\n* Focus: `Turn` `Do Not Disturb` `On` until `Turned Off`\n* Unfocus: `Turn` `Do Not Disturb` `Off`\n\n#### Set up slack_status script\n\n1. put https://github.com/amiel/dotfiles/blob/master/bin/slack_status somewhere in your PATH\n2. make a Slack API token with the `users.profile:write` permission\n3. set that in your environment as `SLACK_STATUS_API_TOKEN`\n\n#### Optional: set up tmux shortcuts\n\nFor this part to work, you must have a tmux session with the name \"Pomodoro\" and at least two windows.\n\nAdd the following to `~/.tmux.conf`:\n\n```\nbind-key p if-shell \"pomo status|cut -f1 -d' ' |grep -q '[PR]'\" { # Running or paused,\n  # Pause/unpause\n  send-keys -t \"Pomodoro:2.1\" p\n} { if-shell \"pomo status|cut -f1 -d' ' |grep -q B\" { # Break\n  # start the next pomodoro\n  send-keys -t \"Pomodoro:2.1\" Enter\n} { if-shell \"pomo status|cut -f1 -d' ' |grep -q C\" { # Completed\n  # Quit the pomodoro screen and prompt to start a new one.\n  send-keys -t \"Pomodoro:2.1\" q\n  display \"Good work, your last pomodoro set was completed. Now set up a new Pomodoro.\"\n} { # No current pomodoro\n  # Verify that the next pomodoro has not been started yet. If there is a new\n  # empty pomodoro, then we can go ahead and start it. Otherwise, require\n  # manual intervention.\n  if-shell \"test $(pomo list --json -n 1 --assend|jq '.[0].pomodoros | length') = 0\" {\n    send-keys -t \"Pomodoro:2.1\" q C-u 'pomo b $(pomo list --json -n 1 --assend | jq '\\''.[0].id'\\'')' Enter\n  } {\n    display \"Your last pomodoro set was completed. Now set up a new Pomodoro.\"\n  }\n} } }\n```\n\nThen, create a pomodoro with:\n\n```\npomo c \"description\"\n```\n\nThen you can use `\u003cprefix\u003e-t ` in tmux to:\n\n* start the next pomodoro\n* continue when on break\n* pause/unpause when running\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famiel%2Fpomo-event","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famiel%2Fpomo-event","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famiel%2Fpomo-event/lists"}