Compare commits

..

24 commits
v0.1.1 ... main

Author SHA1 Message Date
56d993aced
README: update status
Some checks failed
Build / nix (push) Has been cancelled
2025-11-06 20:45:12 +00:00
Blaadick
629b15c19f
core: Custom QT_QUICK_CONTROLS_STYLE fix (#20)
Some checks failed
Build / nix (push) Has been cancelled
2025-09-28 19:23:48 +02:00
VuaTech
5ffdfc13ed
cmake: Added find_package entry for WaylandClientPrivate (#19)
Some checks failed
Build / nix (push) Has been cancelled
2025-09-12 18:32:35 +02:00
119bcb9aa7
version: bump to 0.1.5
Some checks failed
Build / nix (push) Has been cancelled
2025-09-10 13:41:48 +01:00
b308a818b9
donate-screen: add hyprperks mentions
Some checks failed
Build / nix (push) Has been cancelled
2025-07-29 22:10:01 +02:00
b13c7481e3
CI/Nix: add cache-nix-action
Some checks failed
Build / nix (push) Has been cancelled
Use nixbuild/nix-quick-install-action which pairs well with
nix-community/cache-nix-action.

Should help with build times by reducing the number of packages needing
to be re-downloaded on each run.

Parameters are taken from https://github.com/nix-community/cache-nix-action
and may be tweaked later.
2025-06-20 01:23:32 +03:00
Friday
396e8aa1c0
nix: use gcc15 (#15)
Some checks failed
Build / nix (push) Has been cancelled
also updated dependencies
2025-06-05 21:36:16 +01:00
4be1d324fa
version: bump to 0.1.4
Some checks failed
Build / nix (push) Has been cancelled
2025-04-29 19:31:34 +01:00
e0514a390b
update-screen: add icon for support button 2025-04-29 19:31:22 +01:00
5917536fb5
donate-screen: add heart icon 2025-04-29 19:29:54 +01:00
3504a293c8
CI: remove deprecated magic-nix-cache-action
Some checks failed
Build / nix (push) Has been cancelled
2025-02-08 23:09:43 +02:00
matt1432
96bf0677fa chore: add result to gitignore
Some checks failed
Build / nix (push) Has been cancelled
2025-01-27 14:41:51 +02:00
matt1432
5d979b5a5d nix: fix duplicate inputs 2025-01-27 14:41:51 +02:00
9c0831ff98
flake.lock: update
Some checks failed
Build / nix (push) Has been cancelled
2025-01-25 15:30:48 +02:00
a9852dbf5a
flake.lock: update
Some checks failed
Build / nix (push) Has been cancelled
2025-01-23 14:20:10 +02:00
Manu Cornet
534cd1badc
README: Add build instructions (#8)
Some checks failed
Build / nix (push) Has been cancelled
2025-01-13 14:20:15 +01:00
b0214844d8 version: bump to 0.1.3
Some checks failed
Build / nix (push) Has been cancelled
2025-01-10 16:51:04 +01:00
8c9483a21f
nix: move to hyprland-qt-support (#7)
Some checks failed
Build / nix (push) Has been cancelled
2025-01-08 23:17:52 +00:00
196e043cd9 core: move to hyprland-qt-support instead of KDE's qqc2
Some checks are pending
Build / nix (push) Waiting to run
2025-01-08 23:07:04 +01:00
6cc1cf51f2 utils: add donate-screen
Some checks failed
Build / nix (push) Has been cancelled
2025-01-07 14:53:19 +01:00
6997fe382d version: bump to 0.1.2
Some checks failed
Build / nix (push) Has been cancelled
2025-01-05 23:07:18 +01:00
8fcc443630 update-screen: add a support button 2025-01-05 23:07:05 +01:00
c77109d7e1
flake.lock: update
Some checks failed
Build / nix (push) Has been cancelled
2024-12-23 00:27:52 +02:00
3833097e50
Nix: remove unneeded kirigami-addons 2024-12-11 20:02:08 +02:00
23 changed files with 423 additions and 40 deletions

View file

@ -7,8 +7,35 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Install Nix
uses: nixbuild/nix-quick-install-action@v31
with:
nix_conf: |
keep-env-derivations = true
keep-outputs = true
- name: Restore and save Nix store
uses: nix-community/cache-nix-action@v6
with:
# restore and save a cache using this key
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
# if there's no cache hit, restore a cache by this prefix
restore-prefixes-first-match: nix-${{ runner.os }}-
# collect garbage until the Nix store size (in bytes) is at most this number
# before trying to save a new cache
# 1G = 1073741824
gc-max-store-size-linux: 1G
# do purge caches
purge: true
# purge all versions of the cache
purge-prefixes: nix-${{ runner.os }}-
# created more than this number of seconds ago
purge-created: 0
# or, last accessed more than this number of seconds ago
# relative to the start of the `Post Restore and save Nix store` phase
purge-last-accessed: 0
# except any version with the key that is the same as the `primary-key`
purge-primary-key: never
# not needed (yet)
# - uses: cachix/cachix-action@v12

6
.gitignore vendored
View file

@ -33,4 +33,8 @@
build/
.cache/
.vscode/
.vscode/
.idea/
# nix
result*

View file

@ -18,4 +18,5 @@ qt_standard_project_setup(REQUIRES 6.5)
add_subdirectory(utils/dialog)
add_subdirectory(utils/update-screen)
add_subdirectory(utils/donate-screen)

View file

@ -1,7 +1,18 @@
# Hyprland QT utils
> [!IMPORTANT]
> This repo has been superseded by ![hyprland-guiutils](https://github.com/hyprwm/hyprland-guiutils)
This repo houses some qt/qml utilities that might be used by various hypr* apps.
## Dependencies
This depends on qt6 and qt6-qml, as well as qqc2-desktop-style from KDE.
This depends on qt6 and qt6-qml, as well as hyprland-qt-support.
## Building
You can build it with this command:
```sh
cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build
cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF`
```

View file

@ -1 +1 @@
0.1.1
0.1.5

73
flake.lock generated
View file

@ -1,7 +1,10 @@
{
"nodes": {
"hyprutils": {
"hyprland-qt-support": {
"inputs": {
"hyprlang": [
"hyprlang"
],
"nixpkgs": [
"nixpkgs"
],
@ -10,11 +13,60 @@
]
},
"locked": {
"lastModified": 1732288281,
"narHash": "sha256-XTU9B53IjGeJiJ7LstOhuxcRjCOFkQFl01H78sT9Lg4=",
"lastModified": 1749154592,
"narHash": "sha256-DO7z5CeT/ddSGDEnK9mAXm1qlGL47L3VAHLlLXoCjhE=",
"owner": "hyprwm",
"repo": "hyprland-qt-support",
"rev": "4c8053c3c888138a30c3a6c45c2e45f5484f2074",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-qt-support",
"type": "github"
}
},
"hyprlang": {
"inputs": {
"hyprutils": "hyprutils",
"nixpkgs": [
"nixpkgs"
],
"systems": [
"systems"
]
},
"locked": {
"lastModified": 1749145882,
"narHash": "sha256-qr0KXeczF8Sma3Ae7+dR2NHhvG7YeLBJv19W4oMu6ZE=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "1bfb84f54d50c7ae6558c794d3cfd5f6a7e6e676",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprlang",
"type": "github"
}
},
"hyprutils": {
"inputs": {
"nixpkgs": [
"hyprlang",
"nixpkgs"
],
"systems": [
"hyprlang",
"systems"
]
},
"locked": {
"lastModified": 1749135356,
"narHash": "sha256-Q8mAKMDsFbCEuq7zoSlcTuxgbIBVhfIYpX0RjE32PS0=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "b26f33cc1c8a7fd5076e19e2cce3f062dca6351c",
"rev": "e36db00dfb3a3d3fdcc4069cb292ff60d2699ccb",
"type": "github"
},
"original": {
@ -25,11 +77,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1733392399,
"narHash": "sha256-kEsTJTUQfQFIJOcLYFt/RvNxIK653ZkTBIs4DG+cBns=",
"lastModified": 1748929857,
"narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d0797a04b81caeae77bcff10a9dde78bc17f5661",
"rev": "c2a03962b8e24e669fb37b7df10e7c79531ff1a4",
"type": "github"
},
"original": {
@ -41,7 +93,12 @@
},
"root": {
"inputs": {
"hyprutils": "hyprutils",
"hyprland-qt-support": "hyprland-qt-support",
"hyprlang": "hyprlang",
"hyprutils": [
"hyprlang",
"hyprutils"
],
"nixpkgs": "nixpkgs",
"systems": "systems"
}

View file

@ -5,8 +5,17 @@
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default-linux";
hyprutils = {
url = "github:hyprwm/hyprutils";
hyprlang = {
url = "github:hyprwm/hyprlang";
inputs.nixpkgs.follows = "nixpkgs";
inputs.systems.follows = "systems";
};
hyprutils.follows = "hyprlang/hyprutils";
hyprland-qt-support = {
url = "github:hyprwm/hyprland-qt-support";
inputs.hyprlang.follows = "hyprlang";
inputs.nixpkgs.follows = "nixpkgs";
inputs.systems.follows = "systems";
};
@ -34,5 +43,12 @@
default = self.packages.${system}.hyprland-qtutils;
inherit (pkgsFor.${system}) hyprland-qtutils;
});
devShells = eachSystem (system: {
default = import ./nix/shell.nix {
pkgs = pkgsFor.${system};
inherit (pkgsFor.${system}) hyprland-qtutils;
};
});
};
}

View file

@ -4,7 +4,7 @@
cmake,
pkg-config,
hyprutils,
kdePackages,
hyprland-qt-support,
pciutils,
qt6,
version ? "0",
@ -32,7 +32,7 @@ in
buildInputs = [
hyprutils
kdePackages.kirigami-addons
hyprland-qt-support
qt6.qtbase
qt6.qtsvg
qt6.qtwayland

View file

@ -15,9 +15,10 @@ in {
hyprland-qtutils = lib.composeManyExtensions [
inputs.hyprutils.overlays.default
inputs.hyprland-qt-support.overlays.default
(final: prev: {
hyprland-qtutils = final.callPackage ./. {
stdenv = final.gcc14Stdenv;
stdenv = final.gcc15Stdenv;
version = "${version}+date=${date}_${self.shortRev or "dirty"}";
};
})

26
nix/shell.nix Normal file
View file

@ -0,0 +1,26 @@
{
pkgs ? import <nixpkgs> {},
hyprland-qtutils ? pkgs.callPackage ./default.nix {},
...
}: pkgs.mkShell {
inputsFrom = [ hyprland-qtutils ];
nativeBuildInputs = [ pkgs.clang-tools pkgs.pciutils ];
shellHook = let
inherit (pkgs.lib.strings) concatMapStringsSep;
qtLibPath = f: concatMapStringsSep ":" f (with pkgs.qt6; [
qtbase
qtdeclarative
qtwayland
pkgs.hyprland-qt-support
]);
in ''
# Add Qt-related environment variables.
export QT_PLUGIN_PATH=${qtLibPath (p: "${p}/lib/qt-6/plugins")}
export QML2_IMPORT_PATH=${qtLibPath (p: "${p}/lib/qt-6/qml")}
# Generate compile_commands.json
CMAKE_EXPORT_COMPILE_COMMANDS=1 cmake -S . -B ./build
ln -s build/compile_commands.json .
'';
}

View file

@ -5,7 +5,7 @@ project(hyprland-dialog VERSION ${VER} LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt6 6.5 REQUIRED COMPONENTS Widgets Quick QuickControls2 WaylandClient)
find_package(Qt6 6.5 REQUIRED COMPONENTS Widgets Quick QuickControls2 WaylandClient WaylandClientPrivate)
find_package(PkgConfig REQUIRED)
pkg_check_modules(hyprutils REQUIRED IMPORTED_TARGET hyprutils)
@ -24,7 +24,7 @@ qt_add_qml_module(hyprland-dialog
)
target_link_libraries(hyprland-dialog PRIVATE
Qt6::Widgets Qt6::QuickControls2 Qt6::WaylandClientPrivate PkgConfig::hyprutils
Qt6::Quick Qt6::QuickControls2 Qt6::WaylandClientPrivate PkgConfig::hyprutils
)

View file

@ -1,11 +1,11 @@
#include "Dialog.hpp"
#include <hyprutils/string/VarList.hpp>
#include <print>
#include <qapplication.h>
#include <qqmlapplicationengine.h>
#include <qquickstyle.h>
#include <qtenvironmentvariables.h>
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include <QQuickStyle>
#include <QtEnvironmentVariables>
#include <print>
#include <hyprutils/string/VarList.hpp>
using namespace Hyprutils::String;
@ -75,11 +75,11 @@ int main(int argc, char* argv[]) {
return 1;
}
QApplication app(argc, argv);
QGuiApplication app(argc, argv);
app.setApplicationName(appTitle.isEmpty() ? dialog->title : appTitle);
if (qEnvironmentVariableIsEmpty("QT_QUICK_CONTROLS_STYLE"))
QQuickStyle::setStyle("org.kde.desktop");
QQuickStyle::setStyle("org.hyprland.style");
QQmlApplicationEngine engine;
engine.rootContext()->setContextProperty("dialog", dialog);

View file

@ -0,0 +1,42 @@
cmake_minimum_required(VERSION 3.16)
project(hyprland-donate-screen VERSION ${VER} LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt6 6.5 REQUIRED COMPONENTS Widgets Quick QuickControls2 WaylandClient WaylandClientPrivate)
find_package(PkgConfig REQUIRED)
pkg_check_modules(hyprutils REQUIRED IMPORTED_TARGET hyprutils)
qt_standard_project_setup(REQUIRES 6.5)
qt_add_executable(hyprland-donate-screen
main.cpp
DonateScreen.cpp
)
qt_add_qml_module(hyprland-donate-screen
URI org.hyprland.donate-screen
VERSION 1.0
QML_FILES main.qml
)
qt_add_resources(hyprland-donate-screen "assets"
PREFIX "/"
FILES
assets/heart.svg
)
target_link_libraries(hyprland-donate-screen PRIVATE
Qt6::Quick Qt6::QuickControls2 Qt6::WaylandClientPrivate PkgConfig::hyprutils
)
include(GNUInstallDirs)
install(TARGETS hyprland-donate-screen
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

View file

@ -0,0 +1,19 @@
#include "DonateScreen.hpp"
#include <print>
#include <QDesktopServices>
#include <hyprutils/string/String.hpp>
#include <hyprutils/os/Process.hpp>
using namespace Hyprutils::String;
CDonateScreen::CDonateScreen(QObject* parent) : QObject(parent) {
;
}
void CDonateScreen::onButtonPress(QString buttonName) {
if (buttonName == "quit")
exit(0);
if (buttonName == "donate")
QDesktopServices::openUrl(QUrl("https://account.hypr.land/pricing"));
}

View file

@ -0,0 +1,20 @@
#pragma once
#include <QObject>
#include <QQmlApplicationEngine>
#include <QPixmap>
#include <QIcon>
#include <qcontainerfwd.h>
#include <qqmlintegration.h>
#include <qtmetamacros.h>
class CDonateScreen : public QObject {
Q_OBJECT;
QML_NAMED_ELEMENT(DonateScreen);
QML_SINGLETON;
public:
explicit CDonateScreen(QObject* parent = nullptr);
Q_INVOKABLE void onButtonPress(QString buttonName = "");
};

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M19.5355 5.46448C21.4881 7.4171 21.4881 10.5829 19.5355 12.5355L12.7071 19.364C12.3166 19.7545 11.6834 19.7545 11.2929 19.364L4.46447 12.5355C2.51184 10.5829 2.51184 7.4171 4.46447 5.46448C6.0168 3.91215 7.89056 3.43683 9.78125 4.35939C10.5317 4.72556 11.5156 5.46448 12 6.4297C12.4844 5.46448 13.4683 4.72556 14.2187 4.35939C16.1094 3.43683 17.9832 3.91215 19.5355 5.46448Z" stroke="#f309e8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 698 B

View file

@ -0,0 +1,29 @@
#include "DonateScreen.hpp"
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include <QQuickStyle>
#include <QtEnvironmentVariables>
#include <hyprutils/string/VarList.hpp>
using namespace Hyprutils::String;
int main(int argc, char* argv[]) {
// disable logs to not trash the stdout
qputenv("QT_LOGGING_RULES", QByteArray("*.debug=false;qml=false"));
auto dialog = new CDonateScreen();
QGuiApplication app(argc, argv);
app.setApplicationName("Support Hyprland");
app.setApplicationDisplayName("Support Hyprland");
if (qEnvironmentVariableIsEmpty("QT_QUICK_CONTROLS_STYLE"))
QQuickStyle::setStyle("org.hyprland.style");
QQmlApplicationEngine engine;
engine.rootContext()->setContextProperty("donateScreen", dialog);
engine.load("qrc:/qt/qml/org/hyprland/donate-screen/main.qml");
return app.exec();
}

View file

@ -0,0 +1,102 @@
pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import './'
ApplicationWindow {
id: window
FontMetrics { id: fontMetrics }
property var windowPaddingH: 30
property var windowPaddingV: 3
minimumWidth: Math.max(fontMetrics.height * 9, mainLayout.Layout.minimumWidth) + mainLayout.anchors.margins * 2 + windowPaddingH * 2
minimumHeight: Math.max(fontMetrics.height * 9, mainLayout.Layout.minimumHeight) + mainLayout.anchors.margins * 2 + windowPaddingV * 2
maximumWidth: minimumWidth
maximumHeight: minimumHeight
visible: true
component Separator: Rectangle {
color: Qt.darker(system.windowText, 1.5)
}
component VSeparator: Separator {
implicitWidth: 1
Layout.fillHeight: true
Layout.topMargin: fontMetrics.height
Layout.bottomMargin: fontMetrics.height
}
component HSeparator: Separator {
implicitHeight: 1
Layout.fillWidth: true
Layout.leftMargin: fontMetrics.height * 8
Layout.rightMargin: fontMetrics.height * 8
}
SystemPalette {
id: system
colorGroup: SystemPalette.Active
}
ColumnLayout {
id: mainLayout
spacing: fontMetrics.height
anchors {
fill: parent
margins: 4
}
Text {
font.pointSize: fontMetrics.height
color: system.windowText
text: "Support Hyprland"
Layout.alignment: Qt.AlignHCenter
}
HSeparator {}
Text {
color: system.windowText
text: "Hyprland is maintained by volunteers, and led by one person in their free time.<br/>Your support is valuable, and helps fund Hyprland's continued existence.<br/><br/>You can donate once, or monthly, and it takes less than 5 minutes.<br/>We also have Hyprperks, which is 5€ + tax / mo, and gives you access to a few \"Thank you\" goodies from us."
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
textFormat: TextEdit.RichText
onLinkActivated: Qt.openUrlExternally(link)
}
Rectangle {
color: "transparent"
Layout.minimumHeight: 4
Layout.fillHeight: true
}
RowLayout {
spacing: 6
Layout.leftMargin: 20
Layout.alignment: Qt.AlignRight
Button {
icon.color: "transparent"
icon.source: "qrc:/assets/heart.svg"
icon.height: 18
icon.width: 18
text: "Donate"
onClicked: (e) => {
donateScreen.onButtonPress("donate");
}
}
Button {
text: "No thanks"
onClicked: (e) => {
donateScreen.onButtonPress("quit");
}
}
}
}
}

View file

@ -5,7 +5,7 @@ project(hyprland-update-screen VERSION ${VER} LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt6 6.5 REQUIRED COMPONENTS Widgets Quick QuickControls2 WaylandClient)
find_package(Qt6 6.5 REQUIRED COMPONENTS Widgets Quick QuickControls2 WaylandClient WaylandClientPrivate)
find_package(PkgConfig REQUIRED)
pkg_check_modules(hyprutils REQUIRED IMPORTED_TARGET hyprutils)
@ -25,8 +25,14 @@ qt_add_qml_module(hyprland-update-screen
QML_FILES main.qml dialogMain.qml
)
qt_add_resources(hyprland-update-screen "assets"
PREFIX "/"
FILES
assets/heart.svg
)
target_link_libraries(hyprland-update-screen PRIVATE
Qt6::Widgets Qt6::QuickControls2 Qt6::WaylandClientPrivate PkgConfig::hyprutils
Qt6::Quick Qt6::QuickControls2 Qt6::WaylandClientPrivate PkgConfig::hyprutils
)

View file

@ -1,6 +1,7 @@
#include "UpdateScreen.hpp"
#include <print>
#include <QDesktopServices>
#include <hyprutils/string/String.hpp>
#include <hyprutils/os/Process.hpp>
@ -13,4 +14,6 @@ CUpdateScreen::CUpdateScreen(QObject* parent) : QObject(parent) {
void CUpdateScreen::onButtonPress(QString buttonName) {
if (buttonName == "quit")
exit(0);
if (buttonName == "donate")
QDesktopServices::openUrl(QUrl("https://hyprland.org/support"));
}

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M19.5355 5.46448C21.4881 7.4171 21.4881 10.5829 19.5355 12.5355L12.7071 19.364C12.3166 19.7545 11.6834 19.7545 11.2929 19.364L4.46447 12.5355C2.51184 10.5829 2.51184 7.4171 4.46447 5.46448C6.0168 3.91215 7.89056 3.43683 9.78125 4.35939C10.5317 4.72556 11.5156 5.46448 12 6.4297C12.4844 5.46448 13.4683 4.72556 14.2187 4.35939C16.1094 3.43683 17.9832 3.91215 19.5355 5.46448Z" stroke="#f309e8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 698 B

View file

@ -1,12 +1,12 @@
#include "UpdateScreen.hpp"
#include <hyprutils/string/VarList.hpp>
#include <print>
#include <qapplication.h>
#include <qqmlapplicationengine.h>
#include <qquickstyle.h>
#include <qtenvironmentvariables.h>
#include <QQmlContext>
#include "Dialog.hpp"
#include "UpdateScreen.hpp"
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include <QQuickStyle>
#include <QtEnvironmentVariables>
#include <print>
#include <hyprutils/string/VarList.hpp>
using namespace Hyprutils::String;
@ -40,12 +40,12 @@ int main(int argc, char* argv[]) {
return 1;
}
QApplication app(argc, argv);
QGuiApplication app(argc, argv);
app.setApplicationName("Hyprland Updated!");
app.setApplicationDisplayName("Hyprland Updated");
if (qEnvironmentVariableIsEmpty("QT_QUICK_CONTROLS_STYLE"))
QQuickStyle::setStyle("org.kde.desktop");
QQuickStyle::setStyle("org.hyprland.style");
// This entire mechanism fucking sucks,
// but I also suck at qml and I want to avoid spawning a new process as it takes a while.

View file

@ -79,6 +79,17 @@ ApplicationWindow {
Layout.leftMargin: 20
Layout.alignment: Qt.AlignRight
Button {
icon.color: "transparent"
icon.source: "qrc:/assets/heart.svg"
icon.height: 18
icon.width: 18
text: "Support the project"
onClicked: (e) => {
updateScreen.onButtonPress("donate");
}
}
Button {
text: "Don't show this when I update"
onClicked: (e) => {