Skip to content

Commit

Permalink
Merge pull request #163 from arcan1s/feature/plasma6
Browse files Browse the repository at this point in the history
Migrate to plasma 6
  • Loading branch information
arcan1s authored Mar 27, 2024
2 parents eecb128 + 63f1aa8 commit 576a472
Show file tree
Hide file tree
Showing 176 changed files with 2,581 additions and 3,807 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
run: pacman -Sy --noconfirm base-devel cmake extra-cmake-modules python util-linux-libs xorg-server-xvfb

- name: install dependencies
run: pacman -S --noconfirm plasma-workspace ksysguard
run: pacman -S --noconfirm plasma-workspace

- name: configure cmake
run: cmake -B build -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_FUTURE=ON -DBUILD_TESTING=ON sources
run: cmake -B build -S sources -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_FUTURE=ON -DBUILD_TESTING=ON

- name: build
working-directory: /repo/build
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ jobs:
env:
VERSION: ${{ steps.version.outputs.VERSION }}

- name: build debian package
run: |
sudo apt update && \
sudo apt install -yq cmake extra-cmake-modules g++ git gettext make && \
sudo apt install -yq libkf5i18n-dev libkf5notifications-dev libkf5service-dev \
libkf5windowsystem-dev libkf5plasma-dev qtbase5-dev qtdeclarative5-dev \
plasma-workspace-dev && \
cmake -B build-deb -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Optimization -DBUILD_FUTURE=ON -DBUILD_DEB_PACKAGE=ON sources && \
cd build-deb && \
make package && \
cd ..
# - name: build debian package
# run: |
# sudo apt update && \
# sudo apt install -yq cmake extra-cmake-modules g++ git gettext make && \
# sudo apt install -yq libkf5i18n-dev libkf5notifications-dev libkf5service-dev \
# libkf5windowsystem-dev libkf5plasma-dev qtbase5-dev qtdeclarative5-dev \
# plasma-workspace-dev && \
# cmake -B build-deb -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Optimization -DBUILD_FUTURE=ON -DBUILD_DEB_PACKAGE=ON sources && \
# cd build-deb && \
# make package && \
# cd ..

- name: release
uses: softprops/action-gh-release@v1
Expand All @@ -45,7 +45,7 @@ jobs:
${{ steps.changelog.outputs.changelog }}
files: |
awesome-widgets-*-src.tar.xz
build-deb/plasma-widget-awesome-widgets-*.deb
# build-deb/plasma-widget-awesome-widgets-*.deb
fail_on_unmatched_files: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 3 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Ver.4.0.0:
* migration to plasma 6

Ver.3.5.0:
+ wayland support
* update code to latest standards
Expand All @@ -12,7 +15,6 @@ Ver.3.4.2:
* update to new qt api
- fix non printable spaces (#142, #143)


Ver.3.3.3:
+ add custom keys support (#101)
* DBus interface improvements
Expand Down
41 changes: 15 additions & 26 deletions packages/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,41 +1,30 @@
# Maintainer: Evgeniy Alekseev <arcanis at archlinux dot org>

pkgname=plasma5-applet-awesome-widgets
pkgname=plasma6-applet-awesome-widgets
_pkgname=awesome-widgets
pkgver=3.4.3
pkgver=4.0.0alpha2
pkgrel=1
pkgdesc="Collection of minimalistic Plasmoids which look like Awesome WM widgets (ex-PyTextMonitor)"
arch=('i686' 'x86_64')
arch=('x86_64')
url="https://arcanis.me/projects/awesome-widgets"
license=('GPL3')
depends=('ksysguard' 'plasma-framework')
optdepends=("catalyst: for GPU monitor"
"hddtemp: for HDD temperature monitor"
"smartmontools: for HDD temperature monitor"
"mpd: for music player monitor"
"nvidia-utils: for GPU monitor")
depends=('plasma-workspace')
optdepends=("mpd: for music player monitor")
makedepends=('cmake' 'extra-cmake-modules' 'python')
source=(https://github.com/arcan1s/awesome-widgets/releases/download/V.${pkgver}/${_pkgname}-${pkgver}-src.tar.xz)
install=${pkgname}.install
md5sums=('5953ba518191bb6fff83cdb8633c735c')
source=(https://github.com/arcan1s/awesome-widgets/releases/download/${pkgver}/${_pkgname}-${pkgver}-src.tar.xz)
install="$pkgname.install"
backup=('etc/xdg/plasma-dataengine-extsysmon.conf')

prepare() {
rm -rf "${srcdir}/build"
mkdir "${srcdir}/build"
}

build () {
cd "${srcdir}/build"
cmake -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
-DCMAKE_BUILD_TYPE=Optimization \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_FUTURE=ON \
"../${_pkgname}"
make
cmake -B build -S "${_pkgname}" \
-DCMAKE_BUILD_TYPE=Optimization \
-DBUILD_FUTURE=ON \
-DBUILD_TESTING=OFF
cmake --build build
}

package() {
cd "${srcdir}/build"
make DESTDIR="${pkgdir}" install
DESTDIR="$pkgdir" cmake --install build
}

sha256sums=('b2a7b07a1df6f710f4e0d6e5898933f4ddb131818b922dc4b8e48afe3e98a664')
75 changes: 0 additions & 75 deletions sources/3rdparty/fontdialog/fontdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,81 +39,6 @@ void CFont::setCurrentColor(const QColor color)
}


int CFont::html2QFont(const int htmlWeight)
{
int weight = 16;
switch(htmlWeight) {
case 100:
weight = 16;
break;
case 200:
case 300:
weight = 25;
break;
case 400:
weight = 50;
break;
case 500:
case 600:
weight = 63;
break;
case 700:
case 800:
weight = 75;
break;
case 900:
weight = 87;
break;
default:
break;
}

return weight;
}


int CFont::qFont2html(const int weight)
{
int htmlWeight = 400;
switch(weight) {
case 16:
htmlWeight = 100;
break;
case 25:
htmlWeight = 300;
break;
case 50:
htmlWeight = 400;
break;
case 63:
htmlWeight = 600;
break;
case 75:
htmlWeight = 800;
break;
case 87:
htmlWeight = 900;
break;
default:
break;
}

return htmlWeight;
}


int CFont::htmlWeight()
{
return CFont::qFont2html(weight());
}


void CFont::setHtmlWeight(const int htmlWeight)
{
setWeight(CFont::html2QFont(htmlWeight));
}


CFont CFont::fromQFont(const QFont font, const QColor color)
{
return CFont(font.family(), font.pointSize(), font.weight(), font.italic(), color);
Expand Down
5 changes: 0 additions & 5 deletions sources/3rdparty/fontdialog/fontdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ class CFont : public QFont
// color properties
QColor color();
void setCurrentColor(const QColor color);
// html weight properties
static int html2QFont(const int htmlWeight);
static int qFont2html(const int weight);
int htmlWeight();
void setHtmlWeight(const int htmlWeight);
// conversion to QFont
static CFont fromQFont(const QFont font,
const QColor color = QColor(QString("#000000")));
Expand Down
6 changes: 3 additions & 3 deletions sources/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ project(awesomewidgets)
set(PROJECT_AUTHOR "Evgeniy Alekseev")
set(PROJECT_CONTACT "[email protected]")
set(PROJECT_LICENSE "GPL3")
set(PROJECT_VERSION_MAJOR "3")
set(PROJECT_VERSION_MINOR "5")
set(PROJECT_VERSION_PATCH "1")
set(PROJECT_VERSION_MAJOR "4")
set(PROJECT_VERSION_MINOR "0")
set(PROJECT_VERSION_PATCH "0")
set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
# append git version if any
set(PROJECT_COMMIT_SHA "Commit hash" CACHE INTERNAL "")
Expand Down
2 changes: 1 addition & 1 deletion sources/awesome-widget/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set(SUBPROJECT plasma_applet_awesome-widget)
message(STATUS "Subproject ${SUBPROJECT}")

configure_file(metadata.desktop ${CMAKE_CURRENT_SOURCE_DIR}/package/metadata.desktop)
configure_file(metadata.json ${CMAKE_CURRENT_SOURCE_DIR}/package/metadata.json)

add_subdirectory(plugin)
plasma_install_package(package org.kde.plasma.awesomewidget)
26 changes: 0 additions & 26 deletions sources/awesome-widget/metadata.desktop

This file was deleted.

26 changes: 26 additions & 0 deletions sources/awesome-widget/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"KPackageStructure": "Plasma/Applet",
"KPlugin": {
"Authors": [
{
"Email": "[email protected]",
"Name": "Evgeniy Alekseev aka arcanis"
}
],
"Category": "System Information",
"Description": "A minimalistic Plasmoid",
"Description[en]": "A minimalistic Plasmoid",
"Description[es]": "Un script Plasmoïde minimaliste",
"Description[pt_BR]": "Um script Plasmoid",
"Description[ru]": "Минималистичный плазмоид",
"Description[uk]": "Мінімалістичний плазмоїд",
"EnabledByDefault": true,
"Icon": "utilities-system-monitor",
"Id": "org.kde.plasma.awesomewidget",
"License": "GPLv3",
"Name": "Awesome Widget",
"Version": "@PROJECT_VERSION@",
"Website": "https://arcanis.me/projects/awesome-widgets/"
},
"X-Plasma-API-Minimum-Version": "6.0"
}
2 changes: 1 addition & 1 deletion sources/awesome-widget/package/contents/config/config.qml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/

import QtQuick 2.0
import QtQuick 2.15

import org.kde.plasma.configuration 2.0

Expand Down
Loading

0 comments on commit 576a472

Please sign in to comment.