Skip to content
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
5 changes: 5 additions & 0 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,11 @@ To disable: `-DSERVICE_PIPEWIRE=OFF`

Dependencies: `libpipewire`

### OSS
This feature enables sound system support on FreeBSD.

To disable: `-DSERVICE_OSS=OFF`

### StatusNotifier / System Tray
This feature enables system tray support using the status notifier dbus protocol.

Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ boption(ASAN "ASAN (dev)" OFF) # note: better output with gcc than clang
boption(FRAME_POINTERS "Keep Frame Pointers (dev)" ${ASAN})

if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
boption(SERVICE_OSS "Open Sound System" ON)
boption(CRASH_REPORTER "Crash Handling" OFF)
boption(USE_JEMALLOC "Use jemalloc" OFF)
else()
Expand Down Expand Up @@ -78,6 +79,7 @@ boption(SERVICE_UPOWER "UPower" ON)
boption(SERVICE_NOTIFICATIONS "Notifications" ON)
boption(BLUETOOTH "Bluetooth" ON)
boption(NETWORK "Network" ON)
boption(SERVICE_OSS "Open Sound System" OFF)

include(cmake/install-qml-module.cmake)
include(cmake/util.cmake)
Expand Down
1 change: 1 addition & 0 deletions changelog/next.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ set shell id.

## New Features

- Added support for OSS on FreeBSD.
- Added support for creating Polkit agents.
- Added support for creating wayland idle inhibitors.
- Added support for wayland idle timeouts.
Expand Down
2 changes: 2 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
withWayland ? true,
withX11 ? true,
withPipewire ? true,
withOSS ? false,
withPam ? true,
withHyprland ? true,
withI3 ? true,
Expand Down Expand Up @@ -95,6 +96,7 @@
(lib.cmakeBool "WAYLAND" withWayland)
(lib.cmakeBool "SCREENCOPY" (libgbm != null))
(lib.cmakeBool "SERVICE_PIPEWIRE" withPipewire)
(lib.cmakeBool "SERVICE_OSS" withOSS)
(lib.cmakeBool "SERVICE_PAM" withPam)
(lib.cmakeBool "SERVICE_NETWORKMANAGER" withNetworkManager)
(lib.cmakeBool "SERVICE_POLKIT" withPolkit)
Expand Down
5 changes: 4 additions & 1 deletion src/core/logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
#include <sys/sendfile.h>
#include <sys/types.h>
#endif
#ifdef __FreeBSD__
#include <unistd.h>
#endif

#include "instanceinfo.hpp"
#include "logcat.hpp"
Expand Down Expand Up @@ -67,7 +70,7 @@ bool copyFileData(int sourceFd, int destFd, qint64 size) {
return true;
#else
std::array<char, 64 * 1024> buffer = {};
auto remaining = totalTarget;
auto remaining = usize;

while (remaining > 0) {
auto chunk = std::min(remaining, buffer.size());
Expand Down
4 changes: 4 additions & 0 deletions src/services/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ endif()
if (SERVICE_NOTIFICATIONS)
add_subdirectory(notifications)
endif()

if (SERVICE_OSS)
add_subdirectory(oss)
endif()
13 changes: 13 additions & 0 deletions src/services/oss/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
qt_add_library(quickshell-service-oss STATIC
oss.cpp
)

qt_add_qml_module(quickshell-service-oss
URI Quickshell.Services.OSS
VERSION 0.1
DEPENDENCIES QtQml
)

install_qml_module(quickshell-service-oss)

target_link_libraries(quickshell PRIVATE quickshell-service-ossplugin Qt6::Core)
6 changes: 6 additions & 0 deletions src/services/oss/module.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name = "Quickshell.Services.OSS"
description = "Open Sound System (FreeBSD)"
headers = [
"oss.hpp",
]
-----
Loading