diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..978b6de --- /dev/null +++ b/.clang-format @@ -0,0 +1,105 @@ +--- +# SPDX-FileCopyrightText: 2019 Christoph Cullmann +# SPDX-FileCopyrightText: 2019 Gernot Gebhard +# +# SPDX-License-Identifier: MIT + +# This file got automatically created by ECM, do not edit +# See https://clang.llvm.org/docs/ClangFormatStyleOptions.html for the config options +# and https://community.kde.org/Policies/Frameworks_Coding_Style#Clang-format_automatic_code_formatting +# for clang-format tips & tricks +--- +Language: JavaScript +DisableFormat: true +--- +Language: Json +DisableFormat: false +IndentWidth: 4 +--- +# Style for C++ +Language: Cpp + +# base is WebKit coding style: https://webkit.org/code-style-guidelines/ +# below are only things set that diverge from this style! +BasedOnStyle: WebKit + +# enforce C++11 (e.g. for std::vector> +Standard: Cpp11 + +# 4 spaces indent +TabWidth: 4 + +# 2 * 80 wide lines +ColumnLimit: 160 + +# sort includes inside line separated groups +SortIncludes: true + +# break before braces on function, namespace and class definitions. +BreakBeforeBraces: Linux + +# CrlInstruction *a; +PointerAlignment: Right + +# horizontally aligns arguments after an open bracket. +AlignAfterOpenBracket: Align + +# don't move all parameters to new line +AllowAllParametersOfDeclarationOnNextLine: false + +# no single line functions +AllowShortFunctionsOnASingleLine: None + +# no single line enums +AllowShortEnumsOnASingleLine: false + +# always break before you encounter multi line strings +AlwaysBreakBeforeMultilineStrings: true + +# don't move arguments to own lines if they are not all on the same +BinPackArguments: false + +# don't move parameters to own lines if they are not all on the same +BinPackParameters: false + +# In case we have an if statement with multiple lines the operator should be at the beginning of the line +# but we do not want to break assignments +BreakBeforeBinaryOperators: NonAssignment + +# format C++11 braced lists like function calls +Cpp11BracedListStyle: true + +# do not put a space before C++11 braced lists +SpaceBeforeCpp11BracedList: false + +# remove empty lines +KeepEmptyLinesAtTheStartOfBlocks: false + +# no namespace indentation to keep indent level low +NamespaceIndentation: None + +# we use template< without space. +SpaceAfterTemplateKeyword: false + +# Always break after template declaration +AlwaysBreakTemplateDeclarations: true + +# macros for which the opening brace stays attached. +ForEachMacros: + [ + foreach, + Q_FOREACH, + BOOST_FOREACH, + forever, + Q_FOREVER, + QBENCHMARK, + QBENCHMARK_ONCE, + wl_resource_for_each, + wl_resource_for_each_safe, + ] + +# keep lambda formatting multi-line if not empty +AllowShortLambdasOnASingleLine: Empty + +# We do not want clang-format to put all arguments on a new line +AllowAllArgumentsOnNextLine: false diff --git a/.clangd b/.clangd new file mode 100644 index 0000000..dddeaef --- /dev/null +++ b/.clangd @@ -0,0 +1,3 @@ +CompileFlags: + Remove: + - -mno-direct-extern-access diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..f274f1b --- /dev/null +++ b/.editorconfig @@ -0,0 +1,19 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# editorconfig.org + +root = true + +[*] +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +indent_style = space +indent_size = 4 + +[*.md] +trim_trailing_whitespace = false + +[*.xml*] +indent_size = 2 diff --git a/.gitignore b/.gitignore index 5dbff67..46d2466 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ build/ playground *.mo *.tar.gz +.cache/ +compile_commands.json diff --git a/CMakeLists.txt b/CMakeLists.txt index 376f56a..568bce7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,6 @@ cmake_minimum_required(VERSION 3.16) project("plasma-smart-video-wallpaper-reborn") +option(BUILD_PLUGIN "Build the plugin" ON) option(INSTALL_WALLPAPER "Install wallpaper" ON) option(PACKAGE_WALLPAPER "Package wallpaper" OFF) @@ -7,7 +8,9 @@ set(PROJECT_DEP_VERSION "6.0.0") set(QT_MIN_VERSION "6.6.0") set(KF6_MIN_VERSION "6.0.0") set(KDE_COMPILERSETTINGS_LEVEL "5.85") - +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_EXPORT_COMPILE_COMMANDS 1) find_package(ECM ${KF6_MIN_VERSION} REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) @@ -54,3 +57,7 @@ if(PACKAGE_WALLPAPER) add_dependencies(wallpaper translations) endif() + +if(BUILD_PLUGIN) + add_subdirectory(plugin) +endif() diff --git a/README.md b/README.md index 7845d09..167169e 100644 --- a/README.md +++ b/README.md @@ -226,3 +226,4 @@ See [Translations](https://github.com/luisbocanegra/plasma-smart-video-wallpaper - This project a rewrite based on [adhec/Smart Video Wallpaper](https://github.com/adhec/plasma_tweaks/tree/master/SmartVideoWallpaper) and [PeterTucker/smartER-video-wallpaper](https://github.com/PeterTucker/smartER-video-wallpaper) projects. - [ccatterina's script](https://github.com/ccatterina) to manage translations - Brand icons from [Simple Icons](https://simpleicons.org) +- Day-night icons from [Google LLC. / Pictogrammers](https://pictogrammers.com/library/mdi/) diff --git a/package/contents/config/main.xml b/package/contents/config/main.xml index 2a82c81..a652410 100644 --- a/package/contents/config/main.xml +++ b/package/contents/config/main.xml @@ -112,6 +112,18 @@ 0 + + + + + + + + + + + +