Commit graph

64 commits

Author SHA1 Message Date
29f31da29a all: chase hyprland 2024-03-20 03:02:10 +00:00
Mihai Fufezan
34ade54e1b Nix: use mkHyprlandPlugin from nixpkgs 2024-03-13 00:08:22 +02:00
35fe7c3202 all: chase hyprland 2024-03-02 19:38:48 +00:00
f99822818e all: chase hyprland 2024-02-18 15:30:26 +00:00
47a1acd6ba
all: chase hyprland
fixes #66 fixes #67
2024-01-28 23:40:51 +02:00
sjp760
f62f3b216e hyprbars: update meson.build 2023-12-29 00:14:48 +02:00
sjp760
e4e1e33fa9 hyprbars: update Makefile to include necessary pkgconfig flags 2023-12-29 00:14:48 +02:00
c6c9fba566 hyprbars: bring window to top on mouse down
fixes #65
2023-12-28 22:18:12 +01:00
a1277add4b hyprbars: add an option to remove title
fixes #59
2023-12-15 15:46:37 +00:00
af229e6aee hyprbars: decrease input drag height by 1 2023-12-14 13:09:12 +00:00
d4350bfff7 hyprbars: fixup click position calculations for buttons 2023-12-13 01:35:16 +00:00
340ade398e hyprbars: add configurable padding 2023-12-13 01:29:13 +00:00
3a4b079658 hyprbars: add bar_buttons_alignment
also fixes ellipsize calcs. Fixes #49 fixes #56
2023-12-13 01:13:32 +00:00
8018a2f817 hyprbars: add precedence_over_border
fixes #39
2023-12-13 00:51:21 +00:00
ed16998aad hyprbars: add align left 2023-12-13 00:46:12 +00:00
9099c480d8 hyprbars: exclude rounding from geometry calcs 2023-12-11 16:46:45 +00:00
4bb0bf04ed hyprbars: fix workspace offset calculation 2023-11-12 22:45:42 +00:00
69e596af68 hyprbars: make part_of_window configurable
closes #48
2023-11-12 12:46:32 +00:00
2cc193e6dc all: update for hyprland#3800 2023-11-11 14:39:46 +00:00
344e5a145e hyprbars: improve titleBarBox calculations 2023-11-06 16:49:50 +00:00
15cee0bec0 hyprbars: fix for hyprland@#3755 2023-11-04 17:22:55 +00:00
9b1adb6043 hyprbars: cosmetic improvements 2023-11-04 13:31:52 +00:00
69287a4dec hyprbars: update for hyprland@#3739 2023-11-04 13:15:42 +00:00
0a562ab2c4 all: add -O2 to compiler args 2023-11-04 00:48:52 +00:00
da70bebdf1 hyprbars: don't allow move from clicking the border 2023-10-29 23:26:50 +00:00
69dd204c52 hyprbars: use unscaled size for font calcs 2023-10-29 23:22:29 +00:00
f203d69f98 hyprbars: fix dynamic updates of height 2023-10-29 22:57:55 +00:00
f46771dd4f hyprbars: add icon support + general improvements 2023-10-29 22:33:14 +00:00
8274e10d51 hyprbars: use window's border func instead of border_size 2023-10-29 18:20:47 +00:00
220f95a8a1 hyprbars: guard version 2023-10-29 17:36:52 +00:00
17defb17e9 hyprbars: use the new keyword infra 2023-10-29 17:33:32 +00:00
e7caa01b4f all: fix for hyprland@a61eb769 2023-10-21 14:55:42 +01:00
f9578d28d2 hyprbars: fix compile 2023-09-19 11:24:57 +01:00
HaydonBaddock
74a845f1c1
hyprbars: Fix button scaling (#38)
* fixes button scaling

* further scaling fixes
clang formatting
2023-08-17 10:10:33 +02:00
16dc2927bd hyprbars: fix damage region buf 2023-06-26 19:57:47 +02:00
vaxerski
e368bd15e4 hyprbars: don't add to x11 noborder windows 2023-05-14 18:01:37 +01:00
vaxerski
63450e70f2 hyprbars: gen text tex if null 2023-05-14 13:39:43 +01:00
outfoxxed
0053442040 Use pname instead of name for plugin derivations 2023-05-11 10:40:04 +03:00
vaxerski
fb204633fb unbreak build on arch 2023-05-08 19:02:38 +01:00
Jan Beich
1228eb57f9
Unbreak build on FreeBSD (#23)
* make: unhardcode pixman-1 and libdrm include cflags

On BSDs /usr/include only contains headers from base system.

$ pkg-config --cflags pixman-1
-I/usr/local/include/pixman-1
$ pkg-config --cflags libdrm
-I/usr/local/include -I/usr/local/include/libdrm

* make: drop GCC dependencies

/bin/sh: g++: not found
c++: error: unsupported option '--no-gnu-unique'
error: invalid value 'c++23' in '-std=c++23'

* make: drop GNU make extensions

Makefile is evaluated by both GNU make and BSD make but their
extensions are not compatible. Instead of renaming Makefile
to GNUmakefile support both.

- GNU $(shell ...) is BSD ${:!...!} or POSIX sh `...` or $$(...)
- GNU $^ is BSD $> for target rule prerequisites

* hyprbars: silence Clang -Wc++11-narrowing like Hyprland

barDeco.cpp:73:47: error: non-constant-expression cannot be narrowed from type 'int64_t' (aka 'long') to 'double' in initializer list [-Wc++11-narrowing]
    const auto         BARBUF      = Vector2D{(int)m_vLastWindowSize.x + 2 * *PBORDERSIZE, *PHEIGHT};
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
barDeco.cpp:73:47: note: insert an explicit cast to silence this issue
    const auto         BARBUF      = Vector2D{(int)m_vLastWindowSize.x + 2 * *PBORDERSIZE, *PHEIGHT};
                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                              static_cast<double>(                       )
barDeco.cpp:73:92: error: non-constant-expression cannot be narrowed from type 'int64_t' (aka 'long') to 'double' in initializer list [-Wc++11-narrowing]
    const auto         BARBUF      = Vector2D{(int)m_vLastWindowSize.x + 2 * *PBORDERSIZE, *PHEIGHT};
                                                                                           ^~~~~~~~
barDeco.cpp:73:92: note: insert an explicit cast to silence this issue
    const auto         BARBUF      = Vector2D{(int)m_vLastWindowSize.x + 2 * *PBORDERSIZE, *PHEIGHT};
                                                                                           ^~~~~~~~
                                                                                           static_cast<double>( )
barDeco.cpp:249:24: error: non-constant-expression cannot be narrowed from type 'int64_t' (aka 'long') to 'double' in initializer list [-Wc++11-narrowing]
    m_seExtents = {{0, *PHEIGHT + 1}, {}};
                       ^~~~~~~~~~~~
barDeco.cpp:249:24: note: insert an explicit cast to silence this issue
    m_seExtents = {{0, *PHEIGHT + 1}, {}};
                       ^~~~~~~~~~~~
                       static_cast<double>( )
barDeco.cpp:251:34: error: non-constant-expression cannot be narrowed from type 'int64_t' (aka 'long') to 'double' in initializer list [-Wc++11-narrowing]
    const auto BARBUF = Vector2D{(int)m_vLastWindowSize.x + 2 * *PBORDERSIZE, *PHEIGHT} * pMonitor->scale;
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
barDeco.cpp:251:34: note: insert an explicit cast to silence this issue
    const auto BARBUF = Vector2D{(int)m_vLastWindowSize.x + 2 * *PBORDERSIZE, *PHEIGHT} * pMonitor->scale;
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                 static_cast<double>(                       )
barDeco.cpp:251:79: error: non-constant-expression cannot be narrowed from type 'int64_t' (aka 'long') to 'double' in initializer list [-Wc++11-narrowing]
    const auto BARBUF = Vector2D{(int)m_vLastWindowSize.x + 2 * *PBORDERSIZE, *PHEIGHT} * pMonitor->scale;
                                                                              ^~~~~~~~
barDeco.cpp:251:79: note: insert an explicit cast to silence this issue
    const auto BARBUF = Vector2D{(int)m_vLastWindowSize.x + 2 * *PBORDERSIZE, *PHEIGHT} * pMonitor->scale;
                                                                              ^~~~~~~~
                                                                              static_cast<double>( )
barDeco.cpp:253:31: error: type 'double' cannot be narrowed to 'int' in initializer list [-Wc++11-narrowing]
    wlr_box    titleBarBox = {(int)m_vLastWindowPos.x - *PBORDERSIZE - pMonitor->vecPosition.x, (int)m_vLastWindowPos.y - *PBORDERSIZE - *PHEIGHT - pMonitor->vecPosition.y,
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
barDeco.cpp:253:31: note: insert an explicit cast to silence this issue
    wlr_box    titleBarBox = {(int)m_vLastWindowPos.x - *PBORDERSIZE - pMonitor->vecPosition.x, (int)m_vLastWindowPos.y - *PBORDERSIZE - *PHEIGHT - pMonitor->vecPosition.y,
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                              static_cast<int>(                                               )
barDeco.cpp:253:97: error: type 'double' cannot be narrowed to 'int' in initializer list [-Wc++11-narrowing]
    wlr_box    titleBarBox = {(int)m_vLastWindowPos.x - *PBORDERSIZE - pMonitor->vecPosition.x, (int)m_vLastWindowPos.y - *PBORDERSIZE - *PHEIGHT - pMonitor->vecPosition.y,
                                                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
barDeco.cpp:253:97: note: insert an explicit cast to silence this issue
    wlr_box    titleBarBox = {(int)m_vLastWindowPos.x - *PBORDERSIZE - pMonitor->vecPosition.x, (int)m_vLastWindowPos.y - *PBORDERSIZE - *PHEIGHT - pMonitor->vecPosition.y,
                                                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                                                static_cast<int>(                                                          )
barDeco.cpp:254:31: error: non-constant-expression cannot be narrowed from type 'int64_t' (aka 'long') to 'int' in initializer list [-Wc++11-narrowing]
                              (int)m_vLastWindowSize.x + 2 * *PBORDERSIZE, *PHEIGHT + *PROUNDING * 3 /* to fill the bottom cuz we can't disable rounding there */};
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
barDeco.cpp:254:31: note: insert an explicit cast to silence this issue
                              (int)m_vLastWindowSize.x + 2 * *PBORDERSIZE, *PHEIGHT + *PROUNDING * 3 /* to fill the bottom cuz we can't disable rounding there */};
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                              static_cast<int>(                          )
barDeco.cpp:254:76: error: non-constant-expression cannot be narrowed from type 'int64_t' (aka 'long') to 'int' in initializer list [-Wc++11-narrowing]
                              (int)m_vLastWindowSize.x + 2 * *PBORDERSIZE, *PHEIGHT + *PROUNDING * 3 /* to fill the bottom cuz we can't disable rounding there */};
                                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~
barDeco.cpp:254:76: note: insert an explicit cast to silence this issue
                              (int)m_vLastWindowSize.x + 2 * *PBORDERSIZE, *PHEIGHT + *PROUNDING * 3 /* to fill the bottom cuz we can't disable rounding there */};
                                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~
                                                                           static_cast<int>(        )
barDeco.cpp:273:30: error: type 'double' cannot be narrowed to 'int' in initializer list [-Wc++11-narrowing]
        wlr_box windowBox = {(int)m_vLastWindowPos.x + offset.x - pMonitor->vecPosition.x, (int)m_vLastWindowPos.y + offset.y - pMonitor->vecPosition.y, (int)m_vLastWindowSize.x,
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
barDeco.cpp:273:30: note: insert an explicit cast to silence this issue
        wlr_box windowBox = {(int)m_vLastWindowPos.x + offset.x - pMonitor->vecPosition.x, (int)m_vLastWindowPos.y + offset.y - pMonitor->vecPosition.y, (int)m_vLastWindowSize.x,
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                             static_cast<int>(                                           )
barDeco.cpp:273:92: error: type 'double' cannot be narrowed to 'int' in initializer list [-Wc++11-narrowing]
        wlr_box windowBox = {(int)m_vLastWindowPos.x + offset.x - pMonitor->vecPosition.x, (int)m_vLastWindowPos.y + offset.y - pMonitor->vecPosition.y, (int)m_vLastWindowSize.x,
                                                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
barDeco.cpp:273:92: note: insert an explicit cast to silence this issue
        wlr_box windowBox = {(int)m_vLastWindowPos.x + offset.x - pMonitor->vecPosition.x, (int)m_vLastWindowPos.y + offset.y - pMonitor->vecPosition.y, (int)m_vLastWindowSize.x,
                                                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                                           static_cast<int>(                                           )
barDeco.cpp:338:41: error: non-constant-expression cannot be narrowed from type 'int64_t' (aka 'long') to 'double' in initializer list [-
Wc++11-narrowing]
    return SWindowDecorationExtents{{0, *PHEIGHT}, {}};
                                        ^~~~~~~~
barDeco.cpp:338:41: note: insert an explicit cast to silence this issue
    return SWindowDecorationExtents{{0, *PHEIGHT}, {}};
                                        ^~~~~~~~
                                        static_cast<double>( )
barDeco.cpp:344:100: error: non-constant-expression cannot be narrowed from type 'int64_t' (aka 'long') to 'double' in initializer list [-Wc++11-narrowing]
    return g_pInputManager->getMouseCoordsInternal() - m_pWindow->m_vRealPosition.vec() + Vector2D{*PBORDER, *PHEIGHT + *PBORDER};
                                                                                                   ^~~~~~~~
barDeco.cpp:344:100: note: insert an explicit cast to silence this issue
    return g_pInputManager->getMouseCoordsInternal() - m_pWindow->m_vRealPosition.vec() + Vector2D{*PBORDER, *PHEIGHT + *PBORDER};
                                                                                                   ^~~~~~~~
                                                                                                   static_cast<double>( )
barDeco.cpp:344:110: error: non-constant-expression cannot be narrowed from type 'int64_t' (aka 'long') to 'double' in initializer list [-Wc++11-narrowing]
    return g_pInputManager->getMouseCoordsInternal() - m_pWindow->m_vRealPosition.vec() + Vector2D{*PBORDER, *PHEIGHT + *PBORDER};
                                                                                                             ^~~~~~~~~~~~~~~~~~~
barDeco.cpp:344:110: note: insert an explicit cast to silence this issue
    return g_pInputManager->getMouseCoordsInternal() - m_pWindow->m_vRealPosition.vec() + Vector2D{*PBORDER, *PHEIGHT + *PBORDER};
                                                                                                             ^~~~~~~~~~~~~~~~~~~
                                                                                                             static_cast<double>( )

Based on https://github.com/hyprwm/Hyprland/commit/9ee14eb4452e
2023-05-07 15:38:50 +01:00
snehrbass
c2dd35fab6
hyprbars: makefile typo (#21)
Co-authored-by: nehrbash <stephen.nehrbass@infinitetactics.com>
2023-05-05 21:04:54 +01:00
nehrbash
f1e1fc439e hyprbars: add default.nix 2023-05-01 22:46:02 +03:00
snehrbass
e80bf4a44d
Hyprbars: Improve Title Rendering (#16)
* use pangocairo to draw title

* add padding and ellipsis

* add max and close colors to config

* remove snake case, better config variable names

* add pangocairo as a dependency to meson build

* add `buttons:button_size`, adjust for bordersize

* add button_size doc

---------

Co-authored-by: nehrbash <stephen.nehrbass@infinitetactics.com>
2023-05-01 20:02:05 +01:00
vaxerski
274b46c1f7 hyprbars: fix include paths 2023-05-01 02:57:48 +01:00
vaxerski
a6097426e6 all: use pkgconfig for headers 2023-05-01 01:03:10 +01:00
snehrbass
5c383dc5bc
unregister callback for mouse move (#15)
Co-authored-by: nehrbash <stephen.nehrbass@infinitetactics.com>
2023-04-28 15:27:39 +01:00
vaxerski
960a2ae4aa all: update makefile 2023-04-27 14:43:06 +01:00
Mihai Fufezan
c6b1928fac
Meson: init in all plugins and fix include paths 2023-04-27 02:01:22 +03:00
vaxerski
daab9e07e5 hyprbars: end drag on out of bar 2023-04-18 19:50:09 +01:00
vaxerski
bb1437add2 hyprbars: fix typo 2023-04-05 11:20:21 +01:00