glazewm
glazewm copied to clipboard
[Feature Request] Add click events to non-text components
As far as i know, the only component that supports custom click commands is text
:
- type: "text"
text: "hi"
left_click_command: "exec cmd"
right_click_command: "exec taskmgr"
Proposal:
It would be nice to bring this ability to other components. For example, i could click on my RAM indicator to launch Task Manager and kill a process that's hogging my memory.
Before the developers implement this, there is currently actually the very scuffed but functional method of placing a text component containing only spaces on the right of component you want to add a click event for, and then giving it a negative x-margin.
# -- Your component --
- type: "text"
text: " " # Adjust number of spaces based on size of component
margin: 0 -25 # Moves it left on top of the previous component
left_click_command: "exec cmd"
right_click_command: "exec taskmgr"
oh, that’s a creative way of doing it! i’m going to give it a shot, thanks!