160 Commits
Author SHA1 Message Date
Lucas RitzdorfandGitHub f7daeb7f79 hyprctl: random Lua-adjacent fixes (#15767)
* hyprctl(repl): go interactive if no Lua was given via args

The previous check would mess up if `-i` was provided, since it'd see
*an argument* and refuse to go interactive, even when it should've (i.e.
`hyprctl -i 0 repl`).

* ipc(socket1): new escape parsing for batch commands

Semicolons are still the command separator, so those have to be escaped
if they appear anywhere inside of commands (e.g. multi-statement Lua
code). Also, literal backslashes need to be escaped as well.

* tests(ipc): add test for hyprctl batch mode

This test case includes slightly weird stuff (semicolons in Lua code;
square brackets) that would break the old parsing logic.

* format: dang braces
2026-08-09 20:00:17 +02:00
VaxryandGitHub ea95499cd7 hyprctl: fix wiki strings (#15739)
do not keep raw URLs, those can change. Just direct the user.
2026-08-04 14:33:39 +02:00
c82ff80fde hyprctl/repl: support multiline interactive input (#15663)
* lua: include Lua's error code in eval/repl error responses

* hyprctl: let interactive repl handle multiline input

repl with a simple command (i.e. Lua code provided as a hyprctl arg)
handles multiline input just fine already, but interactive didn't. This
uses the Lua repl's own approach of trying to execute, and letting the
user continue if the exec attempt returns an "unexpected EOF"-type
syntax error. It's a little clunky, but if it's fine for them, it should
be fine for us.

Ref: https://github.com/lua/lua/blob/7579fc9d7ed90240487251dfb69168f8e64e9294/lua.c#L569-L582

* hyprctl: append full multiline command to repl history

* fix format :(

* lua: fix crash on print with no args

Co-authored-by: Dregu <dregu@dreg.us>

---------

Co-authored-by: Dregu <dregu@dreg.us>
2026-08-04 13:13:14 +02:00
MikoandGitHub 88c6386994 chore: replace string concatenation with std::format (#15652)
* chore: replace string concatenation with std::format

* Fix " Preserve the root API prefix when formatting" suggestion

* Fix missing slash; add explicit getenv safety check
2026-08-01 18:02:50 +02:00
NotPppp1116GitHubPppp1116 <ACCOUNT1_NOREPLY>
f2eafdf105 hyprctl: handle partial IPC transfers (#15408)
Co-authored-by: Pppp1116 <ACCOUNT1_NOREPLY>
2026-07-14 17:32:05 +02:00
DreguandGitHub f719bd6794 hyprctl: add interactive Lua REPL mode (#15043)
* hyprctl: add lua repl and return for eval

* hook print function for repl

* add help

* nix fixes this

* on second thought don't break all tests

* tests
2026-06-13 17:18:20 +01:00
Daniel KrupińskiandGitHub bb13110bcc hyprctl: hide C++ symbols by default (#14959) 2026-06-04 12:49:07 +01:00
Vaxry 1dc8a0db81 cmake: remove dependence on hyprland.conf 2026-05-07 11:44:13 +01:00
VaxryandGitHub 5ba33f8461 config/lua: init lua config manager, use lua if available (#13817)
Adds a new lua config manager, which will automatically be used if there is a lua config present.
2026-04-26 15:16:36 +01:00
Vaxry 362ea7b0f3 hyprctl: fix buffer overflowing writes to the socket 2026-02-28 15:06:10 +00:00
VaxryandGitHub e5a2b9e5b0 hyprctl: bump hyprpaper protocol to rev 2 (#12838) 2026-02-14 13:08:13 +00:00
ItsOhenandGitHub 407a623801 hyprctl: add error messages to hyprctl hyprpaper wallpaper (#13234) 2026-02-10 14:52:31 +00:00
d9657a95cb hyprctl: use new hyprpaper ipc format (#12537)
---------

Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
2025-12-04 17:59:47 +00:00
Mihai Fufezan cefa63c2af meson: drop 2025-11-17 08:54:47 +02:00
Luke BarkessandGitHub 21953ddf3d hyprctl: add getprop (#11394) 2025-08-18 16:41:17 +01:00
KamikadzeandGitHub beee22a95e refactor: Use new hyprutils casts (#11377) 2025-08-14 15:44:56 +01:00
xqsoandGitHub 5c8d675eed ci: correct tar command for xz compression & fix typos (#11213) 2025-07-25 17:19:23 +02:00
samandGitHub 1f337a7a5e hyprctl: replace read-only strings with std::string_view (#10851) 2025-06-26 12:28:35 +02:00
Mihai Fufezan a301d54df8 treewide: hyprland.org -> hypr.land 2025-06-20 01:49:20 +03:00
Luuk BlankenstijnandGitHub 231e01e39b hyprctl: don't detect a negative value as a parameter (#10671) 2025-06-08 20:17:38 +01:00
samandGitHub 2794f485cb hyprctl: Remove exceptions, use modern error handling (#10664) 2025-06-06 20:23:33 +01:00
samandGitHub 59c886d855 internal: Catch filesystem exceptions while iterating RunTimeDir (#10648) 2025-06-05 15:19:54 +01:00
nyxandGitHub f7ba86d1f3 keybinds: add sendkeystate dispatcher (#9599) 2025-03-25 00:59:13 +01:00
Abdalrahman ShabanandGitHub 2433760786 hyprctl: Error handling improvements, minor cleanups (#9536) 2025-03-06 00:50:28 +01:00
Aaron TulinoandGitHub 2cfa5d2408 hyprctl: Add IPC support for Hyprsunset (#9315)
* Add IPC support for Hyprsunset

* clang-format

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

* dup include + clang moment

* linux-dmabuf: last minute nit change
2025-01-30 11:07:06 +00:00
KhalidandGitHub 5f1df55fcb hyprctl: Fix hyprctl batch JSON command (#8749) 2024-12-17 18:26:02 +01:00
Austin HorstmanandGitHub e340e9f431 nix/meson: add re2 dependency (#8738)
* nix/default: add re2 dependency

* meson: add re2
2024-12-16 20:22:36 +01:00
VaxryandGitHub e06b520427 core: Move regex from stdlib to re2 (#8736)
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 #8693
2024-12-13 22:36:42 +00:00
Vaxry 2687788236 hyprctl: verify runtime dir exists in instances()
ref #8579
2024-11-25 14:42:11 +00:00
Toni500gitandVaxry b61d4c3636 hyprctl: convert std::cout and std::cerr to std::println() 2024-10-13 14:13:56 +01:00
Mihai Fufezan e01da1fd7a Meson: format 2024-09-11 19:09:17 +03:00
Tom EnglundandGitHub 72c7818ae6 misc: constify the remaining for loops (#7534)
now we roll loops at blazing constified speed.
2024-08-26 20:24:30 +02:00
loseardes77andMihai Fufezan 83d88fa564 hyprpm, hyprctl: update shell completions 2024-08-19 00:21:59 +03:00
Mihai Fufezan c5ec079c6f hyprpm, hyprctl: remove Makefiles 2024-08-13 22:14:58 +03:00
Zach DeCookandGitHub 0bf9ceb53b core: Include cstring whenever strncpy is used (#7267)
Fixes ppc64le build in alpine
2024-08-10 21:09:12 +01:00
Tom EnglundandGitHub 4b4971c06f internal: introduce new types to avoid unsigned int rollover and signed int overflow (#7216)
* 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
Sami LiedesandGitHub d5bc3eb1fa hyprctl: link to much less libraries (#7212)
This makes hyprctl start significantly faster.

$ time for ((i=0; i<1000; i++)); do hyprctl/hyprctl -j activewindow >/dev/null; done

Before: 12.269 s (about 12.3 ms/execution)
After: 2.142 s (about 2.1 ms/execution)
2024-08-07 16:28:02 +02:00
Tuur VanhoutteandGitHub be2dfa36ef hyprctl: increase hyprctl timeout to 5s to fix #6801 (#7152) 2024-08-02 21:49:47 +02:00
Lincoln Yuji de OliveiraandGitHub 0a6e83005f Completions: use only awk (#6763) 2024-07-04 14:21:07 +03:00
Lincoln YujiandMihai Fufezan 8bb75a223d hyprctl completions: Use only awk rather than grep + awk
Using "awk '/<exp>/{ print $n }'" is more minimal and slightly faster
than using "grep '<exp>' | awk '{ print $n }'".

Signed-off-by: Lincoln Yuji <lincolnyuji@hotmail.com>
2024-07-02 22:46:20 +03:00
Vaxry 4dd2b5902e hyprctl: add a newline after log() 2024-06-24 23:58:10 +02:00
IkalcoandGitHub 4778afe2e6 hyprctl: make recv timeout bigger and give error message if it does timeout (#6621) 2024-06-22 00:41:23 +02:00
6e5804b53d hyprctl: fix zsh completion (#6467)
Co-authored-by: random2907 <yarnjeetyadav1234567890@gmail.com>
2024-06-19 09:20:49 +03:00
b2590b58c5 hyprctl: added --follow option to rolliglog (#6325)
Co-authored-by: Крылов Александр <aleksandr.krylov@hyperus.team>
2024-06-14 12:11:40 +02:00
8c64a4bad7 core: move to hyprutils for utils (#6385)
* 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
diniamoandGitHub 121c6ac3ea hyprctl: add --quiet flag (#6380) 2024-06-09 21:16:29 +02:00