Skip to content

How to mix command criteria [class="XyZ"] and exec? #5786

Answered by orestisfl
a-pav asked this question in Q&A
Discussion options

You must be logged in to vote

Right, the i3-specific way to do that is:

bindsym $mod+g [con_id=__focused__ class="firefox"] exec notify-send "this is a browser", [con_id=__focused__ class="Gnome-terminal"] exec notify-send "this is a terminal"

This will execute only the first command on firefox and only the second on gnome terminal.

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
8 replies
@orestisfl
Comment options

Answer selected by a-pav
@a-pav
Comment options

@orestisfl
Comment options

@a-pav
Comment options

@a-pav
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants