mirror of
https://github.com/swaywm/sway.git
synced 2025-11-07 13:29:56 -05:00
Send IPC modifier event on bar_modifier up/down
Detects when a bar modifier key is pressed/released and sends a modifier
IPC event to any listeners (usually swaybars).
This way a swaybar can listen on the modifier event and hide/show the
bar accordingly (not implemented yet)
The modifier event looks like this:
{
"change": "pressed", // or released
"modifier": "Mod4"
}
This commit is contained in:
parent
7727c9efbc
commit
c20c63b677
5 changed files with 57 additions and 8 deletions
|
|
@ -1897,7 +1897,7 @@ static struct cmd_results *bar_cmd_modifier(int argc, char **argv) {
|
|||
bool is_mod = false;
|
||||
for (j = 0; j < (int)(sizeof(modifiers) / sizeof(struct modifier_key)); ++j) {
|
||||
if (strcasecmp(modifiers[j].name, split->items[i]) == 0) {
|
||||
mod |= modifiers[j].mod;
|
||||
mod = modifiers[j].mod;
|
||||
is_mod = true;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue