Plugin for Hyprland that gives more control over how you toggle the visibility of your Waybar bars.
hyprpm add https://github.com/peter1745/hypr-waybar-toggle.git
hyprpm enable hypr-waybar-toggleAdd the following section to your hyprland configuration file:
plugin {
hypr_waybar {
// ...
}
}Defines which area of a monitor should be used to toggle a given waybar process. The x, y, width and height parameters are monitor-local values. E.g 0, 0 for x and y is always the top-left corner of the monitor.
The WAYBAR_PROCESS_NAME parameter specifies which waybar process the plugin should toggle when the given region is interacted with. This parameter exists to allow toggling specific bars with specific regions. You name a given waybar process when launching it with the following command:
exec -a process_name waybarIf the WAYBAR_PROCESS_NAME parameter isn't set it will be defaulted to "waybar".
Usage: hypr-waybar-region = MONITOR, X, Y, WIDTH, HEIGHT, WAYBAR_PROCESS_NAME
Example: hypr-waybar-region = DP-1, 0, 0, 200, 60, waybar-workspace-dp-1
The toggle_bind variable lets you set a key that will be used to toggle a given region, assuming the mouse is over the region to begin with.
If toggle_bind isn't specified we assume that you want to show regions on hover, without the use of any key.
See the xkbcommon/xkbcommon-keysyms.h header for possible key names. The name you should use is the segment after XKB_KEY_.
Example: toggle_bind = Caps_Lock
Determines the behavior used to toggle regions. Possible options are: hold, press.
press will cause the key specified by toggle_bind to act as an on / off switch for the normal "hover" behavior.
hold means that a region will only be visible while the mouse is over it AND the key specified by toggle_bind is actively held down.
If toggle_mode isn't specified it will default to hold.
Example: toggle_mode = press
plugin {
hypr_waybar {
toggle_bind = Caps_Lock
toggle_mode = press
hypr-waybar-region = DP-1, 0, 0, 200, 60, waybar-workspace-dp-1
hypr-waybar-region = DP-1, 1180, 0, 200, 60, waybar-clock-dp-1
hypr-waybar-region = DP-1, 2370, 0, 190, 60, waybar-tray-dp-1
}
}