1

i3status-anyevent: run app from button only on left-click

This commit is contained in:
Sergei Fedosov
2021-02-20 19:49:21 +03:00
parent 3a09fcf22f
commit 217a86ecff

View File

@@ -245,6 +245,8 @@ sub add_events () {
my $j = eval { decode_json $msg }; my $j = eval { decode_json $msg };
if (defined $j) { if (defined $j) {
# left button click, without shift, ctrl, alt, etc
if (($j->{button} == 1) && ($#{$j->{modifiers}} < 0)){
foreach (@{$CONF->{apps}}) { foreach (@{$CONF->{apps}}) {
unless (defined $_->{name}) { unless (defined $_->{name}) {
next; next;
@@ -262,6 +264,7 @@ sub add_events () {
} }
} }
} }
}
); );
# poll caps lock status, on one of my laptop there is no led for this :( # poll caps lock status, on one of my laptop there is no led for this :(