KWin(窗口管理器)

    From KDE UserBase Wiki
    Revision as of 08:00, 5 July 2019 by FuzzyBot (talk | contribs) (Updating to match new version of source page)
    KDE 4.5 空桌面
    KDE Plasma 工作空间可靠、灵活的窗口管理器,现在支持3D特效!

    特性预览

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

    KWin (pronounced "kwin" in one word) is the window manager for the KDE Plasma Desktop. It gives you complete control over your windows, making sure they're not in the way but aid you in your task. It paints the window decoration, the bar on top of every window with (configurable) buttons like close, maximize and minimize. It also handles placing of windows and switching between them.

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

    实用功能

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

    If your X server already supports compositing, switching it on is as easy as opening System Settings, opening the Worskpace Appearance and Behaviour module, choosing Desktop Effects and enabling the checkbox Enable desktop effects at startup. More advanced compositing settings (such as Use VSync, Scale method, Compositing type) are available through the Advanced dialog. Customising the behaviour of the KWin effects means opening the All effects tab, and choosing the plugins you want to use. Please note that only a subset of the plugins works with XRender-based compositing. For the full experience, you need to use OpenGL mode.

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

    More information about what was introduced in KDE SC 4.9 can be found at the following link:

    教程

    你想要一个程序每次都以特定的大小,在特定的屏幕位置启动

    Size and Position

    有时候一个程序的屏幕位置都对你的舒适至关重要,使用kwin的灵活性确保他总是出现在你期望的地方。

    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 Size & Position tab and check Position and Size. OK - you are finished!

    从命令行用脚本控制窗口管理器

    使用这个WMIface工具。

    自定义标题栏按钮位置

    设置按钮

    Take a look at System Settings -> Application Style -> Window Decorations -> Buttons tab. The options open to you may depend on your distribution or theme, and it's clear that there is more to come.


    To simply move things around you work with the specimen titlebar. Drag icons there to where you want to see them.

    你可能会找到其他可用的图标。圆圈指的是设置窗口到所有桌面的按钮。另一个你能找到的有用图标是阴影 - 在卷起(只有标题栏可见)和正常视图间切换。直接拖动文本描述框内的图标到标题栏模板(the speciman titlebar)就成 - 随你喜欢放哪

    如果你更喜欢传统 KDE3 类型的桌面

    切换到传统桌面

    Right-click on your desktop - select Desktop Settings (or Appearance Settings, in some distros). Change the Layout: 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.

    直接打开程序进入到另一个不同的桌面

    用命令比如

    kstart5 --desktop 4 kate

    小尺寸屏幕下的使用(比如上网本)

    窗口装饰更小

    Breeze, Plastik, and Oxygen Styles

    System Settings -> Application Style -> Window Decorations tab. Two good options there:

    Configure Breeze Style
    • Using the default style (Breeze), select Configure Decoration and set Button size to Tiny or Small.
    • Using an other style, with smaller windows decorations.

    2条路都能获得实用的细窗口标题栏和边框。

    修改基础字体大小

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

    Firefox 采用更小的字体

    调整about:config并没带来满意的结果。那这样做。下载安装gtk-chtheme。使用那个工具,你能设置特定的字体大小,或更好的是,告诉他使用你的 KDE 字体设置。对包括 Firefox 在内的所有你用的gnome程序都有用。

    KMail 的聚合(Aggregation)选项占了太多空间

    阅读 这份 FAQ 来修改。

    KMail 文件夹列表(Folder-List)的工具提示隐藏了太多文件夹名称

    阅读 这份 FAQ 来修改它们的行为。

    画廊

    画廊 展示多种过去和当前的桌面、特效截图。

    图形故障排查

    图形显示问题大多跟显卡驱动有关,请查阅 桌面特效性能

    定义窗口规则

    KWin 规则 页面介绍了如何定制窗口规则。

    More Information