{"id":13558513,"url":"https://github.com/jml/undistract-me","last_synced_at":"2025-10-26T12:46:42.813Z","repository":{"id":6847395,"uuid":"8096021","full_name":"jml/undistract-me","owner":"jml","description":"Notifies you when long-running terminal commands complete","archived":false,"fork":false,"pushed_at":"2022-11-09T09:03:22.000Z","size":130,"stargazers_count":538,"open_issues_count":35,"forks_count":48,"subscribers_count":16,"default_branch":"main","last_synced_at":"2024-10-13T10:35:45.623Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jml.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}},"created_at":"2013-02-08T15:43:35.000Z","updated_at":"2024-10-08T18:24:54.000Z","dependencies_parsed_at":"2023-01-12T15:01:18.880Z","dependency_job_id":null,"html_url":"https://github.com/jml/undistract-me","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/jml%2Fundistract-me","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jml%2Fundistract-me/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jml%2Fundistract-me/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jml%2Fundistract-me/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jml","download_url":"https://codeload.github.com/jml/undistract-me/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247242680,"owners_count":20907134,"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-08-01T12:04:59.686Z","updated_at":"2025-10-26T12:46:37.770Z","avatar_url":"https://github.com/jml.png","language":"Shell","funding_links":[],"categories":["Shell","Applications","others","应用"],"sub_categories":["Productivity","生产力"],"readme":"# undistract-me\n\nNotifies you when long-running terminal commands complete.\n\n## What is this?\n\nDoes this ever happen to you?\n\nYou're doing some work, and as part of that you need to run a command on the\nterminal that takes a little while to finish.  You run the command, watch it\nfor maybe a second and then switch to doing something else – checking\nemail or something.\n\nYou get so deeply involved in your email that twenty minutes fly by.  When\nyou switch back to your terminal the command has finished, but you've got no\nidea whether it was nineteen seconds ago or nineteen *minutes* ago.\n\nThis happens to me a lot.  I'm just not disciplined enough to sit and watch\ncommands, and I'm not prescient enough to add something to each invocation to\ntell me.  What I want is something that alerts me whenever long running\ncommands finish.\n\nThis is it.\n\nInstall this, and then you'll get a notification when any command finishes\nthat took longer than ten seconds to finish.\n\n## Installation\n\n### From the Ubuntu repositories\n\n    $ sudo apt install undistract-me\n\n### From the branch\n\n    $ bzr checkout --lightweight lp:undistract-me\n    $ . undistract-me/long-running.bash\n    $ notify_when_long_running_commands_finish_install\n\n### Add to your Bash\n\n    $ echo 'source /etc/profile.d/undistract-me.sh' \u003e\u003e ~/.bashrc\n\n## Configuration\n\nBy default, a long-running command is any command that takes more than 10s to\ncomplete.  If this default is not right for you, set\n`LONG_RUNNING_COMMAND_TIMEOUT` to a different number of seconds and export it.\nIt is possible to disable notifications for certain commands by adding them \nspace-separated to `LONG_RUNNING_IGNORE_LIST` variable.\n\nBy default, the notification will only show if the active window is not the \nwindow the command is running in. If this is not right for you, (eg. if you \nare an Emacs user), you can set IGNORE_WINDOW_CHECK to 1 to skip the window\ncheck.\n\nIn addition to a visual notification, you can make undistract-me notify you \nby playing an audible sound along with the notification popup by simply \nsetting the variable UDM_PLAY_SOUND to a non-zero integer on the command line.\nThis functionality requires that pulseaudio-utils and sound-theme-freedesktop \n(which provides the notification sound file) be installed on a Debian-based \nsystem.\n\n## Licensing\n\nAll of undistract-me, including this file, is made available with the Expat\nlicense.  See `LICENSE` for details.\n\n## Getting help\n\nThere's no dedicated IRC channel, but feel free to ping `jml` on Freenode,\nprobably in the `#ubuntu-devel` channel.\n\nAlternatively, ask questions or file bugs on the\n[undistract-me](https://launchpad.net/undistract-me) Launchpad project.\n\n## Credits\n\n[Glyph Lefkowitz](http://glyph.twistedmatrix.com/) wrote\n[a neat hack to provide ZSH-like preexec support for bash](http://glyf.livejournal.com/63106.html).\n\nA lot of help from [Chris Jones](http://www.tenshu.net/) of\n[Terminator](http://www.tenshu.net/p/terminator.html).\n\n[Mikey Neuling](https://github.com/mikey/) and Stephen Rothwell have made huge\nimprovements to the performance and quality of the shell script.  I'm amazed,\nhumbled and grateful.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjml%2Fundistract-me","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjml%2Fundistract-me","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjml%2Fundistract-me/lists"}