Commit graph

39 commits

Author SHA1 Message Date
Maximilian Seidler
1bfa79eb83
core: move to hyprlang config value wrapper (#667) 2025-01-29 23:10:27 +01:00
Maximilian Seidler
07b5e1b4cd
core: fix background screenshot on nvidia (#656)
Fixes DMA buffer screencopy on nvidia cards. Additionally adds shm screencopy as an option
2025-01-24 14:25:37 +01:00
Maximilian Seidler
d547d1d4e3
core: move wayland event reading into the poll thread (#655)
This was done, so that we can

  wl_display_prepare_read -> poll -> wl_display_read_events

That fixes synchronization issues on nvidia proprietary drivers.
2025-01-21 13:42:11 +00:00
Maximilian Seidler
00d2cbfee3
core: introduce animation manager and animation config (#631)
BREAKING:
- Removed `input-field:dots_fade_time`. Now configured via
`animation=inputFieldDots,...`
- Removed `input-field:fail_transition`. Now configured via
`animation=inputFieldColors,...`
- Removed `general:no_fade_in` and `general:no_fade_out`. Now configured
globally via `animations:enabled` or via `animation=fadeIn,...` and
`animation=fadeOut,...`
2025-01-06 12:34:21 +00:00
Robin Carlier
058830668e
widgets: Reload backgrounds and not just images (#583)
* widgets: Reload background and fade

* clang-format

also clang-format

* undo possibly unwanted format on Renderer.hpp

* rename stuff + style

* codestyle + initialize reloadTime

* remove trailing eols
2024-12-18 16:28:05 +01:00
Maximilian Seidler
cc7ffe73e7
renderer: round boxes (#571)
* renderer: round boxes before matrix projection

* renderer: use rounded boxes throughout
2024-12-01 17:13:55 +00:00
Maximilian Seidler
6c3c444136
core: add border shader and border gradients (#548)
* renderer: add renderBorder function

* config: add CGradientValueData from Hyprland

* input-field: change outer to take gradients

Added gradient support to the following color options:
- `outer_color`
- `fail_color`
- `check_color`
- `capslock_color`
- `numlock_color`
- `bothlock_color``

* image: add gradient border

* shape: add gradient border

* shaders: adapt the new rounded smoothing factor from Hyprland
2024-11-09 16:54:44 +00:00
Maximilian Seidler
5065788a47
misc: use Vector2D, Box and Mat3x3 from hyprutils (#515)
* misc: use Vector2D, Box and Mat3x3 from hyprutils

* nix: flake update

Fix CI fails. We need hyprutils>=0.2.3

* misc: use a function to convert Hyprlang::VEC2 to Vector2D

* misc: fixup some includes
2024-10-13 13:04:32 +01:00
Maximilian Seidler
9c1e9e7db2
core: support desc: prefix for widget monitor options (#470) 2024-08-29 12:36:07 +02:00
Aaron Blasko
5d85ea03b0
renderer: add --no-fade-in (#453) 2024-08-03 17:34:54 +02:00
Jasson
d8ccc6f96a
core: Label exception handling + Frambuffer checks + headers (#413)
* Added exception handling in label constructor

* Framebuffer fix + moved headers

* added optional header
2024-07-09 11:32:49 +02:00
Maximilian Seidler
43f2b7441b
core: handle missing wayland protocol support (#408)
* core: check support of wp_factional_scale_manager_v1 and wp_viewporter

* core: check support of zwlr_screencopy_manager_v1
2024-07-07 21:44:53 +02:00
Maximilian Seidler
0552a1eddd
core: add option to render solid background immediatly when bg assets are not ready (#407)
* asyncResourceGatherer: start the asyncLoop at the same time as gather

This is a prerequesit for labels beeing drawn, while backgrounds are
note ready yet.

* core: allow immediate rendering even when backgrounds are not gathered yet

Note:
We don't really need to call `asyncResourceGatherer::apply` in the
`renderLock` function, since it will get called by a call to
`asyncResourceGatherer::getAssetById` anyways.

* background: render color rectangle when asset is not ready yet

* config: add general:immediate_render config option

* core: use the --immediate-render flag in attemptRestoreOnDeath
2024-07-07 18:43:17 +02:00
Maximilian Seidler
88b9ce48ed
core: improve dynamic output handling (#386)
* core: check for sessionLockSurface before calling render

This is needed, because when a new monitor is added via `onGlobal` the
order of the events is not guaranteed. Meaning that render for a
particular monitor might get called before a `CSessionLockSurface` for
that monitor exists.

* renderer: remove widgets for destroyed lockSurfaces

* asyncResourceGatherer: don't create duplicate dma frames for a specific stringPort

* core: remove renderer widgets in ~CSessionLockSurface instead of in onGlobalRemoved

* Revert "core: remove renderer widgets in ~CSessionLockSurface instead of in onGlobalRemoved"

This reverts commit 405aa42de8.

Because of destruction order, it is safer to do it in `onGlobalRemoved`.

* core: ditch dynamic DMAFrame generation

* core: identify DMAFrames via output size and stringPort

* core: fallback to background color for dynamic outputs with background:path=screenshot

* core: remove output pointer from DMAFrame
2024-07-02 00:45:06 +02:00
972c1c27e6 restore: move to runtime dir and check his
fixes #346
2024-05-23 12:58:54 +02:00
shezdy
997f222b0f
core: add zindex option to widgets (#334)
* add zheight

* move sort to renderer

* fix format

* change name to zindex
2024-05-17 19:29:05 +01:00
bvr-yr
eb1123fa2e
widgets: add Shape + minor image improve (#266)
* widgets: add Shape

* image: minor improvment

* glClear on FB alloc

* add Nix HM

* always create FB if not xray
2024-04-10 17:24:17 +01:00
bvr-yr
84c6282d6a
widgets: add rotate option to label and image (#234)
* widgets: add `rotate` option to label and image

* use framebuffer for image
2024-03-29 19:01:11 +00:00
bvr-yr
2448774de3
config: allow mon description for monitor value (#216)
* config: allow mon description for `monitor` value

* rename field
2024-03-23 21:06:54 +00:00
Maximilian Seidler
b50acfaf94
input-field: only render the current output on fade out callback (#206) 2024-03-19 02:49:12 +00:00
bvr-yr
3e38762e84
widgets: add Image (#191) 2024-03-16 16:44:44 +02:00
Abhinav Anil
1c92c6109c
renderer: add fade out animation and property to disable (#188)
* renderer, Nix/HM module: add fade out animation and prop

* fix: fade duration and disable on non hyprland session

* fix: revert needsFrame condition, update duration to 500ms

* fix: make shadows obey widget opacity
2024-03-14 13:23:41 +00:00
Maximilian Seidler
b4a1c8ccbb
label: Fix label updates (#152)
* label: render output via stringPort instead of surface

* label: retry onAssetCallback

Calling `render` might not update the asset when the surfaces frameCallback is already set.

* Revert "label: fix rendering with multiple timers that fire at the same time (#147)"

This reverts commit e9a57f0dae.
2024-03-08 22:48:59 +00:00
a4dc596cb8 renderer: add shadowable props 2024-03-05 20:27:28 +00:00
ada7ce8e56 renderer: various fixes to transformations and backgrounds
fixes #111
2024-03-03 02:19:31 +00:00
57ce4f759c config: add no_fade_in
fixes #55
2024-02-22 00:36:01 +00:00
7ca13a801b renderer: fix misc blur shenanigans
fixes #58
2024-02-22 00:31:33 +00:00
1b57d52179 background: add blurring 2024-02-21 22:21:16 +00:00
2836f02ded background: add screenshot 2024-02-21 21:39:14 +00:00
40802b9672 renderer: minor alpha improvements 2024-02-20 16:29:23 +00:00
7370fc624f label: add time and dynamic timers 2024-02-20 00:11:19 +00:00
80e6970e33 input-field: cleanup props in constructor 2024-02-19 22:39:13 +00:00
LOSEARDES77
05cd68e17d
input-field: add font color config option (#11) 2024-02-19 22:35:13 +00:00
6a31b2f182 widgets: allow background to take a color 2024-02-19 20:50:58 +00:00
e207d34b88 widgets: add label 2024-02-19 16:26:29 +00:00
0719ac671e renderer: fix constant re-renders 2024-02-19 01:24:35 +00:00
8287baca11 input-field: add fade_on_empty 2024-02-19 01:22:22 +00:00
80d6dff563 logging: move spammy logs to trace 2024-02-19 00:22:55 +00:00
a6ac79641a core: initial commit 2024-02-18 23:08:03 +00:00