Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.
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: 79 additions & 26 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,59 +1,112 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.16)
project(lightly)
set(PROJECT_VERSION "0.43")
set(PROJECT_VERSION_MAJOR 5)
set(PROJECT_VERSION "6.80")
set(PROJECT_VERSION_MAJOR 6)

set(KF5_MIN_VERSION "5.78.0")

set(KF6_MIN_VERSION "5.240.0")
set(KDE_COMPILERSETTINGS_LEVEL "5.82")
set(QT_MIN_VERSION "6.6.0")

include(GenerateExportHeader)
include(WriteBasicConfigVersionFile)
include(FeatureSummary)
include(GNUInstallDirs)

find_package(ECM ${KF6_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_SOURCE_DIR}/cmake)

include(CMakePackageConfigHelpers)
include(ECMInstallIcons)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDEClangFormat)
include(KDEGitCommitHooks)

include(GtkUpdateIconCache)

option(WITH_DECORATIONS "Build Lightly window decorations for KWin" ON)
if(WITH_DECORATIONS)
find_package(KDecoration2 REQUIRED)
add_subdirectory(kdecoration)
if(WIN32 OR APPLE)
set(WITH_DECORATIONS OFF)
endif()

set(QT_MAJOR_VERSION 6)
include(KDEInstallDirs6)
include(KDECMakeSettings)

option(WITH_DECORATIONS "Build Lightly window decorations for KWin" ON)

find_package(Qt6 ${QT_MIN_VERSION} REQUIRED CONFIG COMPONENTS Widgets DBus)
find_package(KF6 ${KF6_MIN_VERSION} REQUIRED COMPONENTS
CoreAddons
ColorScheme
Config
GuiAddons
I18n
IconThemes
WindowSystem)
if(NOT WIN32 AND NOT APPLE)
find_package(KF6KCMUtils ${KF6_MIN_VERSION})
set_package_properties(KF6KCMUtils PROPERTIES
TYPE REQUIRED
DESCRIPTION "Helps create configuration modules"
PURPOSE "KCMUtils used for the configuration modules or the decoration and Qt Style"
)
endif()

find_package(Qt6 ${QT_MIN_VERSION} OPTIONAL_COMPONENTS Quick)
if(${Qt6Quick_FOUND})
find_package(KF6KirigamiPlatform ${KF6_MIN_VERSION} REQUIRED)
endif()

find_package(KF6FrameworkIntegration ${KF6_MIN_VERSION} CONFIG )
set_package_properties(KF${QT_MAJOR_VERSION}FrameworkIntegration PROPERTIES
DESCRIPTION "KF6 Framework Integration"
URL "https://projects.kde.org/projects/frameworks/frameworkintegration"
TYPE OPTIONAL
PURPOSE "Required to use KStyle convenience functionalities in style")

set(LIGHTLY_HAVE_KSTYLE ${KF6FrameworkIntegration_FOUND})
set(LIGHTLY_HAVE_QTQUICK ${Qt6Quick_FOUND})


add_subdirectory(colors)
add_subdirectory(liblightlycommon)
add_subdirectory(kstyle)
add_subdirectory(misc)
add_subdirectory(kstyle kstyle6)
add_subdirectory(liblightlycommon liblightlycommon6)
#add_subdirectory(misc)

if(WITH_DECORATIONS)
find_package(KDecoration2 REQUIRED)
add_subdirectory(kdecoration)
endif()

ki18n_install(po)

# create a Config.cmake and a ConfigVersion.cmake file and install them
include(ECMSetupVersion)
ecm_setup_version(${PROJECT_VERSION} VARIABLE_PREFIX LIGHTLY
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/LightlyConfigVersion.cmake"
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/LightlyConfigVersion.cmake"
)

# create a Config.cmake and a ConfigVersion.cmake file and install them
set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/Lightly")
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/Lightly")

ecm_configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/LightlyConfig.cmake.in"
configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/LightlyConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/LightlyConfig.cmake"
PATH_VARS KDE_INSTALL_FULL_DATADIR
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
)
)

install(FILES "${CMAKE_CURRENT_BINARY_DIR}/LightlyConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/LightlyConfigVersion.cmake"
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
COMPONENT Devel
)

# add clang-format target for all our real source files
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})

install(FILES "${CMAKE_CURRENT_BINARY_DIR}/LightlyConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/LightlyConfigVersion.cmake"
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
COMPONENT Devel
)
kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)

feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
65 changes: 49 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,15 @@
<img src="logo.png"/>
</p>

**This is a personal fork of Lightly where I merge pull requests sent to [Luwx/Lightly](https://github.com/Luwx/Lightly)**

*Lightly* is a fork of breeze theme style that aims to be visually modern and minimalistic.

# Notes about this fork

- Do not open pull requests directly here unless they change/require some code that has diverged from upstream
- If the pull request can sucessfully be merged into [Luwx/Lightly](https://github.com/Luwx/Lightly), please open it there and I will merge it here. My intention is not for this to be a permanent fork (hopefully Luwx comes back!)
- Similarly, don't open issues here unless the issue was likely caused by some code here that's not in [Luwx/Lightly](https://github.com/Luwx/Lightly)

These rules are because I don't want to diverge too far from upstream. It should be easy for Luwx to catch up.

Thanks ❤️🐢
*Lightly* is a fork of breeze theme style that aims to be visually modern and minimalistic.

## Development ⚠️

Lightly is a work in progress theme, there is still a lot to change, so expect bugs! Some applications may suddenly crash or flicker.

If you have any feedback or encounter some bugs, feel free to open an issue or a pr.


## Screenshots

![default](https://github.com/Luwx/Lightly/blob/master/Lightly-default.png)
Expand All @@ -45,6 +36,45 @@ Most of these options are inherited from Breeze style, but Lightly has a few exc

The toolbar and menubar will follow the **titlebar** opacity. To configure the titlebar opacity, you will have to change the color scheme file directly in ~/.local/share/color-schemes. Open your desired color scheme and, in the ```[WM]``` section, add a fourth value to ```activeBackground``` and ```inactiveBackground```, like ```activeBackground=0,0,0,127``` where the last value is the alpha, that ranges from 0 (completely transparent) to 255 (totally opaque).

## Installation

### Installing Lightly from [chaotic-aur](https://aur.chaotic.cx/) on ArchLinux and its [derivatives](https://wiki.archlinux.org/title/Arch-based_distributions)
1. Follow the instructions [here](https://aur.chaotic.cx/) on how to setup chaotic-aur
2. run: ```sudo pacman -Syyu lightly-qt```

### Installing Lightly from RPM repository on openSUSE Tumbleweed:

1. Add "sputnik-look-and-feel" repository:
```sudo zypper ar -ef https://download.opensuse.org/repositories/home:/sputnik:/look-and-feel/openSUSE_Tumbleweed/ sputnik-look-and-feel```
2. Refresh repository list:
```sudo zypper ref```
3. You will be notified about received new repository key. And you will be asked if you want to accept the key. This repository is created on OBS. All builds are reproducible.
Type "```a```" and press enter.
4. Install Lightly:
```sudo zypper in Lightly```

### Fedora
```
sudo dnf install Lightly
```

### Fedora 32 RPM repository

1. Create repo file:
```
echo "[sputnik-look-and-feel]
name=Look And Feel (Fedora_32)
type=rpm-md
baseurl=https://download.opensuse.org/repositories/home:/sputnik:/look-and-feel/Fedora_32/
gpgcheck=1
gpgkey=https://download.opensuse.org/repositories/home:/sputnik:/look-and-feel/Fedora_32/repodata/repomd.xml.key
enabled=1" | sudo tee -a /etc/yum.repos.d/sputnik-look-and-feel.repo
```
2. Install Lightly:
```sudo dnf install Lightly```



## Manual installation

### Dependencies
Expand Down Expand Up @@ -80,15 +110,13 @@ sudo eopkg install extra-cmake-modules kdecoration-devel qt5-declarative-devel q
### Build and install

```
git clone --single-branch --depth=1 https://github.com/boehs/Lightly.git
git clone --single-branch --depth=1 https://github.com/Luwx/Lightly.git
cd Lightly && mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DBUILD_TESTING=OFF ..
make
sudo make install
```

For RedHat-based distros (like Fedora and OpenSUSE), run `cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LIBDIR=lib64 -DBUILD_TESTING=OFF ..` instead (#4)

### Uninstall

In the build folder:
Expand All @@ -99,3 +127,8 @@ sudo make uninstall
## Acknowledgments

Breeze authors and Kvantum developer Pedram Pourang.





2 changes: 1 addition & 1 deletion colors/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
install(FILES Lightly.colors
DESTINATION ${DATA_INSTALL_DIR}/color-schemes/)
DESTINATION ${KDE_INSTALL_DATADIR}/color-schemes/)
93 changes: 23 additions & 70 deletions kdecoration/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,30 +1,5 @@
add_definitions(-DTRANSLATION_DOMAIN="lightly_kwin_deco")

find_package(KF5 REQUIRED COMPONENTS CoreAddons GuiAddons ConfigWidgets WindowSystem I18n IconThemes)
find_package(Qt5 CONFIG REQUIRED COMPONENTS DBus)

### XCB
find_package(XCB COMPONENTS XCB)
set_package_properties(XCB PROPERTIES
DESCRIPTION "X protocol C-language Binding"
URL "https://xcb.freedesktop.org"
TYPE OPTIONAL
PURPOSE "Required to pass style properties to native Windows on X11 Platform"
)

if(UNIX AND NOT APPLE)

set(LIGHTLY_HAVE_X11 ${XCB_XCB_FOUND})
if (XCB_XCB_FOUND)
find_package(Qt5 REQUIRED CONFIG COMPONENTS X11Extras)
endif()

else()

set(LIGHTLY_HAVE_X11 FALSE)

endif()

################# configuration #################
configure_file(config-lightly.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-lightly.h )

Expand All @@ -39,59 +14,37 @@ set(lightlydecoration_SRCS
lightlydecoration.cpp
lightlyexceptionlist.cpp
lightlysettingsprovider.cpp
lightlysizegrip.cpp)

kconfig_add_kcfg_files(lightlydecoration_SRCS lightlysettings.kcfgc)

### config classes
### they are kept separately because they might move in a separate library in the future
set(lightlydecoration_config_SRCS
config/lightlyconfigwidget.cpp
config/lightlydetectwidget.cpp
config/lightlyexceptiondialog.cpp
config/lightlyexceptionlistwidget.cpp
config/lightlyexceptionmodel.cpp
config/lightlyitemmodel.cpp
)

set(lightlydecoration_config_PART_FORMS
config/ui/lightlyconfigurationui.ui
config/ui/lightlydetectwidget.ui
config/ui/lightlyexceptiondialog.ui
config/ui/lightlyexceptionlistwidget.ui
lightlysizegrip.cpp
)

ki18n_wrap_ui(lightlydecoration_config_PART_FORMS_HEADERS ${lightlydecoration_config_PART_FORMS})

### build library
kconfig_add_kcfg_files(lightlydecoration_SRCS lightlysettings.kcfgc)
add_library(lightlydecoration MODULE
${lightlydecoration_SRCS}
${lightlydecoration_config_SRCS}
${lightlydecoration_config_PART_FORMS_HEADERS})

set_target_properties(lightlydecoration PROPERTIES
OUTPUT_NAME org.kde.lightly
)

target_link_libraries(lightlydecoration
PUBLIC
Qt5::Core
Qt5::Gui
Qt5::DBus
PRIVATE
lightlycommon5
PUBLIC
Qt::Core
Qt::Gui
Qt::DBus
KDecoration2::KDecoration
KF5::ConfigCore
KF5::CoreAddons
KF5::ConfigWidgets
KF5::GuiAddons
KF5::I18n
KF5::IconThemes
KF5::WindowSystem)

if(LIGHTLY_HAVE_X11)
target_link_libraries(lightlydecoration
PUBLIC
Qt5::X11Extras
XCB::XCB)
endif()
PRIVATE
lightlycommon6
KF6::CoreAddons
KF6::ConfigWidgets
KF6::GuiAddons
KF6::I18n
KF6::IconThemes
KF6::WindowSystem
KF6::KCMUtils
)

install(TARGETS lightlydecoration DESTINATION ${KDE_INSTALL_PLUGINDIR}/${KDECORATION_PLUGIN_DIR})
install(FILES config/lightlydecorationconfig.desktop DESTINATION ${KDE_INSTALL_DATADIR}/kservices6)

install(TARGETS lightlydecoration DESTINATION ${PLUGIN_INSTALL_DIR}/org.kde.kdecoration2)
install(FILES config/lightlydecorationconfig.desktop DESTINATION ${SERVICES_INSTALL_DIR})
add_subdirectory(config)
Loading