Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

316
Views
wmctrl to open window without focus

I am using the command:

wmctrl -a **id of application** -i

This is very close to what I am looking for, however Is there a away I can use wmctrl without bringing focus to the application.

For example if i run the command to bring up a window on my 2nd screen in terminal the focus of the mouse and keyboard stay on terminal.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

xdotool may come in handy in your situation.

  1. You should save your active window's ID to temporary file:

    xdotool getactivewindow > ~/.window_id

  2. Then focus desired window:

    wmctrl -a **id of application** -i

  3. And then restore focus to the previous window:

    xdotool windowfocus $(cat ~/.window_id) xdotool windowactivate $(cat ~/.window_id)

Using xbindkeys, xdotool and wmctrl combined create a very powerful tool-set.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!