diff --git a/CMakeLists.txt b/CMakeLists.txt index 411871f..6a64822 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,6 +26,7 @@ add_compile_options(-Wall -Wextra -Wno-unused-parameter -Wno-unused-value -Wno-m message(STATUS "Checking deps...") add_subdirectory(subprojects/sdbus-cpp) +add_subdirectory(hyprland-share-picker) find_package(Threads REQUIRED) find_package(PkgConfig REQUIRED) diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3d76318 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +PREFIX = /usr/local +LIBEXEC = /usr/lib +SHARE = /usr/share + +all: + $(MAKE) release + +release: + cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -H./ -B./build -G Ninja + cmake --build ./build --config Release --target all -j$(nproc) + +debug: + cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -H./ -B./build -G Ninja + cmake --build ./build --config Debug --target all -j$(nproc) + +install: + $(MAKE) release + cp ./build/hyprland-share-picker/hyprland-share-picker ${PREFIX}/bin + cp ./build/xdg-desktop-portal-hyprland ${LIBEXEC}/ + cp ./hyprland.portal ${SHARE}/xdg-desktop-portal/portals/ + cp ./org.freedesktop.impl.portal.desktop.hyprland.service ${SHARE}/dbus-1/services/ \ No newline at end of file diff --git a/README.md b/README.md index dec88a5..5f8c5b9 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,16 @@ -# v2 rewrite +# xdg-desktop-portal-hyprland +An [XDG Desktop Portal](https://github.com/flatpak/xdg-desktop-portal) backend for Hyprland. -shit is being worked on. +## Building +```sh +make all +``` -going C++ +## Installing +```sh +sudo make install +``` + +## Running, FAQs, etc. +See [the Hyprland wiki](https://wiki.hyprland.org/Useful-Utilities/Hyprland-desktop-portal/) -idk I will write this some day \ No newline at end of file diff --git a/org.freedesktop.impl.portal.desktop.hyprland.service b/org.freedesktop.impl.portal.desktop.hyprland.service new file mode 100644 index 0000000..2a83e66 --- /dev/null +++ b/org.freedesktop.impl.portal.desktop.hyprland.service @@ -0,0 +1,4 @@ +[D-BUS Service] +Name=org.freedesktop.impl.portal.desktop.hyprland +Exec=/usr/lib/xdg-desktop-portal-hyprland +SystemdService=xdg-desktop-portal-hyprland.service \ No newline at end of file