16 Commits
Author SHA1 Message Date
34839b4f64 session: add disable-able systemd session target (#15776)
* add systemd session target

* session: stop graphical-session so we block, near other systemd cleanup

* session: don't start session ourselves if MANAGERPID is set

This avoids doing systemd stuff if we're already in a systemd-managed
session, like UWSM. Env vars and targets and such should already be
handled for us.

* session: store state, rather than rechecking env var at exit

---------

Co-authored-by: Dregu <dregu@dreg.us>
2026-08-22 13:57:45 +02:00
Lucas RitzdorfandGitHub fea3b3367b config/lua: make stable_id field a string, matching hyprctl (#15869) 2026-08-15 16:59:12 +02:00
8a24bb3bb6 render/cm: fix hdrMetadataEqual returning inverted result (#15825)
std::memcmp returns a nonzero value when the buffers differ, so
hdrMetadataEqual() returned true for differing metadata and false for
identical metadata. The caller in commitFrame compares
!hdrMetadataEqual(WANTED, CURRENT), which inverted this again: identical
HDR metadata was treated as changed every frame, re-sending
AQ_OUTPUT_STATE_HDR and forcing a full DRM modeset on every commit.

Fixes a per-frame modeset loop on displays with HDR metadata configured
(e.g. cm=hdredid).

Co-authored-by: neonvoidx <me@neonvoid.dev>
2026-08-11 19:06:15 +02:00
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
Lucas RitzdorfandGitHub 006bcc69a1 config/lua: display dispatcher names in binds list and when stringifying (#15722) 2026-08-08 22:41:40 +02:00
Lucas RitzdorfandGitHub db95de4f5b config/lua: clean up HLMonitor:set_workspace() and set_special_workspace() (#15534)
* lua: make HLMonitor:set_workspace "silent" (no focus or mouse move)

* lua: report correct function name when HLMonitor:set_special_workspace errors

* monitor: allow setting special workspace on monitor without focusing that monitor

* lua: make HLMonitor:set_special_workspace also "silent"

* workspace: support not carrying focus with us in moveWorkspaceToMonitor

This leaves focus on the same monitor, rather than carrying it along
with the moved workspace as usual.

* lua: fix HLMonitor:set_workspace placing the same WS on different monitors

I thought this was already handled for me; apparently not.

* lua: support creating new workspaces via HLMonitor:set_workspace(), set_special_workspace()

* monitor: don't send workspace events on non-focusing workspace change

* lua: better handle (non-)?special selectors in HLMonitor:set_workspace(), set_special_workspace()

Both now check that they're given a workspace of the appropriate
special-ness.

* lua: don't require a table arg for HLMonitor:set_workspace(), set_special_workspace()

Also, names given to `set_special_workspace()` no longer require a
`special:` prefix, matching the toggle_special dispatcher's behavior.

* misc: allow getting workspaces relative to a given monitor

Not just the currently focused one.

* lua: reference targeted monitor for relative WS selectors in set_workspace()

Now, e.g. `m+1` selects the next workspace on the *targeted* monitor,
rather than on the focused monitor.

* tests: HLMonitor:set_workspace() behavior

* tests: HLMonitor:set_special_workspace() behavior

* tests: don't force unnecessary refreshes in luaGetWorkspace test

* lua: return workspace name as selector for special workspaces

Previously this would be the ID, which was negative and would then be
interpreted later as a *relative* ID. Normal workspaces can still return
their (positive) IDs, that's fine.

* monitor: properly leave focus behind when stealing a special workspace
2026-08-05 14:10:45 +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
Lucas RitzdorfandGitHub b3aa455ceb layout: allow constraining floating windows to be entirely or partially on-screen (#15492)
* floating: support fitting windows only partially on-screen

* floating: add config for whether existing floating windows are kept on-screen

* floating: apply "floating windows on-screen" config when moving into layout

* floating: add config for whether new floating windows are forced on-screen

* tests: (new_)?float_force_onscreen behavior
2026-07-29 15:08:53 +02:00
Lucas RitzdorfandGitHub 7b8454d21e config/lua: support workspace selectors in hl.get_workspace() (#15555)
* lua: support workspace selectors in `hl.get_workspace()`

* tests: lua `hl.get_workspace()` with selectors

* lua: don't change focus in `hl.get_workspace()`

That results in an expired workspace being returned, when it should just
be `nil` for nonexistent spaces.
2026-07-26 16:17:56 +02:00
Lucas RitzdorfandGitHub eb21dae6fb makefile: smol Makefile QoL patches (#15491) 2026-07-22 13:54:58 +02:00
Lucas RitzdorfandGitHub 42b15274bc ci(codeowners-plus): fetch PR head before trying to diff against it (#15486) 2026-07-19 22:35:00 +02:00
Lucas RitzdorfandGitHub 9350e3410b crashReporter: don't skip trailing zeros in the stack trace (#15300) 2026-07-02 09:38:22 +02:00
Lucas RitzdorfandGitHub 5ef47bd473 algo/dwindle: fix moving windows across a split (#15079)
* tests: special cases for moving across dwindle splits

Two special cases are covered here:
- Moving across a split whose orientation has been manually toggled,
  should not forget that orientation
- Small windows (<50% of their split's area) should still be able to
  move straight across that split

Both are currently broken, but these tests are in preparation for fixes.

* layout/dwindle: fix moving small windows across splits

When moving a window, its original node is removed from the layout, and
a new node is created based on a "focus point." Previously, if a) the
original window were too small and b) it were moved toward its split
partner, the resulting focus point would cause the new window to be
placed into the same position as the original. This manifested as small
windows being impossible to move toward/across their immediate split
partners.

Now, we detect whether the target window is being moved toward its
immediate partner, and if so, override the split direction to ensure
it's placed on the opposite side of that partner.
2026-06-14 12:37:25 +01:00
Lucas RitzdorfandGitHub d121872736 desktop/windowRule: add stableid: window selector (#14984)
* window: add `stableid:` window selector

Matches against the "stable ID" for a window, which is also the ID
returned to clients that bind to the `ext-foreign-toplevel-list`
protocol. That allows such clients to more easily call `hyprctl` and do
useful things with the IDs they get.

* tests: exact window selectors (address, PID, stable ID)
2026-06-13 17:15:19 +01:00
Lucas RitzdorfandGitHub fcbbd6d4d8 config/lua: improve error handle-ability with Lua require (#14937)
* config/lua: make `require` throw an actual error for nonexistent modules

`require` uses pcall to catch errors and display them to the user. This
is usually okay, but it also hides errors if Lua tries to load a
nonexistent module, which the Lua config might actually want to detect
and handle on its own (e.g. by loading a different module, or disabling
functionality).

Ref #14534

* config/lua: make vanilla `require` available as `__require`

If `safeLuaRequire()`'s error-catching behavior isn't wanted, this
allows the user to call the original version directly, as `__require`.
Or, they could bring it back as the default by doing e.g.
`require = __require`, which might be desired to avoid breaking
third-party modules that want to catch errors during module load.
2026-06-05 22:20:02 +01:00
Lucas RitzdorfandGitHub b62ab4b578 cmake,meson: fix inclusion of GPG info in Git commit info (#12302)
This manifested for me as a failure to build plugins with `hyprpm`, but
the root cause was GPG data getting incorporated into `src/version.h`,
like so:

```c
#define GIT_COMMIT_MESSAGE "gpg: Signature made Sun 09 Nov 2025 03:31:36 PM PST
gpg:                using EDDSA key E26A4A2AB9676F54149F8EAA665806380871D640
gpg: Can't check signature: No public key
version: bump to 0.52.1"
```

This affected both `GIT_COMMIT_MESSAGE` and `GIT_COMMIT_DATE`, since
those are generated via `git show` (which can generate that extra GPG
info if the user's personal Git config sets `log.showSignature`).

See: https://github.com/hyprwm/Hyprland/discussions/12282
2025-11-15 19:23:19 +00:00