Skip to content

peter1745/hypr-waybar-toggle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hypr-waybar-toggle

Plugin for Hyprland that gives more control over how you toggle the visibility of your Waybar bars.

Installation

hyprpm add https://github.com/peter1745/hypr-waybar-toggle.git
hyprpm enable hypr-waybar-toggle

Configuration

Add the following section to your hyprland configuration file:

plugin {
  hypr_waybar {
    // ...
  }
}

Options

hypr-waybar-region

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 waybar

If 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

toggle_bind

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

toggle_mode

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

Example Configuration

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
  }
}

About

Plugin for Hyprland that allows you to toggle waybar by moving your mouse to the top of the screen

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published