1
0
mirror of https://github.com/hyprwm/Hyprland.git synced 2025-07-27 10:11:55 -07:00

116 Commits

Author SHA1 Message Date
sam
1f337a7a5e hyprctl: replace read-only strings with std::string_view () 2025-06-26 12:28:35 +02:00
Luuk Blankenstijn
231e01e39b hyprctl: don't detect a negative value as a parameter () 2025-06-08 20:17:38 +01:00
sam
2794f485cb hyprctl: Remove exceptions, use modern error handling () 2025-06-06 20:23:33 +01:00
sam
59c886d855 internal: Catch filesystem exceptions while iterating RunTimeDir () 2025-06-05 15:19:54 +01:00
Abdalrahman Shaban
2433760786 hyprctl: Error handling improvements, minor cleanups () 2025-03-06 00:50:28 +01:00
Aaron Tulino
2cfa5d2408 hyprctl: Add IPC support for Hyprsunset ()
* Add IPC support for Hyprsunset

* clang-format

* Add documentation
2025-02-21 15:20:11 +01:00
Aaron Tulino
7d51dee103 hyprctl: Extract IPC code to separate method ()
This makes it possible to use the same IPC code for more projects in the future
2025-01-31 13:33:36 +01:00
Honkazel
7d1c78f4a3 core,hyprctl: clang, clang-tidy, typo fixes and dtors changes ()
* declare dtor once + DMABBUF typo fix

* dup include + clang moment

* linux-dmabuf: last minute nit change
2025-01-30 11:07:06 +00:00
Khalid
5f1df55fcb hyprctl: Fix hyprctl batch JSON command () 2024-12-17 18:26:02 +01:00
Vaxry
e06b520427 core: Move regex from stdlib to re2 ()
Moves the regex handling from stdlib to re2
2024-12-16 19:21:44 +01:00
Vaxry
a5234f26e4 core: drop using deques in favor of vectors
No point in most of these.
2024-12-16 15:58:19 +00:00
Vaxry
3cba4ba44e hyprctl: avoid crash on null pwuid
fixes 
2024-12-13 22:36:42 +00:00
Vaxry
2687788236 hyprctl: verify runtime dir exists in instances()
ref 
2024-11-25 14:42:11 +00:00
Toni500git
b61d4c3636 hyprctl: convert std::cout and std::cerr to std::println() 2024-10-13 14:13:56 +01:00
Tom Englund
72c7818ae6 misc: constify the remaining for loops ()
now we roll loops at blazing constified speed.
2024-08-26 20:24:30 +02:00
Zach DeCook
0bf9ceb53b core: Include cstring whenever strncpy is used ()
Fixes ppc64le build in alpine
2024-08-10 21:09:12 +01:00
Tom Englund
4b4971c06f internal: introduce new types to avoid unsigned int rollover and signed int overflow ()
* framebuffer: avoid gluint overflow

GLuint was being initialized to -1 and rolling over to unsigned int max,
its defined behaviour but very unnecessery. add a bool and use it for
checking if allocated or not.

* opengl: avoid gluint rollover

-1 rolls over to unsigned int max, use 0xFF instead.

* core: big uint64_t to int type conversion

there were a few uint64_t to int implicit conversions overflowing int
and causing UB, make all monitor/workspaces/windows use the new
typedefs. also fix the various related 64 to 32 implicit conversions
going around found with -Wshorten-64-to-32
2024-08-08 21:01:50 +02:00
Tuur Vanhoutte
be2dfa36ef hyprctl: increase hyprctl timeout to 5s to fix () 2024-08-02 21:49:47 +02:00
Vaxry
4dd2b5902e hyprctl: add a newline after log() 2024-06-24 23:58:10 +02:00
Ikalco
4778afe2e6 hyprctl: make recv timeout bigger and give error message if it does timeout () 2024-06-22 00:41:23 +02:00
Alexander
b2590b58c5 hyprctl: added --follow option to rolliglog ()
Co-authored-by: Крылов Александр <aleksandr.krylov@hyperus.team>
2024-06-14 12:11:40 +02:00
Vaxry
8c64a4bad7 core: move to hyprutils for utils ()
* core: move to hyprutils for utils

Nix: add hyprutils dep

* Meson: add hyprutils dep

* flake.lock: update

---------

Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
2024-06-11 17:17:45 +02:00
diniamo
121c6ac3ea hyprctl: add --quiet flag () 2024-06-09 21:16:29 +02:00
Gabriel Ford
553232a3e4 hyprctl: Add Config Flag to hyprctl systeminfo () 2024-05-25 22:46:07 +02:00
Raphael Tannous
3fe5280ce9 hyprctl: return exitStatus in requestHyprpaper() and request() () 2024-05-15 16:54:23 +01:00
Vaxry
47b087950d hyprctl: fix instances path
fixes 
2024-05-01 16:47:38 +01:00
Vaxry
d7a48cf478 hyprctl: use XDG_RUNTIME_DIR if available
fixes 
2024-04-30 14:17:35 +01:00
Vaxry
a5a6480917 core: Move /tmp/hypr to $XDG_RUNTIME_DIR/hypr ()
Moves the directory containing sockets and logs.
Also restructures lockfiles a bit.

For consumers, check if `$XDG_RUNTIME_DIR/hypr` exists. If so, use it. If not, use the old `/tmp/hypr`.
2024-04-28 22:25:24 +01:00
Vaxry
f7815dab42 compositor: more fs safety around tmp directories
HIS now includes a random bit, and hyprland will bail if /tmp/hypr is not a directory or if /tmp/hypr/his exists
2024-04-28 20:06:40 +01:00
Micovec
949eb42613 hyprctl: improve help pages () 2024-04-03 23:41:10 +03:00
Khalid
9b7ae25ae8 hyprctl: output json with --batch if requested () 2024-03-26 13:38:54 +00:00
Andrey Donets
997ee82bdf hyprctl: add missing commands to usage () 2024-03-21 14:57:06 +00:00
Vaxry
717d5b3cc2 hyprctl: hide unmapped windows without -a 2024-03-08 17:47:12 +00:00
ItsDrike
be89d6faa9 notifs: Implement notification dimissing () 2024-03-02 18:12:31 +00:00
Sergei Trofimovich
f534ac3fc4 hyprctl: add missing newline in error case of missing HYPRLAND_INSTANCE_SIGNATURE ()
Before the change running a `hyprctl` in incomplete `Hyprland`
environment merged error message and prompt for me as:

    $ hyprctl activewindow
    HYPRLAND_INSTANCE_SIGNATURE not set! (is hyprland running?)$

(note trailing `$` prompt).

After the change the newline is present as expected:

    $ hyprctl activewindow
    HYPRLAND_INSTANCE_SIGNATURE not set! (is hyprland running?)
    $
2024-02-24 23:35:36 +00:00
Vaxry
9103af317e hyprctl: ignore non-lock files for instances 2024-02-24 23:35:18 +00:00
Vaxry
5824b0f305 hyprctl: fix showing invalid instances 2024-02-24 17:36:43 +00:00
Vaxry
6f83856025 hyprctl: add -r argument 2024-02-24 14:02:03 +00:00
Vaxry
c6b1d82c70 hyprctl: more safety around stoull 2024-02-18 23:31:43 +00:00
Alessio Molinari
cca3c64301 hyprctl: remove hardcoded hyprctl commands. ()
* fix: remove hardcoded hyprctl commands.

This allows plugin to properly register hyprctl commands.

* fix: restore commands with min args
2024-02-12 10:34:21 +00:00
vaxerski
069880e374 hyprctl: add systeminfo 2024-01-01 17:53:03 +01:00
MightyPlaza
5f65946c84 hyprctl: add decorations ()
* add hyprctl decorations

modified:   hyprctl/main.cpp
modified:   src/debug/HyprCtl.cpp
modified:   src/render/decorations/CHyprBorderDecoration.cpp
modified:   src/render/decorations/CHyprBorderDecoration.hpp
modified:   src/render/decorations/CHyprDropShadowDecoration.cpp
modified:   src/render/decorations/CHyprDropShadowDecoration.hpp
modified:   src/render/decorations/CHyprGroupBarDecoration.cpp
modified:   src/render/decorations/CHyprGroupBarDecoration.hpp
modified:   src/render/decorations/IHyprWindowDecoration.cpp
modified:   src/render/decorations/IHyprWindowDecoration.hpp

* fixes
modified:   hyprctl/main.cpp
modified:   src/render/decorations/IHyprWindowDecoration.cpp
2023-12-28 16:38:16 +01:00
Vaxry
288f1863f0 hyprctl: allow instances without HIS 2023-12-08 15:40:01 +00:00
Tungsten842
8bd86cf37e hyprctl: order commands alphabetically () 2023-12-05 23:39:57 +00:00
zakk4223
4729265284 hyprctl: Add 'layouts' command ()
* Add hyprctl 'layouts' command

formatting

* Add getAllLayoutNames(), move m_vLayouts back to private

Formatting

* clang-format
2023-11-21 18:43:38 +00:00
Vaxry
e195e51c1b logging: move to an internal rolling log buffer
disables logging to the logfile by default
2023-11-14 20:06:04 +00:00
Greatly Pleased
1e6e9b66a5 hyprctl: Fix build warnings () 2023-11-10 21:45:20 +00:00
Roberto Previdi
af72404259 hyprctl: add a query for workspace rules () 2023-10-21 02:28:34 +01:00
memchr
6594b50e57 logging/format: use std::format_string to catch formatting string errors at compile time ()
* fix(log): use constexpr format string

* deprecate getFormat
2023-09-20 08:26:20 +01:00
vaxerski
3fc4ac07e0 hyprctl: fix hyprpaper 2023-08-13 21:42:16 +02:00