summaryrefslogtreecommitdiff
path: root/src/helpers/MiscFunctions.cpp
Commit message (Collapse)AuthorAgeFilesLines
* core: use readFileAsString instead of cat for os-releasevaxerski2025-01-191-1/+2
|
* core: cleanup header includes (#9088)user1111111111111111111111111111111112025-01-171-0/+2
| | | Cleanup some unneeded includes to speed up compilation
* keybinds: fix previous_per_monitor logic (#9010)Alexander2025-01-111-1/+1
| | | Co-authored-by: Крылов Александр <aleksandr.krylov@hyperus.team>
* core: Add a periodic donation request (#8981)Vaxry2025-01-101-27/+0
| | | Will fire once in december and july. Disableable with `ecosystem:no_donation:nag`
* logging: fix Gpu info (#8764)Kamikadze2024-12-191-1/+1
|
* logging: get broader GPUINFO (#8753)Ikalco2024-12-181-1/+1
|
* internal: remove dead code (#8748)Ikalco2024-12-171-20/+0
|
* core: Add clang-tidy (#8664)Vaxry2024-12-071-4/+1
| | | | | This adds a .clang-tidy file for us. It's not a strict requirement to be compliant, but I tuned it to be alright.
* core: Add support for hyprqtutils' update screen (#8651)Vaxry2024-12-061-1/+31
| | | | | | | | | * Nix: add hyprland-qtutils to PATH * flake.lock: update --------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
* core: workspace-related function cleanup / refactorVaxry2024-11-221-1/+1
| | | | CCompositor is massive, and has a lot of functions that could be better optimized if in CWorkspace
* miscfunctions: move configStringToInt to std::expectedVaxry2024-11-181-13/+24
|
* config: update the configStringToInt implementation (#8476)Maximilian Seidler2024-11-181-21/+57
| | | Copied from hyprlang and removed std::expected.
* miscfunctions: fix cross buildVaxry2024-11-181-1/+1
|
* miscfunctions: add missing includeVaxry2024-11-181-0/+1
|
* shell: propagate new machanism from hyprctl to miscfunctionsVaxry2024-11-171-1/+18
|
* shell: don't use fgrep, prefer grep -FVaxry2024-11-171-1/+1
|
* core: fixup execAndGetVaxry2024-11-101-1/+1
| | | | fixes #8410
* core: move to os/Process from hyprutilsVaxry2024-11-091-12/+8
| | | | nix bump too
* internal: check size limit in layouts (#8298)MightyPlaza2024-10-301-0/+7
| | | | | | | | | | | modified: src/desktop/Window.cpp modified: src/desktop/Window.hpp modified: src/events/Windows.cpp modified: src/helpers/MiscFunctions.cpp modified: src/helpers/MiscFunctions.hpp modified: src/layout/DwindleLayout.cpp modified: src/layout/IHyprLayout.cpp modified: src/layout/MasterLayout.cpp modified: src/macros.hpp
* core: move internal structures to monitor pointers (#8266)Vaxry2024-10-271-3/+3
|
* Internal: move to Mat3x3 from hyprutils (#7902)Vaxry2024-09-251-21/+0
| | | | | | | | | * Meson: require hyprutils >= 0.2.3 * flake.lock: update hyprutils --------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
* misc: constify the remaining for loops (#7534)Tom Englund2024-08-261-6/+6
| | | now we roll loops at blazing constified speed.
* build: fix 32bit builds (#7510)Tom Englund2024-08-261-5/+5
| | | | | | | ensure the correct type is passed to std::clamp and std::max int64_t is different on 64bit compared to 32bit, also in presentationtime tv_sec is __time_t and on 32bit its a 32bit type so right shift count >= width of type. so only bit shift on 64bit. and avoid potential nullptr deref in the for loops, check for .end() before *it <= endID.
* helpers: fix: revert to signed arithmetic for cycling through workspaces (#7339)Mirkwood2024-08-151-4/+4
| | | | The code clearly expects signed types there. Fixes #7329
* internal: introduce new types to avoid unsigned int rollover and signed int ↵Tom Englund2024-08-081-39/+39
| | | | | | | | | | | | | | | | | | | | 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
* Core: Move to aquamarine (#6608)Vaxry2024-07-211-0/+3
| | | | | | | | | | | | | | Moves Hyprland from wlroots to aquamarine for the backend. --------- Signed-off-by: Vaxry <vaxry@vaxry.net> Co-authored-by: Mihai Fufezan <mihai@fufexan.net> Co-authored-by: Jan Beich <jbeich@FreeBSD.org> Co-authored-by: vaxerski <vaxerski@users.noreply.github.com> Co-authored-by: UjinT34 <41110182+UjinT34@users.noreply.github.com> Co-authored-by: Tom Englund <tomenglund26@gmail.com> Co-authored-by: Ikalco <73481042+ikalco@users.noreply.github.com> Co-authored-by: diniamo <diniamo53@gmail.com>
* style: fix clang-formatVaxry2024-07-131-6/+2
|
* core: add ability to select previous workspace per monitor (#6598)Alexander2024-06-221-45/+45
| | | Co-authored-by: Крылов Александр <aleksandr.krylov@hyperus.team>
* core: Move to hyprutils for MathVaxry2024-06-191-1/+1
| | | | | | Moves CRegion, CBox and Vector2D over to hyprutils. Requires hyprutils>=0.1.4
* misc: Fix build warnings (#6486)phonetic1122024-06-131-3/+4
|
* helpers: make shm_open() portable after 8bcccf9f0f0f (#6471)Jan Beich2024-06-131-1/+2
| | | | | https://pubs.opengroup.org/onlinepubs/9699919799/functions/shm_open.html https://man.freebsd.org/shm_open/2 https://www.man7.org/linux/man-pages/man3/shm_open.3.html
* core: move to hyprutils for utils (#6385)Vaxry2024-06-111-56/+5
| | | | | | | | | | | | | * 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>
* wayland/core: move to new impl (#6268)Vaxry2024-06-081-27/+39
| | | | | * wayland/core/dmabuf: move to new impl it's the final countdown
* debug: Add ARM GPU info (#6212)System642024-05-231-0/+2
| | | Added a simple way to get basic info about the GPU on ARM based systems
* keybinds: fix empty on monitor for new workspaces (#6089)JManch2024-05-151-5/+13
|
* keybinds: add empty on monitor and next empty flags (#5936)William Gray2024-05-081-2/+10
| | | | | | | | | * empty on monitor * add flag for next empty * clang-format changes * next also uses m_pLastMonitor
* config: add absolute monitor workspace selectors (#5848)William Gray2024-05-031-97/+132
| | | | | | | * add absolute monitor workspace selectors * implement absolute for `r` * format code
* ime-v2: move to new implVaxry2024-05-011-0/+35
|
* workspace: Fix duplication of "special:" in special workspace name (#5729)Agent00Ming2024-04-241-2/+2
| | | | | | | | | | | | | | * Fix duplication of "special:" in special workspace name modified: src/desktop/Workspace.cpp * Track default special workspace name as special:special This is to fix the edge cases with the previous commit without breaking user configs. modified: src/helpers/MiscFunctions.cpp --------- Co-authored-by: Agent_00Ming <agent00ming9366@gmail.com>
* Workspace/core: Refactor workspace storage (#5380)Vaxry2024-04-021-9/+11
| | | | | * refactor workspaces to use ptrs * clang-format
* format: make ci happyVaxry2024-03-081-2/+2
|
* windowrules: Make min/maxsize rules dynamic (#4775)Epilepsy Gatherings2024-03-081-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * rebase * simplify and remove prop * Stuff - add back win prop - change minsize defaults - change request formatting for setprop * style fix * remove empty line * change defaults * redo string to vec * remove redundant parsing * change to vec * support commas * remove static rules * take out garbage * format * don't allow commas and resize on setprop * use isNumber
* core: improve cleanup logicvaxerski2024-01-191-0/+7
|
* systemd: add HYPRLAND_NO_SD_NOTIFYvaxerski2023-12-211-0/+7
| | | | fixes #4217
* internal: convert uname fields to strings before loggingVaxry2023-12-181-4/+4
| | | | fixes #4188, thanks @jbeich
* screencopy: fix shm exports with 10-bitVaxry2023-12-011-0/+10
| | | | fixes #4019
* env: add HYPRLAND_NO_RTVaxry2023-11-171-0/+4
|
* internal: make getPlusMinusKeywordResult return optionalVaxry2023-11-121-7/+22
|
* internal: replace INT_MAX with WORKSPACE_INVALIDVaxry2023-11-121-9/+7
|
* compositor: find windows in direction on floatingVaxry2023-11-051-0/+4
|