Plasma/Krunner/zh-cn: Difference between revisions

From KDE UserBase Wiki
(Updating to match new version of source page)
(Updating to match new version of source page)
(46 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages />
<languages />


'''KRunner''' is the launcher built into the Plasma desktop. While its basic function is to launch programs from a sort of mini-command-line, its functionality can be extended by "runners" to assist the user to accomplish a lot of tasks.
'''KRunner''' (使用 Alt-F2 或者 Alt-SPACE 快捷键来启动) 是Plasma桌面内置的快速启动器. 他的基本功能是从一个迷你的命令行启动特定程序, 不过它的功能也可以通过"runner"来扩展,以帮助用户完成许多其他的任务.


[[Image:KRunner.png||center]]
<div class="mw-translate-fuzzy">
{{Note|1=你可能需要安装额外的 '''KRunner''' 插件包来使用这里列出的一些功能, 这取决于你的发行版. 注意,开启大量的插件可能会减慢KRunner的启动速度,你通过点击扳手图标来调整。}}
</div>


==Features==
[[Image:KRunner.png|center]]


This woefully incomplete list attempts to present some basic examples of KRunner use. Discover more by clicking on the '?' icon in KRunner!
==特性==


===Start and stop applications===
这个不完整的列表试图展示一些使用'''KRunner'''的基本例子. 你可以点击'''KRunner'''上的'?'按钮来发现更多用法.


You can launch programs by simply typing the name of the application you want to launch. You need to type at least three characters to start finding matches. Matches will be found to applications in your applications menu.
===启动或者终止程序运行===


Examples:
你可以通过输入你想要启动的应用程序的名称来启动程序——或者使用更简单的做法: 按方向键来查看你预先输入的''最近使用''的程序列表。
 
当你开始输入第一个字符时,KRunner就会开始查找匹配项。你 可以从能够自定义的应用程序菜单中找到与应用程序匹配的内容(为此,请在菜单中单击鼠标右键).
 
示例:
{|class="tablecenter" style="border: 1px solid grey"
{|class="tablecenter" style="border: 1px solid grey"
| Input || Output
| 输入 || 输出
|-
|-
| <code> gwe </code> || ''(starts [[Special:myLanguage/Gwenview|Gwenview]])''
| <code> gwe </code> || ''(打开 [[Special:myLanguage/Gwenview|Gwenview]])''
|}
|}


You can use KRunner to kill applications, too. Type in the keyword <code>kill</code> followed by a process name and KRunner will provide options to close the application (SIGTERM) or forcibly quit it (SIGKILL). KRunner will match partial process names (at least three characters) to running processes.
[[Image:KRunner_app.png||center]]


Note that the keyword <code>kill</code> can be changed in the "Terminate Applications" runner to avoid confusion with the shell command kill which accepts process IDs.
您也可以使用'''KRunner'''杀死应用程序。 键入关键字<code> kill </code>,后跟进程名称,'''KRunner'''将提供关闭应用程序(SIGTERM)或强行退出应用程序(SIGKILL)的选项。 '''KRunner'''会将部分进程名称与正在运行的进程匹配。


===Issue (shell) commands===
请注意,可以在"Terminate Applications"插件中更改关键字<code> kill </code>,以避免与接受进程ID的shell命令kill混淆。


In addition to applications listed in the applications menu, KRunner can also be used to run shell commands, including launching binaries. Note that when entering shell commands, KRunner will not accept partial commands or offer command auto completion.
===直接安装===


Running a command like this brings up a wrench icon which offers additional options. You can choose to spawn a terminal and run the command there (this can be useful if your command produces text output that you want to read), or choose to run the program as a different user (by providing the username and password of that user).
如果你在寻找尚未安装的应用程序,KRunner将建议一组与你的搜索匹配的应用程序。 KRunner已与Plasma软件中心[[Special:myLanguage/Discover | Discover]]集成,因此,将向您显示应用程序列表,使您可以继续直接安装。


Examples:
===shell指令===
 
除了应用程序菜单中列出的应用程序外,“‘KRunner’还可以用于运行shell命令,包括启动二进制文件。注意,当输入shell命令时,“‘KRunner’将不提供命令自动补全功能, 也不识别只输入了一部分的指令。
 
运行这样的命令会弹出一个扳手图标,提供额外的选项。你可以选择打开终端并在终端里运行命令(如果你的命令生成了你想要读取的文本输出,这可能很有用),或者选择作为另一个用户(通过提供该用户的用户名和密码)来运行程序。
 
例子:
{|class="tablecenter" style="border: 1px solid grey"
{|class="tablecenter" style="border: 1px solid grey"
| Input || Output
| 输入 || 输出
|-
|-
|<code> ls ~/Documents </code> || ''lists contents of ~/Documents (preferably in a terminal''
|<code> ls ~/Documents </code> || ''显示文件夹 ~/Documents 的内容(在终端中)''
|-
|-
|<code> cp ~/Documents/myFile ~/myFile </code> || ''copies myFile from ~/Documents to ~/''
|<code> cp ~/Documents/myFile ~/myFile </code> || ''~/Documents 拷贝myFile文件到 ~/''
|-
|-
|<code> mplayer myMovie.mkv </code> || ''plays myMovie.mkv in mplayer''
|<code> mplayer myMovie.mkv </code> || ''使用mplayer播放myMovie.mkv''
|}
|}


Incidentally, if the command line is your thing, you may appreciate the built in integration to man pages. Simply type a command name preceded by a <code>#</code> to open the man page formatted for easy readability in your browser.
Incidentally, if the command line is your thing, you may appreciate the built in integration to man pages. Simply type a command name preceded by a <code>#</code> or <code>man:/</code> to open the man page formatted for easy readability in your browser.


Examples:
Examples:
Line 48: Line 60:
|-
|-
|<code> #ls </code> || ''opens the manual for ls in a browser''
|<code> #ls </code> || ''opens the manual for ls in a browser''
|-
|<code> man:/grep </code> || ''opens the manual for grep in a browser''
|}
|}


===Browse websites===
===Browse websites===


You can simply start typing the URL of a website to open it in your default browser. You may even type in the name of a bookmark from [[Special:myLanguage/Konqueror|Konqueror]] and KRunner will open it for you. If you have visited the website in the past, KRunner can fetch you results from your browser's history, too.
You can simply start typing the URL of a website to open it in your default browser. You may even type in the name of a browser bookmark and '''KRunner''' will open it for you. If you have visited the website in the past, '''KRunner''' can fetch you results from your browser's history, too.


Examples:
Examples:
Line 62: Line 76:
|<code> kde.org </code> || ''opens the [http://www.kde.org KDE homepage] in a browser''
|<code> kde.org </code> || ''opens the [http://www.kde.org KDE homepage] in a browser''
|-
|-
|<code> http://userbase.kde.org/ </code> || ''opens [http://www.userbase.kde.org/ Userbase] in a browser'
|<code> http://userbase.kde.org/ </code> || ''opens [http://userbase.kde.org/ Userbase] in a browser''
|}
|}


KRunner already knows your web shortcuts in [[Special:myLanguage/Konqueror|Konqueror]], so you can directly start using them.
'''KRunner''' already knows your Web Shortcuts, found in Plasma System Settings, so you can directly start using them.


Examples:
Examples:
Line 76: Line 90:
|}
|}


KRunner also provides options to download files from the web using [[Special:myLanguage/KGet|KGet]] by providing their URL.
'''KRunner''' also provides options to download files from the web using [[Special:myLanguage/KGet|KGet]] by providing their URL.


Additional runners exist for fast searching on Wikipedia, Wikitravel and KDE Techbase.
Additional runners exist for fast searching on Wikipedia, Wikitravel and KDE Techbase.
Line 82: Line 96:
===Open files, folders and devices===
===Open files, folders and devices===


KRunner can also open files and directories on your local machine for you. If you want to browse remote machines, you can do that, too. Notice how KRunner uses kioslaves for ssh (fish:) and samba (smb:).
'''KRunner''' can also open files and directories on your local machine for you. If you want to browse remote machines, you can do that, too. Notice how '''KRunner''' uses kioslaves for ssh (fish:) and samba (smb:).


Examples:
Examples:
Line 97: Line 111:
|}
|}


If you don't know the path to a file, simply type the name of the file. If the file is a recently opened document, KRunner will list it for you. If you have the [[Special:myLanguage/Nepomuk|Nepomuk]] subsystem installed, you can also search your computer for the file by its indexed contents. Krunner will also open folders you've bookmarked in [[Special:myLanguage/Dolphin|Dolphin]] (in your Places sidebar) if you type their name in. What's more, if you want to access devices on your system (both mounted and unmounted), you can do that, too. Krunner will even provide device-specific options.
If you don't know the path to a file, simply type the name of the file. If the file is a recently opened document, '''KRunner''' will list it for you. If you have enabled "File Search" provided by [https://community.kde.org/Baloo Baloo] daemon, you can also search your computer for the file by its indexed contents. '''KRunner''' will also open folders you've bookmarked in [[Special:myLanguage/Dolphin|Dolphin]] (in your Places sidebar) if you type their name in. What's more, if you want to access devices on your system (both mounted and unmounted), you can do that, too. '''KRunner''' will even provide device-specific options.


Examples:
Examples:
Line 110: Line 124:
===Multitask with sessions, windows, desktops and activities===
===Multitask with sessions, windows, desktops and activities===


Several KDE applications allow you to save and load sessions. KRunner allows you to launch these sessions. You can either type in the name of the application or directly type in the name of the session. Runners exist for opening sessions saved in [[Special:myLanguage/Kate|Kate]],[[Special:myLanguage/Konqueror|Konqueror]],[[Special:myLanguage/Konsole|Konsole]], etc.
Several KDE applications allow you to save and load sessions. '''KRunner''' allows you to launch these sessions. You can either type in the name of the application or directly type in the name of the session. Runners exist for opening sessions saved in [[Special:myLanguage/Kate|Kate]], [[Special:myLanguage/Konqueror|Konqueror]], [[Special:myLanguage/Konsole|Konsole]], etc.


KRunner is a multitasker's dream. If you have too many windows open, just type in the title of the window and switch directly to it. You can similarly type in the name of a virtual desktop and switch directly to it. If you roll with activities, switch activities by typing their name in. KRunner will find a match as soon as you type three characters in.
'''KRunner''' is a multitasker's dream. If you have too many windows open, just type in the title of the window and switch directly to it. You can similarly type in the name of a virtual desktop and switch directly to it. If you roll with activities, switch activities by typing their name in. '''KRunner''' will find a match as soon as you type three characters in.


KRunner will even switch desktop sessions for you. Type in the keyword <code>switch</code> or <code>new session</code> to start a separate X session. You can switch back and forth between sessions by using the <code>switch</code> keyword.
'''KRunner''' will even switch desktop sessions for you. Type in the keyword <code>switch</code> or <code>new session</code> to start a separate X session. You can switch back and forth between sessions by using the <code>switch</code> keyword.


Examples:
Examples:
Line 125: Line 139:
|-
|-
|<code> switch </code> || ''shows options to switch to an existing session or start a new one''
|<code> switch </code> || ''shows options to switch to an existing session or start a new one''
|-
|<code> new session </code> || ''starts a new session''
|}
|}


Several plasma widgets can be launched as windowed applications. You can simply type the name of a widget and KRunner will launch a window for you.
Several plasma widgets can be launched as windowed applications. You can simply type the name of a widget and '''KRunner''' will launch a window for you.


===Talk to people===
===Talk to people===


Type in the name of a contact in your [[Special:myLanguage/KAddressBook|KAddressBook]] to get a list of options to contact them. Typing in an email address into Krunner will open a [[Special:myLanguage/KMail|KMail]] composer window. You can also search through contacts in your [[Special:myLanguage/Kopete|Kopete]] contact list.
Type in the name of a contact in your [[Special:myLanguage/KAddressBook|KAddressBook]] to get a list of options to contact them. Typing in an email address into '''KRunner''' will open a [[Special:myLanguage/KMail|KMail]] composer window. You can also search through contacts in your [[Special:myLanguage/Kopete|Kopete]] contact list.


The addressbook and kopete runners don't seem to be working in SC 4.8.
The addressbook and kopete runners don't seem to be working in SC 4.8.
Line 146: Line 162:
===Listen to some music===
===Listen to some music===


You can control any modern audio player such as [[Special:myLanguage/Amarok|Amarok]] using krunner. You can use several keywords (all configurable) to <code>play</code>, <code>pause</code> or skip songs. Typing in the name of an artist, album or song that is in [[Special:myLanguage/Amarok|Amarok]]'s library will let you either play immediately, play next (<code>queue</code>) or play at the end (<code>append</code>) of the current playlist. You can use keywords to <code>increase</code> or <code>decrease<code> the volume of the player, or even to <code>mute</code> or <code>quit</code> it.
You can control any modern audio player such as [[Special:myLanguage/Amarok|Amarok]] using '''KRunner'''. You can use several keywords (all configurable) to <code>play</code>, <code>pause</code> or skip songs. Typing in the name of an artist, album or song that is in [[Special:myLanguage/Amarok|Amarok]]'s library will let you either play immediately, play next (<code>queue</code>) or play at the end (<code>append</code>) of the current playlist. You can use keywords to <code>increase</code> or <code>decrease</code> the volume of the player, or even to <code>mute</code> or <code>quit</code> it.


Examples:
Examples:
Line 171: Line 187:
|<code> time </code> || The current time is ...
|<code> time </code> || The current time is ...
|}
|}
[[Image:KRunner_time.png||center]]


You can even get the date and time at another location by specifying the time zone or the city listed in the TZ database.
You can even get the date and time at another location by specifying the time zone or the city listed in the TZ database.
Line 189: Line 207:
===Calculator===
===Calculator===


KRunner features a very versatile calculator that can be called by starting or ending a calculation with an <code>=</code> sign. In addition to basic arithmetic, you can call scientific functions like <code>sqrt()</code>, <code>sin()</code>, <code>log()</code>, etc. A list of the supported functions is [http://qalculate.sourceforge.net/gtk-manual/apa.html here]. Note that trigonometric functions like <code>sin()</code>, <code>cos()</code>, etc expect the angle in radians. KRunner understands <code>pi</code> in expressions.
'''KRunner''' features a very versatile calculator that can be called by starting or ending a calculation with an <code>=</code> sign. In addition to basic arithmetic, you can call scientific functions like <code>sqrt()</code>, <code>sin()</code>, <code>log()</code>, etc. A list of the supported functions is [http://qalculate.github.io/manual/qalculate-definitions-functions.html here]. Note that trigonometric functions like <code>sin()</code>, <code>cos()</code>, etc expect the angle in radians. '''KRunner''' understands <code>pi</code> in expressions.


Examples:
Examples:
Line 200: Line 218:
|}
|}


KRunner can also handle symbolic mathematics and perform integration and differentiation on expressions
[[Image:KRunner_calc.png||center]]
 
'''KRunner''' also supports combinatorics functions, like <code>perm()</code> or <code>comb()</code>.
 
Examples:
{|class="tablecenter" style="border: 1px solid grey"
| Input || Output
|-
|<code> = perm(10,5) </code> || 30240
|-
|<code> = comb(10,5) </code> || 252
|}
 
'''KRunner''' can also handle symbolic mathematics and perform integration and differentiation on expressions


Examples:
Examples:
Line 211: Line 242:
|}
|}


You can also use KRunner to solve polynomial functions to find its roots.
You can also use '''KRunner''' to solve polynomial functions to find its roots.


Examples:
Examples:
Line 217: Line 248:
| Input || Output
| Input || Output
|-
|-
|<code> = solve( x^2 + 4*x - 21 = 0 ) </code>|| [7, -3]  
|<code> = solve( x^2 + 4*x - 21 = 0 ) </code>|| [3, -7]  
|}
|}


KRunner intelligently handles units as part of the calculations. Try the following examples to see how.
'''KRunner''' intelligently handles units as part of the calculations. Try the following examples to see how.


Examples:
Examples:
Line 231: Line 262:
|}
|}


Since KRunner understands most units, you can use it to convert them very quickly. Note that unit conversions don't require an <code>=</code> sign.
Since '''KRunner''' understands most units, you can use it to convert them very quickly. Note that unit conversions don't require an <code>=</code> sign.


Examples:
Examples:
Line 244: Line 275:
|}
|}


KRunner knows currencies, too. Conversions between currencies is done by fetching the exchange rate from the [http://www.ecb.int/stats/exchange/eurofxref/html/index.en.html European Central Bank] website.
'''KRunner''' knows currencies, too. Conversions between currencies is done by fetching the exchange rate from the [http://www.ecb.int/stats/exchange/eurofxref/html/index.en.html European Central Bank] website.


Examples:
Examples:
Line 259: Line 290:
===Go places===
===Go places===


If you have bookmarked locations in the '''Marble''' (in OpenStreetMap), KRunner can open the map directly.
If you have bookmarked locations in the '''Marble''' (in OpenStreetMap), '''KRunner''' can open the map directly.


===Spell checking and special characters===
===Spell checking and special characters===


KRunner can tell you whether your spelling is correct and/or suggest corrections. The default keyword to start the spellchecker is <code>spell</code> and can be configured.
'''KRunner''' can tell you whether your spelling is correct and/or suggest corrections. The default keyword to start the spellchecker is <code>spell</code> and can be configured.


Examples:
Examples:
Line 272: Line 303:
|}
|}


KRunner can also allow you to pick special characters if you can specify the hexadecimal unicode for the character, preceded by a <code>#</code> sign.
'''KRunner''' can also allow you to pick special characters if you can specify the hexadecimal unicode for the character, preceded by a <code>#</code> sign.


Examples:
Examples:
Line 285: Line 316:
===Manage your computer===
===Manage your computer===


You can directly open system settings control modules from KRunner. Often, if you want to change something, just type associated terms and KRunner will find the control module with the settings you want.
You can directly open system settings control modules from '''KRunner'''. Often, if you want to change something, just type associated terms and '''KRunner''' will find the control module with the settings you want.


Examples:
Examples:
Line 298: Line 329:
|}
|}


KRunner can also be used to adjust the screen brightness by using the keywords "screen brightness". You can specify a percentage or just turn the brightness halfway or fully down. Additionally, keywords exist to suspend, logout, shutdown or restart your machine.
'''KRunner''' can also be used to adjust the screen brightness by using the keywords "screen brightness". You can specify a percentage or just turn the brightness halfway or fully down. Additionally, keywords exist to suspend, logout, shutdown or restart your machine.


Examples:
Examples:
Line 309: Line 340:
|-
|-
|<code> lock </code> || ''locks the screen''
|<code> lock </code> || ''locks the screen''
|-
|<code> restart </code> || ''restarts computer''
|-
|<code> shutdown </code> || ''shutdowns computer''
|}
|}


Line 315: Line 350:
===Open KRunner===
===Open KRunner===


The easiest way to open KRunner is to trigger its global shortcut (<keycap>Alt+F2</keycap>, by default). In some activities (e.g. Desktop), you can simply click on the desktop and start typing. In others (e.g. Search and Launch), KRunner may be built into the activity itself.
The easiest way to open '''KRunner''' is to trigger its global shortcut (<keycap>Alt+Space</keycap> or <keycap>Alt+F2</keycap>, by default). In some activities (e.g. Desktop), you can simply click on the desktop and start typing. In others (e.g. Search and Launch), '''KRunner''' may be built into the activity itself.
 
You can also right-click on your plasma workspace and select <menuchoice>Run Command...</menuchoice> or just simply launch it from the commandline by typing <code>krunner</code>.
 
===Use KRunner===


Use <keycap>Tab</keycap> or <keycap>Shift+Tab</keycap> to navigate up and down results. Use <keycap>arrow keys</keycap> to move between options (if any) in a result. Use <keycap>Enter</keycap> (or left click) to select a result.
你也可以右键你的工作区, 然后从菜单中选择<menuchoice>显示KRunner</menuchoice>或者从命令行中输入<code>krunner</code>来启动它.


===Discover KRunner===
===使用 KRunner===


Click on the wrench icon to bring up configuration options where you can enable/disable/configure runners that will process your searches. Additional options are available to change the position on the screen where krunner appears. You can even change the style to a task-oriented interface, if you like.
使用 <keycap>Tab</keycap>/<keycap>Ctrl+j</keycap> 或者 <keycap>Shift+Tab</keycap>/<keycap>Ctrl+k</keycap> 来浏览上下页结果. 使用 <keycap>arrow keys</keycap> 在某个结果的不同选项之中移动. 使用 <keycap>Enter</keycap> (or left click) 选定一个结果.


Clicking on the waveform icon will open the System Monitor.
===探索KRunner===


Clicking on the '?' icon opens a scrollable list that explains the syntax of all the available runners. This is a good way to discover new functionality!
单击扳手图标可显示配置选项,您可以在其中启用/禁用/配置将处理搜索的运行程序。其他选项可用于更改屏幕上显示 krunner 的位置。如果你乐意的话,甚至可以将样式更改为面向任务的样式。


点击 '?' 图标可以打开一个滚动列表, 里面有所有可用的runner和对应的使用语法. 这是寻找新功能的好方法!
<span id="Tips, Tricks and FAQs"></span>
==Tips, Tricks and FAQs==
==Tips, Tricks and FAQs==


You can use KRunner in a special "single runner" mode. While in this mode, krunner will only have one active runner to process your searches. This feature isn't supported by all runners, but quite a few already do. Open the global keyboard shortcuts control module directly from krunner and choose the "Run Command Interface" to see what's available. Set a global shortcut for the mode you want and launch krunner in that mode. You can have as many modes as you can find shortcuts for. :)
你可以在特殊的"single runner"模式下使用'''KRunner'''。在此模式下,KRunner 将只使用一个runner来处理您的搜索。相当多的runner都已经支持了此选项, 但仍有少部分没有支持。直接从'''KRunner'''打开全局快捷键控制模块,然后选择"运行命令界面"以查看可用的内容, 并为你想要的模式设置全局快捷方式,并在该模式下启动"KRunner"。你可以拥有许多运行模式, 这取决于你能找到多少快捷键。{{Smiley}}


This [http://sciencekde.wordpress.com/2010/12/07/advanced-calculator-runner/ blog] covers some of the advanced usage of the calculator runner.
这个 [https://sciencekde.wordpress.com/2010/12/07/advanced-calculator-runner/ 博客] 提到了一些Krunner计算器的高级用法.




[[Category:Tutorials]]
[[Category:教程/zh-cn]]
[[Category:System]]
[[Category:系统/zh-cn]]

Revision as of 11:05, 17 January 2021

KRunner (使用 Alt-F2 或者 Alt-SPACE 快捷键来启动) 是Plasma桌面内置的快速启动器. 他的基本功能是从一个迷你的命令行启动特定程序, 不过它的功能也可以通过"runner"来扩展,以帮助用户完成许多其他的任务.

Note

你可能需要安装额外的 KRunner 插件包来使用这里列出的一些功能, 这取决于你的发行版. 注意,开启大量的插件可能会减慢KRunner的启动速度,你通过点击扳手图标来调整。

特性

这个不完整的列表试图展示一些使用KRunner的基本例子. 你可以点击KRunner上的'?'按钮来发现更多用法.

启动或者终止程序运行

你可以通过输入你想要启动的应用程序的名称来启动程序——或者使用更简单的做法: 按方向键来查看你预先输入的最近使用的程序列表。

当你开始输入第一个字符时,KRunner就会开始查找匹配项。你 可以从能够自定义的应用程序菜单中找到与应用程序匹配的内容(为此,请在菜单中单击鼠标右键).

示例:

输入 输出
gwe (打开 Gwenview)

您也可以使用KRunner杀死应用程序。 键入关键字 kill ,后跟进程名称,KRunner将提供关闭应用程序(SIGTERM)或强行退出应用程序(SIGKILL)的选项。 KRunner会将部分进程名称与正在运行的进程匹配。

请注意,可以在"Terminate Applications"插件中更改关键字 kill ,以避免与接受进程ID的shell命令kill混淆。

直接安装

如果你在寻找尚未安装的应用程序,KRunner将建议一组与你的搜索匹配的应用程序。 KRunner已与Plasma软件中心 Discover集成,因此,将向您显示应用程序列表,使您可以继续直接安装。

shell指令

除了应用程序菜单中列出的应用程序外,“‘KRunner’还可以用于运行shell命令,包括启动二进制文件。注意,当输入shell命令时,“‘KRunner’将不提供命令自动补全功能, 也不识别只输入了一部分的指令。

运行这样的命令会弹出一个扳手图标,提供额外的选项。你可以选择打开终端并在终端里运行命令(如果你的命令生成了你想要读取的文本输出,这可能很有用),或者选择作为另一个用户(通过提供该用户的用户名和密码)来运行程序。

例子:

输入 输出
ls ~/Documents 显示文件夹 ~/Documents 的内容(在终端中)
cp ~/Documents/myFile ~/myFile 从 ~/Documents 拷贝myFile文件到 ~/
mplayer myMovie.mkv 使用mplayer播放myMovie.mkv

Incidentally, if the command line is your thing, you may appreciate the built in integration to man pages. Simply type a command name preceded by a # or man:/ to open the man page formatted for easy readability in your browser.

Examples:

Input Output
#ls opens the manual for ls in a browser
man:/grep opens the manual for grep in a browser

Browse websites

You can simply start typing the URL of a website to open it in your default browser. You may even type in the name of a browser bookmark and KRunner will open it for you. If you have visited the website in the past, KRunner can fetch you results from your browser's history, too.

Examples:

Input Output
myBookmark opens the bookmark in a browser
kde.org opens the KDE homepage in a browser
http://userbase.kde.org/ opens Userbase in a browser

KRunner already knows your Web Shortcuts, found in Plasma System Settings, so you can directly start using them.

Examples:

Input Output
gg:KDE searches Google for KDE
wp:krunner searches Wikipedia for krunner

KRunner also provides options to download files from the web using KGet by providing their URL.

Additional runners exist for fast searching on Wikipedia, Wikitravel and KDE Techbase.

Open files, folders and devices

KRunner can also open files and directories on your local machine for you. If you want to browse remote machines, you can do that, too. Notice how KRunner uses kioslaves for ssh (fish:) and samba (smb:).

Examples:

Input Output
file:/home/ opens file:///home/ (the Home directory) in Dolphin
file:myMovie.mkv opens /home/myMovie.mkv
fish:[email protected] opens fish:/[email protected]/ via fish (file over ssh) protocol
smb:myWindowsBox opens smb:/myWindowsBox via Samba

If you don't know the path to a file, simply type the name of the file. If the file is a recently opened document, KRunner will list it for you. If you have enabled "File Search" provided by Baloo daemon, you can also search your computer for the file by its indexed contents. KRunner will also open folders you've bookmarked in Dolphin (in your Places sidebar) if you type their name in. What's more, if you want to access devices on your system (both mounted and unmounted), you can do that, too. KRunner will even provide device-specific options.

Examples:

Input Output
Home opens the Home directory in Dolphin
myFlashDrive shows options to mount or open the contents of myFlashDrive

Multitask with sessions, windows, desktops and activities

Several KDE applications allow you to save and load sessions. KRunner allows you to launch these sessions. You can either type in the name of the application or directly type in the name of the session. Runners exist for opening sessions saved in Kate, Konqueror, Konsole, etc.

KRunner is a multitasker's dream. If you have too many windows open, just type in the title of the window and switch directly to it. You can similarly type in the name of a virtual desktop and switch directly to it. If you roll with activities, switch activities by typing their name in. KRunner will find a match as soon as you type three characters in.

KRunner will even switch desktop sessions for you. Type in the keyword switch or new session to start a separate X session. You can switch back and forth between sessions by using the switch keyword.

Examples:

Input Output
Desktop 1 switches the virtual desktop to Desktop 1
myWorkActivity switches the activity to myWorkActivity
switch shows options to switch to an existing session or start a new one
new session starts a new session

Several plasma widgets can be launched as windowed applications. You can simply type the name of a widget and KRunner will launch a window for you.

Talk to people

Type in the name of a contact in your KAddressBook to get a list of options to contact them. Typing in an email address into KRunner will open a KMail composer window. You can also search through contacts in your Kopete contact list.

The addressbook and kopete runners don't seem to be working in SC 4.8.

Examples:

Input Output
[email protected] compose a mail to the KDE mailing list
myContact show options to contact myContact

Listen to some music

You can control any modern audio player such as Amarok using KRunner. You can use several keywords (all configurable) to play, pause or skip songs. Typing in the name of an artist, album or song that is in Amarok's library will let you either play immediately, play next (queue) or play at the end (append) of the current playlist. You can use keywords to increase or decrease the volume of the player, or even to mute or quit it.

Examples:

Input Output
play song search plays a song immediately
pause pauses Amarok or your designated music player
next plays next song in playlist

Be on time

You can get the current date or time by typing in the keywords date or time. Selecting the result will copy it to your clipboard so you can paste it elsewhere. The format of the date and time respects your system settings.

Examples:

Input Output
date Today's date is ...
time The current time is ...

You can even get the date and time at another location by specifying the time zone or the city listed in the TZ database.

Examples:

Input Output
time UTC The current time in UTC is ...
time oslo The current time in Europe/Oslo is ...
time kolkata The current time in Asia/Kolkata is ...

There is a runner for interfacing with Korganizer and fetching events, but it doesn't seem to be working in SC 4.8.

Calculator

KRunner features a very versatile calculator that can be called by starting or ending a calculation with an = sign. In addition to basic arithmetic, you can call scientific functions like sqrt(), sin(), log(), etc. A list of the supported functions is here. Note that trigonometric functions like sin(), cos(), etc expect the angle in radians. KRunner understands pi in expressions.

Examples:

Input Output
32*12 = 384
= sqrt(4) + 32*sin(30*pi/180) 18

KRunner also supports combinatorics functions, like perm() or comb().

Examples:

Input Output
= perm(10,5) 30240
= comb(10,5) 252

KRunner can also handle symbolic mathematics and perform integration and differentiation on expressions

Examples:

Input Output
= integrate( -x/y^2, y ) -x/y
diff( log(x) ) = 1/x

You can also use KRunner to solve polynomial functions to find its roots.

Examples:

Input Output
= solve( x^2 + 4*x - 21 = 0 ) [3, -7]

KRunner intelligently handles units as part of the calculations. Try the following examples to see how.

Examples:

Input Output
= 2.5 kg * 10 m/s^2 25 N
220 V / 10 A = 22 ohms

Since KRunner understands most units, you can use it to convert them very quickly. Note that unit conversions don't require an = sign.

Examples:

Input Output
30 F -1.11111 degrees C (°C), 273.039 K, ...
27.8 km 1.09449e+06 inches (in), 17.2742 miles (mi), ...
5 gallons in liters 18.9271 liters (l)

KRunner knows currencies, too. Conversions between currencies is done by fetching the exchange rate from the European Central Bank website.

Examples:

Input Output
1 dollar 0.657002 pounds sterling (GBP), 0.742501 euros (EUR), ...
125 euros 110.606 pounds sterling (GBP), 15,785 yen (JPY), ...
30 JPY in RUB 9.40731 rubles (RUB)

Go places

If you have bookmarked locations in the Marble (in OpenStreetMap), KRunner can open the map directly.

Spell checking and special characters

KRunner can tell you whether your spelling is correct and/or suggest corrections. The default keyword to start the spellchecker is spell and can be configured.

Examples:

Input Output
spell linux Suggested words: Linux, lynx, ...

KRunner can also allow you to pick special characters if you can specify the hexadecimal unicode for the character, preceded by a # sign.

Examples:

Input Output
#03b2 β
#00b1 ±

Manage your computer

You can directly open system settings control modules from KRunner. Often, if you want to change something, just type associated terms and KRunner will find the control module with the settings you want.

Examples:

Input Output
keyboard opens the Keyboard settings control module
fonts opens the fonts settings control module
password opens the Password & User account control module

KRunner can also be used to adjust the screen brightness by using the keywords "screen brightness". You can specify a percentage or just turn the brightness halfway or fully down. Additionally, keywords exist to suspend, logout, shutdown or restart your machine.

Examples:

Input Output
screen brightness 100 increases screen brightness to 100%
sleep suspends computer to RAM
lock locks the screen
restart restarts computer
shutdown shutdowns computer

Usage

Open KRunner

The easiest way to open KRunner is to trigger its global shortcut (Alt+Space or Alt+F2, by default). In some activities (e.g. Desktop), you can simply click on the desktop and start typing. In others (e.g. Search and Launch), KRunner may be built into the activity itself.

你也可以右键你的工作区, 然后从菜单中选择显示KRunner或者从命令行中输入krunner来启动它.

使用 KRunner

使用 Tab/Ctrl+j 或者 Shift+Tab/Ctrl+k 来浏览上下页结果. 使用 arrow keys 在某个结果的不同选项之中移动. 使用 Enter (or left click) 选定一个结果.

探索KRunner

单击扳手图标可显示配置选项,您可以在其中启用/禁用/配置将处理搜索的运行程序。其他选项可用于更改屏幕上显示 krunner 的位置。如果你乐意的话,甚至可以将样式更改为面向任务的样式。

点击 '?' 图标可以打开一个滚动列表, 里面有所有可用的runner和对应的使用语法. 这是寻找新功能的好方法!

Tips, Tricks and FAQs

你可以在特殊的"single runner"模式下使用KRunner。在此模式下,KRunner 将只使用一个runner来处理您的搜索。相当多的runner都已经支持了此选项, 但仍有少部分没有支持。直接从KRunner打开全局快捷键控制模块,然后选择"运行命令界面"以查看可用的内容, 并为你想要的模式设置全局快捷方式,并在该模式下启动"KRunner"。你可以拥有许多运行模式, 这取决于你能找到多少快捷键。

这个 博客 提到了一些Krunner计算器的高级用法.