博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
新项目:思考(Terminal Think Music)
阅读量:2519 次
发布时间:2019-05-11

本文共 1899 字,大约阅读时间需要 6 分钟。

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 .

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

安装 (Installation)

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

您可以从安装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 = = playplay file file = = /home/kwpolska/Dropbox/Media/Wielka Gra.mp3/home/kwpolska/Dropbox/Media/Wielka Gra.mp3 behavior behavior = = waitwait
  • 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 theme (BTW: I just published the MP3 file on the 1st anniversary of the upload!), Americans might want (also the namesake for this command), Brits might want the .
  • 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命令唯一参数的文件名。 无需转义。 我使用的是主题(顺便说一句:我刚刚在上载一周年之际发布了MP3文件!),美国人可能想要 (也是此命令的名称),英国佬可能想要 。
  • 行为可以是以下之一:
    • return —程序结束后立即将控制权返回终端,而不会停止音乐
    • 等待 —等待音乐停止后再返回控制
    • 停止 —停止音乐并立即返回控制

用法 (Usage)

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

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

翻译自:

转载地址:http://tpqwd.baihongyu.com/

你可能感兴趣的文章
一款jQuery打造的具有多功能切换的幻灯片特效
查看>>
SNMP从入门到开发:进阶篇
查看>>
@ServletComponentScan ,@ComponentScan,@Configuration 解析
查看>>
unity3d 射弹基础案例代码分析
查看>>
thinksns 分页数据
查看>>
os模块
查看>>
LINQ to SQL vs. NHibernate
查看>>
基于Angular5和WebAPI的增删改查(一)
查看>>
windows 10 & Office 2016 安装
查看>>
最短路径(SP)问题相关算法与模板
查看>>
js算法之最常用的排序
查看>>
Python——交互式图形编程
查看>>
经典排序——希尔排序
查看>>
团队编程项目作业2-团队编程项目代码设计规范
查看>>
英特尔公司将停止910GL、915GL和915PL芯片组的生产
查看>>
Maven配置
查看>>
HttpServletRequest /HttpServletResponse
查看>>
SAM4E单片机之旅——24、使用DSP库求向量数量积
查看>>
从远程库克隆库
查看>>
codeforces Unusual Product
查看>>