Skip to content

Commit

Permalink
Merge pull request #76 from DeltaCopy/Darkly
Browse files Browse the repository at this point in the history
Refactor code to change name to darkly
  • Loading branch information
DeltaCopy authored Dec 21, 2024
2 parents 6599cb8 + 5dee1e2 commit 7a92829
Show file tree
Hide file tree
Showing 240 changed files with 26,640 additions and 27,142 deletions.
12 changes: 6 additions & 6 deletions .github/assets/pkgbuild/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Maintainer: DeltaCopy <[email protected]>
# Description: Builds Lightly from https://github.com/Bali10050/Lightly
# Description: Builds Darkly from https://github.com/Bali10050/Darkly
# Used inside Github Action workflow archlinux-ci

# basic info
dev="Bali10050"
pkgname="lightly-qt6"
pkgname="darkly"
pkgver= # change this to match the name of the release tag you want to build from
pkgrel=1
pkgdesc="Bali10050's fork of Lightly (A modern style for qt applications)"
url="https://github.com/$dev/lightly"
pkgdesc="Bali10050's fork of Darkly (A modern style for qt applications)"
url="https://github.com/$dev/Darkly"
arch=('x86_64' 'aarch64')
license=("GPL-2.0-or-later")
pkgdir="$srcdir/fakeinstall_kf6"
Expand Down Expand Up @@ -54,10 +54,10 @@ depends=("${depends_kf6[@]}" "${depends_kf5[@]}")
conflicts=(
lightly-kf6
lightly-qt
lightly-qt6
lightly-qt6-bin
)

provides=("lightly-qt6")

pkgver() {
cd "$srcdir/$pkgname.git"
git describe --tags --long --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
%define kf5_version 5.102.0
%define qt5_version 5.15.2
%define dev Bali10050
%define style Lightly
%define _style lightly
%define style Darkly
%define _style darkly
%define release_tag ${TAG} # this line gets updated automatically by Github Actions

Name: %{style}
Expand Down Expand Up @@ -35,7 +35,7 @@ BuildRequires: kf6-filesystem
%endif
BuildRequires: pkgconfig

#lightly5 dependencies
#darkly5 dependencies
BuildRequires: cmake(KF5Config) >= %{kf5_version}
BuildRequires: cmake(KF5ConfigWidgets) >= %{kf5_version}
BuildRequires: cmake(KF5CoreAddons) >= %{kf5_version}
Expand All @@ -49,7 +49,7 @@ BuildRequires: cmake(Qt5DBus) >= %{qt5_version}
BuildRequires: cmake(Qt5Quick) >= %{qt5_version}
BuildRequires: cmake(Qt5Widgets) >= %{qt5_version}

#lightly6 dependencies
#darkly6 dependencies
BuildRequires: cmake(KF6ColorScheme) >= %{kf6_version}
BuildRequires: cmake(KF6Config) >= %{kf6_version}
BuildRequires: cmake(KF6CoreAddons) >= %{kf6_version}
Expand All @@ -66,7 +66,7 @@ BuildRequires: cmake(Qt6Quick) >= %{qt6_version}
BuildRequires: cmake(Qt6Widgets) >= %{qt6_version}

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

%prep
%autosetup -n %{name}-%{version} -p1
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/archlinux.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Archlinux
# Build Lightly from release tag and publish .zst package
# Build Darkly from release tag and publish .zst package

on:
workflow_call:
Expand Down Expand Up @@ -39,19 +39,19 @@ jobs:
- name: Update PKGBUILD file with new checksum and git tag values
run: |
# update tag with latest version
mkdir /var/tmp/lightly-archlinux
cp ${{ env.PKGBUILD }} /var/tmp/lightly-archlinux
sed -i "s/.*pkgver=.*/pkgver=${{ inputs.version }}/" /var/tmp/lightly-archlinux/PKGBUILD
mkdir /var/tmp/darkly-archlinux
cp ${{ env.PKGBUILD }} /var/tmp/darkly-archlinux
sed -i "s/.*pkgver=.*/pkgver=${{ inputs.version }}/" /var/tmp/darkly-archlinux/PKGBUILD
- name: Change permissions of build directory
run: |
chown builduser:builduser -R /var/tmp/lightly-archlinux
chown builduser:builduser -R /var/tmp/darkly-archlinux
- name: Generate package checksum
run: sudo -u builduser bash -c 'cd /var/tmp/lightly-archlinux; makepkg -g >> PKGBUILD'
run: sudo -u builduser bash -c 'cd /var/tmp/darkly-archlinux; makepkg -g >> PKGBUILD'
- name: Build package
run: |
sudo -u builduser bash -c 'cd /var/tmp/lightly-archlinux; makepkg -s'
zst_file=$(find /var/tmp/lightly-archlinux -name "*.zst*")
publish_filename=lightly-${{ inputs.version }}-x86_64.pkg.zst
sudo -u builduser bash -c 'cd /var/tmp/darkly-archlinux; makepkg -s'
zst_file=$(find /var/tmp/darkly-archlinux -name "*.zst*")
publish_filename=darkly-${{ inputs.version }}-x86_64.pkg.zst
mv "$zst_file" $publish_filename
echo "ZST_ASSET=$publish_filename" >> "$GITHUB_ENV"
- name: Release
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Build Lightly and publish release
name: Lightly build & release
# Build Darkly and publish release
name: Darkly build & release
on:
push:
tags:
- "v*"
env:
BUILD_TYPE: Release
BUILD_WS: build_kf6
BUILD_REPO: https://github.com/Bali10050/Lightly/
BUILD_REPO: https://github.com/Bali10050/Darkly
jobs:
release-ci:
runs-on: ubuntu-latest
Expand All @@ -24,7 +24,7 @@ jobs:
- name: Install build dependencies
run: sudo apt-get install git -y -qq
- name: Get latest Lightly release tag
- name: Get latest Darkly release tag
id: step_getlatest_tag
run: |
# get latest release tag from remote
Expand All @@ -42,8 +42,8 @@ jobs:
- name: Download tag asset
id: step_get_asset
run: |
curl -L $BUILD_REPO/archive/refs/tags/${{ env.LATEST_TAG }}.tar.gz --output lightly-${{ env.LATEST_TAG }}.tar.gz
echo "ASSET=lightly-${{ env.LATEST_TAG }}.tar.gz" >> "$GITHUB_OUTPUT"
curl -L $BUILD_REPO/archive/refs/tags/${{ env.LATEST_TAG }}.tar.gz --output darkly-${{ env.LATEST_TAG }}.tar.gz
echo "ASSET=darkly-${{ env.LATEST_TAG }}.tar.gz" >> "$GITHUB_OUTPUT"
- uses: actions/cache/[email protected]
id: cache
with:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/fedora.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Fedora 41/40
# Build Lightly from release tag and publish .rpm package
# Build Darkly from release tag and publish .rpm package

on:
workflow_call:
Expand All @@ -14,7 +14,7 @@ on:
required: true
type: string
env:
SPEC_FILE: $GITHUB_WORKSPACE/.github/assets/specs/lightly.spec
SPEC_FILE: $GITHUB_WORKSPACE/.github/assets/specs/darkly.spec
jobs:
build:
strategy:
Expand All @@ -29,7 +29,7 @@ jobs:
with:
repository: ${{ github.repository }}
sparse-checkout: |
.github/assets/specs/lightly.spec
.github/assets/specs/darkly.spec
- name: Update tag version inside spec file
run: sed -i "s/.*%define release_tag.*/%define release_tag ${{ inputs.version }}/" ${{ env.SPEC_FILE }}
- uses: actions/cache/[email protected]
Expand Down Expand Up @@ -59,13 +59,13 @@ jobs:
- name: Build rpm binary package
run: |
cd $HOME/rpmbuild/SPECS
rpmbuild -bb --quiet lightly.spec
rpmbuild -bb --quiet darkly.spec
rpm_file=$(find $HOME/rpmbuild/RPMS/x86_64 -name "*.rpm*" ! -name "*src*" ! -name "*debug*")
echo "rpm_file = $rpm_file"
source /etc/os-release
echo "Version ID = $VERSION_ID"
mv $rpm_file $HOME/rpmbuild/RPMS/x86_64/lightly-${{ inputs.version }}.fc$VERSION_ID.x86_64.rpm
echo "RPM_ASSET=$HOME/rpmbuild/RPMS/x86_64/lightly-${{ inputs.version }}.fc$VERSION_ID.x86_64.rpm" >> "$GITHUB_ENV"
mv $rpm_file $HOME/rpmbuild/RPMS/x86_64/darkly-${{ inputs.version }}.fc$VERSION_ID.x86_64.rpm
echo "RPM_ASSET=$HOME/rpmbuild/RPMS/x86_64/darkly-${{ inputs.version }}.fc$VERSION_ID.x86_64.rpm" >> "$GITHUB_ENV"
- name: Release
uses: softprops/[email protected]
if: startsWith(github.ref, 'refs/tags/')
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/kubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Kubuntu
# Requires a custom docker container
# The Dockerfile is inside .github/assets/docker/kubuntu
# Build Lightly from release tag and publish .deb package
# Build Darkly from release tag and publish .deb package

on:
workflow_call:
Expand Down Expand Up @@ -34,18 +34,18 @@ jobs:
libkf6windowsystem-dev libkf6kcmutils-dev libkirigami-dev
- name: Extract release tarball
run: tar xvf ${{ inputs.cache-file-path }}
- name: Build Lightly
- name: Build Darkly
run: |
cmake -B build_kf6 -DBUILD_TESTING=OFF -Wno-dev -S Lightly-${{inputs.version}}
cmake -B build_kf6 -DBUILD_TESTING=OFF -Wno-dev -S Darkly-${{inputs.version}}
cmake --build build_kf6 -j $(nproc)
- name: Create deb package
id: create_deb_package
run: |
cd build_kf6
checkinstall -D --pkgname lightly --pkgversion ${{ inputs.version }} --nodoc --fstrans=no --default
checkinstall -D --pkgname darkly --pkgversion ${{ inputs.version }} --nodoc --fstrans=no --default
deb_file=$(find . -name "*.deb*")
test ! -z $deb_file && mv $deb_file ${{ env.GITHUB_WORKSPACE}}/lightly_${{ inputs.version }}_kubuntu_amd64.deb
echo "DEB_ASSET=${{ env.GITHUB_WORKSPACE}}/lightly_${{ inputs.version }}_kubuntu_amd64.deb" >> "$GITHUB_OUTPUT"
test ! -z $deb_file && mv $deb_file ${{ env.GITHUB_WORKSPACE}}/darkly_${{ inputs.version }}_kubuntu_amd64.deb
echo "DEB_ASSET=${{ env.GITHUB_WORKSPACE}}/darkly_${{ inputs.version }}_kubuntu_amd64.deb" >> "$GITHUB_OUTPUT"
- name: Release
uses: softprops/[email protected]
if: startsWith(github.ref, 'refs/tags/')
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/neon.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# KDE Neon
# Requires a custom docker container
# The Dockerfile is inside .github/assets/docker/kde-neon
# Build Lightly from release tag and publish .deb package
# Build Darkly from release tag and publish .deb package

on:
workflow_call:
Expand All @@ -15,7 +15,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container: deltacopy/lightly-kde-neon:0.1
container: deltacopy/darkly-kde-neon:0.1
steps:
- uses: actions/cache/[email protected]
id: cache
Expand All @@ -37,18 +37,18 @@ jobs:
- name: Extract release tarball
run: |
tar xvf ${{ inputs.cache-file-path }}
- name: Build Lightly
- name: Build Darkly
run: |
cmake -B build_kf6 -DBUILD_TESTING=OFF -Wno-dev -S Lightly-${{inputs.version}}
cmake -B build_kf6 -DBUILD_TESTING=OFF -Wno-dev -S Darkly-${{inputs.version}}
cmake --build build_kf6 -j $(nproc)
- name: Create deb package
id: create_deb_package
run: |
cd build_kf6
checkinstall -D --pkgname lightly --pkgversion ${{ inputs.version }} --nodoc --default
checkinstall -D --pkgname darkly --pkgversion ${{ inputs.version }} --nodoc --default
deb_file=$(find . -name "*.deb*")
test ! -z $deb_file && mv $deb_file /home/neon/lightly_${{ inputs.version }}_kdeneon_amd64.deb
echo "DEB_ASSET=/home/neon/lightly_${{ inputs.version }}_kdeneon_amd64.deb" >> "$GITHUB_OUTPUT"
test ! -z $deb_file && mv $deb_file /home/neon/darkly_${{ inputs.version }}_kdeneon_amd64.deb
echo "DEB_ASSET=/home/neon/darkly_${{ inputs.version }}_kdeneon_amd64.deb" >> "$GITHUB_OUTPUT"
- name: Release
uses: softprops/[email protected]
if: startsWith(github.ref, 'refs/tags/')
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/opensuse-tw.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# openSUSE Tumbleweed
# Build Lightly from release tag and publish .rpm package
# Build Darkly from release tag and publish .rpm package

on:
workflow_call:
Expand All @@ -11,7 +11,7 @@ on:
required: true
type: string
env:
SPEC_FILE: $GITHUB_WORKSPACE/.github/assets/specs/lightly.spec
SPEC_FILE: $GITHUB_WORKSPACE/.github/assets/specs/darkly.spec
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -36,19 +36,19 @@ jobs:
uses: actions/[email protected]
with:
repository: ${{ github.repository }}
sparse-checkout: .github/assets/specs/lightly.spec
sparse-checkout: .github/assets/specs/darkly.spec
- name: Update tag version inside spec file
run: sed -i "s/.*%define release_tag.*/%define release_tag ${{ inputs.version }}/" ${{ env.SPEC_FILE }}
- name: Copy opensuse specfile to rpm build location
run: cp ${{ env.SPEC_FILE }} /usr/src/packages/SPECS
- name: Create rpm binary file
run: |
cd /usr/src/packages/SPECS
rpmbuild -bb lightly.spec
rpmbuild -bb darkly.spec
rpm_file=$(find /usr/src/packages/RPMS/x86_64 -name "*.rpm*" ! -name "*src*" ! -name "*debug*")
echo "rpm_file = $rpm_file"
mv $rpm_file /usr/src/packages/RPMS/x86_64/lightly-${{ inputs.version }}.openSUSE-tumbleweed.x86_64.rpm
echo "RPM_ASSET= /usr/src/packages/RPMS/x86_64/lightly-${{ inputs.version }}.openSUSE-tumbleweed.x86_64.rpm" >> "$GITHUB_ENV"
mv $rpm_file /usr/src/packages/RPMS/x86_64/darkly-${{ inputs.version }}.openSUSE-tumbleweed.x86_64.rpm
echo "RPM_ASSET= /usr/src/packages/RPMS/x86_64/darkly-${{ inputs.version }}.openSUSE-tumbleweed.x86_64.rpm" >> "$GITHUB_ENV"
- name: Release
uses: softprops/[email protected]
if: startsWith(github.ref, 'refs/tags/')
Expand Down
34 changes: 17 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.16)
project(lightly)
project(darkly)
set(PROJECT_VERSION "0.5.12")
set(PROJECT_VERSION_MAJOR 6)

Expand Down Expand Up @@ -44,7 +44,7 @@ function(build_qt5)
set(QT_MAJOR_VERSION 5)
include(KDEInstallDirs5)
include(KDECMakeSettings)
option(WITH_DECORATIONS "Build Lightly window decorations for KWin" ON)
option(WITH_DECORATIONS "Build Darkly window decorations for KWin" ON)

find_package(Qt5 ${QT5_MIN_VERSION} REQUIRED CONFIG COMPONENTS Widgets DBus)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Expand Down Expand Up @@ -75,13 +75,13 @@ function(build_qt5)
TYPE OPTIONAL
PURPOSE "Required to use KStyle convenience functionalities in style")

set(LIGHTLY_HAVE_KSTYLE ${KF5FrameworkIntegration_FOUND})
set(LIGHTLY_HAVE_QTQUICK ${Qt5Quick_FOUND})
set(DARKLY_HAVE_KSTYLE ${KF5FrameworkIntegration_FOUND})
set(DARKLY_HAVE_QTQUICK ${Qt5Quick_FOUND})


#add_subdirectory(colors)
add_subdirectory(kstyle kstyle5)
add_subdirectory(liblightlycommon liblightlycommon5)
add_subdirectory(libdarklycommon libdarklycommon5)
#add_subdirectory(misc)
unset(QUERY_EXECUTABLE CACHE)
endfunction()
Expand All @@ -95,7 +95,7 @@ function(build_qt6)
include(KDEInstallDirs6)
include(KDECMakeSettings)

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

find_package(Qt6 ${QT_MIN_VERSION} REQUIRED CONFIG COMPONENTS Widgets DBus)
find_package(KF6 ${KF6_MIN_VERSION} REQUIRED COMPONENTS
Expand Down Expand Up @@ -127,8 +127,8 @@ function(build_qt6)
TYPE OPTIONAL
PURPOSE "Required to use KStyle convenience functionalities in style")

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


add_library(Qt::Core ALIAS Qt6::Core)
Expand All @@ -141,7 +141,7 @@ function(build_qt6)

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

if(WITH_DECORATIONS)
Expand All @@ -153,23 +153,23 @@ function(build_qt6)

# 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"
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kstyle6/config/lightlystyleversion.h"
ecm_setup_version(${PROJECT_VERSION} VARIABLE_PREFIX DARKLY
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/DarklyConfigVersion.cmake"
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kstyle6/config/darklystyleversion.h"
)



set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/Lightly")
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/Darkly")

configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/LightlyConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/LightlyConfig.cmake"
configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/DarklyConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/DarklyConfig.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"
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/DarklyConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/DarklyConfigVersion.cmake"
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
COMPONENT Devel
)
Expand Down
Loading

0 comments on commit 7a92829

Please sign in to comment.