.offset, +- names.pitch, plane.stride, ++ names.offset, static_cast(plane.offset), ++ names.pitch, static_cast(plane.stride), + }); + // clang-format on + diff --git a/x11/quickshell/files/patch-src_core_logging.cpp b/x11/quickshell/files/patch-src_core_logging.cpp new file mode 100644 index 000000000000..eda74904e917 --- /dev/null +++ b/x11/quickshell/files/patch-src_core_logging.cpp @@ -0,0 +1,77 @@ +--- src/core/logging.cpp.orig 2025-10-12 00:14:14 UTC ++++ src/core/logging.cpp +@@ -27,7 +27,16 @@ + #include + #include + #include ++#if defined(__linux__) + #include ++#else ++#include ++#include ++#if defined(__NetBSD__) || defined(__DragonFly__) ++#include ++#include ++#endif ++#endif + + #include "instanceinfo.hpp" + #include "logcat.hpp" +@@ -389,7 +398,7 @@ void ThreadLogging::initFs() { + delete detailedFile; + detailedFile = nullptr; + } else { +- auto lock = flock { ++ struct flock lock { + .l_type = F_WRLCK, + .l_whence = SEEK_SET, + .l_start = 0, +@@ -411,7 +420,19 @@ void ThreadLogging::initFs() { + auto* oldFile = this->file; + if (oldFile) { + oldFile->seek(0); ++#if defined(__linux__) + sendfile(file->handle(), oldFile->handle(), nullptr, oldFile->size()); ++#elif defined(__FreeBSD__) ++ copy_file_range(oldFile->handle(), nullptr, file->handle(), nullptr, oldFile->size(), 0); ++#elif defined(__NetBSD__) || defined(__DragonFly__) ++ sendfile(oldFile->handle(), file->handle(), 0, oldFile->size(), nullptr, nullptr, 0); ++#elif defined(__OpenBSD__) ++ constexpr size_t BUF_SIZE = 1 << 20; ++ char buf[BUF_SIZE]; ++ ssize_t r = read(oldFile->handle(), buf, oldFile->size() > BUF_SIZE ? BUF_SIZE : (size_t)oldFile->size()); ++ if (r > 0) ++ write(file->handle(), buf, r); ++#endif + } + + this->file = file; +@@ -423,7 +444,19 @@ void ThreadLogging::initFs() { + auto* oldFile = this->detailedFile; + if (oldFile) { + oldFile->seek(0); ++#if defined(__linux__) + sendfile(detailedFile->handle(), oldFile->handle(), nullptr, oldFile->size()); ++#elif defined(__FreeBSD__) ++ copy_file_range(oldFile->handle(), nullptr, detailedFile->handle(), nullptr, oldFile->size(), 0); ++#elif defined(__NetBSD__) || defined(__DragonFly__) ++ sendfile(oldFile->handle(), detailedFile->handle(), 0, oldFile->size(), nullptr, nullptr, 0); ++#elif defined(__OpenBSD__) ++ constexpr size_t BUF_SIZE = 1 << 20; ++ char buf[BUF_SIZE]; ++ ssize_t r = read(oldFile->handle(), buf, oldFile->size() > BUF_SIZE ? BUF_SIZE : (size_t)oldFile->size()); ++ if (r > 0) ++ write(detailedFile->handle(), buf, r); ++#endif + } + + crash::CrashInfo::INSTANCE.logFd = detailedFile->handle(); +@@ -886,7 +919,7 @@ void LogFollower::FcntlWaitThread::run() { + } + + void LogFollower::FcntlWaitThread::run() { +- auto lock = flock { ++ struct flock lock { + .l_type = F_RDLCK, // won't block other read locks when we take it + .l_whence = SEEK_SET, + .l_start = 0, diff --git a/x11/quickshell/files/patch-src_core_paths.cpp b/x11/quickshell/files/patch-src_core_paths.cpp new file mode 100644 index 000000000000..302d5948a8ff --- /dev/null +++ b/x11/quickshell/files/patch-src_core_paths.cpp @@ -0,0 +1,20 @@ +--- src/core/paths.cpp.orig 2025-10-12 00:14:14 UTC ++++ src/core/paths.cpp +@@ -346,7 +346,7 @@ void QsPaths::createLock() { + return; + } + +- auto lock = flock { ++ struct flock lock { + .l_type = F_WRLCK, + .l_whence = SEEK_SET, + .l_start = 0, +@@ -373,7 +373,7 @@ bool QsPaths::checkLock(const QString& path, InstanceL + auto file = QFile(QDir(path).filePath("instance.lock")); + if (!file.open(QFile::ReadOnly)) return false; + +- auto lock = flock { ++ struct flock lock { + .l_type = F_WRLCK, + .l_whence = SEEK_SET, + .l_start = 0, diff --git a/x11/quickshell/files/patch-src_core_toolsupport.cpp b/x11/quickshell/files/patch-src_core_toolsupport.cpp new file mode 100644 index 000000000000..15271acf6dd8 --- /dev/null +++ b/x11/quickshell/files/patch-src_core_toolsupport.cpp @@ -0,0 +1,11 @@ +--- src/core/toolsupport.cpp.orig 2025-10-12 00:14:14 UTC ++++ src/core/toolsupport.cpp +@@ -54,7 +54,7 @@ bool QmlToolingSupport::lockTooling() { + return false; + } + +- auto lock = flock { ++ struct flock lock { + .l_type = F_WRLCK, + .l_whence = SEEK_SET, // NOLINT (fcntl.h??) + .l_start = 0, diff --git a/x11/quickshell/files/patch-src_services_pam_conversation.cpp b/x11/quickshell/files/patch-src_services_pam_conversation.cpp new file mode 100644 index 000000000000..8269b0742fa1 --- /dev/null +++ b/x11/quickshell/files/patch-src_services_pam_conversation.cpp @@ -0,0 +1,10 @@ +--- src/services/pam/conversation.cpp.orig 2026-01-12 13:51:40 UTC ++++ src/services/pam/conversation.cpp +@@ -7,6 +7,7 @@ + #include + #include + #include ++#include + + #include "../../core/logcat.hpp" + #include "ipc.hpp" diff --git a/x11/quickshell/files/patch-src_services_pam_qml.hpp b/x11/quickshell/files/patch-src_services_pam_qml.hpp new file mode 100644 index 000000000000..7e91f062bda4 --- /dev/null +++ b/x11/quickshell/files/patch-src_services_pam_qml.hpp @@ -0,0 +1,12 @@ +--- src/services/pam/qml.hpp.orig 2025-10-12 00:14:14 UTC ++++ src/services/pam/qml.hpp +@@ -6,7 +6,9 @@ + #include + #include + #include ++#if defined(__linux__) + #include ++#endif + #include + + #include "conversation.hpp" diff --git a/x11/quickshell/files/patch-src_services_pam_subprocess.cpp b/x11/quickshell/files/patch-src_services_pam_subprocess.cpp new file mode 100644 index 000000000000..89f0e2ee7830 --- /dev/null +++ b/x11/quickshell/files/patch-src_services_pam_subprocess.cpp @@ -0,0 +1,24 @@ +--- src/services/pam/subprocess.cpp.orig 2025-10-12 00:14:14 UTC ++++ src/services/pam/subprocess.cpp +@@ -7,7 +7,9 @@ + #include + #include + #include ++#if defined(__linux__) + #include ++#endif + #include + #include + +@@ -83,7 +85,11 @@ PamIpcExitCode PamSubprocess::exec(const char* configD + logIf(this->log) << "Starting pam session for user \"" << user << "\" with config \"" << config + << "\" in dir \"" << configDir << "\"" << std::endl; + ++#if defined(__linux__) + auto result = pam_start_confdir(config, user, &conv, configDir, &handle); ++#else ++ auto result = pam_start(config, user, &conv, &handle); ++#endif + + if (result != PAM_SUCCESS) { + logIf(true) << "Unable to start pam conversation with error \"" << pam_strerror(handle, result) diff --git a/x11/quickshell/pkg-descr b/x11/quickshell/pkg-descr new file mode 100644 index 000000000000..51feff797655 --- /dev/null +++ b/x11/quickshell/pkg-descr @@ -0,0 +1,4 @@ +Quickshell is a toolkit for building status bars, widgets, +lockscreens, and other desktop components using QtQuick. It can be +used alongside your wayland compositor or window manager to build a +complete desktop environment. diff --git a/x11/quickshell/pkg-plist b/x11/quickshell/pkg-plist new file mode 100644 index 000000000000..1b531398a880 --- /dev/null +++ b/x11/quickshell/pkg-plist @@ -0,0 +1,62 @@ +bin/qs +bin/quickshell +%%QT_QMLDIR%%/Quickshell/Bluetooth/qmldir +%%QT_QMLDIR%%/Quickshell/Bluetooth/quickshell-bluetooth.qmltypes +%%QT_QMLDIR%%/Quickshell/DBusMenu/qmldir +%%QT_QMLDIR%%/Quickshell/DBusMenu/quickshell-dbusmenu.qmltypes +%%WAYLAND%%%%QT_QMLDIR%%/Quickshell/Hyprland/_FocusGrab/qmldir +%%WAYLAND%%%%QT_QMLDIR%%/Quickshell/Hyprland/_FocusGrab/quickshell-hyprland-focus-grab.qmltypes +%%WAYLAND%%%%QT_QMLDIR%%/Quickshell/Hyprland/_GlobalShortcuts/qmldir +%%WAYLAND%%%%QT_QMLDIR%%/Quickshell/Hyprland/_GlobalShortcuts/quickshell-hyprland-global-shortcuts.qmltypes +%%WAYLAND%%%%QT_QMLDIR%%/Quickshell/Hyprland/_Ipc/qmldir +%%WAYLAND%%%%QT_QMLDIR%%/Quickshell/Hyprland/_Ipc/quickshell-hyprland-ipc.qmltypes +%%WAYLAND%%%%QT_QMLDIR%%/Quickshell/Hyprland/_SurfaceExtensions/qmldir +%%WAYLAND%%%%QT_QMLDIR%%/Quickshell/Hyprland/_SurfaceExtensions/quickshell-hyprland-surface-extensions.qmltypes +%%WAYLAND%%%%QT_QMLDIR%%/Quickshell/Hyprland/qmldir +%%WAYLAND%%%%QT_QMLDIR%%/Quickshell/Hyprland/quickshell-hyprland.qmltypes +%%X11%%%%QT_QMLDIR%%/Quickshell/I3/_Ipc/qmldir +%%X11%%%%QT_QMLDIR%%/Quickshell/I3/_Ipc/quickshell-i3-ipc.qmltypes +%%X11%%%%QT_QMLDIR%%/Quickshell/I3/qmldir +%%X11%%%%QT_QMLDIR%%/Quickshell/I3/quickshell-i3.qmltypes +%%QT_QMLDIR%%/Quickshell/Io/FileView.qml +%%QT_QMLDIR%%/Quickshell/Io/qmldir +%%QT_QMLDIR%%/Quickshell/Io/quickshell-io.qmltypes +%%QT_QMLDIR%%/Quickshell/Services/Greetd/qmldir +%%QT_QMLDIR%%/Quickshell/Services/Greetd/quickshell-service-greetd.qmltypes +%%QT_QMLDIR%%/Quickshell/Services/Mpris/qmldir +%%QT_QMLDIR%%/Quickshell/Services/Mpris/quickshell-service-mpris.qmltypes +%%QT_QMLDIR%%/Quickshell/Services/Notifications/qmldir +%%QT_QMLDIR%%/Quickshell/Services/Notifications/quickshell-service-notifications.qmltypes +%%QT_QMLDIR%%/Quickshell/Services/Pam/qmldir +%%QT_QMLDIR%%/Quickshell/Services/Pam/quickshell-service-pam.qmltypes +%%PIPEWIRE%%%%QT_QMLDIR%%/Quickshell/Services/Pipewire/qmldir +%%PIPEWIRE%%%%QT_QMLDIR%%/Quickshell/Services/Pipewire/quickshell-service-pipewire.qmltypes +%%QT_QMLDIR%%/Quickshell/Services/SystemTray/qmldir +%%QT_QMLDIR%%/Quickshell/Services/SystemTray/quickshell-service-statusnotifier.qmltypes +%%QT_QMLDIR%%/Quickshell/Services/UPower/qmldir +%%QT_QMLDIR%%/Quickshell/Services/UPower/quickshell-service-upower.qmltypes +%%WAYLAND%%%%QT_QMLDIR%%/Quickshell/Wayland/_Screencopy/qmldir +%%WAYLAND%%%%QT_QMLDIR%%/Quickshell/Wayland/_Screencopy/quickshell-wayland-screencopy.qmltypes +%%WAYLAND%%%%QT_QMLDIR%%/Quickshell/Wayland/_ToplevelManagement/qmldir +%%WAYLAND%%%%QT_QMLDIR%%/Quickshell/Wayland/_ToplevelManagement/quickshell-wayland-toplevel-management.qmltypes +%%WAYLAND%%%%QT_QMLDIR%%/Quickshell/Wayland/_WlrLayerShell/qmldir +%%WAYLAND%%%%QT_QMLDIR%%/Quickshell/Wayland/_WlrLayerShell/quickshell-wayland-layershell.qmltypes +%%WAYLAND%%%%QT_QMLDIR%%/Quickshell/Wayland/qmldir +%%WAYLAND%%%%QT_QMLDIR%%/Quickshell/Wayland/quickshell-wayland.qmltypes +%%QT_QMLDIR%%/Quickshell/Widgets/ClippingRectangle.qml +%%QT_QMLDIR%%/Quickshell/Widgets/ClippingWrapperRectangle.qml +%%QT_QMLDIR%%/Quickshell/Widgets/ClippingWrapperRectangleInternal.qml +%%QT_QMLDIR%%/Quickshell/Widgets/IconImage.qml +%%QT_QMLDIR%%/Quickshell/Widgets/WrapperItem.qml +%%QT_QMLDIR%%/Quickshell/Widgets/WrapperMouseArea.qml +%%QT_QMLDIR%%/Quickshell/Widgets/WrapperRectangle.qml +%%QT_QMLDIR%%/Quickshell/Widgets/qmldir +%%QT_QMLDIR%%/Quickshell/Widgets/quickshell-widgets.qmltypes +%%X11%%%%QT_QMLDIR%%/Quickshell/X11/qmldir +%%X11%%%%QT_QMLDIR%%/Quickshell/X11/quickshell-x11.qmltypes +%%QT_QMLDIR%%/Quickshell/_Window/qmldir +%%QT_QMLDIR%%/Quickshell/_Window/quickshell-window.qmltypes +%%QT_QMLDIR%%/Quickshell/qmldir +%%QT_QMLDIR%%/Quickshell/quickshell-core.qmltypes +share/applications/org.quickshell.desktop +share/icons/hicolor/scalable/apps/org.quickshell.svg