ui: added a ton of cool splashes and made the hyprpm ui consistent

This commit is contained in:
Kaley, Fischer 2024-01-04 21:46:39 +01:00
parent f684fd3e43
commit 9609ae0f28
10 changed files with 190 additions and 409 deletions

View file

@ -1,8 +0,0 @@
# compile with HYPRLAND_HEADERS=<path_to_hl> make all
# make sure that the path above is to the root hl repo directory, NOT src/
# and that you have ran `make protocols` in the hl dir.
all:
$(CXX) -shared -fPIC --no-gnu-unique main.cpp customLayout.cpp customDecoration.cpp -o examplePlugin.so -g `pkg-config --cflags pixman-1 libdrm hyprland` -std=c++2b
clean:
rm ./examplePlugin.so

View file

@ -1,74 +0,0 @@
#include "customDecoration.hpp"
#include <hyprland/src/Window.hpp>
#include <hyprland/src/Compositor.hpp>
#include "globals.hpp"
CCustomDecoration::CCustomDecoration(CWindow* pWindow) {
m_pWindow = pWindow;
m_vLastWindowPos = pWindow->m_vRealPosition.vec();
m_vLastWindowSize = pWindow->m_vRealSize.vec();
}
CCustomDecoration::~CCustomDecoration() {
damageEntire();
}
SWindowDecorationExtents CCustomDecoration::getWindowDecorationExtents() {
return m_seExtents;
}
void CCustomDecoration::draw(CMonitor* pMonitor, float a, const Vector2D& offset) {
if (!g_pCompositor->windowValidMapped(m_pWindow))
return;
if (!m_pWindow->m_sSpecialRenderData.decorate)
return;
static auto* const PCOLOR = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:example:border_color")->intValue;
static auto* const PROUNDING = &HyprlandAPI::getConfigValue(PHANDLE, "decoration:rounding")->intValue;
static auto* const PBORDERSIZE = &HyprlandAPI::getConfigValue(PHANDLE, "general:border_size")->intValue;
const auto ROUNDING = !m_pWindow->m_sSpecialRenderData.rounding ?
0 :
(m_pWindow->m_sAdditionalConfigData.rounding.toUnderlying() == -1 ? *PROUNDING : m_pWindow->m_sAdditionalConfigData.rounding.toUnderlying());
// draw the border
CBox fullBox = {(int)(m_vLastWindowPos.x - *PBORDERSIZE), (int)(m_vLastWindowPos.y - *PBORDERSIZE), (int)(m_vLastWindowSize.x + 2.0 * *PBORDERSIZE),
(int)(m_vLastWindowSize.y + 2.0 * *PBORDERSIZE)};
fullBox.x -= pMonitor->vecPosition.x;
fullBox.y -= pMonitor->vecPosition.y;
m_seExtents = {{m_vLastWindowPos.x - fullBox.x - pMonitor->vecPosition.x + 2, m_vLastWindowPos.y - fullBox.y - pMonitor->vecPosition.y + 2},
{fullBox.x + fullBox.width + pMonitor->vecPosition.x - m_vLastWindowPos.x - m_vLastWindowSize.x + 2,
fullBox.y + fullBox.height + pMonitor->vecPosition.y - m_vLastWindowPos.y - m_vLastWindowSize.y + 2}};
fullBox.x += offset.x;
fullBox.y += offset.y;
if (fullBox.width < 1 || fullBox.height < 1)
return; // don't draw invisible shadows
g_pHyprOpenGL->scissor((CBox*)nullptr);
fullBox.scale(pMonitor->scale);
g_pHyprOpenGL->renderBorder(&fullBox, CColor(*PCOLOR), *PROUNDING * pMonitor->scale + *PBORDERSIZE * 2, a);
}
eDecorationType CCustomDecoration::getDecorationType() {
return DECORATION_CUSTOM;
}
void CCustomDecoration::updateWindow(CWindow* pWindow) {
m_vLastWindowPos = pWindow->m_vRealPosition.vec();
m_vLastWindowSize = pWindow->m_vRealSize.vec();
damageEntire();
}
void CCustomDecoration::damageEntire() {
CBox dm = {(int)(m_vLastWindowPos.x - m_seExtents.topLeft.x), (int)(m_vLastWindowPos.y - m_seExtents.topLeft.y),
(int)(m_vLastWindowSize.x + m_seExtents.topLeft.x + m_seExtents.bottomRight.x), (int)m_seExtents.topLeft.y};
g_pHyprRenderer->damageBox(&dm);
}

View file

@ -1,29 +0,0 @@
#pragma once
#define WLR_USE_UNSTABLE
#include <hyprland/src/render/decorations/IHyprWindowDecoration.hpp>
class CCustomDecoration : public IHyprWindowDecoration {
public:
CCustomDecoration(CWindow*);
virtual ~CCustomDecoration();
virtual SWindowDecorationExtents getWindowDecorationExtents();
virtual void draw(CMonitor*, float a, const Vector2D& offset);
virtual eDecorationType getDecorationType();
virtual void updateWindow(CWindow*);
virtual void damageEntire();
private:
SWindowDecorationExtents m_seExtents;
CWindow* m_pWindow = nullptr;
Vector2D m_vLastWindowPos;
Vector2D m_vLastWindowSize;
};

View file

@ -1,80 +0,0 @@
#include "customLayout.hpp"
#include <hyprland/src/Compositor.hpp>
#include "globals.hpp"
void CHyprCustomLayout::onWindowCreatedTiling(CWindow* pWindow) {
const auto PMONITOR = g_pCompositor->getMonitorFromID(pWindow->m_iMonitorID);
const auto SIZE = PMONITOR->vecSize;
// these are used for focus and move calculations, and are *required* to touch for moving focus to work properly.
pWindow->m_vPosition = Vector2D{(SIZE.x / 2.0) * (m_vWindowData.size() % 2), (SIZE.y / 2.0) * (int)(m_vWindowData.size() > 1)};
pWindow->m_vSize = SIZE / 2.0;
// this is the actual pos and size of the window (where it's rendered)
pWindow->m_vRealPosition = pWindow->m_vPosition + Vector2D{10, 10};
pWindow->m_vRealSize = pWindow->m_vSize - Vector2D{20, 20};
const auto PDATA = &m_vWindowData.emplace_back();
PDATA->pWindow = pWindow;
}
void CHyprCustomLayout::onWindowRemovedTiling(CWindow* pWindow) {
std::erase_if(m_vWindowData, [&](const auto& other) { return other.pWindow == pWindow; });
}
bool CHyprCustomLayout::isWindowTiled(CWindow* pWindow) {
return std::find_if(m_vWindowData.begin(), m_vWindowData.end(), [&](const auto& other) { return other.pWindow == pWindow; }) != m_vWindowData.end();
}
void CHyprCustomLayout::recalculateMonitor(const int& eIdleInhibitMode) {
; // empty
}
void CHyprCustomLayout::recalculateWindow(CWindow* pWindow) {
; // empty
}
void CHyprCustomLayout::resizeActiveWindow(const Vector2D& delta, CWindow* pWindow) {
; // empty
}
void CHyprCustomLayout::fullscreenRequestForWindow(CWindow* pWindow, eFullscreenMode mode, bool on) {
; // empty
}
std::any CHyprCustomLayout::layoutMessage(SLayoutMessageHeader header, std::string content) {
return "";
}
SWindowRenderLayoutHints CHyprCustomLayout::requestRenderHints(CWindow* pWindow) {
return {};
}
void CHyprCustomLayout::switchWindows(CWindow* pWindowA, CWindow* pWindowB) {
; // empty
}
void CHyprCustomLayout::alterSplitRatio(CWindow* pWindow, float delta, bool exact) {
; // empty
}
std::string CHyprCustomLayout::getLayoutName() {
return "custom";
}
void CHyprCustomLayout::replaceWindowDataWith(CWindow* from, CWindow* to) {
; // empty
}
void CHyprCustomLayout::onEnable() {
for (auto& w : g_pCompositor->m_vWindows) {
if (w->isHidden() || !w->m_bIsMapped || w->m_bFadingOut || w->m_bIsFloating)
continue;
onWindowCreatedTiling(w.get());
}
}
void CHyprCustomLayout::onDisable() {
m_vWindowData.clear();
}

View file

@ -1,32 +0,0 @@
#pragma once
#define WLR_USE_UNSTABLE
#include <hyprland/src/layout/IHyprLayout.hpp>
struct SWindowData {
CWindow* pWindow = nullptr;
};
class CHyprCustomLayout : public IHyprLayout {
public:
virtual void onWindowCreatedTiling(CWindow*);
virtual void onWindowRemovedTiling(CWindow*);
virtual bool isWindowTiled(CWindow*);
virtual void recalculateMonitor(const int&);
virtual void recalculateWindow(CWindow*);
virtual void resizeActiveWindow(const Vector2D&, CWindow* pWindow = nullptr);
virtual void fullscreenRequestForWindow(CWindow*, eFullscreenMode, bool);
virtual std::any layoutMessage(SLayoutMessageHeader, std::string);
virtual SWindowRenderLayoutHints requestRenderHints(CWindow*);
virtual void switchWindows(CWindow*, CWindow*);
virtual void alterSplitRatio(CWindow*, float, bool);
virtual std::string getLayoutName();
virtual void replaceWindowDataWith(CWindow* from, CWindow* to);
virtual void onEnable();
virtual void onDisable();
private:
std::vector<SWindowData> m_vWindowData;
};

View file

@ -1,5 +0,0 @@
#pragma once
#include <hyprland/src/plugins/PluginAPI.hpp>
inline HANDLE PHANDLE = nullptr;

View file

@ -1,99 +0,0 @@
#define WLR_USE_UNSTABLE
#include "globals.hpp"
#include <hyprland/src/Window.hpp>
#include <hyprland/src/Compositor.hpp>
#include "customLayout.hpp"
#include "customDecoration.hpp"
#include <unistd.h>
#include <thread>
// Methods
inline std::unique_ptr<CHyprCustomLayout> g_pCustomLayout;
inline CFunctionHook* g_pFocusHook = nullptr;
inline CFunctionHook* g_pMotionHook = nullptr;
inline CFunctionHook* g_pMouseDownHook = nullptr;
typedef void (*origFocusWindow)(void*, CWindow*, wlr_surface*);
typedef void (*origMotion)(wlr_seat*, uint32_t, double, double);
typedef void (*origMouseDownNormal)(void*, wlr_pointer_button_event*);
// Do NOT change this function.
APICALL EXPORT std::string PLUGIN_API_VERSION() {
return HYPRLAND_API_VERSION;
}
static void onActiveWindowChange(void* self, std::any data) {
try {
auto* const PWINDOW = std::any_cast<CWindow*>(data);
HyprlandAPI::addNotification(PHANDLE, "[ExamplePlugin] Active window: " + (PWINDOW ? PWINDOW->m_szTitle : "None"), CColor{0.f, 0.5f, 1.f, 1.f}, 5000);
} catch (std::bad_any_cast& e) { HyprlandAPI::addNotification(PHANDLE, "[ExamplePlugin] Active window: None", CColor{0.f, 0.5f, 1.f, 1.f}, 5000); }
}
static void onNewWindow(void* self, std::any data) {
auto* const PWINDOW = std::any_cast<CWindow*>(data);
HyprlandAPI::addWindowDecoration(PHANDLE, PWINDOW, new CCustomDecoration(PWINDOW));
}
void hkFocusWindow(void* thisptr, CWindow* pWindow, wlr_surface* pSurface) {
// HyprlandAPI::addNotification(PHANDLE, getFormat("FocusWindow with %lx %lx", pWindow, pSurface), CColor{0.f, 1.f, 1.f, 1.f}, 5000);
(*(origFocusWindow)g_pFocusHook->m_pOriginal)(thisptr, pWindow, pSurface);
}
void hkNotifyMotion(wlr_seat* wlr_seat, uint32_t time_msec, double sx, double sy) {
// HyprlandAPI::addNotification(PHANDLE, getFormat("NotifyMotion with %lf %lf", sx, sy), CColor{0.f, 1.f, 1.f, 1.f}, 5000);
(*(origMotion)g_pMotionHook->m_pOriginal)(wlr_seat, time_msec, sx, sy);
}
void hkProcessMouseDownNormal(void* thisptr, wlr_pointer_button_event* e) {
// HyprlandAPI::addNotification(PHANDLE, "Mouse down normal!", CColor{0.8f, 0.2f, 0.5f, 1.0f}, 5000);
(*(origMouseDownNormal)g_pMouseDownHook->m_pOriginal)(thisptr, e);
}
APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) {
PHANDLE = handle;
HyprlandAPI::addNotification(PHANDLE, "Hello World from an example plugin!", CColor{0.f, 1.f, 1.f, 1.f}, 5000);
HyprlandAPI::registerCallbackDynamic(PHANDLE, "activeWindow", [&](void* self, SCallbackInfo& info, std::any data) { onActiveWindowChange(self, data); });
HyprlandAPI::registerCallbackDynamic(PHANDLE, "openWindow", [&](void* self, SCallbackInfo& info, std::any data) { onNewWindow(self, data); });
g_pCustomLayout = std::make_unique<CHyprCustomLayout>();
HyprlandAPI::addLayout(PHANDLE, "custom", g_pCustomLayout.get());
HyprlandAPI::addConfigValue(PHANDLE, "plugin:example:border_color", SConfigValue{.intValue = configStringToInt("rgb(44ee44)")});
HyprlandAPI::addDispatcher(PHANDLE, "example", [](std::string arg) { HyprlandAPI::addNotification(PHANDLE, "Arg passed: " + arg, CColor{0.5f, 0.5f, 0.7f, 1.0f}, 5000); });
// Hook a public member
g_pFocusHook = HyprlandAPI::createFunctionHook(PHANDLE, (void*)&CCompositor::focusWindow, (void*)&hkFocusWindow);
// Hook a public non-member
g_pMotionHook = HyprlandAPI::createFunctionHook(PHANDLE, (void*)&wlr_seat_pointer_notify_motion, (void*)&hkNotifyMotion);
// Hook a private member
static const auto METHODS = HyprlandAPI::findFunctionsByName(PHANDLE, "processMouseDownNormal");
g_pMouseDownHook = HyprlandAPI::createFunctionHook(PHANDLE, METHODS[0].address, (void*)&hkProcessMouseDownNormal);
static auto* const PBORDERCOLOR = HyprlandAPI::getConfigValue(PHANDLE, "plugin:example:border_color");
// fancy notifications
HyprlandAPI::addNotificationV2(
PHANDLE,
{{"text", "Example hint, color " + std::to_string(PBORDERCOLOR->intValue)}, {"time", (uint64_t)10000}, {"color", CColor{PBORDERCOLOR->intValue}}, {"icon", ICON_HINT}});
// Enable our hooks
g_pFocusHook->hook();
g_pMotionHook->hook();
g_pMouseDownHook->hook();
HyprlandAPI::reloadConfig();
return {"ExamplePlugin", "An example plugin", "Vaxry", "1.0"};
}
APICALL EXPORT void PLUGIN_EXIT() {
HyprlandAPI::invokeHyprctlCommand("seterror", "disable");
}

View file

@ -1,32 +1,112 @@
# This is an example Hyprland config file.
#
# Refer to the wiki for more information.
#
# Please note not all available settings / options are set here.
# For a full list, see the wiki
#
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=,preferred,auto,auto
# See https://wiki.hyprland.org/Configuring/Keywords/ for more # See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute your favorite apps at launch
# exec-once = waybar & hyprpaper & firefox # exec-once = waybar & hyprpaper & firefox
# Source a file (multi-file configs) # Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf # source = ~/.config/hypr/myColors.conf
# Set programs that you use # Startup
$terminal = kitty #exec-once = waybar & hyprpaper & dunst
$fileManager = dolphin exec-once = /usr/libexec/polkit-gnome-authentication-agent-1
$menu = wofi --show drun exec-once = hyprpm reload -n
#exec-once = wl-clip-persist --clipboard both
#exec-once = wl-paste -p -t text --watch clipman store -P --histpath="~/.local/share/clipman-primary.json"
# Some default env vars. # Plugins
env = XCURSOR_SIZE,24 #plugin {
env = QT_QPA_PLATFORMTHEME,qt5ct # change to qt6ct if you have that # split-monitor-workspaces {
# count = 10
# }
# hy3 {
# # disable gaps when only one window is onscreen
# no_gaps_when_only = false # default: false
#
# # policy controlling what happens when a node is removed from a group,
# # leaving only a group
# # 0 = remove the nested group
# # 1 = keep the nested group
# # 2 = keep the nested group only if its parent is a tab group
# node_collapse_policy = 2 # default: 2
#
# # special workspace
# special_scale_factor = 0.95
#
# # offset from group split direction when only one window is in a group
# group_inset = 10 # default: 10
#
# # tab group settings
# tabs {
# # height of the tab bar
# height = 15 # default: 15
#
# # padding between the tab bar and its focused node
# padding = 5 # default: 5
#
# # the tab bar should animate in/out from the top instead of below the window
# from_top = false # default: false
#
# # rounding of tab bar corners
# rounding = 5 # default: 3
#
# # render the window title on the bar
# render_text = true # default: true
#
# # font to render the window title with
# text_font = Jetbrains Mono # default: Sans
#
# # height of the window title
# text_height = 8 # default: 8
#
# # left padding of the window title
# text_padding = 3 # default: 3
#
# # active tab bar segment color
# col.active = 0xFF8330DB # default: 0xff32b4ff
#
# # urgent tab bar segment color
# col.urgent = 0xffff4f4f # default: 0xffff4f4f
#
# # inactive tab bar segment color
# col.inactive = 0xFF4D4D4D # default: 0x80808080
#
# # active tab bar text color
# col.text.active = 0xffffffff # default: 0xff000000
#
# # urgent tab bar text color
# col.text.urgent = 0xffffffff # default: 0xff000000
#
# # inactive tab bar text color
# col.text.inactive = 0xffffffff # default: 0xff000000
# }
#
# # autotiling settings
# autotile {
# # enable autotile
# enable = false # default: false
#
# # make autotile-created groups ephemeral
# ephemeral_groups = true # default: true
#
# # if a window would be squished smaller than this width, a vertical split will be created
# # -1 = never automatically split vertically
# # 0 = always automatically split vertically
# # <number> = pixel height to split at
# trigger_width = 0 # default: 0
#
# # if a window would be squished smaller than this height, a horizontal split will be created
# # -1 = never automatically split horizontally
# # 0 = always automatically split horizontally
# # <number> = pixel height to split at
# trigger_height = 0 # default: 0
#
# # a space or comma separated list of workspace ids where autotile should be enabled
# # it's possible to create an exception rule by prefixing the definition with "not:"
# # workspaces = 1,2 # autotiling will only be enabled on workspaces 1 and 2
# # workspaces = not:1,2 # autotiling will be enabled on all workspaces except 1 and 2
# workspaces = all # default: all
# }
# }
#}
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/ # For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input { input {
@ -39,7 +119,7 @@ input {
follow_mouse = 1 follow_mouse = 1
touchpad { touchpad {
natural_scroll = false natural_scroll = no
} }
sensitivity = 0 # -1.0 - 1.0, 0 means no modification. sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
@ -50,37 +130,32 @@ general {
gaps_in = 5 gaps_in = 5
gaps_out = 20 gaps_out = 20
border_size = 2 border_size = 3
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg col.active_border = 0xFF8330DB 0xFF3e136c
col.inactive_border = rgba(595959aa) col.inactive_border = 0xFF4D4D4D 0xFF333333
layout = dwindle layout = dwindle
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
allow_tearing = false
} }
decoration { decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more # See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 10 rounding = 10
blur { blur {
enabled = true enabled = true
size = 3 size = 1.5
passes = 1 passes = 1
vibrancy = 0.1696
} }
drop_shadow = true drop_shadow = yes
shadow_range = 4 shadow_range = 4
shadow_render_power = 3 shadow_render_power = 3
col.shadow = rgba(1a1a1aee) col.shadow = rgba(1a1a1aee)
} }
animations { animations {
enabled = true enabled = yes
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
@ -89,15 +164,14 @@ animations {
animation = windows, 1, 7, myBezier animation = windows, 1, 7, myBezier
animation = windowsOut, 1, 7, default, popin 80% animation = windowsOut, 1, 7, default, popin 80%
animation = border, 1, 10, default animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = fade, 1, 7, default animation = fade, 1, 7, default
animation = workspaces, 1, 6, default animation = workspaces, 1, 4, default
} }
dwindle { dwindle {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = true # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = true # you probably want this preserve_split = yes # you probably want this
} }
master { master {
@ -107,40 +181,39 @@ master {
gestures { gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more # See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = false workspace_swipe = off
} }
misc { # unscale XWayland
# See https://wiki.hyprland.org/Configuring/Variables/ for more xwayland {
force_default_wallpaper = -1 # Set to 0 to disable the anime mascot wallpapers force_zero_scaling = true
} }
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
device:epic-mouse-v1 {
sensitivity = -0.5
}
# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
windowrulev2 = nomaximizerequest, class:.* # You'll probably like this. windowrule = rounding 1,class:^(Wine)$
windowrulev2 = opacity 0.8 0.8,class:^(kitty)$
windowrulev2=float,class:^(hyprland.share.picker)$
windowrule = float,^(Steamwebhelper)$
windowrule = float, title:^(Steamwebhelper)$
windowrule = float, title:^(pop-up)
windowrule = float, class:^(xdg-desktop-portal-kde)
windowrule = float, class:^(Wine)
# See https://wiki.hyprland.org/Configuring/Keywords/ for more # See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER $mainMod = SUPER
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, Q, exec, $terminal bind = $mainMod, RETURN, exec, $terminal
bind = $mainMod, C, killactive, bind = $mainMod, Q, killactive,
bind = $mainMod, M, exit, bind = $mainMod SHIFT, Q, exit,
bind = $mainMod, E, exec, $fileManager bind = $mainMod, F, fullscreen,
bind = $mainMod, V, togglefloating, bind = $mainMod, SPACE, togglefloating,
bind = $mainMod, R, exec, $menu bind = $mainMod, L, exec, gtklock
bind = $mainMod CTRL, B, exec, killall waybar && waybar -c /home/$USER/.config/waybar/config-hypr
bind = $mainMod, D, exec, rofi -show run
bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle bind = $mainMod, J, togglesplit, # dwindle
bind = $mainMod, Print, exec, grim -g "$(slurp)" - | swappy -f - # take a screenshot
# Move focus with mainMod + arrow keys # Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l bind = $mainMod, left, movefocus, l
@ -148,6 +221,12 @@ bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d bind = $mainMod, down, movefocus, d
# Move focused with mainMod + arrow keys
bind = $mainMod SHIFT, left, movewindow, l
bind = $mainMod SHIFT, right, movewindow, r
bind = $mainMod SHIFT, up, movewindow, u
bind = $mainMod SHIFT, down, movewindow, d
# Switch workspaces with mainMod + [0-9] # Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1 bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2 bind = $mainMod, 2, workspace, 2
@ -172,9 +251,22 @@ bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9 bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10 bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Example special workspace (scratchpad)
bind = $mainMod, S, togglespecialworkspace, magic # vm fix
bind = $mainMod SHIFT, S, movetoworkspace, special:magic bind=CTRL,ALT_L,submap,passthrough
submap=passthrough
bindr=CTRL,Escape,submap,reset
submap=reset
# Repeat this for each scratchpad you need
# BROWSER
animation=specialWorkspace,0,0,default
# kitty
#bind = $mainMod, y, togglespecialworkspace, kitty
#bind = $mainMod SHIFT, y, movetoworkspace, special:kitty
bind = $mainMod, x, exec, hyprctl dispatch togglespecialworkspace && hyprctl dispatch togglespecialworkspace
# Scroll through existing workspaces with mainMod + scroll # Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1 bind = $mainMod, mouse_down, workspace, e+1

View file

@ -8,22 +8,21 @@
#include <chrono> #include <chrono>
#include <thread> #include <thread>
const std::string HELP = R"#(┏ hyprpm, a Hyprland Plugin Manager const std::string HELP = R"#(usage: hyprpm [flags] [<command> [args]]
add [url] Install a new plugin repository from git LISTING COMMANDS:
remove [url/name] Remove an installed plugin repository add: Install a new plugin repository from git
enable [name] Enable a plugin remove: Remove an installed plugin repository
disable [name] Disable a plugin enable: Enable a plugin
update Check and update all plugins if needed disable: Disable a plugin
reload Reload hyprpm state. Ensure all enabled plugins are loaded. update: Check and update all plugins if needed
list List all installed plugins reload: Rreload hyprpm state. Ensure all enabled plugins are loaded.
list: List all installed plugins
Flags: FLAGS:
--notify -> Send a hyprland notification for important events (e.g. load fail)
--notify | -n Send a hyprland notification for important events (e.g. load fail) --help -> display this help
--help | -h Show this menu --verbose -> Enable too much logging
--verbose | -v Enable too much logging
)#"; )#";
int main(int argc, char** argv, char** envp) { int main(int argc, char** argv, char** envp) {
@ -146,4 +145,4 @@ int main(int argc, char** argv, char** envp) {
} }
return 0; return 0;
} }

View file

@ -26,6 +26,23 @@ inline const std::vector<std::string> SPLASHES = {
"I see a red door and I want it painted black.", "I see a red door and I want it painted black.",
"Take on me, take me on...", "Take on me, take me on...",
"You spin me right round baby right round", "You spin me right round baby right round",
"Through the fire and the flames, we carry on!",
"Life could be a dream, sweetheart",
"We're off to never-never land",
"Just remember ALL CAPS when you spell the man name",
"The cake is a lie The cake is a lie The cake is a lie The cake is a lie",
"WE'RE SHAMELESS",
"Now I only want you gone",
"You Forget A Thousand Things Every Day Pal. Make Sure This Is One Of 'Em."
"The right man in the wrong place can make all the difference in the world."
"Truth Is, The Game Was Rigged From The Start."
"It's said war, war never changes. Men do, through the roads they walk."
"Victory shall be ours, it shall be swift, and it will be honest; purchased with blood."
"Patrolling the Mojave almost makes you wish for a nuclear winter."
"When life gives you lemons, dont make lemonade…"
"You Picked The Wrong House, Fool!"
"I suck at life, but I bowl like an angel."
"Swaying to the symphony... of destruction!",
"Stayin' alive, stayin' alive", "Stayin' alive, stayin' alive",
"Say no way, say no way ya, no way!", "Say no way, say no way ya, no way!",
"Ground control to Major Tom...", "Ground control to Major Tom...",
@ -62,4 +79,4 @@ inline const std::vector<std::string> SPLASHES = {
"The AUR packages always work, except for the times they don't.", "The AUR packages always work, except for the times they don't.",
"Funny animation compositor woo" "Funny animation compositor woo"
// clang-format on // clang-format on
}; };