Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,23 @@ To disable: `-DHYPRLAND_GLOBAL_SHORTCUTS=OFF`
[hyprland-global-shortcuts-v1]: https://github.com/hyprwm/hyprland-protocols/blob/main/protocols/hyprland-global-shortcuts-v1.xml

#### Hyprland Focus Grab
Enables windows to grab focus similarly to a context menu undr hyprland through the
Enables windows to grab focus similarly to a context menu under hyprland through the
[hyprland-focus-grab-v1] protocol. This feature has no extra dependencies.

To disable: `-DHYPRLAND_FOCUS_GRAB=OFF`

[hyprland-focus-grab-v1]: https://github.com/hyprwm/hyprland-protocols/blob/main/protocols/hyprland-focus-grab-v1.xml

### i3/Sway
Enables i3 and Sway specific features, does not have any dependency on Wayland or x11.

To disable: `-DI3=OFF`

#### i3/Sway IPC
Enables interfacing with i3 and Sway's IPC.

To disable: `-DI3_IPC=OFF`

## Building
*For developers and prospective contributors: See [CONTRIBUTING.md](CONTRIBUTING.md).*

Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ boption(HYPRLAND " Hyprland" ON REQUIRES WAYLAND)
boption(HYPRLAND_IPC " Hyprland IPC" ON REQUIRES HYPRLAND)
boption(HYPRLAND_GLOBAL_SHORTCUTS " Hyprland Global Shortcuts" ON REQUIRES HYPRLAND)
boption(HYPRLAND_FOCUS_GRAB " Hyprland Focus Grabbing" ON REQUIRES HYPRLAND)
boption(I3 " I3/Sway" ON)
boption(I3_IPC " I3/Sway IPC" ON REQUIRES I3)
boption(X11 "X11" ON)
boption(SERVICE_STATUS_NOTIFIER "System Tray" ON)
boption(SERVICE_PIPEWIRE "PipeWire" ON)
Expand Down
3 changes: 3 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ lint:
lint-ci:
find src -type f -name "*.cpp" -print0 | parallel -q0 --no-notice --will-cite --tty clang-tidy --load={{ env_var("TIDYFOX") }}

lint-changed:
git diff --name-only HEAD | grep "^.*\.cpp\$" | parallel --no-notice --will-cite --eta clang-tidy --load={{ env_var("TIDYFOX") }}

configure target='debug' *FLAGS='':
cmake -GNinja -B {{builddir}} \
-DCMAKE_BUILD_TYPE={{ if target == "debug" { "Debug" } else { "RelWithDebInfo" } }} \
Expand Down
2 changes: 2 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
withPipewire ? true,
withPam ? true,
withHyprland ? true,
withI3 ? true,
}: buildStdenv.mkDerivation {
pname = "quickshell${lib.optionalString debug "-debug"}";
version = "0.1.0";
Expand Down Expand Up @@ -81,6 +82,7 @@
(lib.cmakeBool "SERVICE_PIPEWIRE" withPipewire)
(lib.cmakeBool "SERVICE_PAM" withPam)
(lib.cmakeBool "HYPRLAND" withHyprland)
(lib.cmakeBool "I3" withI3)
];

# How to get debuginfo in gdb from a release build:
Expand Down
4 changes: 4 additions & 0 deletions src/x11/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ qt_add_qml_module(quickshell-x11
DEPENDENCIES QtQuick
)

if(I3)
add_subdirectory(i3)
endif()

install_qml_module(quickshell-x11)

add_library(quickshell-x11-init OBJECT init.cpp)
Expand Down
23 changes: 23 additions & 0 deletions src/x11/i3/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
qt_add_library(quickshell-i3 STATIC)

target_link_libraries(quickshell-i3 PRIVATE ${QT_DEPS})

set(I3_MODULES)

if (I3_IPC)
add_subdirectory(ipc)
list(APPEND I3_MODULES Quickshell.I3._Ipc)
endif()

qt_add_qml_module(quickshell-i3
URI Quickshell.I3
VERSION 0.1
IMPORTS ${I3_MODULES}
)

install_qml_module(quickshell-i3)

qs_pch(quickshell-i3)
qs_pch(quickshell-i3plugin)

target_link_libraries(quickshell PRIVATE quickshell-i3plugin)
22 changes: 22 additions & 0 deletions src/x11/i3/ipc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
qt_add_library(quickshell-i3-ipc STATIC
connection.cpp
qml.cpp
workspace.cpp
monitor.cpp
)

qt_add_qml_module(quickshell-i3-ipc
URI Quickshell.I3._Ipc
VERSION 0.1
DEPENDENCIES QtQml
)

qs_add_module_deps_light(quickshell-i3-ipc Quickshell)

install_qml_module(quickshell-i3-ipc)

target_link_libraries(quickshell-i3-ipc PRIVATE Qt::Quick)

qs_module_pch(quickshell-i3-ipc SET large)

target_link_libraries(quickshell PRIVATE quickshell-i3-ipcplugin)
Loading