Button
Button widget provides mouse event map, you can specify mouse key ID
along with the shell command
which will be executed when button is clicked with that key.
Example:
{
"edge": "top",
"position": "left",
"monitor": "HDMI-A-1",
"layer": "overlay",
"margins": {
"left": "25%"
},
"widget": {
"thickness": 20,
"length": "25%",
"type": "btn",
"event_map": {
"1": "hyprctl dispatch movefocus l",
"3": "hyprctl dispatch 'workspace -1'"
}
}
}
*
means required property.
type*
const `btn`
thickness*
*Thickness* of the button, from screen edge to the screen center.
Support relative value, but don't recommend using relative value for this property.
Type: int | string
length*
Length of the button.
Support relative value.
Type: int | string
border_width
Type: int
color
Color of the button.
Support: #rgb
/#rrggbb
/#rrrgggbbb
/rgb(r, g, b)
/rgba(r, g, b, a)
...
For full info, check RGBA
Type: string
Default: #7B98FF
event_map
mouse_key_ID : shell_command
Default mouse keys:
1
- Left button2
- Middle button3
- Right button
Type: object
Default: {}