Skip to content
Merged
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
85 changes: 63 additions & 22 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,34 +1,75 @@
cmake_minimum_required(VERSION 3.16)
cmake_minimum_required(VERSION 3.19)

# Get version
file(READ "${CMAKE_SOURCE_DIR}/VERSION" VER_RAW)
string(STRIP ${VER_RAW} VER)
string(STRIP ${VER_RAW} HYPRSYSTEMINFO_VERSION)

project(hsi VERSION ${VER} LANGUAGES CXX)
add_compile_definitions(HYPRSYSTEMINFO_VERSION="${HYPRSYSTEMINFO_VERSION}")

set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
project(
hyprsysteminfo
VERSION ${HYPRSYSTEMINFO_VERSION}
DESCRIPTION "System info utility for Hyprland")

include(CTest)
include(CheckIncludeFile)
include(GNUInstallDirs)

set(PREFIX ${CMAKE_INSTALL_PREFIX})
set(INCLUDE ${CMAKE_INSTALL_FULL_INCLUDEDIR})
set(LIBDIR ${CMAKE_INSTALL_FULL_LIBDIR})

find_package(glaze QUIET)
if (NOT glaze_FOUND)
set(GLAZE_VERSION v6.1.0)
message(STATUS "glaze dependency not found, retrieving ${GLAZE_VERSION} with FetchContent")
include(FetchContent)
FetchContent_Declare(
glaze
GIT_REPOSITORY https://github.com/stephenberry/glaze.git
GIT_TAG ${GLAZE_VERSION}
GIT_SHALLOW TRUE
)
FetchContent_MakeAvailable(glaze)
endif()

find_package(Qt6 6.5 REQUIRED COMPONENTS Widgets Quick QuickControls2 WaylandClient)
find_package(PkgConfig REQUIRED)
pkg_check_modules(
deps
REQUIRED
IMPORTED_TARGET
hyprtoolkit
hyprutils>=0.10.2
libdrm
libpci
pixman-1
)

pkg_check_modules(hyprutils REQUIRED IMPORTED_TARGET hyprutils)
set(CMAKE_CXX_STANDARD 23)
add_compile_options(
-Wall
-Wextra
-Wno-unused-parameter
-Wno-unused-value
-Wno-missing-field-initializers
-Wpedantic)
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)

qt_standard_project_setup(REQUIRES 6.5)
if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG)
message(STATUS "Configuring hyprsysteminfo in Debug")
add_compile_definitions(hyprsysteminfo_DEBUG)
else()
add_compile_options(-O3)
message(STATUS "Configuring hyprsysteminfo in Release")
endif()

add_subdirectory(src)
file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "src/*.cpp" "include/*.hpp")

qt_add_resources(hyprsysteminfo "resource"
PREFIX "/"
FILES
resource/hyprlandlogo.svg
)
add_executable(hyprsysteminfo ${SRCFILES})

include(GNUInstallDirs)
install(TARGETS hyprsysteminfo
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
target_link_libraries(hyprsysteminfo PkgConfig::deps)

install(
FILES assets/install/hyprsysteminfo.desktop
DESTINATION "share/applications")

install(FILES assets/install/hyprsysteminfo.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
install(TARGETS hyprsysteminfo)
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# hyprsysteminfo
A tiny qt6/qml application to display information about the running system,
## hyprsysteminfo
A tiny hyprtoolkit application to display information about the running system,
or copy diagnostics data, without the terminal.

![](./assets/showcase.png)

## Footnotes
[^1]:
Some distributions may not support a graphical logo in hyprsysteminfo. To check if your distribution supports a graphical logo, run `cat /etc/os-release`. If the output includes a `LOGO` line, a graphical logo should appear in hyprsysteminfo. If there is no `LOGO` line, a graphical logo will not be displayed.
Binary file modified assets/showcase.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
158 changes: 127 additions & 31 deletions flake.lock

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

Loading