Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CHALLENGE: Find a Way to Activate a Window
#5
The "wmctrl" might work only for XFCE. Right now I'm on EndeavourOS with that D.E. and had to install "wmctrl", so not everybody will have it on their Linux system. The good news is that it works but the commands are very specific. Basically give the window a title that could be easily captured and told apart from any other window. Then a few things could be done like:

Code: (Select All)
Force-close:
wmctrl -F -c weakwack

Minimize:
wmctrl -F -c weakwack -b add,hidden

Restore:
wmctrl -F -c weakwack -b remove,hidden

In these examples, "weakwack" (without double-quotation marks) is the title of the window. The "-ia" or anything involving "-i" just didn't work for me, the stupid program doesn't read hexadecimal numbers properly.

https://en.wikipedia.org/wiki/Wmctrl

Sadly otherwise it seems that only window managers are supported. If it exists it would have to be found eg. for KDE Plasma. The "compiz" is in some installations with MATE, especially Fedora. "OpenBox" is a window manager which looks very much like XFCE but was clunky for me to work with. Some distros have it like Porteus and Slackel (both based on Slackware).

EDIT: It might matter if the user enables composition or not for XFCE or for "compiz". I have it disabled on my installtion of EndeavourOS but it worked nevertheless. I would have to switch to my other computer with Fedora 37 MATE to test the other one.

https://linux.die.net/man/1/wmctrl

The following also needs to be installed and there's no guarantee for which D.E. it could work on:

https://github.com/jordansissel/xdotool
Reply


Messages In This Thread
RE: CHALLENGE: Find a Way to Activate a Window - by mnrvovrfc - 12-09-2022, 11:31 PM



Users browsing this thread: 3 Guest(s)