├── debian
├── source
│ └── format
├── control
├── rules
├── changelog
└── copyright
├── src
├── preloadplugin
│ ├── plugin.json
│ ├── preload.qrc
│ ├── CMakeLists.txt
│ ├── preloadplugin.h
│ ├── preloadplugin.cpp
│ └── Preload.qml
├── maincomponentplugin
│ ├── qml
│ │ ├── Utils
│ │ │ ├── qmldir
│ │ │ └── utils.qml
│ │ ├── Components
│ │ │ ├── ListViewHighLight.qml
│ │ │ └── ListViewDelegate.qml
│ │ ├── CategoryModel.qml
│ │ ├── Category.qml
│ │ ├── MainPage.qml
│ │ └── Categories
│ │ │ ├── Other.qml
│ │ │ └── Welcome.qml
│ ├── plugin.json
│ ├── images
│ │ ├── DE.png
│ │ ├── Kernel.png
│ │ ├── BootMenu.png
│ │ ├── Welcome.png
│ │ ├── welcome.webp
│ │ ├── Application.png
│ │ ├── Environment.png
│ │ ├── PossibleVing_author.png
│ │ ├── Other.svg
│ │ ├── github_fill.svg
│ │ ├── distributor-logo-deepin.svg
│ │ └── logo.svg
│ ├── main.qml
│ ├── pluginlistmodel.h
│ ├── staff
│ │ ├── settings.h
│ │ ├── settings.cpp
│ │ ├── gsettings.h
│ │ ├── file.cpp
│ │ ├── launcher.h
│ │ ├── file.h
│ │ ├── gsettings.cpp
│ │ ├── launcher.cpp
│ │ └── staff.h
│ ├── maincomponentplugin.h
│ ├── maincomponentplugin.cpp
│ ├── CMakeLists.txt
│ ├── maincomponent.qrc
│ └── pluginlistmodel.cpp
├── CMakeLists.txt
└── main
│ ├── main.cpp
│ └── CMakeLists.txt
├── plugins
├── dev.myml.tweak.tasks
│ ├── assets
│ │ └── icon.png
│ ├── Actions.qml
│ ├── translations
│ │ └── en_US.ts
│ └── main.qml
├── org.deepin.tweak.titlebar
│ ├── assets
│ │ └── icon.png
│ ├── translations
│ │ ├── zh_CN.ts
│ │ └── en_US.ts
│ └── main.qml
├── org.deepin.tweak.environment
│ ├── assets
│ │ └── icon.png
│ ├── translations
│ │ ├── en_US.ts
│ │ ├── es.ts
│ │ ├── uk.ts
│ │ ├── tr.ts
│ │ ├── hu.ts
│ │ └── zh_CN.ts
│ └── main.qml
├── CMakeLists.txt
└── fun.tarrow.tweak.fillet
│ ├── translations
│ └── en_US.ts
│ ├── assets
│ └── icon.svg
│ └── main.qml
├── resources.qrc
├── .github
└── workflows
│ ├── call-chatOps.yml
│ ├── call-commitlint.yml
│ ├── call-build-distribution.yml
│ ├── call-auto-tag.yml
│ ├── call-clacheck.yml
│ ├── backup-to-gitlab.yml
│ └── call-license-check.yml
├── misc
├── deepin-tweak.desktop
└── deepin-tweak.svg
├── translate_generation.sh
├── .gitignore
├── .obs
└── workflows.yml
├── README.md
├── .reuse
└── dep5
├── CMakeLists.txt
├── doc
├── demos
│ └── org.deepin.test
│ │ └── main.qml
└── README.zh_CN.md
├── README.zh_CN.md
├── translations
├── en_US.ts
├── hu.ts
├── pl.ts
├── tr.ts
├── uk.ts
├── es.ts
└── zh_CN.ts
├── .clang-format
├── LICENSES
├── CC0-1.0.txt
├── Apache-2.0.txt
└── CC-BY-4.0.txt
└── LICENSE
/debian/source/format:
--------------------------------------------------------------------------------
1 | 3.0 (native)
2 |
--------------------------------------------------------------------------------
/src/preloadplugin/plugin.json:
--------------------------------------------------------------------------------
1 | {
2 | "appid": "deepin-tweak"
3 | }
--------------------------------------------------------------------------------
/src/maincomponentplugin/qml/Utils/qmldir:
--------------------------------------------------------------------------------
1 | singleton Utils utils.qml
2 |
--------------------------------------------------------------------------------
/src/maincomponentplugin/plugin.json:
--------------------------------------------------------------------------------
1 | {
2 | "appid": "deepin-tweak"
3 | }
--------------------------------------------------------------------------------
/src/maincomponentplugin/images/DE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxdeepin/deepin-tweak/HEAD/src/maincomponentplugin/images/DE.png
--------------------------------------------------------------------------------
/src/maincomponentplugin/images/Kernel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxdeepin/deepin-tweak/HEAD/src/maincomponentplugin/images/Kernel.png
--------------------------------------------------------------------------------
/plugins/dev.myml.tweak.tasks/assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxdeepin/deepin-tweak/HEAD/plugins/dev.myml.tweak.tasks/assets/icon.png
--------------------------------------------------------------------------------
/src/maincomponentplugin/images/BootMenu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxdeepin/deepin-tweak/HEAD/src/maincomponentplugin/images/BootMenu.png
--------------------------------------------------------------------------------
/src/maincomponentplugin/images/Welcome.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxdeepin/deepin-tweak/HEAD/src/maincomponentplugin/images/Welcome.png
--------------------------------------------------------------------------------
/src/maincomponentplugin/images/welcome.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxdeepin/deepin-tweak/HEAD/src/maincomponentplugin/images/welcome.webp
--------------------------------------------------------------------------------
/src/maincomponentplugin/images/Application.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxdeepin/deepin-tweak/HEAD/src/maincomponentplugin/images/Application.png
--------------------------------------------------------------------------------
/src/maincomponentplugin/images/Environment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxdeepin/deepin-tweak/HEAD/src/maincomponentplugin/images/Environment.png
--------------------------------------------------------------------------------
/plugins/org.deepin.tweak.titlebar/assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxdeepin/deepin-tweak/HEAD/plugins/org.deepin.tweak.titlebar/assets/icon.png
--------------------------------------------------------------------------------
/plugins/org.deepin.tweak.environment/assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxdeepin/deepin-tweak/HEAD/plugins/org.deepin.tweak.environment/assets/icon.png
--------------------------------------------------------------------------------
/src/maincomponentplugin/images/PossibleVing_author.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxdeepin/deepin-tweak/HEAD/src/maincomponentplugin/images/PossibleVing_author.png
--------------------------------------------------------------------------------
/resources.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | translations/en_US.qm
4 | translations/zh_CN.qm
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/preloadplugin/preload.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | Preload.qml
4 | ../../misc/deepin-tweak.svg
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.github/workflows/call-chatOps.yml:
--------------------------------------------------------------------------------
1 | name: chatOps
2 | on:
3 | issue_comment:
4 | types: [created]
5 |
6 | jobs:
7 | chatopt:
8 | uses: linuxdeepin/.github/.github/workflows/chatOps.yml@master
9 | secrets: inherit
10 |
--------------------------------------------------------------------------------
/misc/deepin-tweak.desktop:
--------------------------------------------------------------------------------
1 | [Desktop Entry]
2 | Name=Deepin Tweak
3 | Name[zh_CN]=深度定制
4 | GenericName=Deepin Tweak
5 | GenericName[zh_CN]=深度定制
6 | Icon=deepin-tweak
7 | Exec=/usr/bin/deepin-tweak
8 | Type=Application
9 | X-Deepin-TurboType=dtkqml
10 |
--------------------------------------------------------------------------------
/src/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | # SPDX-License-Identifier: CC0-1.0
4 | # Application
5 | add_subdirectory(main)
6 | add_subdirectory(preloadplugin)
7 | add_subdirectory(maincomponentplugin)
8 |
--------------------------------------------------------------------------------
/.github/workflows/call-commitlint.yml:
--------------------------------------------------------------------------------
1 | name: Call commitlint
2 | on:
3 | pull_request_target:
4 |
5 | concurrency:
6 | group: ${{ github.workflow }}-pull/${{ github.event.number }}
7 | cancel-in-progress: true
8 |
9 | jobs:
10 | check_job:
11 | uses: linuxdeepin/.github/.github/workflows/commitlint.yml@master
12 |
--------------------------------------------------------------------------------
/src/maincomponentplugin/images/Other.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.github/workflows/call-build-distribution.yml:
--------------------------------------------------------------------------------
1 | name: Call build-distribution
2 | on:
3 | push:
4 | paths-ignore:
5 | - ".github/workflows/**"
6 | pull_request_target:
7 | paths-ignore:
8 | - ".github/workflows/**"
9 |
10 | jobs:
11 | check_job:
12 | uses: linuxdeepin/.github/.github/workflows/build-distribution.yml@master
13 | secrets: inherit
14 |
--------------------------------------------------------------------------------
/src/maincomponentplugin/main.qml:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 |
5 | import QtQuick 2.11
6 | import org.deepin.dtk 1.0
7 | import QtQuick.Layouts 1.15
8 |
9 | AppLoader {
10 | Component {
11 | Loader {
12 | anchors.fill: parent
13 | source: 'qml/MainPage.qml'
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/.github/workflows/call-auto-tag.yml:
--------------------------------------------------------------------------------
1 | name: auto tag
2 |
3 | on:
4 | pull_request_target:
5 | types: [opened, synchronize, closed]
6 | paths:
7 | - "debian/changelog"
8 |
9 | concurrency:
10 | group: ${{ github.workflow }}-pull/${{ github.event.number }}
11 | cancel-in-progress: true
12 |
13 | jobs:
14 | auto_tag:
15 | uses: linuxdeepin/.github/.github/workflows/auto-tag.yml@master
16 | secrets: inherit
17 |
--------------------------------------------------------------------------------
/.github/workflows/call-clacheck.yml:
--------------------------------------------------------------------------------
1 | name: Call CLA check
2 | on:
3 | issue_comment:
4 | types: [created]
5 | pull_request_target:
6 | types: [opened, closed, synchronize]
7 |
8 | concurrency:
9 | group: ${{ github.workflow }}-pull/${{ github.event.number }}
10 | cancel-in-progress: true
11 |
12 | jobs:
13 | clacheck:
14 | uses: linuxdeepin/.github/.github/workflows/cla-check.yml@master
15 | secrets: inherit
16 |
--------------------------------------------------------------------------------
/.github/workflows/backup-to-gitlab.yml:
--------------------------------------------------------------------------------
1 | name: backup to gitlab
2 | on: [push]
3 |
4 | concurrency:
5 | group: ${{ github.workflow }}
6 | cancel-in-progress: true
7 |
8 | jobs:
9 | backup-to-gitlabwh:
10 | uses: linuxdeepin/.github/.github/workflows/backup-to-gitlabwh.yml@master
11 | secrets: inherit
12 |
13 | backup-to-gitee:
14 | uses: linuxdeepin/.github/.github/workflows/backup-to-gitee.yml@master
15 | secrets: inherit
16 |
--------------------------------------------------------------------------------
/translate_generation.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
3 |
4 | # SPDX-License-Identifier: CC0-1.0
5 |
6 | # this file is used to auto-generate .qm file from .ts file.
7 | # author: shibowen at linuxdeepin.com
8 |
9 | ts_list=(`ls translations/*.ts` `ls plugins/*/translations/*.ts`)
10 |
11 | for ts in "${ts_list[@]}"
12 | do
13 | printf "\nprocess ${ts}\n"
14 | lrelease "${ts}"
15 | done
16 |
--------------------------------------------------------------------------------
/.github/workflows/call-license-check.yml:
--------------------------------------------------------------------------------
1 | name: Call License and README Check
2 | on:
3 | pull_request_target:
4 | types: [opened, synchronize, reopened]
5 |
6 | permissions:
7 | pull-requests: write
8 | contents: read
9 |
10 | concurrency:
11 | group: ${{ github.workflow }}-pull/${{ github.event.number }}
12 | cancel-in-progress: true
13 |
14 | jobs:
15 | license-check:
16 | uses: linuxdeepin/.github/.github/workflows/license-check.yml@master
17 |
--------------------------------------------------------------------------------
/plugins/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | # SPDX-License-Identifier: CC0-1.0
4 |
5 | install(DIRECTORY org.deepin.tweak.titlebar
6 | DESTINATION share/deepin-tweak/plugins)
7 | install(DIRECTORY org.deepin.tweak.environment
8 | DESTINATION share/deepin-tweak/plugins)
9 | install(DIRECTORY dev.myml.tweak.tasks
10 | DESTINATION share/deepin-tweak/plugins)
11 | install(DIRECTORY fun.tarrow.tweak.fillet
12 | DESTINATION share/deepin-tweak/plugins)
13 |
--------------------------------------------------------------------------------
/src/maincomponentplugin/qml/Components/ListViewHighLight.qml:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 |
5 | import QtQuick 2.15
6 | import QtQuick.Controls 2.4
7 | import "../Utils"
8 |
9 | Rectangle {
10 | color: palette.highlight
11 | radius: Utils.listRadius
12 | Rectangle {
13 | color: palette.highlightedText
14 | width: 5
15 | height: 20
16 | radius: 5
17 | x: 5
18 | y: 8
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/maincomponentplugin/qml/CategoryModel.qml:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 |
5 | import QtQuick 2.0
6 | import QtQml.Models 2.15
7 |
8 | ListModel {
9 | ListElement {
10 | title: qsTr("Welcome")
11 | icon: "/images/Welcome.png"
12 | source: "Categories/Welcome.qml"
13 | }
14 | ListElement {
15 | title: qsTr("Other")
16 | icon: "/images/Other.svg"
17 | source: "Categories/Other.qml"
18 | }
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/debian/control:
--------------------------------------------------------------------------------
1 | Source: deepin-tweak
2 | Section: admin
3 | Priority: optional
4 | Maintainer: Deepin Sysdev
5 | Build-Depends:
6 | debhelper-compat (= 12),
7 | cmake,
8 | pkg-config,
9 | qtbase5-dev,
10 | qtdeclarative5-dev,
11 | libdtkcommon-dev,
12 | libdtkcore-dev,
13 | libdtkgui-dev,
14 | libdtkdeclarative-dev,
15 | libgsettings-qt-dev,
16 | qttools5-dev-tools,
17 | libnemodbus,
18 | Standards-Version: 4.6.0
19 | Rules-Requires-Root: no
20 |
21 | Package: deepin-tweak
22 | Architecture: any
23 | Depends: ${shlibs:Depends}, ${misc:Depends}
24 | Description: deepin tweak tools
25 | Advanced customization features for communities
26 |
--------------------------------------------------------------------------------
/src/main/main.cpp:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 |
5 | #include
6 | #include
7 | #include
8 |
9 | DQUICK_USE_NAMESPACE
10 |
11 | int main(int argc, char *argv[])
12 | {
13 | #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
14 | QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
15 | #endif
16 |
17 | // 避免窗口菜单背景显示灰色 https://github.com/linuxdeepin/dtk/issues/70
18 | qputenv("D_POPUP_MODE", "embed");
19 | DAppLoader appLoader(APP_NAME, LOCALLIBPATH);
20 | return appLoader.exec(argc, argv);
21 | }
22 |
--------------------------------------------------------------------------------
/src/maincomponentplugin/qml/Utils/utils.qml:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 |
5 | pragma Singleton
6 | import QtQuick 2.0
7 |
8 | QtObject {
9 | property int margin: 10
10 | property int radius: 15
11 | property int spacing: 5
12 | property int listRadius: 10
13 | property int listItemWidth: 200
14 | property int listItemHeight: 36
15 | property int welcomeHeaderHeight: 250
16 | property int welcomeHeaderAnimatedHeight: 200
17 | property int welcomeHeaderAnimateDuration: 600
18 | property string transparentBackground: 'transparent'
19 | }
20 |
--------------------------------------------------------------------------------
/src/preloadplugin/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | # SPDX-License-Identifier: CC0-1.0
4 | set(PRELOAD_LIB_NAME ${CMAKE_PROJECT_NAME}-preload)
5 | set(PRELOAD_SRC
6 | preloadplugin.cpp
7 | )
8 | find_package(Qt5QuickCompiler REQUIRED)
9 | qtquick_compiler_add_resources(PRELOAD_RCC_SOURCES preload.qrc)
10 | include_directories(src/preloadplugin)
11 | add_library(${PRELOAD_LIB_NAME} SHARED
12 | ${PRELOAD_SRC}
13 | ${PRELOAD_RCC_SOURCES}
14 | )
15 | target_link_libraries(${PRELOAD_LIB_NAME}
16 | Qt5::Quick
17 | ${DtkDeclarative_LIBRARIES}
18 | )
19 | install(TARGETS ${PRELOAD_LIB_NAME} DESTINATION ${LIB_INSTALL_DIR})
20 |
--------------------------------------------------------------------------------
/src/main/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | # SPDX-License-Identifier: CC0-1.0
4 | set(APP_NAME ${CMAKE_PROJECT_NAME})
5 | add_definitions(-DAPP_NAME="${APP_NAME}")
6 |
7 | ###! main目录创建出二进制可执行文件,但启动方式由 DAppLoader
8 | ###! 中提供, 请不要在 main 中实现额外内容,请将需要实现的部分
9 | ###! 移动到 preload 插件和 maincomponent 插件中。
10 |
11 | # Set sources
12 | set(SRC
13 | main.cpp
14 | )
15 |
16 | # Find the Qt5Quick library
17 |
18 | # Add EXE
19 | add_executable(${APP_NAME} ${SRC} ${QRC})
20 |
21 | # 由于 EXE 只是作为启动程序加载 LIB 使用,一般来说,只需链接 ${LIB_NAME} 既可。
22 | target_link_libraries(${APP_NAME}
23 | Qt5::Quick
24 | ${DtkDeclarative_LIBRARIES}
25 | )
26 |
27 |
28 | install(TARGETS ${APP_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
29 |
--------------------------------------------------------------------------------
/src/maincomponentplugin/qml/Category.qml:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 |
5 | import QtQuick 2.15
6 | import QtQuick.Controls 2.4
7 | import QtQuick.Layouts 1.15
8 | import "."
9 | import "./Utils"
10 | import "./Components"
11 |
12 | ListView {
13 | id: listView
14 | model: CategoryModel {}
15 | Layout.topMargin: Utils.margin
16 | spacing: Utils.spacing
17 | focus: true
18 | interactive: false
19 | highlight: ListViewHighLight {}
20 | delegate: ListViewDelegate {
21 | width: listView.width
22 | height: Utils.listItemHeight
23 | isCurrentIndex: listView.currentIndex === index
24 | onClicked: {
25 | listView.currentIndex = index
26 | }
27 | }
28 | }
29 |
30 |
--------------------------------------------------------------------------------
/src/preloadplugin/preloadplugin.h:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 |
5 | #ifndef PRELOADPLUGIN_H
6 | #define PRELOADPLUGIN_H
7 |
8 | #include
9 |
10 | class QQmlComponent;
11 | class PreloadPlugin : public QObject, public DTK_QUICK_NAMESPACE::DQmlAppPreloadInterface
12 | {
13 | Q_OBJECT
14 | Q_PLUGIN_METADATA(IID DQmlAppPreloadInterface_iid FILE "plugin.json")
15 | Q_INTERFACES(DTK_QUICK_NAMESPACE::DQmlAppPreloadInterface)
16 | public:
17 | PreloadPlugin(QObject *parent = nullptr);
18 | ~PreloadPlugin() override;
19 |
20 | virtual QUrl preloadComponentPath() const override;
21 | virtual QGuiApplication *creatApplication(int &argc, char **argv) override;
22 | };
23 |
24 | #endif // PRELOADPLUGIN_H
25 |
--------------------------------------------------------------------------------
/debian/rules:
--------------------------------------------------------------------------------
1 | #!/usr/bin/make -f
2 | # See debhelper(7) (uncomment to enable)
3 | # output every command that modifies files on the build system.
4 | #export DH_VERBOSE = 1
5 |
6 | include /usr/share/dpkg/default.mk
7 |
8 | export QT_SELECT = qt5
9 |
10 | # see FEATURE AREAS in dpkg-buildflags(1)
11 | #export DEB_BUILD_MAINT_OPTIONS = hardening=+all
12 |
13 | # see ENVIRONMENT in dpkg-buildflags(1)
14 | # package maintainers to append CFLAGS
15 | #export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
16 | # package maintainers to append LDFLAGS
17 | #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
18 |
19 |
20 | %:
21 | dh $@
22 |
23 |
24 | # dh_make generated override targets
25 | # This is example for Cmake (See https://bugs.debian.org/641051 )
26 | #override_dh_auto_configure:
27 | # dh_auto_configure -- \
28 | # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
29 |
--------------------------------------------------------------------------------
/debian/changelog:
--------------------------------------------------------------------------------
1 | deepin-tweak (1.2.2) unstable; urgency=medium
2 |
3 | * revert Dtk::Declarative
4 |
5 | -- TagBuilder Thu, 05 Jan 2023 10:32:57 +0800
6 |
7 | deepin-tweak (1.2.1) unstable; urgency=medium
8 |
9 | * fix release mode lib path
10 |
11 | -- TagBuilder Wed, 04 Jan 2023 16:06:57 +0800
12 |
13 | deepin-tweak (1.2.0) unstable; urgency=medium
14 |
15 | * add environment plugin
16 |
17 | -- TagBuilder Fri, 09 Sep 2022 17:42:57 +0800
18 |
19 | deepin-tweak (1.1.0) UNRELEASED; urgency=medium
20 |
21 | * support plugins
22 |
23 | -- TagBuilder Fri, 09 Sep 2022 17:42:57 +0800
24 |
25 | deepin-tweak (1.0) UNRELEASED; urgency=medium
26 |
27 | * Initial release
28 |
29 | -- TagBuilder Fri, 09 Sep 2022 17:42:57 +0800
30 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # C++ objects and libs
2 | *.slo
3 | *.lo
4 | *.o
5 | *.a
6 | *.la
7 | *.lai
8 | *.so
9 | *.so.*
10 | *.dll
11 | *.dylib
12 |
13 | # Qt-es
14 | object_script.*.Release
15 | object_script.*.Debug
16 | *_plugin_import.cpp
17 | /.qmake.cache
18 | /.qmake.stash
19 | *.pro.user
20 | *.pro.user.*
21 | *.qbs.user
22 | *.qbs.user.*
23 | *.moc
24 | moc_*.cpp
25 | moc_*.h
26 | qrc_*.cpp
27 | ui_*.h
28 | *.qmlc
29 | *.jsc
30 | Makefile*
31 | build-*
32 | *.qm
33 | *.prl
34 |
35 | # Qt unit tests
36 | target_wrapper.*
37 |
38 | # QtCreator
39 | *.autosave
40 |
41 | # QtCreator Qml
42 | *.qmlproject.user
43 | *.qmlproject.user.*
44 |
45 | # QtCreator CMake
46 | CMakeLists.txt.user*
47 |
48 | # QtCreator 4.8< compilation database
49 | compile_commands.json
50 |
51 | # QtCreator local machine specific files for imported projects
52 | *creator.user*
53 |
54 | # vscode
55 | .vscode/
56 | build/
57 | .ccls*
58 | .cache/
59 |
--------------------------------------------------------------------------------
/src/maincomponentplugin/pluginlistmodel.h:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 |
5 | #ifndef PLUGINLISTMODEL_H_
6 | #define PLUGINLISTMODEL_H_
7 |
8 | #include
9 |
10 | #include
11 | #include
12 | #include
13 |
14 | class PluginListModel : public QAbstractListModel
15 | {
16 | Q_OBJECT
17 | public:
18 | explicit PluginListModel(QObject *parent = nullptr);
19 | ~PluginListModel() override;
20 |
21 | enum PluginRoles { PathRole = Qt::UserRole + 1 };
22 |
23 | int rowCount(const QModelIndex &parent = QModelIndex()) const override;
24 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
25 | QHash roleNames() const override;
26 |
27 | private:
28 | QStringList items;
29 | };
30 |
31 | #endif // PLUGINLISTMODEL_H_
32 |
--------------------------------------------------------------------------------
/src/maincomponentplugin/staff/settings.h:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 | #ifndef SETTINGS_H
5 | #define SETTINGS_H
6 |
7 | #include
8 | #include
9 | #include
10 |
11 | class QSettings;
12 | class SettingsBackend : public QObject
13 | {
14 | Q_OBJECT
15 | public:
16 | explicit SettingsBackend(const QString& file, QObject *parent = nullptr);
17 | ~SettingsBackend() override;
18 |
19 | Q_INVOKABLE QVariant value(const QString& key, const QVariant& defaultValue = QVariant()) const;
20 | Q_INVOKABLE void setValue(const QString& key, const QVariant &value);
21 | Q_INVOKABLE void beginGroup(const QString& group);
22 | Q_INVOKABLE void endGroup();
23 | Q_INVOKABLE QStringList keys() const;
24 |
25 | private:
26 | std::unique_ptr m_settings;
27 | };
28 |
29 | #endif // SETTINGS_H
30 |
--------------------------------------------------------------------------------
/plugins/org.deepin.tweak.titlebar/translations/zh_CN.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | main
6 |
7 |
8 | Title height
9 | 标题栏高度
10 |
11 |
12 |
13 | Change window title height
14 | 修改标题栏高度
15 |
16 |
17 |
18 | Reset to default
19 | 重置为默认值
20 |
21 |
22 |
23 | Apply
24 | 应用
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/src/maincomponentplugin/maincomponentplugin.h:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 |
5 | #ifndef MAINCOMPONENTPLUGIN_H
6 | #define MAINCOMPONENTPLUGIN_H
7 |
8 | #include
9 |
10 | class QQmlComponent;
11 | class PluginListModel;
12 | class MainComponentPlugin : public QObject, public DTK_QUICK_NAMESPACE::DQmlAppMainWindowInterface
13 | {
14 | Q_OBJECT
15 | Q_PLUGIN_METADATA(IID DQmlAppMainWindowInterface_iid FILE "plugin.json")
16 | Q_INTERFACES(DTK_QUICK_NAMESPACE::DQmlAppMainWindowInterface)
17 | public:
18 | MainComponentPlugin(QObject *parent = nullptr);
19 | ~MainComponentPlugin() override;
20 |
21 | QUrl mainComponentPath() const override;
22 | void initialize(QQmlApplicationEngine *engine) override;
23 |
24 | private:
25 | PluginListModel *pluginListModel;
26 | };
27 |
28 | #endif // MAINCOMPONENTPLUGIN_H
29 |
--------------------------------------------------------------------------------
/src/maincomponentplugin/qml/MainPage.qml:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 |
5 | import QtQuick 2.15
6 | import QtQuick.Layouts 1.15
7 | import "./Utils"
8 |
9 | RowLayout {
10 | anchors.fill: parent
11 | spacing: Utils.spacing
12 | Category {
13 | id: category
14 | Layout.fillHeight: true
15 | Layout.preferredWidth: Utils.listItemWidth
16 | Layout.leftMargin: Utils.margin
17 | onCurrentItemChanged: {
18 | content.source = category.model.get(category.currentIndex).source
19 | }
20 | }
21 | Rectangle {
22 | clip: true
23 | Layout.fillHeight: true
24 | Layout.fillWidth: true
25 | radius: Utils.listRadius
26 | color: Utils.transparentBackground
27 | Loader {
28 | id: content
29 | anchors.fill: parent
30 | }
31 | }
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/plugins/org.deepin.tweak.titlebar/translations/en_US.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | main
6 |
7 |
8 | Title height
9 |
10 |
11 |
12 |
13 | Change window title height
14 |
15 |
16 |
17 |
18 | Reset to default
19 |
20 |
21 |
22 |
23 | Apply
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/debian/copyright:
--------------------------------------------------------------------------------
1 | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2 | Upstream-Name: deepin-tweak
3 |
4 | Files: *
5 | Copyright: 2022 Deepin Technology Co., Ltd.
6 | License: LGPL-3+
7 | This package is free software; you can redistribute it and/or modify
8 | it under the terms of the GNU Lesser General Public License as published by
9 | the Free Software Foundation; either version 3 of the License, or
10 | (at your option) any later version.
11 | .
12 | This package is distributed in the hope that it will be useful,
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU Lesser General Public License for more details.
16 | .
17 | You should have received a copy of the GNU Lesser General Public License
18 | along with this program. If not, see
19 | .
20 | On Debian systems, the complete text of the GNU Lesser General
21 | Public License version 3 can be found in "/usr/share/common-licenses/LGPL-3".
22 |
--------------------------------------------------------------------------------
/src/maincomponentplugin/staff/settings.cpp:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 | #include "settings.h"
5 |
6 | #include
7 |
8 | SettingsBackend::SettingsBackend(const QString &file, QObject *parent)
9 | : QObject{parent}
10 | , m_settings(new QSettings(file, QSettings::IniFormat))
11 | {
12 | }
13 |
14 | SettingsBackend::~SettingsBackend()
15 | {
16 |
17 | }
18 |
19 | QVariant SettingsBackend::value(const QString &key, const QVariant &defaultValue) const
20 | {
21 | return m_settings->value(key, defaultValue);
22 | }
23 |
24 | void SettingsBackend::setValue(const QString& key, const QVariant &value)
25 | {
26 | return m_settings->setValue(key, value);
27 | }
28 |
29 | void SettingsBackend::beginGroup(const QString &group)
30 | {
31 | return m_settings->beginGroup(group);
32 | }
33 |
34 | void SettingsBackend::endGroup()
35 | {
36 | return m_settings->endGroup();
37 | }
38 |
39 | QStringList SettingsBackend::keys() const
40 | {
41 | return m_settings->allKeys();
42 | }
43 |
--------------------------------------------------------------------------------
/src/maincomponentplugin/maincomponentplugin.cpp:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 |
5 | #include "maincomponentplugin.h"
6 |
7 | #include
8 |
9 | #include
10 | #include
11 | #include
12 | #include
13 |
14 | #include "pluginlistmodel.h"
15 | #include "staff/staff.h"
16 |
17 | DQUICK_USE_NAMESPACE
18 |
19 | MainComponentPlugin::MainComponentPlugin(QObject *parent)
20 | : QObject(parent)
21 | {
22 | pluginListModel = new PluginListModel(this);
23 | registerStaff();
24 | }
25 |
26 | MainComponentPlugin::~MainComponentPlugin() {}
27 |
28 | QUrl MainComponentPlugin::mainComponentPath() const
29 | {
30 | // 返回程序的主控件部分 qml 文件,请确保该文件存在
31 | return QUrl("qrc:///main.qml");
32 | }
33 |
34 | void MainComponentPlugin::initialize(QQmlApplicationEngine *engine)
35 | {
36 | engine->rootContext()->setContextProperty("pluginListModel", pluginListModel);
37 | engine->rootContext()->setContextProperty("env", QProcessEnvironment::systemEnvironment().toStringList());
38 | }
39 |
--------------------------------------------------------------------------------
/src/maincomponentplugin/staff/gsettings.h:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 | #ifndef GSETTINGS_H
5 | #define GSETTINGS_H
6 |
7 | #include
8 | #include
9 | #include
10 | #include
11 |
12 | class GSettingsBackend : public QObject
13 | {
14 | Q_OBJECT
15 | public:
16 | explicit GSettingsBackend(const QByteArray &schema_id,
17 | const QByteArray &path = QByteArray(),
18 | QObject *parent = nullptr);
19 |
20 | Q_INVOKABLE void changed(QJSValue callback);
21 | Q_INVOKABLE bool contains(const QString &key) const;
22 | Q_INVOKABLE QVariant get(const QString &key) const;
23 | Q_INVOKABLE bool set(const QString &key, const QVariant &value);
24 | Q_INVOKABLE QStringList keys() const;
25 | Q_INVOKABLE QVariantList choices(const QString &key) const;
26 | Q_INVOKABLE void reset(const QString &key);
27 |
28 | private:
29 | std::unique_ptr m_settings;
30 | QJSValue m_callback;
31 | };
32 |
33 | #endif // GSETTINGS_H
34 |
--------------------------------------------------------------------------------
/src/preloadplugin/preloadplugin.cpp:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 |
5 | #include "preloadplugin.h"
6 |
7 | #include
8 | #include
9 | #include
10 | #include
11 |
12 | DQUICK_USE_NAMESPACE
13 |
14 | PreloadPlugin::PreloadPlugin(QObject *parent)
15 | : QObject(parent)
16 | {
17 |
18 | }
19 |
20 | PreloadPlugin::~PreloadPlugin()
21 | {
22 |
23 | }
24 |
25 | QGuiApplication *PreloadPlugin::creatApplication(int &argc, char **argv) {
26 |
27 | QGuiApplication* app = new QGuiApplication(argc, argv);
28 |
29 | QTranslator* translator = new QTranslator();
30 | if (translator->load(QLocale::system().name(), ":/resources/translations/")) {
31 | app->installTranslator(translator);
32 | }
33 |
34 | app->setApplicationName("deepin-tweak");
35 | app->setApplicationVersion("1.0.0");
36 | app->setApplicationDisplayName(tr("Deepin Tweak"));
37 |
38 | return app;
39 | }
40 |
41 | QUrl PreloadPlugin::preloadComponentPath() const
42 | {
43 | // 预览组件的 qml 路径
44 | return QUrl("qrc:///Preload.qml");
45 | }
46 |
--------------------------------------------------------------------------------
/plugins/fun.tarrow.tweak.fillet/translations/en_US.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | main
6 |
7 |
8 | Fillet size
9 |
10 |
11 |
12 |
13 | Adjust window fillet size
14 |
15 |
16 |
17 |
18 | Fillet size
19 |
20 |
21 |
22 |
23 | Reset to default
24 |
25 |
26 |
27 |
28 | Apply
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/.obs/workflows.yml:
--------------------------------------------------------------------------------
1 | test_build:
2 | steps:
3 | - link_package:
4 | source_project: deepin:Develop:dde
5 | source_package: %{SCM_REPOSITORY_NAME}
6 | target_project: deepin:CI
7 |
8 | - configure_repositories:
9 | project: deepin:CI
10 | repositories:
11 | - name: deepin_develop
12 | paths:
13 | - target_project: deepin:CI
14 | target_repository: deepin_develop
15 | architectures:
16 | - x86_64
17 | - aarch64
18 |
19 | - name: debian
20 | paths:
21 | - target_project: deepin:CI
22 | target_repository: debian_sid
23 | architectures:
24 | - x86_64
25 |
26 | filters:
27 | event: pull_request
28 |
29 | tag_build:
30 | steps:
31 | - trigger_services:
32 | project: deepin:Unstable:dde
33 | package: %{SCM_REPOSITORY_NAME}
34 | filters:
35 | event: tag_push
36 |
37 | commit_build:
38 | steps:
39 | - trigger_services:
40 | project: deepin:Develop:dde
41 | package: %{SCM_REPOSITORY_NAME}
42 | filters:
43 | event: push
44 |
--------------------------------------------------------------------------------
/src/maincomponentplugin/staff/file.cpp:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 |
5 | #include "file.h"
6 |
7 | bool FileBackend::open(const QVariant &mode)
8 | {
9 | return file->open(static_cast(mode.toInt()));
10 | }
11 |
12 | void FileBackend::close()
13 | {
14 | return file->close();
15 | }
16 |
17 | QByteArray FileBackend::read(qint64 maxSize)
18 | {
19 | return file->read(maxSize);
20 | }
21 |
22 | QByteArray FileBackend::readAll()
23 | {
24 | return file->readAll();
25 | }
26 |
27 | qint64 FileBackend::write(const QByteArray &data)
28 | {
29 | return file->write(data);
30 | }
31 |
32 | bool FileBackend::flush()
33 | {
34 | return file->flush();
35 | }
36 |
37 | bool FileBackend::rename(const QString &newName)
38 | {
39 | return file->rename(newName);
40 | }
41 |
42 | bool FileBackend::remove()
43 | {
44 | return file->remove();
45 | }
46 |
47 | bool FileBackend::exists() const
48 | {
49 | return file->exists();
50 | }
51 |
52 | bool FileBackend::seek(qint64 pos)
53 | {
54 | return file->seek(pos);
55 | }
56 |
57 | qint64 FileBackend::pos() const
58 | {
59 | return file->pos();
60 | }
61 |
62 | qint64 FileBackend::size() const
63 | {
64 | return file->size();
65 | }
66 |
--------------------------------------------------------------------------------
/src/maincomponentplugin/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | # SPDX-License-Identifier: CC0-1.0
4 | set(MAINCOMPONENT_LIB_NAME ${CMAKE_PROJECT_NAME}-main)
5 | set(MAINCOMPONENNT_SRC
6 | maincomponentplugin.h
7 | maincomponentplugin.cpp
8 | pluginlistmodel.h
9 | pluginlistmodel.cpp
10 | staff/launcher.h
11 | staff/launcher.cpp
12 | staff/file.h
13 | staff/file.cpp
14 | staff/staff.h
15 | staff/settings.h
16 | staff/settings.cpp
17 | staff/gsettings.h
18 | staff/gsettings.cpp
19 | )
20 | find_package(Qt5 REQUIRED COMPONENTS Core Widgets)
21 | find_package(Qt5QuickCompiler REQUIRED)
22 | find_package(PkgConfig REQUIRED)
23 | pkg_search_module(QGSettings REQUIRED IMPORTED_TARGET gsettings-qt)
24 | qtquick_compiler_add_resources(MAINCOMPONENT_RCC_SOURCES maincomponent.qrc)
25 | include_directories(src/maincomponentplugin)
26 | add_library(${MAINCOMPONENT_LIB_NAME} SHARED
27 | ${MAINCOMPONENNT_SRC}
28 | ${MAINCOMPONENT_RCC_SOURCES}
29 | )
30 | target_include_directories(${MAINCOMPONENT_LIB_NAME}
31 | PUBLIC
32 | ${DTKDECLARATIVE_INCLUDE_DIR}
33 | PkgConfig::QGSettings
34 | )
35 | target_link_libraries(${MAINCOMPONENT_LIB_NAME}
36 | Qt5::Quick
37 | Qt5::Widgets
38 | PkgConfig::QGSettings
39 | ${DtkDeclarative_LIBRARIES}
40 | )
41 | install(TARGETS ${MAINCOMPONENT_LIB_NAME} DESTINATION ${LIB_INSTALL_DIR})
42 |
--------------------------------------------------------------------------------
/src/maincomponentplugin/maincomponent.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | main.qml
4 | qml/Category.qml
5 | qml/CategoryModel.qml
6 | qml/MainPage.qml
7 | qml/Categories/Welcome.qml
8 | qml/Categories/Other.qml
9 | qml/Utils/utils.qml
10 | qml/Utils/qmldir
11 | qml/Components/ListViewHighLight.qml
12 | qml/Components/ListViewDelegate.qml
13 |
14 |
15 | images/Application.png
16 | images/BootMenu.png
17 | images/DE.png
18 | images/Environment.png
19 | images/Welcome.png
20 | images/Kernel.png
21 | images/Other.svg
22 | images/github_fill.svg
23 | images/distributor-logo-deepin.svg
24 | images/logo.svg
25 | images/welcome.webp
26 | images/PossibleVing_author.png
27 |
28 |
29 |
--------------------------------------------------------------------------------
/src/maincomponentplugin/staff/launcher.h:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 |
5 | #pragma once
6 |
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include
13 | #include
14 |
15 | class LauncherCall : public QObject
16 | {
17 | Q_OBJECT
18 | public:
19 | explicit LauncherCall() {}
20 | ~LauncherCall() override {}
21 |
22 | Q_INVOKABLE inline LauncherCall *program(const QString &program)
23 | {
24 | m_program = program;
25 | return this;
26 | }
27 | Q_INVOKABLE inline LauncherCall *arguments(const QStringList &arguments)
28 | {
29 | m_arguments = arguments;
30 | return this;
31 | }
32 | Q_INVOKABLE inline LauncherCall *timeout(const int timeout)
33 | {
34 | m_timeout = timeout;
35 | return this;
36 | }
37 | Q_INVOKABLE inline LauncherCall *workingDir(const QString &workingDir)
38 | {
39 | m_workingDir = workingDir;
40 | return this;
41 | }
42 | Q_INVOKABLE QVariantMap call();
43 | Q_INVOKABLE void asyncCall(const QJSValue &jsCallback);
44 | Q_INVOKABLE void startDetached();
45 |
46 | private:
47 | QString m_program;
48 | QStringList m_arguments;
49 | QString m_workingDir;
50 | std::optional m_timeout;
51 | };
52 |
--------------------------------------------------------------------------------
/plugins/org.deepin.tweak.environment/translations/en_US.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | main
6 |
7 |
8 | System Environment
9 |
10 |
11 |
12 |
13 | change system environment for user
14 |
15 |
16 |
17 |
18 | Please modify environment variables carefully.You must clearly understand the importance of system environment variables. This operation is irreversible.If there is a problem, please log in with tty and delete the $HOME/.dde_env file to restore the environment. Please login again to apply changes.
19 |
20 |
21 |
22 |
23 | Add
24 |
25 |
26 |
27 |
28 | Save
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Deepin Tweak
2 |
3 | Deepin Tweak is an advanced setting tool built on dtkdeclarative. Deepin Tweak only provides limited built-in functions, most of which need to be provided by other developers in the community according to the requirements of plug-in development.
4 |
5 | [中文文档](README.zh_CN.md)
6 |
7 | ## Dependencies
8 |
9 | * dtkdeclarative
10 |
11 | ## Build dependencies
12 |
13 | * cmake
14 | * libdtkdeclarative-dev
15 | * qtdeclarative5-dev
16 | * qtbase5-dev-tools
17 | * qtquickcontrols2-5-dev
18 | * libdtkgui-dev
19 | * libdtkcore-dev
20 | * libgsettings-qt-dev
21 |
22 | ## Installation
23 |
24 | ### Build from source
25 |
26 | 1. Please make sure that all dependencies are installed
27 | 2. Get source and build
28 |
29 | ```shell
30 | $ git clone https://github.com/linuxdeepin/deepin-tweak.git
31 | cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
32 | cmake --build build
33 | ```
34 |
35 | 3. Install
36 |
37 | ```shell
38 | $ sudo cmake --install build
39 | ```
40 |
41 | ## Getting help
42 |
43 | * Please feel free to report issues if you encounter any problem
44 | * [Deepin Community](https://bbs.deepin.org/) for generic discussion and help.
45 |
46 | ## Getting Involved
47 |
48 | We encourage you to report issues and contribute changes
49 |
50 | * [Contribution guide for developers](https://github.com/linuxdeepin/developer-center/wiki/Contribution-Guidelines-for-Developers-en)(English)
51 |
52 | ## License
53 |
54 | deepin-tweak is licensed under the [LGPL-3.0-or-later](LICENSE)
55 |
--------------------------------------------------------------------------------
/plugins/dev.myml.tweak.tasks/Actions.qml:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 |
5 | import QtQuick 2.15
6 | import QtQuick.Controls 2.15
7 | import Nemo.DBus 2.0
8 |
9 | Item {
10 | DBusInterface {
11 | id: sessionManager
12 | service: 'com.deepin.SessionManager'
13 | iface: 'com.deepin.SessionManager'
14 | path: '/com/deepin/SessionManager'
15 | }
16 | ListModel {
17 | id: model
18 | ListElement {
19 | title: qsTr("Shutdown");
20 | run: () => {
21 | console.log("shutdown")
22 | sessionManager.call("RequestShutdown")
23 | }
24 | }
25 | ListElement {
26 | title: qsTr("Reboot");
27 | run: () => {
28 | console.log("reboot")
29 | sessionManager.call("RequestReboot")
30 | }
31 | }
32 | ListElement {
33 | title: qsTr("Lock");
34 | run: () => {
35 | console.log("lock")
36 | sessionManager.call("RequestLock")
37 | }
38 | }
39 | ListElement {
40 | title: qsTr("Logout");
41 | run: () => {
42 | console.log("logout")
43 | sessionManager.call("RequestLogout")
44 | }
45 | }
46 | }
47 | function getModel(){
48 | return model
49 | }
50 | function execAction(index) {
51 | model.get(index).run()
52 | }
53 | }
--------------------------------------------------------------------------------
/.reuse/dep5:
--------------------------------------------------------------------------------
1 | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2 | Upstream-Name: deepin-tweak
3 | Upstream-Contact: UnionTech Software Technology Co., Ltd. <>
4 | Source: https://github.com/linuxdeepin/deepin-tweak
5 |
6 | # .github
7 | Files: .github/*
8 | Copyright: None
9 | License: CC0-1.0
10 |
11 | # .obs/workflows.yml
12 | Files: .obs/workflows.yml
13 | Copyright: None
14 | License: CC0-1.0
15 |
16 | # debian rpm archlinux
17 | Files: debian/* rpm/* archlinux/*
18 | Copyright: None
19 | License: CC0-1.0
20 |
21 | # desktop file
22 | FIles: misc/deepin-tweak.desktop
23 | Copyright: None
24 | License: CC0-1.0
25 |
26 | # README
27 | Files: *README.md *README.zh_CN.md CHANGELOG.md
28 | Copyright: UnionTech Software Technology Co., Ltd.
29 | License: CC-BY-4.0
30 |
31 | # Project file
32 | Files: *.pro *.prf *.pri *.qrc
33 | Copyright: None
34 | License: CC0-1.0
35 |
36 | # Qt ts files
37 | Files: translations/*.ts plugins/**/translations/*.ts
38 | Copyright: None
39 | License: CC0-1.0
40 |
41 | # Resource files
42 | Files: *.qrc src/maincomponentplugin/qml/Utils/qmldir
43 | Copyright: None
44 | License: CC0-1.0
45 |
46 | # Icon files
47 | Files: src/maincomponentplugin/images/* misc/deepin-tweak.svg plugins/*/assets/*
48 | Copyright: Remix
49 | License: Apache-2.0
50 |
51 | # Setting file
52 | Files: *.in
53 | Copyright: None
54 | License: CC0-1.0
55 |
56 | # gitignore
57 | Files: .gitignore
58 | Copyright: None
59 | License: CC0-1.0
60 |
61 | # format
62 | Files: .clang-format
63 | Copyright: None
64 | License: CC0-1.0
65 |
66 | # plugin.json
67 | Files: src/**/plugin.json
68 | Copyright: None
69 | License: CC0-1.0
--------------------------------------------------------------------------------
/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | # SPDX-License-Identifier: CC0-1.0
4 | cmake_minimum_required(VERSION 3.13)
5 |
6 | project(deepin-tweak VERSION 0.1 LANGUAGES CXX)
7 |
8 | set(CMAKE_INCLUDE_CURRENT_DIR ON)
9 | set(CMAKE_AUTOMOC ON)
10 | set(CMAKE_AUTORCC ON)
11 | set(CMAKE_CXX_STANDARD_REQUIRED ON)
12 | set(CMAKE_CXX_STANDARD 17)
13 | set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
14 |
15 | include(GNUInstallDirs)
16 |
17 | # generate qm
18 | execute_process(COMMAND bash "translate_generation.sh"
19 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
20 |
21 | find_package(QT NAMES Qt5 REQUIRED COMPONENTS Core Quick)
22 | find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Quick)
23 | find_package(DtkDeclarative REQUIRED)
24 |
25 | if (CMAKE_BUILD_TYPE STREQUAL "Debug")
26 | add_definitions(-DPLUGINPATH="${CMAKE_CURRENT_SOURCE_DIR}")
27 | endif()
28 |
29 | set(LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/deepin-tweak")
30 |
31 | if (CMAKE_BUILD_TYPE STREQUAL "Debug")
32 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
33 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib")
34 | add_definitions(-DLOCALLIBPATH="${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
35 | else()
36 | add_definitions(-DLOCALLIBPATH="${CMAKE_INSTALL_FULL_LIBDIR}/deepin-tweak")
37 | endif()
38 |
39 | file(GLOB_RECURSE QRC resources.qrc)
40 |
41 | add_subdirectory(src)
42 | add_subdirectory(plugins)
43 |
44 | install(FILES misc/deepin-tweak.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
45 | install(FILES misc/deepin-tweak.svg DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps/)
46 |
--------------------------------------------------------------------------------
/plugins/org.deepin.tweak.environment/translations/es.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | main
6 |
7 |
8 | System Environment
9 | Entorno del sistema
10 |
11 |
12 |
13 | change system environment for user
14 | cambiar el entorno del sistema para el usuario
15 |
16 |
17 |
18 | Please modify environment variables carefully.You must clearly understand the importance of system environment variables. This operation is irreversible.If there is a problem, please log in with tty and delete the $HOME/.dde_env file to restore the environment. Please login again to apply changes.
19 | Por favor, modifique las variables de entorno con cuidado.Debe entender claramente la importancia de las variables de entorno del sistema. Si se produce algún problema, inicie sesión con tty y elimine el archivo $HOME/.dde_env para restaurar el entorno. Vuelva a iniciar la sesión para aplicar los cambios.
20 |
21 |
22 |
23 | Add
24 | Añadir
25 |
26 |
27 |
28 | Save
29 | Guardar
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/plugins/org.deepin.tweak.environment/translations/uk.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | main
6 |
7 |
8 | System Environment
9 | Системне середовище
10 |
11 |
12 |
13 | change system environment for user
14 | змінити системне середовище для користувача
15 |
16 |
17 |
18 | Please modify environment variables carefully.You must clearly understand the importance of system environment variables. This operation is irreversible.If there is a problem, please log in with tty and delete the $HOME/.dde_env file to restore the environment. Please login again to apply changes.
19 | Будь ласка, змінюйте змінні оточення обережно, ви повинні чітко розуміти важливість системних змінних оточення. Ця операція є незворотною. Якщо виникла проблема, будь ласка, увійдіть за допомогою tty і видаліть файл $HOME/.dde_env, щоб відновити середовище. Будь ласка, увійдіть знову, щоб застосувати зміни.
20 |
21 |
22 |
23 | Add
24 | Додати
25 |
26 |
27 |
28 | Save
29 | Зберегти
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/plugins/org.deepin.tweak.environment/translations/tr.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | main
6 |
7 |
8 | System Environment
9 | Sistem Ortamı
10 |
11 |
12 |
13 | change system environment for user
14 | kullanıcı için sistem ortamını değiştir
15 |
16 |
17 |
18 | Please modify environment variables carefully.You must clearly understand the importance of system environment variables. This operation is irreversible.If there is a problem, please log in with tty and delete the $HOME/.dde_env file to restore the environment. Please login again to apply changes.
19 | Lütfen ortam değişkenlerini dikkatlice değiştirin. Sistem ortam değişkenlerinin önemini tam olarak anlamız gerekmektedir. Bu işlem geri alınamaz. Herhangi bir sorun oluşursa, ortamı eski haline geri almak için, tty ile oturum açıp $HOME/.dde_env dosyasını silin. Değişiklikleri devreye almak için tekrar oturum açmanız gerekir.
20 |
21 |
22 |
23 | Add
24 | Ekle
25 |
26 |
27 |
28 | Save
29 | Sakla
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/plugins/org.deepin.tweak.environment/translations/hu.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | main
6 |
7 |
8 | System Environment
9 | Rendszerkörnyezet
10 |
11 |
12 |
13 | change system environment for user
14 | Rendszerkörnyezet módosítása a felhasználó számára
15 |
16 |
17 |
18 | Please modify environment variables carefully.You must clearly understand the importance of system environment variables. This operation is irreversible.If there is a problem, please log in with tty and delete the $HOME/.dde_env file to restore the environment. Please login again to apply changes.
19 | Kérjük óvatosan módosítsa a környezeti változókat. Világosan meg kell értenie a rendszerkörnyezeti változók fontosságát. Ez a művelet visszafordíthatatlan. Probléma esetén jelentkezzen be tty-vel, és törölje a $HOME/.dde_env fájlt a környezet visszaállításához. Kérjük jelentkezzen be újra a módosítások alkalmazásához.
20 |
21 |
22 |
23 | Add
24 | Hozzáadás
25 |
26 |
27 |
28 | Save
29 | Mentés
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/src/maincomponentplugin/qml/Components/ListViewDelegate.qml:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 |
5 | import QtQuick 2.15
6 | import QtQuick.Controls 2.4
7 | import QtQuick.Layouts 1.15
8 | import org.deepin.dtk 1.0
9 | import "../Utils"
10 |
11 | Rectangle {
12 | property bool isCurrentIndex
13 | property string _title: title
14 | property string _icon: icon
15 | signal clicked()
16 | id: item
17 | radius: Utils.listRadius
18 | color: Utils.transparentBackground
19 | MouseArea {
20 | anchors.fill: parent
21 | hoverEnabled: true
22 | onClicked: {
23 | item.clicked()
24 | item.color = Utils.transparentBackground
25 | }
26 | onEntered: {
27 | if (isCurrentIndex) {
28 | return;
29 | }
30 | item.color = palette.base
31 | }
32 | onExited: {
33 | item.color = Utils.transparentBackground
34 | }
35 | }
36 | RowLayout {
37 | Layout.alignment: Qt.AlignVCenter
38 | anchors.fill: parent
39 | Rectangle {
40 | width: 10
41 | visible: isCurrentIndex
42 | }
43 | Image {
44 | source: _icon
45 | fillMode: Image.PreserveAspectFit
46 | Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
47 | Layout.preferredWidth: 22
48 | Layout.preferredHeight: 22
49 | Layout.leftMargin: 5
50 | }
51 | Text {
52 | text: _title
53 | Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
54 | Layout.fillWidth: true
55 | font: DTK.fontManager.t8
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/src/maincomponentplugin/staff/file.h:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 |
5 | #pragma once
6 |
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include
13 | #include
14 | #include
15 |
16 | class FileMode : public QObject
17 | {
18 | Q_OBJECT
19 | Q_ENUMS(Mode);
20 |
21 | public:
22 | enum Mode {
23 | NotOpen = QFile::NotOpen,
24 | ReadOnly = QFile::ReadOnly,
25 | WriteOnly = QFile::WriteOnly,
26 | ReadWrite = ReadOnly | WriteOnly,
27 | Append = QFile::Append,
28 | Truncate = QFile::Truncate,
29 | Text = QFile::Text,
30 | Unbuffered = QFile::Unbuffered,
31 | NewOnly = QFile::NewOnly,
32 | ExistingOnly = QFile::ExistingOnly
33 | };
34 | };
35 |
36 | class FileBackend : public QObject
37 | {
38 | Q_OBJECT
39 | public:
40 | FileBackend(const QString &file, QObject *parent = nullptr)
41 | : QObject(parent)
42 | , file(new QFile(file))
43 | {}
44 |
45 | ~FileBackend() override {}
46 |
47 | Q_INVOKABLE bool open(const QVariant &mode);
48 | Q_INVOKABLE void close();
49 | Q_INVOKABLE QByteArray read(qint64 maxSize);
50 | Q_INVOKABLE QByteArray readAll();
51 | Q_INVOKABLE qint64 write(const QByteArray &data);
52 | Q_INVOKABLE bool rename(const QString &newName);
53 | Q_INVOKABLE bool remove();
54 | Q_INVOKABLE bool flush();
55 | Q_INVOKABLE bool exists() const;
56 | Q_INVOKABLE bool seek(qint64 pos);
57 | Q_INVOKABLE qint64 pos() const;
58 | Q_INVOKABLE qint64 size() const;
59 |
60 | private:
61 | std::unique_ptr file;
62 | };
63 |
--------------------------------------------------------------------------------
/src/maincomponentplugin/staff/gsettings.cpp:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 | #include "gsettings.h"
5 | #include
6 | #include
7 |
8 | GSettingsBackend::GSettingsBackend(const QByteArray &schema_id,
9 | const QByteArray &path,
10 | QObject *parent)
11 | : QObject(parent)
12 | , m_settings(new QGSettings(schema_id, path))
13 | {
14 | connect(m_settings.get(), &QGSettings::changed, this, [=](const QString &key) {
15 | QJSValue callback = m_callback;
16 | if (callback.isCallable()) {
17 | QVariantMap map{{"key", key}, {"value", get(key)}};
18 | QJSValue value = m_callback.engine()->toScriptValue(map);
19 | callback.call({value});
20 | }
21 | });
22 | }
23 |
24 | void GSettingsBackend::changed(QJSValue callback)
25 | {
26 | m_callback = callback;
27 | }
28 |
29 | bool GSettingsBackend::contains(const QString &key) const
30 | {
31 | const QStringList list = m_settings->keys();
32 | return list.contains(key);
33 | }
34 |
35 | QVariant GSettingsBackend::get(const QString &key) const
36 | {
37 | return contains(key) ? m_settings->get(key) : QVariant();
38 | }
39 |
40 | bool GSettingsBackend::set(const QString &key, const QVariant &value)
41 | {
42 | return m_settings->trySet(key, value);
43 | }
44 |
45 | QStringList GSettingsBackend::keys() const
46 | {
47 | return m_settings->keys();
48 | }
49 |
50 | QVariantList GSettingsBackend::choices(const QString &key) const
51 | {
52 | return m_settings->choices(key);
53 | }
54 |
55 | void GSettingsBackend::reset(const QString &key)
56 | {
57 | return m_settings->reset(key);
58 | }
59 |
--------------------------------------------------------------------------------
/plugins/fun.tarrow.tweak.fillet/assets/icon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/maincomponentplugin/images/github_fill.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/maincomponentplugin/pluginlistmodel.cpp:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 |
5 | #include "pluginlistmodel.h"
6 |
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include
13 | #include
14 | #include
15 |
16 | PluginListModel::PluginListModel(QObject *parent)
17 | : QAbstractListModel(parent)
18 | {
19 | #ifdef PLUGINPATH
20 | QStringList locations = QStandardPaths::standardLocations(
21 | QStandardPaths::AppDataLocation);
22 | locations.insert(0, PLUGINPATH);
23 | #else
24 | const QStringList &locations = QStandardPaths::standardLocations(
25 | QStandardPaths::AppDataLocation);
26 | #endif
27 | for (const auto &location : locations) {
28 | QDir dir(QString("%1/plugins").arg(location));
29 | for (auto d : dir.entryList(QDir::NoDotAndDotDot | QDir::Dirs)) {
30 | qDebug() << dir.path();
31 | items << QString("file://%1/%2").arg(dir.path()).arg(d);
32 | // load translation
33 | QTranslator* translator = new QTranslator();
34 | if (translator->load(QLocale::system().name(), QString("%1/%2/translations").arg(dir.path()).arg(d))) {
35 | qApp->installTranslator(translator);
36 | }
37 | }
38 | }
39 | }
40 |
41 | PluginListModel::~PluginListModel() {}
42 |
43 | int PluginListModel::rowCount(const QModelIndex &parent) const
44 | {
45 | return items.length();
46 | }
47 |
48 | QVariant PluginListModel::data(const QModelIndex &index, int role) const
49 | {
50 | return role == PathRole ? items[index.row()] : QAbstractItemModel::data(index, role);
51 | }
52 |
53 | QHash PluginListModel::roleNames() const
54 | {
55 | QHash roles;
56 | roles[PathRole] = "path";
57 | return roles;
58 | }
59 |
--------------------------------------------------------------------------------
/src/maincomponentplugin/staff/launcher.cpp:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 |
5 | #include "launcher.h"
6 |
7 | QVariantMap LauncherCall::call()
8 | {
9 | QScopedPointer process(new QProcess);
10 | process->setProgram(m_program);
11 | process->setArguments(m_arguments);
12 | process->setWorkingDirectory(m_workingDir);
13 | process->start();
14 | process->waitForFinished(m_timeout.value_or(-1));
15 |
16 | QVariantMap map;
17 | map["allStandardOutput"] = process->readAllStandardOutput();
18 | map["allStandardError"] = process->readAllStandardError();
19 |
20 | return map;
21 | }
22 |
23 | void LauncherCall::asyncCall(const QJSValue &jsCallback)
24 | {
25 | QProcess *process = new QProcess;
26 |
27 | auto result = [=] {
28 | QJSValue callback = jsCallback;
29 | if (callback.isCallable()) {
30 | QVariantMap map;
31 | map["allStandardOutput"] = process->readAllStandardOutput();
32 | map["allStandardError"] = process->readAllStandardError();
33 | QJSValue value = jsCallback.engine()->toScriptValue(map);
34 | callback.call({value});
35 | }
36 | process->deleteLater();
37 | };
38 |
39 | connect(process,
40 | static_cast(&QProcess::finished),
41 | process,
42 | result);
43 |
44 | process->setProgram(m_program);
45 | process->setArguments(m_arguments);
46 | process->setWorkingDirectory(m_workingDir);
47 | process->start();
48 |
49 | if (m_timeout.has_value()) {
50 | QTimer::singleShot(m_timeout.value(), process, [=] {
51 | process->kill();
52 | process->deleteLater();
53 | result();
54 | });
55 | }
56 | }
57 |
58 | void LauncherCall::startDetached()
59 | {
60 | QProcess::startDetached(m_program, m_arguments, m_workingDir);
61 | }
62 |
--------------------------------------------------------------------------------
/plugins/org.deepin.tweak.environment/translations/zh_CN.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | main
6 |
7 | Title height
8 | 标题栏高度
9 |
10 |
11 | Change window title height
12 | 修改标题栏高度
13 |
14 |
15 | Reset to default
16 | 重置为默认值
17 |
18 |
19 | Apply
20 | 应用
21 |
22 |
23 |
24 | System Environment
25 | 系统环境变量
26 |
27 |
28 |
29 | change system environment for user
30 | 修改用户的系统环境变量
31 |
32 |
33 |
34 | Please modify environment variables carefully.You must clearly understand the importance of system environment variables. This operation is irreversible.If there is a problem, please log in with tty and delete the $HOME/.dde_env file to restore the environment. Please login again to apply changes.
35 | 请慎重修改环境变量,您必须明确知道系统环境变量的重要性。该操作不可逆,如果出现问题,请在 tty 登录,并删除 $HOME/.dde_env 文件来恢复环境。请重新登录来应用变更。
36 |
37 |
38 |
39 | Add
40 | 添加
41 |
42 |
43 |
44 | Save
45 | 保存
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/src/maincomponentplugin/qml/Categories/Other.qml:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 |
5 | import QtQuick 2.15
6 | import QtQuick.Layouts 1.15
7 | import org.deepin.dtk 1.0
8 | import "../Utils"
9 | import "../Components"
10 |
11 | RowLayout {
12 | anchors.fill: parent
13 | spacing: Utils.spacing
14 | ListView {
15 | id: listView
16 | clip: true
17 | spacing: Utils.spacing
18 | Layout.fillHeight: true
19 | Layout.preferredWidth: Utils.listItemWidth
20 | Layout.alignment: Qt.AlignVCenter
21 | model: pluginListModel
22 | focus: true
23 | interactive: true
24 | highlight: ListViewHighLight {}
25 | delegate: ListViewDelegate {
26 | required property int index
27 | // NOTE: Custom properties need to be kept at the end,
28 | // otherwise the index property will not be accessible
29 | required property string path
30 | id: delegate
31 | width: listView.width
32 | height: Utils.listItemHeight
33 | isCurrentIndex: listView.currentIndex === index
34 | onClicked: {
35 | listView.currentIndex = index
36 | }
37 | Loader {
38 | id: _loader
39 | visible: false
40 | source: path + "/main.qml"
41 | onLoaded: {
42 | delegate._icon = path + "/assets/" + _loader.item.icon
43 | delegate._title = _loader.item.displayName
44 | }
45 | }
46 | }
47 | onCurrentItemChanged: {
48 | view.setSource(listView.currentItem.path + "/main.qml")
49 | }
50 | }
51 | Rectangle {
52 | id: view
53 | Layout.fillHeight: true
54 | Layout.fillWidth: true
55 | Layout.bottomMargin: Utils.margin
56 | Layout.rightMargin: Utils.margin
57 | color: palette.alternateBase
58 | radius: Utils.listRadius
59 |
60 | function setSource(source) {
61 | loader.source = source
62 | }
63 |
64 | Loader {
65 | id: loader
66 | anchors.fill: parent
67 | asynchronous: true
68 | visible: status == Loader.Ready
69 | }
70 | }
71 | }
72 |
73 |
--------------------------------------------------------------------------------
/doc/demos/org.deepin.test/main.qml:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 | import QtQuick 2.0
5 | import QtQuick.Layouts 1.7
6 | import org.deepin.dtk 1.0
7 | import org.deepin.tweak 1.0
8 |
9 | Frame {
10 | property string displayName: "Test Name"
11 | property string description: "Test description"
12 | property string version: "1.0.0"
13 | property string author: "justforlxz"
14 | property string icon: "icon.png"
15 |
16 | ColumnLayout {
17 | Text {
18 | text: "I'm qml loader content"
19 | }
20 | RowLayout {
21 | Text {
22 | id: label
23 | text: "Hello: "
24 | }
25 | LineEdit {
26 | }
27 | Button {
28 | id: button
29 | onClicked: {
30 | let vv = Tweak.Launcher().program("ls").arguments("/");
31 | console.log("sync =====");
32 | let sync = vv.call();
33 | console.log("standard output: \n", sync.allStandardOutput);
34 | console.log("standard error: \n", sync.allStandardError);
35 | console.log('async ======');
36 | vv.asyncCall((callback) => {
37 | console.log("standard output: \n", callback.allStandardOutput);
38 | console.log("standard error: \n", callback.allStandardError);
39 | Tweak.Launcher().program("ls").arguments("/").call()
40 | });
41 | let file = Tweak.File("/tmp/test.file");
42 | console.log(typeof FileMode)
43 | console.log(typeof FileMode.ReadOnly);
44 | let open = file.open(FileMode.ReadOnly);
45 | if (open) {
46 | console.log('===== ready read');
47 | console.log(file.readAll());
48 | console.log('===== read all.');
49 | }
50 | console.log('file exist: ', Tweak.File('/tmp/test.file').exists());
51 | }
52 | }
53 | }
54 | Image {
55 | id: img
56 |
57 | source: "tile.png"
58 | sourceSize.width: 300
59 | sourceSize.height: 300
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/plugins/fun.tarrow.tweak.fillet/main.qml:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2023 ice
2 | // SPDX-License-Identifier: LGPL-3.0-or-later
3 |
4 | import Nemo.DBus 2.0
5 | import QtQuick 2.15
6 | import QtQuick.Controls 2.15
7 | import QtQuick.Layouts 1.7
8 | import org.deepin.dtk 1.0
9 | import org.deepin.tweak 1.0
10 |
11 | ColumnLayout {
12 | id: root
13 |
14 | property string displayName: qsTr("Fillet size")
15 | property string description: qsTr("Adjust window fillet size")
16 | property string version: "0.0.2"
17 | property string author: "ice"
18 | property string icon: "icon.svg"
19 | property int filletSize: 18
20 | property string appearanceService: "org.deepin.dde.Appearance1"
21 | property string appearancePath: "/org/deepin/dde/Appearance1"
22 | property string appearanceInterface: "org.deepin.dde.Appearance1"
23 |
24 | function getFilletSize() {
25 | filletSize = appearanceInter.getProperty("WindowRadius");
26 | }
27 |
28 | function setFilletSize(_size) {
29 | appearanceInter.setProperty("WindowRadius", _size);
30 | }
31 |
32 | Component.onCompleted: getFilletSize()
33 |
34 | DBusInterface {
35 | id: appearanceInter
36 |
37 | service: appearanceService
38 | iface: appearanceInterface
39 | path: appearancePath
40 | }
41 |
42 | Label {
43 | Layout.topMargin: 10
44 | Layout.leftMargin: 10
45 | Layout.rightMargin: 10
46 | text: qsTr("Fillet size")
47 | font.bold: true
48 | font.pixelSize: 15
49 | }
50 |
51 | RowLayout {
52 | spacing: 10
53 | Layout.fillWidth: true
54 | Layout.topMargin: 10
55 | Layout.leftMargin: 10
56 | Layout.rightMargin: 10
57 |
58 | SpinBox {
59 | id: control
60 |
61 | from: 0
62 | to: 999
63 | value: filletSize
64 | editable: true
65 | Layout.alignment: Qt.AlignHCenter
66 | Layout.fillWidth: true
67 | }
68 |
69 | Button {
70 | Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
71 | Layout.preferredWidth: 118
72 | text: qsTr("Reset to default")
73 | onClicked: {
74 | setFilletSize(18);
75 | }
76 | }
77 |
78 | }
79 |
80 | Item {
81 | Layout.fillHeight: true
82 | }
83 |
84 | Button {
85 | id: accept
86 |
87 | Layout.fillWidth: true
88 | Layout.leftMargin: 10
89 | Layout.rightMargin: 10
90 | Layout.bottomMargin: 10
91 | text: qsTr("Apply")
92 | onClicked: {
93 | setFilletSize(control.value);
94 | }
95 | }
96 |
97 | }
98 |
--------------------------------------------------------------------------------
/plugins/dev.myml.tweak.tasks/translations/en_US.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Actions
6 |
7 |
8 | Shutdown
9 |
10 |
11 |
12 |
13 | Reboot
14 |
15 |
16 |
17 |
18 | Lock
19 |
20 |
21 |
22 |
23 | Logout
24 |
25 |
26 |
27 |
28 | main
29 |
30 |
31 | Automate Tasks
32 |
33 |
34 |
35 |
36 | Visual configuration automatically executes actions
37 |
38 |
39 |
40 |
41 | after
42 |
43 |
44 |
45 |
46 | minutes
47 |
48 |
49 |
50 |
51 | perform
52 |
53 |
54 |
55 |
56 | operation
57 |
58 |
59 |
60 |
61 | Cancel
62 |
63 |
64 |
65 |
66 | Start
67 |
68 |
69 |
70 |
71 | %1 after %2:%3, please do not leave this UI.
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/plugins/dev.myml.tweak.tasks/main.qml:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 |
5 | import QtQuick 2.15
6 | import QtQuick.Controls 2.15
7 | import QtQuick.Layouts 1.7
8 | import org.deepin.dtk 1.0
9 |
10 | Frame {
11 | id: frame
12 | property string displayName: qsTr("Automate Tasks")
13 | property string description: qsTr("Visual configuration automatically executes actions")
14 | property string version: "0.0.1"
15 | property string author: "myml"
16 | property string icon: "icon.png"
17 | Actions {
18 | id: actions
19 | }
20 | ColumnLayout {
21 | id: main
22 | property int delay: 0
23 | Layout.fillWidth: true
24 | Layout.fillHeight: true
25 | RowLayout {
26 | Text {
27 | text: qsTr("after")
28 | }
29 | SpinBox {
30 | id: control
31 | stepSize: 5
32 | from: 1
33 | to: 100000
34 | value: 30
35 | editable: true
36 | Layout.preferredWidth: 100
37 | }
38 | Text {
39 | text: qsTr("minutes")
40 | Layout.fillWidth: true
41 | }
42 | }
43 | RowLayout {
44 | Text {
45 | text: qsTr("perform")
46 | }
47 | ComboBox {
48 | id: action
49 | model: actions.getModel()
50 | textRole: "title"
51 | Layout.preferredWidth: 200
52 | }
53 | Text {
54 | text: qsTr("operation")
55 | }
56 | }
57 | Button {
58 | id: btn
59 | text: timer.running ? qsTr("Cancel") : qsTr("Start")
60 | Layout.fillWidth: true
61 | onClicked: {
62 | if (timer.running) {
63 | timer.stop()
64 | } else {
65 | main.delay = control.value*60-1
66 | timer.start()
67 | }
68 | }
69 | }
70 | Text {
71 | visible: timer.running
72 | color: "red"
73 | font.pixelSize: 20
74 | wrapMode: Text.WordWrap
75 | Layout.preferredWidth: btn.width
76 | text: qsTr("%1 after %2:%3, please do not leave this UI.").
77 | arg(action.model.get(action.currentIndex).title).
78 | arg(Math.floor(main.delay/60)).
79 | arg(main.delay%60)
80 | }
81 | Timer {
82 | id: timer
83 | interval: 1000
84 | repeat: true
85 | onTriggered: {
86 | main.delay--
87 | if(main.delay <= 0){
88 | timer.stop()
89 | actions.execAction(action.currentIndex)
90 | }
91 | }
92 | }
93 | }
94 | }
--------------------------------------------------------------------------------
/README.zh_CN.md:
--------------------------------------------------------------------------------
1 | # Deepin Tweak
2 |
3 | Tweak 是一个基于 dtkdeclarative 的高级设置工具,Tweak 仅维护很少的内建功能,大部分功能将由符合开发规范的插件提供,通常这些插件由社区开发者提供。
4 |
5 | [English](README.md)
6 |
7 | ## 为什么需要这个工具
8 |
9 | deepin 是一个用户群体广泛的发行版,其中囊括普通用户、开发者用户、极客等,对于使用 deepin 的用户而言,对桌面环境及操作系统的个性化管理能力有着强烈诉求。当前,deepin 为平衡普通用户和开发者用户之间的差异,更多的选择了相对稳定性、易操作、规则更为固定的管理方式,将产品提供给用户使用。但对于开发者或极客用户而言,期望对操作系统和桌面环境有着更加灵活的个性化和自定义管理能力,而目前的产品则无法满足这样的需求。
10 | 开发者和极客用户一直以来是我们所关注的重要用户群体,因此计划在社区独立开发一款面向于开发者和极客用户的高级设置管理软件,以图形化界面的形式为广大对系统有更多个性化定制需求的高级用户提供更强大、便捷的管理能力,未来它可能会涵盖(窗管口管理器、桌面环境、文管、内核等)各方面的全局化高级自定义能力,以此来满足更多不同类型用户的高级自定义管理诉求。
11 |
12 | ## 它与控制中心的区别是什么
13 |
14 | 在控制中心中添加的设置项一般会具备以下特点:
15 |
16 | * 基础性。属于系统中必备的基础功能,如日期设置
17 | * 普适性。适用于大多数的用户,如网络设置
18 |
19 | 并且,往控制中心添加一个新的设置项时还必须要考虑它的`副作用`,因此往往不会提供很灵活的设置手段,以`个性化`模块里的`窗口圆角`这一项设置为例,控制中心里提供了“小”、“中”、“大”三个选项,而不是直接提供一个输入框由用户自由设置像素值,这样做是因为我们需要保证无论用户如何设置,都不会带来很严重的后果。因此控制中心可以适用于大多数用户,不必担心用户的误操作导致系统出现非常严重的问题。但是,这同时也局限了在控制中心添加设置项的范围,提高了增加功能的门槛,而本工具就是为了弥补这类问题而创建。
20 |
21 | 在本工具中添加的设置项一般会具备以下特点:
22 |
23 | * 无法添加到控制中心,且没有其它更合适的产品可以承载。即不符合控制中心产品定位的系统设置类功能,如无限制地设置系统环境变量
24 | * 需要它的人局限于某类单一的群体中,不适用于大多数人。如开启程序的 Debug 日志
25 |
26 | 本工具与控制中心的一些理念相反且功能互补,它不考虑增加设置项时的`副作用`,我们将假定使用此工具的用户都有能力解决使用它所带来的任何问题,即便无法解决也有觉悟接受它所带来的不良后果!基于以上原则,为此工具添加选项将变得较为简单,因为开发者不需要考虑用户的行为会导致怎样的后果,可以以最简单的方式添加最灵活的设置。还是以控制中心里的`窗口圆角`这一项设置为例,如果将其添加到此工具中,开发者可以直接提供一个输入框,用户可以精确定义圆角大小,但是如果使用者将其设置为 10000,由此带来的严重后果将自己承担(注:此处只是举例,不表示将其设置为10000一定会出现非常严重的后果)。即使用此工具所带来的收益和风险皆归使用者自身所有,此项目不会受理此类问题。
27 |
28 | ## 准备怎样开发和发布
29 |
30 | 本项目将提供一个独立的应用程序,而不是将其作为控制中心的插件或者是其它产品的附属品提供,因为它定位的独特性,我们必须严格地将其与其它产品划清界限,避免使用者产生误会。本工具将不会预装到系统中,而是单独在应用商店提供,由需要它的人自行下载,亦或下载源代码自行编译使用。
31 |
32 | 本项目的期望是尽量减少其“官方”基因,虽然由官方人员发起,但是主要由社区人员参与后续的开发和迭代。项目的功能和发展也主要由开发者决定,不强制依赖于产品和设计人员。在技术结构方面,当前的想法是:本项目只作为设置的 GUI 入口,所添加的功能都在具体的项目中提供配置项或 DBus 接口,本工具不需要后台,在设置完毕后即可推出,不影响功能的生效和后续的使用。因此,若要提供强大的个性化和自定义能力,仅有设置工具是不够的,它需要 DDE 桌面环境的各个组件能提供个性化定制的能力,再由本工具将相关的功能以界面设置的形式呈现给用户。我们希望能以此项目作为一个桥梁,使得参与到本项目开发中的社区伙伴更加方便和深入的了解 DDE 的各项细节,也希望在项目的开发过程中,能一并推进 DDE 本身的演进,使得 DDE 变得更加强大,能符合更多用户的高端需求。
33 |
34 | ## 未来的畅想
35 |
36 | 为了更灵活的支持功能扩展,本项目计划支持插件,自身主要提供插件的运行环境,在 GUI 方面使用 qml,其它方面提供 js 的接口,目标是能满足大部分插件的开发需求。因为不涉及二进制文件,插件可以更容易分发,甚至可以专门提供一个网站允许自由发布和下载这些插件。
37 |
38 | ## 运行依赖
39 |
40 | * dtkdeclarative
41 |
42 | ## 构建依赖
43 |
44 | * cmake
45 | * libdtkdeclarative-dev
46 | * qtdeclarative5-dev
47 | * qtbase5-dev-tools
48 | * qtquickcontrols2-5-dev
49 | * libdtkgui-dev
50 | * libdtkcore-dev
51 | * libgsettings-qt-dev
52 |
53 | ## 安装
54 |
55 | ### 从源码构建
56 |
57 | 1. 请确保已安装全部构建依赖
58 | 2. 获取源码
59 |
60 | ```shell
61 | $ git clone https://github.com/linuxdeepin/deepin-tweak.git
62 | cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
63 | cmake --build build
64 | ```
65 |
66 | 3. 安装
67 |
68 | ```shell
69 | $ sudo cmake --install build
70 | ```
71 |
72 | ## 获取帮助
73 |
74 | * 如果您遇到任何问题,请随时报告问题
75 | * 在 [Deepin 论坛](https://bbs.deepin.org/) 获取通用帮助
76 |
77 | ## 参与
78 |
79 | 我们鼓励您参与问题报告和项目贡献
80 |
81 | * [开发者贡献指南](https://github.com/linuxdeepin/developer-center/wiki/Contribution-Guidelines-for-Developers)
82 |
83 | ## 许可
84 |
85 | deepin-tweak 使用 [LGPL-3.0-or-later](LICENSE)
86 |
--------------------------------------------------------------------------------
/plugins/org.deepin.tweak.titlebar/main.qml:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 |
5 | import QtQuick 2.0
6 | import QtQuick.Controls 2.15
7 | import QtQuick.Layouts 1.7
8 | import Qt.labs.platform 1.1
9 | import org.deepin.dtk 1.0
10 | import org.deepin.tweak 1.0
11 |
12 | ColumnLayout {
13 | id: frame
14 | spacing: 10
15 | property string displayName: qsTr("Title height")
16 | property string description: qsTr("Change window title height")
17 | property string version: "1.0.0"
18 | property string author: "justforlxz"
19 | property string icon: "icon.png"
20 |
21 | function getConfigFilePath(theme) {
22 | const paths = StandardPaths.standardLocations(StandardPaths.GenericDataLocation)
23 | if (paths.length === 0) {
24 | return;
25 | }
26 | return paths[0].slice('files://'.length-1) + '/deepin/themes/deepin/'+ theme + '/titlebar.ini';
27 | }
28 | function loadConfig() {
29 | const path = getConfigFilePath('light')
30 | const settings = Tweak.newSettings(path);
31 | settings.beginGroup('Active');
32 | const height = settings.value('height');
33 | if (height !== undefined) {
34 | control.value = height
35 | }
36 | }
37 |
38 | function setHeight(value) {
39 | const setTitleBar = function(theme, value) {
40 | const path = getConfigFilePath(theme)
41 | const settings = Tweak.newSettings(path);
42 | settings.beginGroup('Active');
43 | settings.setValue('height', value);
44 | settings.endGroup();
45 | settings.beginGroup('Inactive');
46 | settings.setValue('height', value);
47 | }
48 | setTitleBar('light', value);
49 | setTitleBar('dark', value);
50 |
51 | // restart wm
52 | // TODO: use dbus but wait for v23
53 | const wm = Tweak.newLauncher();
54 | wm.program('/usr/bin/kwin_no_scale');
55 | wm.arguments(['--replace']);
56 | wm.startDetached();
57 | }
58 |
59 | RowLayout {
60 | spacing: 10
61 | Layout.fillWidth: true
62 | Layout.topMargin: 10
63 | Layout.leftMargin: 10
64 | Layout.rightMargin: 10
65 | SpinBox {
66 | id: control
67 | from: 0
68 | to: 9999
69 | value: 40
70 | editable: true
71 | Layout.alignment: Qt.AlignHCenter
72 | Layout.fillWidth: true
73 |
74 | validator: IntValidator {
75 | locale: control.locale.name
76 | bottom: Math.min(control.from, control.to)
77 | top: Math.max(control.from, control.to)
78 | }
79 | }
80 | Button {
81 | Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
82 | text: qsTr("Reset to default")
83 | onClicked: {
84 | setHeight(40)
85 | loadConfig()
86 | }
87 | }
88 | }
89 |
90 | Item {
91 | Layout.fillHeight: true
92 | }
93 |
94 | Button {
95 | Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
96 | Layout.fillWidth: true
97 | Layout.leftMargin: 10
98 | Layout.rightMargin: 10
99 | Layout.bottomMargin: 10
100 | id: accept
101 | text: qsTr("Apply")
102 | onClicked: setHeight(control.value)
103 | }
104 |
105 | Component.onCompleted: loadConfig()
106 | }
107 |
--------------------------------------------------------------------------------
/src/maincomponentplugin/staff/staff.h:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 |
5 | #pragma once
6 |
7 | #include "file.h"
8 | #include "gsettings.h"
9 | #include "launcher.h"
10 | #include "settings.h"
11 |
12 | #include
13 | #include
14 | #include
15 |
16 | class Staff : public QObject
17 | {
18 | Q_OBJECT
19 | public:
20 | Staff(QQmlEngine *engine, QJSEngine *scriptEngine)
21 | : QObject()
22 | , m_engine(engine)
23 | , m_jsEngine(scriptEngine)
24 | {}
25 |
26 | ~Staff() override {}
27 |
28 | Q_INVOKABLE inline LauncherCall *newLauncher()
29 | {
30 | auto *call = new LauncherCall;
31 | QQmlEngine::setObjectOwnership(call, QQmlEngine::JavaScriptOwnership);
32 | return call;
33 | }
34 |
35 | Q_INVOKABLE FileBackend *newFile(const QString &file)
36 | {
37 | auto *call = new FileBackend(file);
38 | QQmlEngine::setObjectOwnership(call, QQmlEngine::JavaScriptOwnership);
39 | return call;
40 | }
41 |
42 | Q_INVOKABLE SettingsBackend *newSettings(const QString &file)
43 | {
44 | auto *call = new SettingsBackend(file);
45 | QQmlEngine::setObjectOwnership(call, QQmlEngine::JavaScriptOwnership);
46 | return call;
47 | }
48 |
49 | Q_INVOKABLE GSettingsBackend *newGSettings(const QByteArray &schema_id,
50 | const QByteArray &path = QByteArray())
51 | {
52 | auto *call = new GSettingsBackend(schema_id, path);
53 | QQmlEngine::setObjectOwnership(call, QQmlEngine::JavaScriptOwnership);
54 | return call;
55 | }
56 |
57 | private:
58 | QQmlEngine *m_engine;
59 | QJSEngine *m_jsEngine;
60 | };
61 |
62 | static void registerStaff()
63 | {
64 | qmlRegisterUncreatableType("org.deepin.tweak",
65 | 1,
66 | 0,
67 | "FileBackend",
68 | "cannot create filebackend object.");
69 | qmlRegisterType("org.deepin.tweak", 1, 0, "FileMode");
70 | qmlRegisterUncreatableType("org.deepin.tweak",
71 | 1,
72 | 0,
73 | "LauncherCall",
74 | "cannot create LauncherCall object.");
75 | qmlRegisterUncreatableType("org.deepin.tweak",
76 | 1,
77 | 0,
78 | "SettingsBackend",
79 | "cannot create Settings object.");
80 | qmlRegisterUncreatableType("org.deepin.tweak",
81 | 1,
82 | 0,
83 | "GSettingsBackend",
84 | "cannot create GSettings object.");
85 | qmlRegisterSingletonType("org.deepin.tweak",
86 | 1,
87 | 0,
88 | "Tweak",
89 | [=](QQmlEngine *engine, QJSEngine *scriptEngine) {
90 | return new Staff(engine, scriptEngine);
91 | });
92 | }
93 |
--------------------------------------------------------------------------------
/translations/en_US.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CategoryModel
6 |
7 |
8 | Welcome
9 |
10 |
11 |
12 |
13 | Other
14 |
15 |
16 |
17 |
18 | Preload
19 |
20 |
21 |
22 |
23 | Deepin Tweak
24 |
25 |
26 |
27 |
28 | Special Thanks
29 |
30 |
31 |
32 |
33 | This project was developed with the great help of the deepin community. In the name of the entire community, we would like to thank all the developers and contributors who made this release possible.
34 |
35 |
36 |
37 |
38 | Interface Design
39 |
40 |
41 |
42 |
43 | Program Development
44 |
45 |
46 |
47 |
48 | PreloadPlugin
49 |
50 |
51 | Deepin Tweak
52 |
53 |
54 |
55 |
56 | Welcome
57 |
58 |
59 | Now,
60 | You can control.
61 |
62 |
63 |
64 |
65 | Welcome to the deepin advanced tool -- Deepin Tweak!
66 | You can define deepin in an advanced way by selecting the desired items in the sidebar. From the desktop environment to the kernel, Deepin Tweak gives you a high degree of customizability. Now, let's explore!
67 | If you have more suggestions for this software, please feel free to submit a Pull Request or Issue; if this software has helped you, you can consider donating to us, or why not also give us a Star for our project. your support is our motivation to continue development, we appreciate it.
68 |
69 |
70 |
71 |
72 | Made by deepin Opensource Community with love.
73 |
74 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/src/maincomponentplugin/qml/Categories/Welcome.qml:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 |
5 | import QtQuick 2.15
6 | import QtQuick.Controls 2.4
7 | import QtQuick.Layouts 1.15
8 | import org.deepin.dtk 1.0
9 | import "../Utils"
10 |
11 | Item {
12 | Item {
13 | id: header
14 | height: Utils.welcomeHeaderHeight
15 | x: Utils.margin
16 | RowLayout {
17 | spacing: Utils.spacing * 5
18 | ColumnLayout {
19 | Image {
20 | source: "/images/logo.svg"
21 | }
22 | Text {
23 | text: qsTr('Now,\nYou can control.')
24 | font: DTK.fontManager.t2
25 | }
26 | }
27 | // TODO: use lottie qml
28 | AnimatedImage {
29 | source: "/images/welcome.webp"
30 | Layout.preferredWidth: header.height
31 | Layout.preferredHeight: header.height
32 | }
33 | }
34 | Behavior on height {
35 | PropertyAnimation {
36 | duration: Utils.welcomeHeaderAnimateDuration
37 | easing.type: Easing.InOutQuad
38 | }
39 | }
40 | }
41 |
42 | Text {
43 | id: text
44 | text: qsTr("Welcome to the deepin advanced tool -- Deepin Tweak! \nYou can define deepin in an advanced way by selecting the desired items in the sidebar. From the desktop environment to the kernel, Deepin Tweak gives you a high degree of customizability. Now, let's explore! \nIf you have more suggestions for this software, please feel free to submit a Pull Request or Issue; if this software has helped you, you can consider donating to us, or why not also give us a Star for our project. your support is our motivation to continue development, we appreciate it.")
45 | clip: true
46 | wrapMode: Text.WordWrap
47 | x: Utils.margin
48 | width: parent.width - x * 2
49 | anchors.top: header.bottom
50 | anchors.bottom: bottomWrapper.top
51 | anchors.topMargin: Utils.margin
52 | MouseArea {
53 | anchors.fill: parent
54 | hoverEnabled: true
55 | onEntered: {
56 | header.height = Utils.welcomeHeaderAnimatedHeight
57 | }
58 | onExited: {
59 | header.height = Utils.welcomeHeaderHeight
60 | }
61 | }
62 | }
63 |
64 | Rectangle {
65 | color: Utils.transparentBackground
66 | anchors.bottom: parent.bottom
67 | x: Utils.margin
68 | width: parent.width - x * 2
69 | height: bottom.height
70 | id: bottomWrapper
71 | RowLayout {
72 | spacing: Utils.spacing
73 | id: bottom
74 | width: parent.width
75 | Image {
76 | source: "/images/github_fill.svg"
77 | MouseArea {
78 | anchors.fill: parent
79 | onClicked: Qt.openUrlExternally("https://github.com/linuxdeepin/")
80 | }
81 | }
82 | Image {
83 | source: "/images/deepin-logo.svg"
84 | MouseArea {
85 | anchors.fill: parent
86 | onClicked: Qt.openUrlExternally("https://www.deepin.org/")
87 | }
88 | }
89 | Item {
90 | Layout.fillWidth: true
91 | }
92 | Text {
93 | text: qsTr("Made by deepin Opensource Community with love.")
94 | font: DTK.fontManager.t9
95 | }
96 | }
97 | }
98 |
99 |
100 | Rectangle {
101 | id: headerBackground
102 | color: palette.alternateBase
103 | width: parent.width
104 | height: parent.height
105 | z: -1
106 | anchors.top: header.bottom
107 | radius: Utils.radius
108 | }
109 | }
110 |
111 |
--------------------------------------------------------------------------------
/.clang-format:
--------------------------------------------------------------------------------
1 | # .clang-format for Qt Creator
2 | #
3 | # This is for clang-format >= 5.0.
4 | #
5 | # The configuration below follows the Qt Creator Coding Rules [1] as closely as
6 | # possible. For documentation of the options, see [2].
7 | #
8 | # Use ../../tests/manual/clang-format-for-qtc/test.cpp for documenting problems
9 | # or testing changes.
10 | #
11 | # In case you update this configuration please also update the qtcStyle() in src\plugins\clangformat\clangformatutils.cpp
12 | #
13 | # [1] https://doc-snapshots.qt.io/qtcreator-extending/coding-style.html
14 | # [2] https://clang.llvm.org/docs/ClangFormatStyleOptions.html
15 | #
16 | ---
17 | Language: Cpp
18 | AccessModifierOffset: -4
19 | AlignAfterOpenBracket: Align
20 | AlignConsecutiveAssignments: false
21 | AlignConsecutiveDeclarations: false
22 | AlignEscapedNewlines: DontAlign
23 | AlignOperands: true
24 | AlignTrailingComments: true
25 | AllowAllParametersOfDeclarationOnNextLine: true
26 | AllowShortBlocksOnASingleLine: false
27 | AllowShortCaseLabelsOnASingleLine: false
28 | AllowShortFunctionsOnASingleLine: Inline
29 | AllowShortIfStatementsOnASingleLine: false
30 | AllowShortLoopsOnASingleLine: false
31 | AlwaysBreakAfterReturnType: None
32 | AlwaysBreakBeforeMultilineStrings: false
33 | AlwaysBreakTemplateDeclarations: true
34 | BinPackArguments: false
35 | BinPackParameters: false
36 | BraceWrapping:
37 | AfterClass: true
38 | AfterControlStatement: false
39 | AfterEnum: false
40 | AfterFunction: true
41 | AfterNamespace: false
42 | AfterObjCDeclaration: false
43 | AfterStruct: true
44 | AfterUnion: false
45 | BeforeCatch: false
46 | BeforeElse: false
47 | IndentBraces: false
48 | SplitEmptyFunction: false
49 | SplitEmptyRecord: false
50 | SplitEmptyNamespace: false
51 | BreakBeforeBinaryOperators: All
52 | BreakBeforeBraces: Custom
53 | BreakBeforeInheritanceComma: false
54 | BreakBeforeTernaryOperators: true
55 | BreakConstructorInitializersBeforeComma: false
56 | BreakConstructorInitializers: BeforeComma
57 | BreakAfterJavaFieldAnnotations: false
58 | BreakStringLiterals: true
59 | ColumnLimit: 100
60 | CommentPragmas: '^ IWYU pragma:'
61 | CompactNamespaces: false
62 | ConstructorInitializerAllOnOneLineOrOnePerLine: false
63 | ConstructorInitializerIndentWidth: 4
64 | ContinuationIndentWidth: 4
65 | Cpp11BracedListStyle: true
66 | DerivePointerAlignment: false
67 | DisableFormat: false
68 | ExperimentalAutoDetectBinPacking: false
69 | FixNamespaceComments: true
70 | ForEachMacros:
71 | - forever # avoids { wrapped to next line
72 | - foreach
73 | - Q_FOREACH
74 | - BOOST_FOREACH
75 | IncludeCategories:
76 | - Regex: '^
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/translations/hu.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CategoryModel
6 |
7 |
8 | Welcome
9 | Üdvözöljük
10 |
11 |
12 |
13 | Other
14 | Egyebek
15 |
16 |
17 |
18 | Preload
19 |
20 |
21 |
22 |
23 | Deepin Tweak
24 | Deepin Tweak
25 |
26 |
27 |
28 | Special Thanks
29 | Külön köszönet
30 |
31 |
32 |
33 | This project was developed with the great help of the deepin community. In the name of the entire community, we would like to thank all the developers and contributors who made this release possible.
34 | Ez a projekt a Deepin közösség nagy közreműködésével jött létre. Az egész közösség nevében szeretnénk köszönetet mondani minden fejlesztőnek és közreműködőnek, akik lehetővé tették ezt a kiadást.
35 |
36 |
37 |
38 | Interface Design
39 | Felhasználói felület
40 |
41 |
42 |
43 | Program Development
44 | Programfejlesztés
45 |
46 |
47 |
48 | PreloadPlugin
49 |
50 |
51 | Deepin Tweak
52 | Deepin Tweak
53 |
54 |
55 |
56 | Welcome
57 |
58 |
59 | Now,
60 | You can control.
61 | Most,
62 | Ön irányíthat.
63 |
64 |
65 |
66 | Welcome to the deepin advanced tool -- Deepin Tweak!
67 | You can define deepin in an advanced way by selecting the desired items in the sidebar. From the desktop environment to the kernel, Deepin Tweak gives you a high degree of customizability. Now, let's explore!
68 | If you have more suggestions for this software, please feel free to submit a Pull Request or Issue; if this software has helped you, you can consider donating to us, or why not also give us a Star for our project. your support is our motivation to continue development, we appreciate it.
69 | Üdvözöljük a Deepin Tweak speciális eszközében!
70 | A módosításokat speciálisan is meghatározhatja, ha kiválasztja a kívánt elemeket az oldalsávon. Az asztali környezettől a kernelig a Deepin Tweak nagyfokú testreszabhatóságot biztosít.
71 | Most pedig fedezzük fel!
72 | Ha további javaslatai vannak ezzel a szoftverrel kapcsolatban, kérjük nyújtson be kérelmet vagy problémát; Ha ez a szoftver segített Önnek, fontolja meg adományozását, vagy adjon nekünk egy csillagot a projektünkért. Az Ön támogatása a motivációnk a további fejlődéshez, és ezt nagyra értékeljük.
73 |
74 |
75 |
76 | Made by deepin Opensource Community with love.
77 | Készítette a Deepin Nyílt Forráskódú Közösség nagy szeretettel.
78 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/translations/pl.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CategoryModel
6 |
7 |
8 | Welcome
9 | Witaj
10 |
11 |
12 |
13 | Other
14 | Inne
15 |
16 |
17 |
18 | Preload
19 |
20 |
21 |
22 |
23 | Deepin Tweak
24 | Dostosowywanie Deepin
25 |
26 |
27 |
28 | Special Thanks
29 | Specjalne podziękowania
30 |
31 |
32 |
33 | This project was developed with the great help of the deepin community. In the name of the entire community, we would like to thank all the developers and contributors who made this release possible.
34 | Ten projekt został opracowany z wielką pomocą społeczności deepin. W imieniu całej społeczności chcielibyśmy podziękować wszystkim programistom i współtwórcom, którzy umożliwili powstanie tego wydania.
35 |
36 |
37 |
38 | Interface Design
39 | Wygląd interfejsu
40 |
41 |
42 |
43 | Program Development
44 | Rozwój programu
45 |
46 |
47 |
48 | PreloadPlugin
49 |
50 |
51 | Deepin Tweak
52 | Dostosowywanie Deepin
53 |
54 |
55 |
56 | Welcome
57 |
58 |
59 | Now,
60 | You can control.
61 | Teraz,
62 | Ty masz kontrolę.
63 |
64 |
65 |
66 | Welcome to the deepin advanced tool -- Deepin Tweak!
67 | You can define deepin in an advanced way by selecting the desired items in the sidebar. From the desktop environment to the kernel, Deepin Tweak gives you a high degree of customizability. Now, let's explore!
68 | If you have more suggestions for this software, please feel free to submit a Pull Request or Issue; if this software has helped you, you can consider donating to us, or why not also give us a Star for our project. your support is our motivation to continue development, we appreciate it.
69 | Witamy w zaawansowanym narzędziu deepin - Dostosowywanie Deepin!
70 | Możesz dostosować deepin w zaawansowany sposób, wybierając żądane elementy na pasku bocznym. Od środowiska graficznego po jądro systemu, Dostosowywanie Deepin zapewnia wysoki stopień możliwości konfiguracji. A teraz do dzieła!
71 | Jeśli masz więcej sugestii dotyczących tego programu, prosimy o przesłanie Zgłoszenia lub Zgłoszenia o przyjęcie; jeśli ten program pomógł Ci, możesz rozważyć przekazanie nam darowizny lub dać gwiazdkę naszemu projektowi. Twoje wsparcie jest naszą motywacją do dalszego rozwoju, doceniamy to.
72 |
73 |
74 |
75 | Made by deepin Opensource Community with love.
76 | Wykonane z miłością przez Społeczność Deepin.
77 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/translations/tr.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CategoryModel
6 |
7 |
8 | Welcome
9 | Hoşgeldiniz
10 |
11 |
12 |
13 | Other
14 | Diğer
15 |
16 |
17 |
18 | Preload
19 |
20 |
21 |
22 |
23 | Deepin Tweak
24 | Deepin Tweak (İnce Ayar)
25 |
26 |
27 |
28 | Special Thanks
29 | Özel Teşekkürler
30 |
31 |
32 |
33 | This project was developed with the great help of the deepin community. In the name of the entire community, we would like to thank all the developers and contributors who made this release possible.
34 | Bu proje deepin topluluğunun önemli yardımlarıyla geliştirilmiştir. Bütün topluluk adına, bu sürümün gerçekleştirilmesini sağlayan geliştiricilere ve katkıda bulunan kişilere teşekkürü bir borç biliriz.
35 |
36 |
37 |
38 | Interface Design
39 | Arayüz Tasarımı
40 |
41 |
42 |
43 | Program Development
44 | Program Geliştirme
45 |
46 |
47 |
48 | PreloadPlugin
49 |
50 |
51 | Deepin Tweak
52 | Deepin Tweak (İnce Ayar)
53 |
54 |
55 |
56 | Welcome
57 |
58 |
59 | Now,
60 | You can control.
61 | Şimdi
62 | Kontrol sizde.
63 |
64 |
65 |
66 | Welcome to the deepin advanced tool -- Deepin Tweak!
67 | You can define deepin in an advanced way by selecting the desired items in the sidebar. From the desktop environment to the kernel, Deepin Tweak gives you a high degree of customizability. Now, let's explore!
68 | If you have more suggestions for this software, please feel free to submit a Pull Request or Issue; if this software has helped you, you can consider donating to us, or why not also give us a Star for our project. your support is our motivation to continue development, we appreciate it.
69 | Deepin gelişmiş aracı Deepin Tweak'e hoşgeldiniz!
70 | Kenar çubuğundan istediğiniz öğeleri seçerek deepin'i gelişmiş bir şekilde tanımlayabilirsiniz. Deepin Tweak size masaüstü ortamından çekirdeğe kadar yüksek düzeyde özelleştirme sağlar. Şimdi inceleyelim:
71 | Bu yazılımla ilgili önerileriniz varsa, Çekme İsteği (Pull Request) veya Yayın (Issue) talep edebilirsiniz. Bu yazılım size yardımcı oluyorsa, bağış yapmayı düşünebilir, ya da neden olmasın projemiz için bize Yıldız vermeyi düşünebilirsiniz. Desteğiniz bizim için çok önemlidir ve geliştirmeye devam etmek için bize motivasyon verir.
72 |
73 |
74 |
75 | Made by deepin Opensource Community with love.
76 | Deepin Açık Kaynak Kodu Topluluğu tarafından sevgi ile yapılmıştır.
77 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/translations/uk.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CategoryModel
6 |
7 |
8 | Welcome
9 | Ласкаво просимо
10 |
11 |
12 |
13 | Other
14 | Інше
15 |
16 |
17 |
18 | Preload
19 |
20 |
21 |
22 |
23 | Deepin Tweak
24 | Глибинний налаштування
25 |
26 |
27 |
28 | Special Thanks
29 | Особлива подяка
30 |
31 |
32 |
33 | This project was developed with the great help of the deepin community. In the name of the entire community, we would like to thank all the developers and contributors who made this release possible.
34 | Цей проєкт було розроблено за великої допомоги спільноти deepin. Від імені всієї спільноти ми хотіли б подякувати всім розробникам та учасникам, які зробили цей реліз можливим.
35 |
36 |
37 |
38 | Interface Design
39 | Дизайн інтерфейсу
40 |
41 |
42 |
43 | Program Development
44 | Розробка програми
45 |
46 |
47 |
48 | PreloadPlugin
49 |
50 |
51 | Deepin Tweak
52 | Глибокий налаштування
53 |
54 |
55 |
56 | Welcome
57 |
58 |
59 | Now,
60 | You can control.
61 | Тепер,
62 | Ви можете контролювати.
63 |
64 |
65 |
66 | Welcome to the deepin advanced tool -- Deepin Tweak!
67 | You can define deepin in an advanced way by selecting the desired items in the sidebar. From the desktop environment to the kernel, Deepin Tweak gives you a high degree of customizability. Now, let's explore!
68 | If you have more suggestions for this software, please feel free to submit a Pull Request or Issue; if this software has helped you, you can consider donating to us, or why not also give us a Star for our project. your support is our motivation to continue development, we appreciate it.
69 | Ласкаво просимо до розширеного інструменту deepin - Deepin Tweak!
70 | Ви можете налаштувати deepin у розширений спосіб, вибравши потрібні елементи на бічній панелі. Від середовища робочого столу до ядра, Deepin Tweak надає вам високий ступінь налаштування. А тепер, давайте дослідимо!
71 | Якщо у вас є ще пропозиції щодо цього програмного забезпечення, будь ласка, не соромтеся подавати запит на вилучення або проблему; якщо це програмне забезпечення допомогло вам, ви можете розглянути можливість пожертвувати нам, або чому б не дати нам зірку за наш проект. ваша підтримка є нашою мотивацією для продовження розробки, ми цінуємо це.
72 |
73 |
74 |
75 | Made by deepin Opensource Community with love.
76 | Зроблено спільнотою відкритого коду deepin з любов'ю.
77 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/translations/es.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CategoryModel
6 |
7 |
8 | Welcome
9 | Bienvenido
10 |
11 |
12 |
13 | Other
14 | Otro
15 |
16 |
17 |
18 | Preload
19 |
20 |
21 |
22 |
23 | Deepin Tweak
24 | Ajustes de Deepin
25 |
26 |
27 |
28 | Special Thanks
29 | Agradecimientos especiales
30 |
31 |
32 |
33 | This project was developed with the great help of the deepin community. In the name of the entire community, we would like to thank all the developers and contributors who made this release possible.
34 | Este proyecto se ha desarrollado con la gran ayuda de la comunidad deepin. En nombre de toda la comunidad, queremos dar las gracias a todos los desarrolladores y colaboradores que han hecho posible esta versión.
35 |
36 |
37 |
38 | Interface Design
39 | Diseño de la interfaz
40 |
41 |
42 |
43 | Program Development
44 | Desarrollo del programa
45 |
46 |
47 |
48 | PreloadPlugin
49 |
50 |
51 | Deepin Tweak
52 | Personaliza Deepin
53 |
54 |
55 |
56 | Welcome
57 |
58 |
59 | Now,
60 | You can control.
61 | Ahora,
62 | tienes el control.
63 |
64 |
65 |
66 | Welcome to the deepin advanced tool -- Deepin Tweak!
67 | You can define deepin in an advanced way by selecting the desired items in the sidebar. From the desktop environment to the kernel, Deepin Tweak gives you a high degree of customizability. Now, let's explore!
68 | If you have more suggestions for this software, please feel free to submit a Pull Request or Issue; if this software has helped you, you can consider donating to us, or why not also give us a Star for our project. your support is our motivation to continue development, we appreciate it.
69 | ¡Bienvenido a la herramienta avanzada de Deepin -- Deepin Tweak!
70 | Puedes personalizar deepin de forma avanzada seleccionando los elementos deseados en la barra lateral. Desde el entorno del escritorio hasta el kernel, Deepin Tweak te ofrece un alto grado de personalización. Ahora, ¡a explorar!
71 | Si tienes más sugerencias para este software, por favor siéntete libre de enviar una solicitud de extracción o un problema; si este software te ha ayudado, puedes hacer una donación, o por qué no también darnos una Estrella en nuestro proyecto. Tu apoyo es nuestra motivación para continuar con el desarrollo, te lo agradecemos.
72 |
73 |
74 |
75 | Made by deepin Opensource Community with love.
76 | Realizado por Deepin Opensource Community con amor.
77 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/translations/zh_CN.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CategoryModel
6 |
7 |
8 | Welcome
9 | 欢迎
10 |
11 |
12 | Desktop Environment
13 | 桌面环境
14 |
15 |
16 | Application
17 | 应用程序
18 |
19 |
20 | Kernel
21 | 内核
22 |
23 |
24 | Environment
25 | 环境
26 |
27 |
28 | Boot Menu
29 | 启动菜单
30 |
31 |
32 |
33 | Other
34 | 其他
35 |
36 |
37 |
38 | Preload
39 |
40 |
41 |
42 |
43 | Deepin Tweak
44 | 深度定制
45 |
46 |
47 |
48 | Special Thanks
49 | 鸣谢
50 |
51 |
52 |
53 | This project was developed with the great help of the deepin community. In the name of the entire community, we would like to thank all the developers and contributors who made this release possible.
54 | 这个项目是在 deepin 社区的巨大帮助下开发的。以整个社区的名义,我们要感谢所有的开发者和贡献者,他们使这个版本成为可能。
55 |
56 |
57 |
58 | Interface Design
59 | 界面设计
60 |
61 |
62 |
63 | Program Development
64 | 程序开发
65 |
66 |
67 |
68 | PreloadPlugin
69 |
70 |
71 | Deepin Tweak
72 | 深度定制
73 |
74 |
75 |
76 | Welcome
77 |
78 |
79 | Now,
80 | You can control.
81 | 现在,
82 | 掌控整个系统。
83 |
84 |
85 |
86 | Welcome to the deepin advanced tool -- Deepin Tweak!
87 | You can define deepin in an advanced way by selecting the desired items in the sidebar. From the desktop environment to the kernel, Deepin Tweak gives you a high degree of customizability. Now, let's explore!
88 | If you have more suggestions for this software, please feel free to submit a Pull Request or Issue; if this software has helped you, you can consider donating to us, or why not also give us a Star for our project. your support is our motivation to continue development, we appreciate it.
89 | 欢迎使用深度高级工具——深度定制!
90 | 您可以通过在侧边栏中选择所需的项目来以高级方式定义深度操作系统。 从桌面环境到内核,深度定制为您提供高度的可定制性。 现在,让我们一起探索吧!
91 | 如果您对此软件有更多建议,请随时提交 Pull Request 或 Issue。如果这个软件对你有帮助,你可以考虑捐赠给我们,或者给我们的项目打个 Star。 您的支持是我们继续发展的动力,我们感激不尽。
92 |
93 |
94 |
95 | Made by deepin Opensource Community with love.
96 | 来自热爱深度开源社区的力量。
97 |
98 |
99 |
100 |
--------------------------------------------------------------------------------
/doc/README.zh_CN.md:
--------------------------------------------------------------------------------
1 | ## 目录结构
2 |
3 | deepin-tweak 接受的插件目录必须具备以下结构:
4 |
5 | - assets 目录
6 |
7 | 存储图片等素材
8 |
9 | - translations 目录
10 |
11 | 存放 Qt 的翻译文件
12 |
13 | - main.qml
14 |
15 | 插件主界面
16 |
17 | ## 主界面
18 |
19 | deepin-tweak 会加载插件的主界面到窗口中,主界面的 QML 不能是 Window 元素。
20 |
21 | ### 插件元信息
22 |
23 | 在 `main.qml` 中需要提供以下属性作为插件的元信息:
24 |
25 | - displayName
26 | - description
27 | - version
28 | - author
29 | - icon
30 |
31 | ```qml
32 | property string displayName: "Test Name"
33 | property string description: "Test description"
34 | property string version: "1.0.0"
35 | property string author: "justforlxz"
36 | property string icon: "icon.png"
37 | ```
38 |
39 | ## 调用接口
40 |
41 | deepin-tweak 内置了执行命令、读写文件及 DBus 调用的接口。
42 |
43 | tweak 提供了一个 Tweak 模块,在 qml 文件头部使用 `import org.deepin.tweak 1.0` 导入 tweak 模块,就可以使用 `Tweak` 对象。
44 |
45 | Tweak 对象提供了以下方法用于获取特定功能支持的对象。
46 |
47 | ### 执行命令(newLauncher)
48 |
49 | `Launcher` 对象提供了 `create` 方法创建一个执行实例,并通过链式调用设置相关参数,最终通过 `call` 方法或者 `async` 方法启动执行,并获取结果。
50 |
51 | 目前支持的参数有:
52 |
53 | - program
54 |
55 | 设置启动的命令。
56 |
57 | - arguments
58 |
59 | 设置传递给启动命令的参数。
60 |
61 | - timeout
62 |
63 | 设置命令超时的时间,默认情况下将一直等待执行结果。
64 |
65 | `call` 的返回值与 `asyncCall` 的回调函数是一个对象,拥有 `allStandardOutput` 属性与 `allStandardError` 属性。
66 |
67 | ### 读写文件(newFile)
68 |
69 | 需要传入 File 对象操作的文件路径。
70 |
71 | File 对象拥有以下方法:
72 |
73 | - open
74 |
75 | 设置文件的打开方式,可以在 qml 中使用 FileMode 枚举进行设置:
76 |
77 | - NotOpen
78 |
79 | 选择不打开文件。
80 |
81 | - ReadOnly
82 |
83 | 选择只读,选择此模式将无法使用 write 方法。
84 |
85 | - WriteOnly
86 |
87 | 选择只写,选择此模式将无法使用 read 方法。
88 |
89 | - ReadWrite
90 |
91 | 选择可读可写,选择此模式可以随意使用 read 与 write 方法。
92 |
93 | - Append
94 |
95 | 使用此模式时,write 方法会将内容在文件末尾添加。
96 |
97 | - Truncate
98 |
99 | 如果可能,设备在打开之前将被截断。设备的所有早期内容都将丢失。
100 |
101 | - Text
102 |
103 | 读取时,行尾终止符将转换为“\n”。写入时,行尾终止符将转换为本地编码,例如 Win32 的“\r\n”。
104 |
105 | - Unbuffered
106 |
107 | 设备中的任何缓冲区都会被绕过。
108 |
109 | - NewOnly
110 |
111 | 如果要打开的文件已经存在,则失败。只有当文件不存在时才创建并打开它。操作系统保证您是唯一创建和打开该文件的人。注意,这种模式意味着 WriteOnly,并且允许将其与 ReadWrite 结合使用。该标志目前只影响QFile。其他类将来可能会使用这个标志,但在此之前,对QFile以外的任何类使用这个标志可能会导致未定义的行为。
112 |
113 | - ExistingOnly
114 |
115 | 如果要打开的文件不存在,则会失败。此标志必须与 ReadOnly、WriteOnly 或 ReadWrite 一起指定。注意,单独使用 ReadOnly 标志是多余的,因为当文件不存在时,ReadOnly 已经失败了。
116 |
117 | - close
118 |
119 | 关闭已打开的文件。
120 |
121 | - flush
122 |
123 | 强制刷新缓冲区,将缓冲区的内容实际的写入文件。
124 |
125 | - read
126 |
127 | 读取指定大小的内容。
128 |
129 | - readAll
130 |
131 | 读取文件的全部内容。
132 |
133 | - write
134 |
135 | 写入数据到文件。
136 |
137 | - exists
138 |
139 | 判读文件是否存在。
140 |
141 | - rename
142 |
143 | 对文件进行重新命名
144 |
145 | - remove
146 |
147 | 删除指定文件
148 |
149 | - seek
150 |
151 | 设置 read 函数开始读取的位置
152 |
153 | - pos
154 |
155 | 获取当前文件 read 的位置
156 |
157 | - size
158 |
159 | 获取当前文件的大小
160 |
161 | ### settings(newSettings)
162 |
163 | 需要传入操作的 ini 配置文件的路径。
164 |
165 | - value
166 |
167 | 获取某个 key 对应的值
168 |
169 | - setValue
170 |
171 | 设置某个 key 的值
172 |
173 | - beginGroup
174 |
175 | 设置读取的组,切换不同的组时必须先调用 endGroup 方法。
176 |
177 | - endGroup
178 |
179 | 结束组的标记
180 |
181 | - keys
182 |
183 | 获取所有的 key
184 |
185 | ### GSettings(newGSettings)
186 |
187 | 需要传递初始化的 gsettings schema id 和 path。
188 |
189 | - changed
190 |
191 | 传递一个函数签名为 (key, value) 的回调函数,回调函数将会在 schema id 下的值发生变化时调用。
192 |
193 | - contains
194 |
195 | 判断 schema id 是否包含指定的 key。
196 |
197 | - get
198 |
199 | 获取指定 key 对应的值。
200 |
201 | - set
202 |
203 | 设置指定的 key 对应的值。
204 |
205 | - keys
206 |
207 | 获取 schema id 所有的 key。
208 |
209 | - choices
210 |
211 | 列出指定 key 可选择的值。
212 |
213 | - reset
214 |
215 | 将指定 key 重设为默认值。
216 |
217 | ### DBus 调用
218 |
219 | tweak 使用 nemo.dbus 为 qml 提供 DBus 调用的能力。
220 |
221 | 在 qml 文件中导入 `import Nemo.DBus 2.0`,并使用
222 | tweak 使用 Nemo.DBus 为 qml 提供 DBus 调用的能力。
223 |
224 | 在 qml 文件中导入 `import Nemo.DBus 2.0`,并创建一个 DBusInterface 对象执行 DBus 调用。
225 |
226 | DBusInterface 提供了 `service`、`iface` 和 `path` 属性用来初始化 DBus 连接。
227 |
228 | ```qml
229 | DBusInterface {
230 | id: profiled
231 | service: 'org.kde.KWin'
232 | iface: 'org.kde.kwin.Effects'
233 | path: '/Effects'
234 | }
235 | ```
236 |
237 | 在函数中调用 call 方法执行 DBus 调用。
238 |
239 | ```
240 | profiled.call('loadEffect', ['blur']);
241 | ```
242 |
243 | ### 插件示例
244 |
245 | ```qml
246 | import QtQuick.Layouts 1.7
247 | import QtQuick 2.4
248 | import org.deepin.dtk 1.0
249 |
250 | RowLayout {
251 | property string displayName: "Test Name"
252 | property string description: "Test description"
253 | property string version: "1.0.0"
254 | property string author: "justforlxz"
255 | property string icon: "icon.png"
256 | Text {
257 | text: "input"
258 | }
259 | LineEdit {}
260 | }
261 | ```
262 |
263 | 更多插件示例在 [demos](demos) 目录查看。
264 |
--------------------------------------------------------------------------------
/src/preloadplugin/Preload.qml:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 |
5 | import QtQuick 2.11
6 | import QtQuick.Controls 2.4
7 | import QtQuick.Window 2.0
8 | import QtQuick.Layouts 1.15
9 | import org.deepin.dtk 1.0
10 | import "."
11 |
12 | /**
13 | Preload 作为程序的主窗口被 AppLoader 提前加载,用于达到快速
14 | 启动的功能。 在使用时,可以配合 DWindow 的 overlayExited属性,
15 | 进行流畅化动画设计。
16 |
17 | Preload 中可以使用 ApplicationWindow; Window 和 DialogWindow
18 | 作为主窗口,但请注意,每个程序只有一个 Preload 入口,而这个 Preload 入口
19 | 将作为程序的主界面显示,当程序存在多个 Window 窗口时,请将主窗口作为 Preload
20 | 窗口。
21 |
22 | Preload 中 loadingOverlay 作为流畅化过渡的组件属性,请不要在程序加载
23 | 完成之后使用它,也不要管理它的生命周期,其生命周期仅会在窗口过渡阶段。 loadingOverlay
24 | 属性除了可以使用一般控件之外,也能使用静态图,动态图等内容。当不指定其大小和位置时,
25 | 默认情况进行主窗口填充。当指定大小后,将按照控件大小和位置进行布局。
26 | */
27 | ApplicationWindow {
28 | id: root
29 | visible: true
30 | x: Screen.width / 2 - width / 2
31 | y: Screen.height / 2 - height / 2
32 | width: 800
33 | height: 500
34 | title: qsTr("Deepin Tweak")
35 | flags: Qt.WindowMinButtonsHint | Qt.WindowCloseButtonHint | Qt.FramelessWindowHint
36 | header: TitleBar {
37 | leftContent: RowLayout {
38 | Image {
39 | Layout.preferredHeight: 26
40 | Layout.preferredWidth: 26
41 | Layout.leftMargin: 10
42 | source: "deepin-tweak.svg"
43 | fillMode: Image.PreserveAspectFit
44 | }
45 | Text {
46 | text: qsTr('Deepin Tweak')
47 | Layout.alignment: Qt.AlignVCenter
48 | font.pointSize: 24
49 | }
50 | }
51 | aboutDialog: DialogWindow {
52 | title: qsTr("Deepin Tweak")
53 | width: 350
54 | ColumnLayout {
55 | width: parent.width
56 | Item {
57 | Layout.topMargin: 10
58 | }
59 | Label {
60 | Layout.alignment: Qt.AlignHCenter
61 | font: DTK.fontManager.t5
62 | text: qsTr("Special Thanks")
63 | }
64 | Label {
65 | Layout.alignment: Qt.AlignHCenter
66 | Layout.fillWidth: true
67 | Layout.leftMargin: 10
68 | Layout.rightMargin: 10
69 | font: DTK.fontManager.t8
70 | wrapMode: "WordWrap"
71 | text: qsTr("This project was developed with the great help of the deepin community. In the name of the entire community, we would like to thank all the developers and contributors who made this release possible.")
72 | }
73 | Label {
74 | Layout.alignment: Qt.AlignHCenter
75 | font: DTK.fontManager.t5
76 | wrapMode: "WordWrap"
77 | text: qsTr("Interface Design")
78 | }
79 | Repeater {
80 | model: ListModel {
81 | ListElement {
82 | name: "PossibleVing"
83 | icon: "images/PossibleVing.png"
84 | }
85 | ListElement {
86 | name: "deepin-community-design"
87 | icon: ""
88 | }
89 | }
90 | Row {
91 | Layout.alignment: Qt.AlignHCenter
92 | Image {
93 | source: icon
94 | width: 26
95 | fillMode: Image.PreserveAspectFit
96 | }
97 | Label {
98 | anchors.verticalCenter: parent.verticalCenter
99 | font: DTK.fontManager.t8
100 | wrapMode: "WordWrap"
101 | text: name
102 | }
103 | }
104 | }
105 | Label {
106 | Layout.alignment: Qt.AlignHCenter
107 | font: DTK.fontManager.t5
108 | wrapMode: "WordWrap"
109 | text: qsTr("Program Development")
110 | }
111 | Repeater {
112 | model: ["justforlxz"]
113 | Label {
114 | Layout.alignment: Qt.AlignHCenter
115 | font: DTK.fontManager.t8
116 | wrapMode: "WordWrap"
117 | text: modelData
118 | }
119 | }
120 | Item {
121 | Layout.bottomMargin: 10
122 | }
123 | }
124 | }
125 | }
126 | color: "transparent"
127 | background: Rectangle {
128 | // dark mode
129 | color: Qt.rgba(1, 1, 1, 0.7)
130 | }
131 |
132 | DWindow.enabled: true
133 | DWindow.windowRadius: 16
134 | DWindow.enableSystemResize: false // TODO: not disable WM max window
135 | DWindow.enableSystemMove: true // TODO: not working
136 | DWindow.enableBlurWindow: true // TODO: not working
137 | DWindow.loadingOverlay: Rectangle {
138 | color: palette.window
139 | BusyIndicator {
140 | id: indicator
141 | anchors.centerIn: parent
142 | running: true
143 | width: 64
144 | height: 64
145 | }
146 | }
147 |
148 | DWindow.overlayExited: Transition {
149 | NumberAnimation {
150 | properties: "scale"
151 | from: 1
152 | to: 0
153 | easing.type: Easing.InBack
154 | }
155 | }
156 | }
157 |
--------------------------------------------------------------------------------
/plugins/org.deepin.tweak.environment/main.qml:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2 |
3 | // SPDX-License-Identifier: LGPL-3.0-or-later
4 |
5 | import QtQuick 2.15
6 | import QtQuick.Controls 2.15
7 | import QtQuick.Layouts 1.7
8 | import Qt.labs.qmlmodels 1.0
9 | import Qt.labs.platform 1.1
10 | import org.deepin.dtk 1.0
11 | import org.deepin.tweak 1.0
12 |
13 | ColumnLayout {
14 | id: frame
15 | spacing: 10
16 | property string displayName: qsTr("System Environment")
17 | property string description: qsTr("change system environment for user")
18 | property string version: "1.0.0"
19 | property string author: "justforlxz"
20 | property string icon: "icon.png"
21 |
22 | TableView {
23 | id: tableView
24 | Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
25 | Layout.fillWidth: true
26 | Layout.fillHeight: true
27 | Layout.margins: 10
28 | columnSpacing: 1
29 | rowSpacing: 1
30 | clip: true
31 |
32 | model: TableModel {
33 | TableModelColumn { display: "key" }
34 | TableModelColumn { display: "value" }
35 | rows: []
36 | }
37 |
38 | delegate: Rectangle {
39 | implicitHeight: 30
40 | implicitWidth: tableView.width / 2 - 1
41 | border.width: 1
42 |
43 | Text {
44 | text: display
45 | anchors.centerIn: parent
46 | visible: !loader.visible
47 | }
48 | MouseArea {
49 | id: mouseArea
50 | anchors.fill: parent
51 | acceptedButtons: Qt.LeftButton | Qt.RightButton
52 | onClicked: {
53 | if(mouse.button == Qt.RightButton) {
54 | if(timer.running)
55 | {
56 | mouseArea.onDoubleClicked()
57 | timer.stop()
58 | }
59 | else {
60 | timer.restart()
61 | }
62 | }
63 | }
64 | onDoubleClicked: {
65 | loader.visible = true
66 | loader.item.forceActiveFocus()
67 | }
68 | Timer{
69 | id:timer
70 | interval: 200
71 | onTriggered: mouseArea.onClicked()
72 | }
73 | }
74 | Loader {
75 | id: loader
76 | anchors { verticalCenter: parent.verticalCenter; left: parent.left}
77 | height: parent.height
78 | width: parent.width
79 | visible: false
80 | sourceComponent: visible ? input : undefined
81 |
82 | Component {
83 | id: input
84 | TextField {
85 | anchors { fill: parent }
86 | text: display
87 | onAccepted:{
88 | model.display = item.text
89 | loader.visible = false
90 | add.clicked()
91 | }
92 | validator: RegExpValidator {}
93 | onActiveFocusChanged: {
94 | if (!activeFocus) {
95 | loader.visible = false
96 | }
97 | if (model.column === 0) {
98 | item.validator.regExp = /^[a-zA-Z][a-zA-Z0-9_]*$/
99 | }
100 | else {
101 | item.validator.regExp = '*'
102 | }
103 | }
104 | Keys.onEscapePressed: loader.visible = false
105 | }
106 |
107 | }
108 | }
109 | }
110 | }
111 |
112 | Text {
113 | id: tips
114 | Layout.fillWidth: true
115 | Layout.margins: 10
116 | wrapMode: Text.WordWrap
117 | text: qsTr('Please modify environment variables carefully.You must clearly understand the importance of system environment variables. This operation is irreversible.If there is a problem, please log in with tty and delete the $HOME/.dde_env file to restore the environment. Please login again to apply changes.')
118 | }
119 |
120 | Button {
121 | Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
122 | Layout.fillWidth: true
123 | Layout.leftMargin: 10
124 | Layout.rightMargin: 10
125 | id: add
126 | text: qsTr("Add")
127 | onClicked: {
128 | // TODO: remove empty object inside.
129 | for (const row of tableView.model.rows) {
130 | if (row['key'] === '' && row['value'] === '') {
131 | return;
132 | }
133 | }
134 |
135 | tableView.model.appendRow({key: '', value: ''})
136 | }
137 | }
138 |
139 | Button {
140 | Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
141 | Layout.fillWidth: true
142 | Layout.leftMargin: 10
143 | Layout.rightMargin: 10
144 | Layout.bottomMargin: 10
145 | text: qsTr("Save")
146 | onClicked: {
147 | const paths = StandardPaths.standardLocations(StandardPaths.HomeLocation)
148 | if (paths.length === 0) {
149 | return;
150 | }
151 | const path = paths[0] + '/.dde_env';
152 | const file = Tweak.newFile(path.slice(6, path.length));
153 | if (!file.open(FileMode.WriteOnly)) {
154 | console.error('cannot open .dde_env on $HOME');
155 | return;
156 | }
157 |
158 | const datas = tableView.model.rows;
159 | console.log(JSON.stringify(datas));
160 | for (const data of datas) {
161 | if (data['key'] === '' || data['value'] === '') {
162 | continue;
163 | }
164 | file.write('export ' + data['key'] + '=' + data['value'] + '\n');
165 | }
166 | file.close();
167 | }
168 | }
169 |
170 | Component.onCompleted: {
171 | const paths = StandardPaths.standardLocations(StandardPaths.HomeLocation)
172 | if (paths.length === 0) {
173 | return;
174 | }
175 | const path = paths[0] + '/.dde_env';
176 | const file = Tweak.newFile(path.slice(6, path.length));
177 | if (!file.open(FileMode.ReadOnly)) {
178 | console.error('cannot open .dde_env on $HOME');
179 | add.clicked();
180 | return;
181 | }
182 | const s = new String(file.readAll());
183 | const envs = s.split('\n');
184 | for (const k of envs) {
185 | if (k.length === 0 || !k.startsWith('export')) {
186 | continue;
187 | }
188 | const v = k.replace('export ', '').split('=');
189 | // TODO: "xx";
190 | tableView.model.appendRow({key: v[0], value: v[1]})
191 | }
192 | add.clicked();
193 | file.close();
194 | }
195 | }
196 |
--------------------------------------------------------------------------------
/LICENSES/CC0-1.0.txt:
--------------------------------------------------------------------------------
1 | Creative Commons Legal Code
2 |
3 | CC0 1.0 Universal
4 |
5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
12 | HEREUNDER.
13 |
14 | Statement of Purpose
15 |
16 | The laws of most jurisdictions throughout the world automatically confer
17 | exclusive Copyright and Related Rights (defined below) upon the creator
18 | and subsequent owner(s) (each and all, an "owner") of an original work of
19 | authorship and/or a database (each, a "Work").
20 |
21 | Certain owners wish to permanently relinquish those rights to a Work for
22 | the purpose of contributing to a commons of creative, cultural and
23 | scientific works ("Commons") that the public can reliably and without fear
24 | of later claims of infringement build upon, modify, incorporate in other
25 | works, reuse and redistribute as freely as possible in any form whatsoever
26 | and for any purposes, including without limitation commercial purposes.
27 | These owners may contribute to the Commons to promote the ideal of a free
28 | culture and the further production of creative, cultural and scientific
29 | works, or to gain reputation or greater distribution for their Work in
30 | part through the use and efforts of others.
31 |
32 | For these and/or other purposes and motivations, and without any
33 | expectation of additional consideration or compensation, the person
34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she
35 | is an owner of Copyright and Related Rights in the Work, voluntarily
36 | elects to apply CC0 to the Work and publicly distribute the Work under its
37 | terms, with knowledge of his or her Copyright and Related Rights in the
38 | Work and the meaning and intended legal effect of CC0 on those rights.
39 |
40 | 1. Copyright and Related Rights. A Work made available under CC0 may be
41 | protected by copyright and related or neighboring rights ("Copyright and
42 | Related Rights"). Copyright and Related Rights include, but are not
43 | limited to, the following:
44 |
45 | i. the right to reproduce, adapt, distribute, perform, display,
46 | communicate, and translate a Work;
47 | ii. moral rights retained by the original author(s) and/or performer(s);
48 | iii. publicity and privacy rights pertaining to a person's image or
49 | likeness depicted in a Work;
50 | iv. rights protecting against unfair competition in regards to a Work,
51 | subject to the limitations in paragraph 4(a), below;
52 | v. rights protecting the extraction, dissemination, use and reuse of data
53 | in a Work;
54 | vi. database rights (such as those arising under Directive 96/9/EC of the
55 | European Parliament and of the Council of 11 March 1996 on the legal
56 | protection of databases, and under any national implementation
57 | thereof, including any amended or successor version of such
58 | directive); and
59 | vii. other similar, equivalent or corresponding rights throughout the
60 | world based on applicable law or treaty, and any national
61 | implementations thereof.
62 |
63 | 2. Waiver. To the greatest extent permitted by, but not in contravention
64 | of, applicable law, Affirmer hereby overtly, fully, permanently,
65 | irrevocably and unconditionally waives, abandons, and surrenders all of
66 | Affirmer's Copyright and Related Rights and associated claims and causes
67 | of action, whether now known or unknown (including existing as well as
68 | future claims and causes of action), in the Work (i) in all territories
69 | worldwide, (ii) for the maximum duration provided by applicable law or
70 | treaty (including future time extensions), (iii) in any current or future
71 | medium and for any number of copies, and (iv) for any purpose whatsoever,
72 | including without limitation commercial, advertising or promotional
73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
74 | member of the public at large and to the detriment of Affirmer's heirs and
75 | successors, fully intending that such Waiver shall not be subject to
76 | revocation, rescission, cancellation, termination, or any other legal or
77 | equitable action to disrupt the quiet enjoyment of the Work by the public
78 | as contemplated by Affirmer's express Statement of Purpose.
79 |
80 | 3. Public License Fallback. Should any part of the Waiver for any reason
81 | be judged legally invalid or ineffective under applicable law, then the
82 | Waiver shall be preserved to the maximum extent permitted taking into
83 | account Affirmer's express Statement of Purpose. In addition, to the
84 | extent the Waiver is so judged Affirmer hereby grants to each affected
85 | person a royalty-free, non transferable, non sublicensable, non exclusive,
86 | irrevocable and unconditional license to exercise Affirmer's Copyright and
87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the
88 | maximum duration provided by applicable law or treaty (including future
89 | time extensions), (iii) in any current or future medium and for any number
90 | of copies, and (iv) for any purpose whatsoever, including without
91 | limitation commercial, advertising or promotional purposes (the
92 | "License"). The License shall be deemed effective as of the date CC0 was
93 | applied by Affirmer to the Work. Should any part of the License for any
94 | reason be judged legally invalid or ineffective under applicable law, such
95 | partial invalidity or ineffectiveness shall not invalidate the remainder
96 | of the License, and in such case Affirmer hereby affirms that he or she
97 | will not (i) exercise any of his or her remaining Copyright and Related
98 | Rights in the Work or (ii) assert any associated claims and causes of
99 | action with respect to the Work, in either case contrary to Affirmer's
100 | express Statement of Purpose.
101 |
102 | 4. Limitations and Disclaimers.
103 |
104 | a. No trademark or patent rights held by Affirmer are waived, abandoned,
105 | surrendered, licensed or otherwise affected by this document.
106 | b. Affirmer offers the Work as-is and makes no representations or
107 | warranties of any kind concerning the Work, express, implied,
108 | statutory or otherwise, including without limitation warranties of
109 | title, merchantability, fitness for a particular purpose, non
110 | infringement, or the absence of latent or other defects, accuracy, or
111 | the present or absence of errors, whether or not discoverable, all to
112 | the greatest extent permissible under applicable law.
113 | c. Affirmer disclaims responsibility for clearing rights of other persons
114 | that may apply to the Work or any use thereof, including without
115 | limitation any person's Copyright and Related Rights in the Work.
116 | Further, Affirmer disclaims responsibility for obtaining any necessary
117 | consents, permissions or other rights required for any use of the
118 | Work.
119 | d. Affirmer understands and acknowledges that Creative Commons is not a
120 | party to this document and has no duty or obligation with respect to
121 | this CC0 or use of the Work.
122 |
--------------------------------------------------------------------------------
/src/maincomponentplugin/images/logo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU LESSER GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 |
9 | This version of the GNU Lesser General Public License incorporates
10 | the terms and conditions of version 3 of the GNU General Public
11 | License, supplemented by the additional permissions listed below.
12 |
13 | 0. Additional Definitions.
14 |
15 | As used herein, "this License" refers to version 3 of the GNU Lesser
16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU
17 | General Public License.
18 |
19 | "The Library" refers to a covered work governed by this License,
20 | other than an Application or a Combined Work as defined below.
21 |
22 | An "Application" is any work that makes use of an interface provided
23 | by the Library, but which is not otherwise based on the Library.
24 | Defining a subclass of a class defined by the Library is deemed a mode
25 | of using an interface provided by the Library.
26 |
27 | A "Combined Work" is a work produced by combining or linking an
28 | Application with the Library. The particular version of the Library
29 | with which the Combined Work was made is also called the "Linked
30 | Version".
31 |
32 | The "Minimal Corresponding Source" for a Combined Work means the
33 | Corresponding Source for the Combined Work, excluding any source code
34 | for portions of the Combined Work that, considered in isolation, are
35 | based on the Application, and not on the Linked Version.
36 |
37 | The "Corresponding Application Code" for a Combined Work means the
38 | object code and/or source code for the Application, including any data
39 | and utility programs needed for reproducing the Combined Work from the
40 | Application, but excluding the System Libraries of the Combined Work.
41 |
42 | 1. Exception to Section 3 of the GNU GPL.
43 |
44 | You may convey a covered work under sections 3 and 4 of this License
45 | without being bound by section 3 of the GNU GPL.
46 |
47 | 2. Conveying Modified Versions.
48 |
49 | If you modify a copy of the Library, and, in your modifications, a
50 | facility refers to a function or data to be supplied by an Application
51 | that uses the facility (other than as an argument passed when the
52 | facility is invoked), then you may convey a copy of the modified
53 | version:
54 |
55 | a) under this License, provided that you make a good faith effort to
56 | ensure that, in the event an Application does not supply the
57 | function or data, the facility still operates, and performs
58 | whatever part of its purpose remains meaningful, or
59 |
60 | b) under the GNU GPL, with none of the additional permissions of
61 | this License applicable to that copy.
62 |
63 | 3. Object Code Incorporating Material from Library Header Files.
64 |
65 | The object code form of an Application may incorporate material from
66 | a header file that is part of the Library. You may convey such object
67 | code under terms of your choice, provided that, if the incorporated
68 | material is not limited to numerical parameters, data structure
69 | layouts and accessors, or small macros, inline functions and templates
70 | (ten or fewer lines in length), you do both of the following:
71 |
72 | a) Give prominent notice with each copy of the object code that the
73 | Library is used in it and that the Library and its use are
74 | covered by this License.
75 |
76 | b) Accompany the object code with a copy of the GNU GPL and this license
77 | document.
78 |
79 | 4. Combined Works.
80 |
81 | You may convey a Combined Work under terms of your choice that,
82 | taken together, effectively do not restrict modification of the
83 | portions of the Library contained in the Combined Work and reverse
84 | engineering for debugging such modifications, if you also do each of
85 | the following:
86 |
87 | a) Give prominent notice with each copy of the Combined Work that
88 | the Library is used in it and that the Library and its use are
89 | covered by this License.
90 |
91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license
92 | document.
93 |
94 | c) For a Combined Work that displays copyright notices during
95 | execution, include the copyright notice for the Library among
96 | these notices, as well as a reference directing the user to the
97 | copies of the GNU GPL and this license document.
98 |
99 | d) Do one of the following:
100 |
101 | 0) Convey the Minimal Corresponding Source under the terms of this
102 | License, and the Corresponding Application Code in a form
103 | suitable for, and under terms that permit, the user to
104 | recombine or relink the Application with a modified version of
105 | the Linked Version to produce a modified Combined Work, in the
106 | manner specified by section 6 of the GNU GPL for conveying
107 | Corresponding Source.
108 |
109 | 1) Use a suitable shared library mechanism for linking with the
110 | Library. A suitable mechanism is one that (a) uses at run time
111 | a copy of the Library already present on the user's computer
112 | system, and (b) will operate properly with a modified version
113 | of the Library that is interface-compatible with the Linked
114 | Version.
115 |
116 | e) Provide Installation Information, but only if you would otherwise
117 | be required to provide such information under section 6 of the
118 | GNU GPL, and only to the extent that such information is
119 | necessary to install and execute a modified version of the
120 | Combined Work produced by recombining or relinking the
121 | Application with a modified version of the Linked Version. (If
122 | you use option 4d0, the Installation Information must accompany
123 | the Minimal Corresponding Source and Corresponding Application
124 | Code. If you use option 4d1, you must provide the Installation
125 | Information in the manner specified by section 6 of the GNU GPL
126 | for conveying Corresponding Source.)
127 |
128 | 5. Combined Libraries.
129 |
130 | You may place library facilities that are a work based on the
131 | Library side by side in a single library together with other library
132 | facilities that are not Applications and are not covered by this
133 | License, and convey such a combined library under terms of your
134 | choice, if you do both of the following:
135 |
136 | a) Accompany the combined library with a copy of the same work based
137 | on the Library, uncombined with any other library facilities,
138 | conveyed under the terms of this License.
139 |
140 | b) Give prominent notice with the combined library that part of it
141 | is a work based on the Library, and explaining where to find the
142 | accompanying uncombined form of the same work.
143 |
144 | 6. Revised Versions of the GNU Lesser General Public License.
145 |
146 | The Free Software Foundation may publish revised and/or new versions
147 | of the GNU Lesser General Public License from time to time. Such new
148 | versions will be similar in spirit to the present version, but may
149 | differ in detail to address new problems or concerns.
150 |
151 | Each version is given a distinguishing version number. If the
152 | Library as you received it specifies that a certain numbered version
153 | of the GNU Lesser General Public License "or any later version"
154 | applies to it, you have the option of following the terms and
155 | conditions either of that published version or of any later version
156 | published by the Free Software Foundation. If the Library as you
157 | received it does not specify a version number of the GNU Lesser
158 | General Public License, you may choose any version of the GNU Lesser
159 | General Public License ever published by the Free Software Foundation.
160 |
161 | If the Library as you received it specifies that a proxy can decide
162 | whether future versions of the GNU Lesser General Public License shall
163 | apply, that proxy's public statement of acceptance of any version is
164 | permanent authorization for you to choose that version for the
165 | Library.
166 |
--------------------------------------------------------------------------------
/LICENSES/Apache-2.0.txt:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
10 |
11 | "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
12 |
13 | "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
14 |
15 | "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
16 |
17 | "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
18 |
19 | "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
20 |
21 | "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
22 |
23 | "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
24 |
25 | "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
26 |
27 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
28 |
29 | 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
30 |
31 | 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
32 |
33 | 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
34 |
35 | (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
36 |
37 | (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
38 |
39 | (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
40 |
41 | (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
42 |
43 | You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
44 |
45 | 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
46 |
47 | 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
48 |
49 | 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
50 |
51 | 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
52 |
53 | 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
54 |
55 | END OF TERMS AND CONDITIONS
56 |
57 | APPENDIX: How to apply the Apache License to your work.
58 |
59 | To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
60 |
61 | Copyright [yyyy] [name of copyright owner]
62 |
63 | Licensed under the Apache License, Version 2.0 (the "License");
64 | you may not use this file except in compliance with the License.
65 | You may obtain a copy of the License at
66 |
67 | http://www.apache.org/licenses/LICENSE-2.0
68 |
69 | Unless required by applicable law or agreed to in writing, software
70 | distributed under the License is distributed on an "AS IS" BASIS,
71 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
72 | See the License for the specific language governing permissions and
73 | limitations under the License.
74 |
--------------------------------------------------------------------------------
/misc/deepin-tweak.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/LICENSES/CC-BY-4.0.txt:
--------------------------------------------------------------------------------
1 | Creative Commons Attribution 4.0 International
2 |
3 | Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible.
4 |
5 | Using Creative Commons Public Licenses
6 |
7 | Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses.
8 |
9 | Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. More considerations for licensors.
10 |
11 | Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More considerations for the public.
12 |
13 | Creative Commons Attribution 4.0 International Public License
14 |
15 | By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
16 |
17 | Section 1 – Definitions.
18 |
19 | a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
20 |
21 | b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
22 |
23 | c. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
24 |
25 | d. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
26 |
27 | e. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
28 |
29 | f. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
30 |
31 | g. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
32 |
33 | h. Licensor means the individual(s) or entity(ies) granting rights under this Public License.
34 |
35 | i. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
36 |
37 | j. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
38 |
39 | k. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
40 |
41 | Section 2 – Scope.
42 |
43 | a. License grant.
44 |
45 | 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
46 |
47 | A. reproduce and Share the Licensed Material, in whole or in part; and
48 |
49 | B. produce, reproduce, and Share Adapted Material.
50 |
51 | 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
52 |
53 | 3. Term. The term of this Public License is specified in Section 6(a).
54 |
55 | 4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
56 |
57 | 5. Downstream recipients.
58 |
59 | A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
60 |
61 | B. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
62 |
63 | 6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
64 |
65 | b. Other rights.
66 |
67 | 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
68 |
69 | 2. Patent and trademark rights are not licensed under this Public License.
70 |
71 | 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties.
72 |
73 | Section 3 – License Conditions.
74 |
75 | Your exercise of the Licensed Rights is expressly made subject to the following conditions.
76 |
77 | a. Attribution.
78 |
79 | 1. If You Share the Licensed Material (including in modified form), You must:
80 |
81 | A. retain the following if it is supplied by the Licensor with the Licensed Material:
82 |
83 | i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
84 |
85 | ii. a copyright notice;
86 |
87 | iii. a notice that refers to this Public License;
88 |
89 | iv. a notice that refers to the disclaimer of warranties;
90 |
91 | v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
92 |
93 | B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
94 |
95 | C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
96 |
97 | 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
98 |
99 | 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
100 |
101 | 4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License.
102 |
103 | Section 4 – Sui Generis Database Rights.
104 |
105 | Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
106 |
107 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database;
108 |
109 | b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and
110 |
111 | c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
112 | For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
113 |
114 | Section 5 – Disclaimer of Warranties and Limitation of Liability.
115 |
116 | a. Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.
117 |
118 | b. To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.
119 |
120 | c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
121 |
122 | Section 6 – Term and Termination.
123 |
124 | a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
125 |
126 | b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
127 |
128 | 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
129 |
130 | 2. upon express reinstatement by the Licensor.
131 |
132 | c. For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
133 |
134 | d. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
135 |
136 | e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
137 |
138 | Section 7 – Other Terms and Conditions.
139 |
140 | a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
141 |
142 | b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
143 |
144 | Section 8 – Interpretation.
145 |
146 | a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
147 |
148 | b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
149 |
150 | c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
151 |
152 | d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
153 |
154 | Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.
155 |
156 | Creative Commons may be contacted at creativecommons.org.
157 |
--------------------------------------------------------------------------------