Commit graph

25 commits

Author SHA1 Message Date
0a562ab2c4 all: add -O2 to compiler args 2023-11-04 00:48:52 +00:00
e7caa01b4f all: fix for hyprland@a61eb769 2023-10-21 14:55:42 +01:00
48be13fcb9 borders-plus-plus: remove old debug log 2023-10-19 14:56:59 +01:00
45fcd108d1 borders-plus-plus: honor 0 rounding 2023-10-19 14:48:55 +01:00
2ae696398a borders-plus-plus: Add more borders and controls
Adds up to 9 borders, adds an option to modify size of each, adds natural_rounding
2023-10-19 14:43:54 +01:00
ef552ecfa9 [bpp] Add version check 2023-10-19 14:12:55 +01:00
vaxerski
aa3517bec5 borders-plus-plus: remove debug log 2023-10-10 22:24:14 +01:00
vaxerski
ac6bc07346 borders-plus-plus: update for hyprland 2023-10-10 20:13:20 +01:00
4f58c9b64a borders++: fix compile 2023-09-19 11:21:03 +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
vaxerski
a6097426e6 all: use pkgconfig for headers 2023-05-01 01:03:10 +01:00
vaxerski
960a2ae4aa all: update makefile 2023-04-27 14:43:06 +01:00
Mihai Fufezan
b1b43e8108
Nix: init 2023-04-27 02:01:29 +03:00
Mihai Fufezan
c6b1928fac
Meson: init in all plugins and fix include paths 2023-04-27 02:01:22 +03:00
10522051cd add additional wlroots include dirs 2023-04-01 02:21:31 +01:00
vaxerski
cdebc72b48 add wlr include paths to all makefiles 2023-03-18 00:50:38 +00:00
vaxerski
1a90265ff7 bpp: don't round on rounding 0 2023-03-13 01:32:39 +00:00
vaxerski
d0e1fb960b bpp: fix rounding on border 2 2023-03-03 16:15:33 +00:00
vaxerski
1083afb2d8 bpp: fix oopsie 2023-03-03 15:39:53 +00:00
fa9ef0628d fix borders on workspace anims 2023-02-28 12:06:21 +00:00
vaxerski
7877e735e8 fix example cfg 2023-02-27 20:56:24 +00:00
vaxerski
11a7ad55b7 add offset to bordersplusplus 2023-02-27 19:54:53 +00:00
4b0d8a0eff Added borders-plus-plus 2023-02-27 15:24:28 +00:00