mirror of
https://github.com/hyprwm/hyprland-plugins.git
synced 2025-10-29 03:35:48 +00:00
parent
6913b8d506
commit
d0d8e8dd5b
@ -1,4 +1,12 @@
|
||||
# Else exist specifically for clang
|
||||
ifeq ($(CXX),g++)
|
||||
EXTRA_FLAGS = --no-gnu-unique
|
||||
else
|
||||
EXTRA_FLAGS =
|
||||
endif
|
||||
|
||||
all:
|
||||
$(CXX) -shared -fPIC --no-gnu-unique main.cpp borderDeco.cpp BorderppPassElement.cpp -o borders-plus-plus.so -g `pkg-config --cflags pixman-1 libdrm hyprland pangocairo libinput libudev wayland-server xkbcommon` -std=c++2b -O2
|
||||
$(CXX) -shared -fPIC $(EXTRA_FLAGS) main.cpp borderDeco.cpp BorderppPassElement.cpp -o borders-plus-plus.so -g `pkg-config --cflags pixman-1 libdrm hyprland pangocairo libinput libudev wayland-server xkbcommon` -std=c++2b -O2
|
||||
|
||||
clean:
|
||||
rm ./borders-plus-plus.so
|
||||
|
||||
@ -3,7 +3,8 @@
|
||||
#include <hyprland/src/Compositor.hpp>
|
||||
#include <hyprland/src/desktop/Window.hpp>
|
||||
#include <hyprland/src/render/Renderer.hpp>
|
||||
|
||||
#include <hyprutils/memory/Casts.hpp>
|
||||
using namespace Hyprutils::Memory;
|
||||
#include "BorderppPassElement.hpp"
|
||||
#include "globals.hpp"
|
||||
|
||||
@ -138,11 +139,11 @@ void CBordersPlusPlus::drawPass(PHLMONITOR pMonitor, const float& a) {
|
||||
g_pHyprOpenGL->scissor(nullptr);
|
||||
|
||||
g_pHyprOpenGL->renderBorder(fullBox, CHyprColor{(uint64_t)**PCOLORS[i]},
|
||||
{.round = **PNATURALROUND ? ORIGINALROUND : rounding,
|
||||
{.round = **PNATURALROUND ? sc<int>(ORIGINALROUND) : sc<int>(rounding),
|
||||
.roundingPower = ROUNDINGPOWER,
|
||||
.borderSize = THISBORDERSIZE,
|
||||
.a = a,
|
||||
.outerRound = **PNATURALROUND ? ORIGINALROUND : -1});
|
||||
.outerRound = **PNATURALROUND ? sc<int>(ORIGINALROUND) : -1});
|
||||
}
|
||||
|
||||
m_seExtents = {{fullThickness, fullThickness}, {fullThickness, fullThickness}};
|
||||
|
||||
@ -1,4 +1,11 @@
|
||||
# Else exist specifically for clang
|
||||
ifeq ($(CXX),g++)
|
||||
EXTRA_FLAGS = --no-gnu-unique
|
||||
else
|
||||
EXTRA_FLAGS =
|
||||
endif
|
||||
|
||||
all:
|
||||
$(CXX) -shared -fPIC --no-gnu-unique main.cpp -o csgo-vulkan-fix.so -g `pkg-config --cflags pixman-1 libdrm hyprland pangocairo libinput libudev wayland-server xkbcommon` -std=c++2b -O2
|
||||
$(CXX) -shared -fPIC $(EXTRA_FLAGS) main.cpp -o csgo-vulkan-fix.so -g `pkg-config --cflags pixman-1 libdrm hyprland pangocairo libinput libudev wayland-server xkbcommon` -std=c++2b -O2
|
||||
clean:
|
||||
rm ./csgo-vulkan-fix.so
|
||||
|
||||
@ -1,4 +1,11 @@
|
||||
CXXFLAGS = -shared -fPIC --no-gnu-unique -g -std=c++2b -Wno-c++11-narrowing
|
||||
# Else exist specifically for clang
|
||||
ifeq ($(CXX),g++)
|
||||
EXTRA_FLAGS = --no-gnu-unique
|
||||
else
|
||||
EXTRA_FLAGS =
|
||||
endif
|
||||
|
||||
CXXFLAGS = -shared -fPIC -g -std=c++2b -Wno-c++11-narrowing
|
||||
INCLUDES = `pkg-config --cflags pixman-1 libdrm hyprland pangocairo libinput libudev wayland-server xkbcommon`
|
||||
LIBS = `pkg-config --libs pangocairo`
|
||||
|
||||
@ -8,7 +15,7 @@ TARGET = hyprbars.so
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(SRC)
|
||||
$(CXX) $(CXXFLAGS) $(INCLUDES) $^ $> -o $@ $(LIBS) -O2
|
||||
$(CXX) $(CXXFLAGS) $(EXTRA_FLAGS) $(INCLUDES) $^ $> -o $@ $(LIBS) -O2
|
||||
|
||||
clean:
|
||||
rm ./$(TARGET)
|
||||
|
||||
@ -1,4 +1,11 @@
|
||||
# Else exist specifically for clang
|
||||
ifeq ($(CXX),g++)
|
||||
EXTRA_FLAGS = --no-gnu-unique
|
||||
else
|
||||
EXTRA_FLAGS =
|
||||
endif
|
||||
|
||||
all:
|
||||
$(CXX) -shared -fPIC --no-gnu-unique main.cpp overview.cpp ExpoGesture.cpp OverviewPassElement.cpp -o hyprexpo.so -g `pkg-config --cflags pixman-1 libdrm hyprland pangocairo libinput libudev wayland-server xkbcommon` -std=c++2b -Wno-narrowing
|
||||
$(CXX) -shared -fPIC $(EXTRA_FLAGS) main.cpp overview.cpp ExpoGesture.cpp OverviewPassElement.cpp -o hyprexpo.so -g `pkg-config --cflags pixman-1 libdrm hyprland pangocairo libinput libudev wayland-server xkbcommon` -std=c++2b -Wno-narrowing
|
||||
clean:
|
||||
rm ./hyprexpo.so
|
||||
|
||||
@ -1,4 +1,11 @@
|
||||
# Else exist specifically for clang
|
||||
ifeq ($(CXX),g++)
|
||||
EXTRA_FLAGS = --no-gnu-unique
|
||||
else
|
||||
EXTRA_FLAGS =
|
||||
endif
|
||||
|
||||
all:
|
||||
$(CXX) -shared -fPIC --no-gnu-unique main.cpp -o hyprfocus.so -g `pkg-config --cflags pixman-1 libdrm hyprland pangocairo libinput libudev wayland-server xkbcommon` -std=c++2b -O2
|
||||
$(CXX) -shared -fPIC $(EXTRA_FLAGS) main.cpp -o hyprfocus.so -g `pkg-config --cflags pixman-1 libdrm hyprland pangocairo libinput libudev wayland-server xkbcommon` -std=c++2b -O2
|
||||
clean:
|
||||
rm ./hyprfocus.so
|
||||
|
||||
@ -1,4 +1,12 @@
|
||||
# Else exist specifically for clang
|
||||
ifeq ($(CXX),g++)
|
||||
EXTRA_FLAGS = --no-gnu-unique
|
||||
else
|
||||
EXTRA_FLAGS =
|
||||
endif
|
||||
|
||||
|
||||
all:
|
||||
$(CXX) -shared -fPIC --no-gnu-unique main.cpp Scrolling.cpp -o hyprscrolling.so -g `pkg-config --cflags pixman-1 libdrm hyprland pangocairo libinput libudev wayland-server xkbcommon` -std=c++2b
|
||||
$(CXX) -shared -fPIC $(EXTRA_FLAGS) main.cpp Scrolling.cpp -o hyprscrolling.so -g `pkg-config --cflags pixman-1 libdrm hyprland pangocairo libinput libudev wayland-server xkbcommon` -std=c++2b
|
||||
clean:
|
||||
rm ./hyprscrolling.so
|
||||
|
||||
@ -1,4 +1,11 @@
|
||||
# Else exist specifically for clang
|
||||
ifeq ($(CXX),g++)
|
||||
EXTRA_FLAGS = --no-gnu-unique
|
||||
else
|
||||
EXTRA_FLAGS =
|
||||
endif
|
||||
|
||||
all:
|
||||
$(CXX) -shared -fPIC --no-gnu-unique main.cpp trail.cpp TrailPassElement.cpp -o hyprtrails.so -g `pkg-config --cflags pixman-1 libdrm hyprland pangocairo libinput libudev wayland-server xkbcommon` -std=c++2b -O2
|
||||
$(CXX) -shared -fPIC $(EXTRA_FLAGS) main.cpp trail.cpp TrailPassElement.cpp -o hyprtrails.so -g `pkg-config --cflags pixman-1 libdrm hyprland pangocairo libinput libudev wayland-server xkbcommon` -std=c++2b -O2
|
||||
clean:
|
||||
rm ./hyprtrails.so
|
||||
|
||||
@ -3,7 +3,8 @@
|
||||
#include <hyprland/src/Compositor.hpp>
|
||||
#include <hyprland/src/desktop/Window.hpp>
|
||||
#include <hyprland/src/render/Renderer.hpp>
|
||||
|
||||
#include <hyprutils/memory/Casts.hpp>
|
||||
using namespace Hyprutils::Memory;
|
||||
#include "globals.hpp"
|
||||
#include "TrailPassElement.hpp"
|
||||
|
||||
@ -120,7 +121,7 @@ void CTrail::renderPass(PHLMONITOR pMonitor, const float& a) {
|
||||
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
|
||||
|
||||
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
|
||||
g_pHyprOpenGL->renderRect(wlrbox, CHyprColor(0, 0, 0, 0), {.round = PWINDOW->rounding() * pMonitor->m_scale, .roundingPower = PWINDOW->roundingPower()});
|
||||
g_pHyprOpenGL->renderRect(wlrbox, CHyprColor(0, 0, 0, 0), {.round = sc<int>(PWINDOW->rounding() * pMonitor->m_scale), .roundingPower = PWINDOW->roundingPower()});
|
||||
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||
|
||||
glStencilFunc(GL_NOTEQUAL, 1, -1);
|
||||
@ -227,7 +228,7 @@ void CTrail::renderPass(PHLMONITOR pMonitor, const float& a) {
|
||||
float ageFloor = std::floor(ageCoeff);
|
||||
float ageCeil = std::ceil(ageCoeff);
|
||||
float approxAge =
|
||||
agesForBezier[static_cast<int>(ageFloor)] + (agesForBezier[static_cast<int>(ageCeil)] - agesForBezier[static_cast<int>(ageFloor)]) * (ageCoeff - ageFloor);
|
||||
agesForBezier[sc<int>(ageFloor)] + (agesForBezier[sc<int>(ageCeil)] - agesForBezier[sc<int>(ageFloor)]) * (ageCoeff - ageFloor);
|
||||
float coeff = originalCoeff * (1.0 - (approxAge / maxAge));
|
||||
Vector2D newVec = {vecNormal.x * coeff / pMonitor->m_size.x, vecNormal.y * coeff / pMonitor->m_size.y};
|
||||
|
||||
@ -243,9 +244,10 @@ void CTrail::renderPass(PHLMONITOR pMonitor, const float& a) {
|
||||
}
|
||||
|
||||
box thisboxopengl =
|
||||
box{(PWINDOW->m_realPosition->value().x - pMonitor->m_position.x) / pMonitor->m_size.x, (PWINDOW->m_realPosition->value().y - pMonitor->m_position.y) / pMonitor->m_size.y,
|
||||
(PWINDOW->m_realPosition->value().x + PWINDOW->m_realSize->value().x) / pMonitor->m_size.x,
|
||||
(PWINDOW->m_realPosition->value().y + PWINDOW->m_realSize->value().y) / pMonitor->m_size.y};
|
||||
box{sc<float>((PWINDOW->m_realPosition->value().x - pMonitor->m_position.x) / pMonitor->m_size.x),
|
||||
sc<float>((PWINDOW->m_realPosition->value().y - pMonitor->m_position.y) / pMonitor->m_size.y),
|
||||
sc<float>((PWINDOW->m_realPosition->value().x + PWINDOW->m_realSize->value().x) / pMonitor->m_size.x),
|
||||
sc<float>((PWINDOW->m_realPosition->value().y + PWINDOW->m_realSize->value().y) / pMonitor->m_size.y)};
|
||||
glUniform4f(g_pGlobalState->trailShader.uniformLocations[SHADER_GRADIENT], thisboxopengl.x, thisboxopengl.y, thisboxopengl.w, thisboxopengl.h);
|
||||
glUniform4f(g_pGlobalState->trailShader.uniformLocations[SHADER_COLOR], COLOR.r, COLOR.g, COLOR.b, COLOR.a);
|
||||
|
||||
@ -332,7 +334,7 @@ void CTrail::updateWindow(PHLWINDOW pWindow) {
|
||||
}
|
||||
|
||||
void CTrail::damageEntire() {
|
||||
CBox dm = {(int)(m_lastWindowPos.x - m_seExtents.topLeft.x), (int)(m_lastWindowPos.y - m_seExtents.topLeft.y),
|
||||
(int)(m_lastWindowSize.x + m_seExtents.topLeft.x + m_seExtents.bottomRight.x), (int)m_seExtents.topLeft.y};
|
||||
CBox dm = {sc<double>(m_lastWindowPos.x - m_seExtents.topLeft.x), sc<double>(m_lastWindowPos.y - m_seExtents.topLeft.y),
|
||||
sc<double>(m_lastWindowSize.x + m_seExtents.topLeft.x + m_seExtents.bottomRight.x), sc<double>(m_seExtents.topLeft.y)};
|
||||
g_pHyprRenderer->damageBox(dm);
|
||||
}
|
||||
|
||||
@ -1,4 +1,11 @@
|
||||
# Else exist specifically for clang
|
||||
ifeq ($(CXX),g++)
|
||||
EXTRA_FLAGS = --no-gnu-unique
|
||||
else
|
||||
EXTRA_FLAGS =
|
||||
endif
|
||||
|
||||
all:
|
||||
$(CXX) -shared -fPIC --no-gnu-unique main.cpp -o hyprwinwrap.so -g `pkg-config --cflags pixman-1 libdrm hyprland pangocairo libinput libudev wayland-server xkbcommon` -std=c++2b -O2
|
||||
$(CXX) -shared -fPIC $(EXTRA_FLAGS) main.cpp -o hyprwinwrap.so -g `pkg-config --cflags pixman-1 libdrm hyprland pangocairo libinput libudev wayland-server xkbcommon` -std=c++2b -O2
|
||||
clean:
|
||||
rm ./hyprwinwrap.so
|
||||
|
||||
@ -1,4 +1,11 @@
|
||||
# Else exist specifically for clang
|
||||
ifeq ($(CXX),g++)
|
||||
EXTRA_FLAGS = --no-gnu-unique
|
||||
else
|
||||
EXTRA_FLAGS =
|
||||
endif
|
||||
|
||||
all:
|
||||
$(CXX) -shared -fPIC --no-gnu-unique main.cpp -o xtra-dispatchers.so -g `pkg-config --cflags pixman-1 libdrm hyprland pangocairo libinput libudev wayland-server xkbcommon` -std=c++2b -O2
|
||||
$(CXX) -shared -fPIC $(EXTRA_FLAGS) main.cpp -o xtra-dispatchers.so -g `pkg-config --cflags pixman-1 libdrm hyprland pangocairo libinput libudev wayland-server xkbcommon` -std=c++2b -O2
|
||||
clean:
|
||||
rm ./xtra-dispatchers.so
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user