You are not logged in.
Hey everyone, I simply assigned
firefoxto the keyboard shortcut SUPER+W.
Is it possible to have Xfce open the current firefox window/application if it is already running?
Last edited by jones (2020-12-21 19:44:56)
Offline
Try:
bash -c "pgrep firefox && wmctrl -a firefox || firefox"(requires wmctrl)
Offline
I think one can omit "pgrep firefox && ". Also, while "wmctrl -a" works for many applications, "wmctrl -xa" is required for some applications such as leafpad and lxterminal. So I just use "wmctrl -xa" instead.
Offline
This is solved!
bash -c "pgrep firefox && wmctrl -a firefox || firefox"The following only works as intended if the program ("process", to be exact) is already running:
wmctrl -xa firefoxLast edited by jones (2020-12-23 10:08:40)
Offline