新项目:思考(Terminal Think Music)

Are you executing a process that takes a long time? Do you want to know that it’s still working while you are in another terminal/making coffee? Do you have a favorite game show tune to play while doing something?

您正在执行需要很长时间的过程吗? 您是否想知道在另一个终端/煮咖啡时它仍在工作? 您在做某事时是否有喜欢的游戏节目播放?

If yes: think is just for you. For more details, read on or hop onto the GitHub page.

如果是,请考虑为您准备。 有关更多详细信息,请继续阅读或跳至GitHub页面

Project page

项目页面

GitHub

的GitHub

Downloads (GitHub)

下载(GitHub)

Downloads (PyPI)

下载(PyPI)

安装 (Installation)

You can install think from PyPI (with pip install think). Arch Linux users can install the think package from the AUR.

您可以从PyPI安装think (使用pip install think )。 Arch Linux用户可以从AUR安装思想包。

组态 (Configuration)

Create a file named ~/.config/think.conf (or wherever your XDG_CONFIG_HOME is) with the following four lines:

用以下四行创建一个名为〜/ .config / think.conf (或XDG_CONFIG_HOME所在的文件)的文件:

 [Think]
[Think]
 command command = = play
play
 file file = = /home/kwpolska/Dropbox/Media/Wielka Gra.mp3
/home/kwpolska/Dropbox/Media/Wielka Gra.mp3
 behavior behavior = = wait
wait
  • command is the command of the player that will be executed. You can use play (from sox) or any other fast CLI music player.
  • file is the filename that will be given as the sole argument to the play command. No escaping is necessary. I’m using the Wielka Gra theme (BTW: I just published the MP3 file on the 1st anniversary of the upload!), Americans might want Jeopardy! Think Music (also the namesake for this command), Brits might want the Countdown theme.
  • behavior can be one of:
    • return — return control to the terminal as soon as the program finishes, without stopping the music
    • wait — wait until music stops before returning control
    • stop — stop the music and return control immediately
  • command是将要执行的播放器的命令。 您可以使用play (来自sox )或任何其他快速的CLI音乐播放器。
  • file是将作为play命令唯一参数的文件名。 无需转义。 我使用的是Wielka Gra主题(顺便说一句:我刚刚在上载一周年之际发布了MP3文件!),美国人可能想要危险! 想想音乐 (也是此命令的名称),英国佬可能想要Countdown主题
  • 行为可以是以下之一:
    • return —程序结束后立即将控制权返回终端,而不会停止音乐
    • 等待 —等待音乐停止后再返回控制
    • 停止 —停止音乐并立即返回控制

用法 (Usage)

Prepend think before the command that takes too long to execute:

在执行所需时间太长的命令之前先思考

翻译自: https://www.pybloggers.com/2015/06/new-project-think-terminal-think-music/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值