Skip to content

Commit

Permalink
Merge branch 'main' into tap-to-click
Browse files Browse the repository at this point in the history
  • Loading branch information
sliedes authored Aug 17, 2024
2 parents 91377fe + 912e7ba commit d853f6a
Show file tree
Hide file tree
Showing 118 changed files with 2,160 additions and 554 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ gmon.out
PKGBUILD

src/version.h
hyprpm/Makefile
hyprctl/Makefile
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ else()
endif()

include_directories(. "src/" "subprojects/udis86/" "protocols/")
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD 26)
add_compile_options(
-Wall
-Wextra
Expand All @@ -87,6 +87,12 @@ else()
endif()
find_package(OpenGL REQUIRED COMPONENTS ${GLES_VERSION})

pkg_check_modules(
hyprctl_deps
REQUIRED
IMPORTED_TARGET
hyprutils>=0.2.1)

pkg_check_modules(
deps
REQUIRED
Expand All @@ -111,6 +117,7 @@ pkg_check_modules(
libliftoff
libudev
gbm
gio-2.0
hyprlang>=0.3.2
hyprcursor>=0.1.7
hyprutils>=0.2.1)
Expand Down Expand Up @@ -323,7 +330,7 @@ install(
CODE "execute_process( \
COMMAND ${CMAKE_COMMAND} -E create_symlink \
${CMAKE_INSTALL_FULL_BINDIR}/Hyprland \
${CMAKE_INSTALL_FULL_BINDIR}/hyprland
\"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_BINDIR}/hyprland\" \
)")

# session file
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div align = center>

<img src="https://raw.githubusercontent.com/vaxerski/Hyprland/main/assets/header.svg" width="750" height="300" alt="banner">
<img src="https://raw.githubusercontent.com/hyprwm/Hyprland/main/assets/header.svg" width="750" height="300" alt="banner">

<br>

Expand Down Expand Up @@ -125,7 +125,6 @@ easy IPC, much more QoL stuff than other compositors and more...

<!----------------------------------{ Images }--------------------------------->

[Stars Preview]: https://starchart.cc/vaxerski/Hyprland.svg
[Preview A]: https://i.ibb.co/C1yTb0r/falf.png
[Preview B]: https://linfindel.github.io/cdn/hyprland-preview-b.png
[Preview C]: https://i.ibb.co/B3GJg28/20221126-20h53m26s-grim.png
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.41.2
0.42.0
24 changes: 12 additions & 12 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
devShells = eachSystem (system: {
default =
pkgsFor.${system}.mkShell.override {
stdenv = pkgsFor.${system}.gcc13Stdenv;
stdenv = pkgsFor.${system}.gcc14Stdenv;
} {
name = "hyprland-shell";
nativeBuildInputs = with pkgsFor.${system}; [
Expand Down
2 changes: 1 addition & 1 deletion hyprctl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pkg_check_modules(deps REQUIRED IMPORTED_TARGET hyprutils>=0.1.1)

add_executable(hyprctl "main.cpp")

target_link_libraries(hyprctl PUBLIC PkgConfig::deps)
target_link_libraries(hyprctl PUBLIC PkgConfig::hyprctl_deps)

# binary
install(TARGETS hyprctl)
Expand Down
4 changes: 0 additions & 4 deletions hyprctl/Makefile

This file was deleted.

3 changes: 2 additions & 1 deletion hyprctl/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <regex>
#include <sys/socket.h>
#include <hyprutils/string/String.hpp>
#include <cstring>
using namespace Hyprutils::String;

#include "Strings.hpp"
Expand Down Expand Up @@ -113,7 +114,7 @@ int rollingRead(const int socket) {

constexpr size_t BUFFER_SIZE = 8192;
std::array<char, BUFFER_SIZE> buffer = {0};
int sizeWritten = 0;
long sizeWritten = 0;
std::cout << "[hyprctl] reading from socket following up log:" << std::endl;
while (!sigintReceived) {
sizeWritten = read(socket, buffer.data(), BUFFER_SIZE);
Expand Down
4 changes: 3 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ project('Hyprland', 'cpp', 'c',
'optimization=3',
'buildtype=release',
'debug=false',
'cpp_std=c++23',
'cpp_std=c++26',
])

datarootdir = '-DDATAROOTDIR="' + get_option('prefix') / get_option('datadir') + '"'
Expand Down Expand Up @@ -34,6 +34,8 @@ xcb_render_dep = dependency('xcb-render', required: get_option('xwayland'))
xcb_res_dep = dependency('xcb-res', required: get_option('xwayland'))
xcb_xfixes_dep = dependency('xcb-xfixes', required: get_option('xwayland'))

gio_dep = dependency('gio-2.0', required:true)

cmake = import('cmake')
udis = cmake.subproject('udis86')
udis86 = udis.dependency('libudis86')
Expand Down
5 changes: 5 additions & 0 deletions nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ assert lib.assertMsg (!hidpiXWayland) "The option `hidpiXWayland` has been remov
src = lib.cleanSource ../.;
};

patches = [
# forces GCC to use -std=c++26
./stdcxx.patch
];

postPatch = ''
# Fix hardcoded paths to /usr installation
sed -i "s#/usr#$out#" src/render/OpenGL.cpp
Expand Down
2 changes: 1 addition & 1 deletion nix/overlays.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ in {
date = mkDate (self.lastModifiedDate or "19700101");
in {
hyprland = final.callPackage ./default.nix {
stdenv = final.gcc13Stdenv;
stdenv = final.gcc14Stdenv;
version = "${version}+date=${date}_${self.shortRev or "dirty"}";
commit = self.rev or "";
inherit date;
Expand Down
12 changes: 12 additions & 0 deletions nix/stdcxx.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cfbd431f..73e8e0c2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -64,6 +64,7 @@ endif()
include_directories(. "src/" "subprojects/udis86/" "protocols/")
set(CMAKE_CXX_STANDARD 26)
add_compile_options(
+ -std=c++26
-Wall
-Wextra
-Wno-unused-parameter
Loading

0 comments on commit d853f6a

Please sign in to comment.