Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 105 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
---
# SPDX-FileCopyrightText: 2019 Christoph Cullmann <cullmann@kde.org>
# SPDX-FileCopyrightText: 2019 Gernot Gebhard <gebhard@absint.com>
#
# 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<std::vector<lala>>
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
3 changes: 3 additions & 0 deletions .clangd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CompileFlags:
Remove:
- -mno-direct-extern-access
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ build/
playground
*.mo
*.tar.gz
.cache/
compile_commands.json
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
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)

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})

Expand Down Expand Up @@ -54,3 +57,7 @@ if(PACKAGE_WALLPAPER)

add_dependencies(wallpaper translations)
endif()

if(BUILD_PLUGIN)
add_subdirectory(plugin)
endif()
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
32 changes: 32 additions & 0 deletions package/contents/config/main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,18 @@
<entry name="LastVideoPosition" type="Int">
<default>0</default>
</entry>
<entry name="LastVideoDay" type="String">
<default></default>
</entry>
<entry name="LastVideoNight" type="String">
<default></default>
</entry>
<entry name="LastVideoSunrise" type="String">
<default></default>
</entry>
<entry name="LastVideoSunset" type="String">
<default></default>
</entry>
<!-- Mute audio
0: when maximized or full-screen windows
1: when a visible window is active
Expand All @@ -135,6 +147,22 @@
<entry name="ChangeWallpaperTimerHours" type="Int">
<default>0</default>
</entry>
<entry name="DayNightCycleMode" type="Int">
<label>Mode</label>
<default>0</default>
</entry>
<entry name="DayNightCycleSunriseTime" type="Int">
<label>Time of sunrise</label>
<default>360</default>
</entry>
<entry name="DayNightCycleSunsetTime" type="Int">
<label>Time of sunset</label>
<default>1080</default>
</entry>
<entry name="DayNightCycleTransitionDuration" type="Int">
<label>Duration of sunrise and sunset (minutes)</label>
<default>5</default>
</entry>
<entry name="ResumeLastVideo" type="Bool">
<label>Whether or not to resume last playing video on startup</label>
<default>True</default>
Expand All @@ -158,5 +186,9 @@
<entry name="AlternativePlaybackRate" type="Double">
<default>0.5</default>
</entry>
<entry name="DarkLightScheduleState" type="String">
<label>Saved dark light schedule state</label>
<default></default>
</entry>
</group>
</kcfg>
44 changes: 44 additions & 0 deletions package/contents/icons/dayNight/day.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions package/contents/icons/dayNight/disabled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions package/contents/icons/dayNight/night.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading