kde 时钟格式:如何在非小字体中包含日期?

Pet*_*des 5 clock kde kubuntu qml

我在 Kubuntu 15.04 上使用 KDE。

我希望我的任务栏时钟看起来像这样:

周日 19 15:11

(或者 AM/PM 可以,主要是日期/日期与时间的字体大小相同。我不需要我的电脑告诉我月份和年份,但我确实想要日期和日期-月。)

KDE 的默认数字时钟小程序的配置选项包括“显示日期”选项,但这会将日/月/年放在时间下方的 TINY 字体中,而不是使小程序更宽。除此之外,您只能选择短日期或长日期格式,不能自定义。右键单击时钟 ->“设置时间格式”是 KDE 范围内的数字、时间等的格式设置,适用于您的语言环境。我只想更改时钟,而不是以自定义格式显示我的文件时间戳。

那么有没有办法在 GUI 之外自定义它?(我的意思是,除了修改代码和构建我自己的包版本之外,我的意思是。)或者,如果没有,我将如何在 KDE 中使用不同的时钟小程序,该小程序具有可使用 %letter 格式字符串自定义的时钟格式?

use*_*687 5

质量管理语言

KDE plasmoids 使用 qml 脚本,http://en.wikipedia.org/wiki/QML

plasmoid 脚本位于:/usr/share/plasma/plasmoids/... 即数字时钟脚本位于:/usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/... 你可以编辑那些但任何更新都会覆盖您的更改。

KDE TechBase 有教程 - Plasma5 QML2 GettingStarted:https ://techbase.kde.org/Development/Tutorials/Plasma5/QML2/GettingStarted 。

日期 QML 类型:http : //doc.qt.io/qt-5/qml-qtqml-date.html

-> 日期: 在此处输入图片说明

-> 时间: 在此处输入图片说明

我的面板时钟

编写一个快速而肮脏的时钟。

制作:

打开终端窗口到 tmp 目录并运行命令:

plasmapkg2 -i mypanelclock
Run Code Online (Sandbox Code Playgroud)

命令:

:~$ plasmapkg2 --help
Usage: plasmapkg2 [options]
Plasma Package Manager

Options:
  -v, --version             Displays version information.
  -h, --help                Displays this help.
  --hash <path>             Generate a SHA1 hash for the package at <path>
  -g, --global              For install or remove, operates on packages
                            installed for all users.
  -t, --type <type>         The type of package, e.g. theme, wallpaper,
                            plasmoid, dataengine, runner, layout-template, etc.
  -i, --install <path>      Install the package at <path>
  -s, --show <name>         Show information of package <name>
  -u, --upgrade <path>      Upgrade the package at <path>
  -l, --list                List installed packages
  --list-types              List all known package types that can be installed
  -r, --remove <name>       Remove the package named <name>
  -p, --packageroot <path>  Absolute path to the package root. If not supplied,
                            then the standard data directories for this KDE
                            session will be searched instead.
Run Code Online (Sandbox Code Playgroud)

现在有:

在此处输入图片说明

将时钟添加到面板:

在此处输入图片说明

更多 KDE 时钟:https : //www.kubuntuforums.net/showthread.php? 61798-Clocks

更多 qml 和等离子 5:https ://www.kubuntuforums.net/showthread.php?67726-Quick-KDE-plasma-qml-widgets