KWin(窗口管理器)

From KDE Wiki Sandbox
Revision as of 14:19, 28 October 2010 by Qiii2006 (talk | contribs) (Created page with "== 教程 ==")
KDE 4.5 空桌面
KDE Plasma 工作空间可靠又灵活的窗口管理器,现在支持3D特效!

特性预览

  • 稳定和可靠
  • 混成的 3D 效果
  • 易于配置
  • 改进的效率

KWin(发音 "kwin")是 KDE Plasma 桌面 的窗口管理器。它让你完全操控你的窗口,确保它们不是在妨碍工作而是在帮助你完成任务。它绘制窗口装饰,每个窗口顶部的栏,带有(可定制的)按钮比如关闭,最大化和最小化。他同样处理窗口移动和互相切换。

KWin 支持混成特性(compositing), 意味着能够使用 3D 效果来处理你的窗口。这使得窗口管理更平滑,更容易,更有效和更自然。它的硬件要求非常的适当,几乎每个相当于 2002 年之后的现代系统都支持它。与某些硬件还存在一些问题,要了解更多信息,请点击 techbase

实用功能

右击窗口装饰(就是标题栏)或打开 系统设置 访问 KWin 新的更容易的设置。在这你可以启用特效以便更有效的管理你的窗口。比如你能用窗口轮转(Present Windows)作为「窗口切换」的特效。不同于显示图标或是小的程序缩略图,他安排整理运行中的窗口在同一个网格内,然后你能快速的选择你要的那个窗口。只要使用Alt-Tab快捷键组合,保持Alt按键一直按住。现在你能用TAB按键遍历选择窗口或用鼠标激活相应的窗口。快速的击打Alt-Tab按键会显示队列中下一个窗口,就如以前一样。

如果你的 X server 已经支持「混成」,那简单的打开「系统设置」,进入「桌面」模块,选择「桌面效果」,然后勾选「启用桌面效果」来切换。更多高级的混成设置(比如 VSync操作直接渲染混成类型)可通过「高级」标签页操作。自定义 KWin 特效的行为可打开「全部效果」标签,选择你想要用的插件。请注意只有一部分插件能在 XRender 类型混成下工作。要获得完全的体验,你需要使用OpenGL 类型。

使用物理学动力, KWin 给窗口提供了更自然的感觉。新的桌面特效像是"立方体"桌面切换和"魔灯"最小化动画都已经有添加。现有特效的改进使得窗口管理器相比以前更顺畅。KWin在性能上有很多改进以使得在低配置硬件上能够开启那些特效。精细的检查确保低配置硬件的使用者不会面对一套无法使用的配置方案。KWin检查硬件的性能如果需要会适当的调低效果。你可以选择自己控制,禁用那些功能检查或修改设置像是调整全局动画速度到自己喜欢的。当你电脑在高负载时, KWin 会临时自动取消混成特性保证其他任务运行流畅。如果取消特效了他会通知你,你能按住Shift+Alt+F12重新启用混成特性。最后,对多屏幕处理的支持已经由使用新的Kephal函数库在 KWin 中得到改进。你可以在 Xinerama屏幕之间移动最大化的窗口,额外的外部屏幕都会正确处理。

更多 KDE SC 4.2 新加特性的信息能在下列链接找到:

教程

You want an application to launch in a specific size and position every time

Sometimes the screen position of an application is vital to your comfort, so use the flexibility of KWin to make sure it's always where you want it.

Position the window where you want it to open, then right-click on the title-bar, choosing Advanced -> Special Window Settings. This will open a settings window, with appropriate entries already made. All you need to do now is select the Geometry tab and check Position and Size. OK - you're finished!

Script the window manager from the command line

Use the WMIface utility.

Customise the position of titlebar buttons

Take a look at System Settings -> Appearance -> Windows -> Buttons tab - and enable Use custom titlebar button positions. The options open to you may depend on your distribution or theme, and it's clear that there is more to come.

Perhaps you would like more space between the Close button and the Minimise/Maximise pair? So you will want to add a spacer - two if you wish.

To simply move things around you work with the speciman titlebar - that is the dark blue bar with a large KDE on it. Drag icons there and you will see them move in the preview window at the bottom of the screen.

You may find that you have other icons available to you. A circle indicates that the button will set that window on all desktops. Another icon that you may find useful is Shade - a toggle between rolled up (titlebar only visible) and normal view. These icons are added by dragging from the text description window onto the speciman title bar - just position them as you want to use them.

If you prefer a Classic, KDE3-style Desktop

Right-click on your desktop - select Desktop Settings (or Appearance Settings, in some distros). Change the Type: from Desktop to Folder View. The whole desktop is now a folderview, and another right-click on the desktop will allow you to select FolderView Settings. Set the folderview to the directory you want to use as your desktop.

A video of KWin features

A demonstration of features is here

Open applications directly into a different desktop

Use commands like

kstart --desktop 4 kate

Using with small screens (eg Netbooks)

Make the window decorations smaller

System Settings -> Appearance -> Windows -> Window Decoration tab. Two good options there:

  • Using the default style (Oxygen), select Configure Decoration and set Button Size to Small and Border Size to Tiny
  • Select the Laptop

Both routes will give you slim and functional window titles and borders.

Change the base fonts

On many netbooks the screen is very clear, so that reading fonts much smaller than you expect is feasible. On my Acer Aspire One I find that 8 point is a good base settings.

Make Firefox use smaller fonts

Experimentation with about:config did not bring satisfactory results. Do this instead. Download and install gtk-chtheme from this website. Using that tool you can either set a specific font size, or better still, tell it to use your KDE desktop settings. This will work with Firefox as well as any gtk applications that you use.

KMail's Aggregation options take up too much space

See this FAQ to change it.

KMail's Folder-List Tooltips hide too many folder names

See this FAQ to change their behaviour

Gallery

The Gallery holds many screenshots of past and present desktops and effects.