Questions tagged [wmctrl]

wmctrl is a UNIX/Linux command line tool to interact with an EWMH/NetWM compatible X Window Manager.

Filter by
Sorted by
Tagged with
0 votes
0 answers
32 views

List active windows and their app icon filepaths ( from current icon theme ) - Xorg

I can get the list of active windows by xprop -root _NET_CLIENT_LIST , wmctrl -l but how do i get their app icons too? preferrably from /usr/share/applications/appname.desktop! cuz these have ...
sidhanth rathod's user avatar
0 votes
0 answers
113 views

Get app name by its window ID ( in xorg & linux )

i have a window id, i would like to know its app name. For example, there's an app called "PulseAudio Volume Control", ( pavucontrol pkg ) Now if I open it and xprop it, then the wm_class ...
sidhanth rathod's user avatar
1 vote
0 answers
74 views

wmctrl -- rename window title but need to select by hexadecimal window identifier

I have two instances of a windowed program running. wmctrl -l shows them having identical "long names," though their hexadecimal window identities shown in the first column are different. ...
That Jack Elliott's user avatar
1 vote
1 answer
256 views

Having trouble moving windows between screens via the terminal

I'm running 22.04.2 LTS. I'm trying to write a script that will organize open windows. Unfortunately, wmctrl -l returns an incomplete list. PS /home/edward/Documents/rclone> wmctrl -l 0x0260003d 1 ...
Ed C.'s user avatar
  • 11
1 vote
0 answers
69 views

How do you interact (close, minimize, maximize windows) with Files Windows in Ubuntu 22.10?

In Ubuntu 22.04, you could use wmctrl to interact with Files windows. In Ubuntu 22.10, wmctrl no longer works. How can one interact with Files windows in Ubuntu 22.10? Ubuntu 22.04 userabc@apollo:~$ ...
Chris A.'s user avatar
2 votes
1 answer
516 views

How to maximize all windows from command line

To maximise all windows from the command line, it would be great if wmctrl could be used as easily in minimizing all windows. How do I can use it to do the reverse?
Gaetano Gallozzi's user avatar
0 votes
1 answer
819 views

Description of window properties modified by wmctrl

I found wmctrl allows for changing some "properties" of windows: wmctrl -r <WIN> -b ( add | remove | toggle),prop1 [,prop2 ] Add, remove, or toggle up to two window properties ...
sancho.s ReinstateMonicaCellio's user avatar
1 vote
3 answers
3k views

How can i move a window to a specific monitor (Ubuntu 20.04)?

How do I move a window to a specific monitor with code? I have two screens where one needs to run an app in full screen, and the other needs to play a video in full screen.
Nikolaj Bech Andersen's user avatar
0 votes
0 answers
31 views

Is there a way to "unminimize" a window from the terminal? [duplicate]

I'm making a small GUI extension, one of the things with which it struggles however are minimized windows (I do a lot of window moving via wmctrl). I heard that it is impossible to minimize windows ...
Brendan Mesters's user avatar
0 votes
0 answers
82 views

Is it possible to have an invisible desktop

Note, I've rephrased my question below in edit 2. I really like Ubuntu 20.04s desktop system, I am however looking to make a small script to add some functionality to my system and was wondering it is ...
Brendan Mesters's user avatar
0 votes
1 answer
948 views

Start firefox in fullscreen using wmctrl

I wanted to know if the Firefox's config file can be edited such that Firefox starts in fullscreen. I wanted to find out where is Firefox's config file, so that I could go on and add this line there ...
cookiemonster's user avatar
0 votes
1 answer
99 views

run a python file immidiately after alt+tab

I wrote a python file, which based on wmctrl output of the current window, changes the panel color. I want to bind this file to the Alt+Tab . I tried using system shortcuts but It disables the normal ...
Master Pythoner's user avatar
0 votes
1 answer
584 views

Is there a way to Restore Window from maximized, if not where is the code for the window button that does this?

This is not a duplicate of: Command for restoring minimized windows. (The answer is incorrect on that question and I don't know how to contact the mods to have it unmarked as accepted. I did find this ...
alchemy's user avatar
  • 772
0 votes
0 answers
566 views

Scroll through opened windows & apps with mouse button and scroll wheel

I have my Logitech G502 mouse with many extra buttons so I wish to be able to hold down a mouse button, use scroll wheel to go through opened windows, release mouse button to select it. The close ...
user1502776's user avatar
0 votes
1 answer
1k views

How can a bash script running in a window raise/activate its window?

I ran two similar experiments. First one works, second one doesn't. What am I doing wrong? Setup for both experiments: I have two terminal windows (urxvt) side by side (i3 wm, ubuntu 18.04.4 LTS) ...
Ken's user avatar
  • 3
3 votes
2 answers
708 views

How to send standard input to background job?

After several trial & error, I installed another image viewer on my remote machine (feh), setting in up— and tried the command once again. feh WARNING: /tmp/feh_stdin_ZwCjv7 - No Imlib2 loader ...
Liso's user avatar
  • 15.4k
1 vote
1 answer
234 views

take-vector-screenshot: focusing the window before taking the screenshot

I am using take-vector-screenshot to take a PDF screenshot. When I launch take-vector-screenshot, I have to click a button within its window in order to begin the screenshot process. I then need to ...
Adam Williams's user avatar
6 votes
1 answer
3k views

Setting terminal window's title: wmctrl versus xdotool

Edit: I am not looking for other ways or better ways to change a window's title or to add titles to tabs in terminals. The answers in the proposed duplicate do not in any way come close to addressing ...
DK Bose's user avatar
  • 42.4k
0 votes
1 answer
311 views

How to Retrieve an Iconized Program from the Tray with a Keyboard shortcut

I know that many here don't love Electron, but it's here to stay, as many commercial solution providers are using to package the web applications and make them act/feel like desktop apps and have them ...
Kendor's user avatar
  • 4,838
16 votes
1 answer
4k views

How to determine if window is maximised or minimised from bash script

I have a bash script that moves my windows from the left screen to right screen in dual-screen setup. Currently the way it works is cycling through the window ids that are given by xdotool search --...
v010dya's user avatar
  • 1,472
2 votes
1 answer
3k views

wmctrl && xdotool as keyboard shortcut [duplicate]

In my workflow I always have tab 1-3 of chrome as specific pages that never change. I want to make a keyboard shortcut that will navigate to the second tab with Super+Shift+S. If I execute the ...
emilraji's user avatar
1 vote
1 answer
410 views

Ubuntu 18.04 wmctrl issues

So I've just upgraded to 18.04 and have been adjusting settings and such but am having issues with wmctrl. I had a shortcut set for toggling a window to be always on top "wmctrl -r :ACTIVE: -b toggle,...
WillBV's user avatar
  • 13
1 vote
1 answer
588 views

Get process name behind a window

I'm trying to make a script that checks if Spotify is closed. I tried the following to print the number of open Spotify windows, but it doesn't work. wmctrl -l | grep "Spotify" | wc -l The reason is ...
Abraham Murciano Benzadon's user avatar
1 vote
0 answers
67 views

gnome-terminal is secretive with the runing process in its titlebar (a bug or ?)

Misbehavior of the new gnome terminal (18.04) I used to use wmcrtl to search for the proper window on my crowded desktop and to raise it, set the focus or to do other wm operations... However it ...
Iggy Lake's user avatar
3 votes
2 answers
975 views

Command for restoring minimized windows

Anyone knows the command to restore minimized windows? I need that command to configure Easystroke. For some reason, misc option is not working in that app so I need to enter the command manually. I'm ...
Dillon's user avatar
  • 33
9 votes
3 answers
2k views

wmctrl Ubuntu 17.10 toggle,above not toggling down

After trying the answers in this question: How to start an app with "Always On Top" set?, specially the one in the comments by @MichaelTunnell: This is the best option for me because I ...
Frakcool's user avatar
  • 245
2 votes
1 answer
1k views

17.10 workspaces, xdotool, and wmctrl

Under (not-yet-installed) 17.10, I want a fixed number of (not dynamic) workspaces; whether they're presented horizontally or vertically I don't care. Under Ubuntu 16.10 I'm running now, I had do a ...
daveboss's user avatar
2 votes
1 answer
2k views

Start every window on all workspaces, with a few exclusions

I know about Always on visible workspace But I want all windows to have this as the default when opening, with a few exceptions. The workflow I'm looking for is pretty much the inverse of how it ...
janw's user avatar
  • 546
2 votes
1 answer
1k views

Skype pop up video hack (forcibly resize window)

I use Skype a lot, and a problem I face is that the video pop up doesn't come in ubuntu, as it does in Windows. I tried to use wmctrl for the desired results. This is what I did: wmctrl -i -r ID -b ...
stranger_anon's user avatar
2 votes
0 answers
538 views

How do I make browser window always-on-top (or bottom) whenever I open the broswer? [duplicate]

(Actually I want it to be always-on-bottom, but "on-top" is a more common search term). I know that I can use wmctrl -r "Mozilla Firefox" -b toggle,below to set the browser window to be always-...
Yan King Yin's user avatar
1 vote
0 answers
84 views

How can I detect Workrave windows?

I have some scripts using xmacro. The problem is the thing that Workrave blocks the input from a keyboard for Micro-breaks. So I would like to pause my xmacro script at the moment when Micro-break ...
max5555's user avatar
  • 317
1 vote
0 answers
117 views

Open a script while working on another program

I would like to know how to open a script in a different workspace while working in another workspace. The script opens different webpages every 2 seconds and it lasts 2 minutes to open all the ...
joshsoj's user avatar
  • 115
2 votes
0 answers
41 views

Window location in wmctrl [duplicate]

I have open File Manager window in Ubuntu 16.06 (Unity). I want to make this window size to 400px x 400px and I want to locate top-left corner of this window in point (50, 20). To do this I run ...
Simon's user avatar
  • 151
0 votes
1 answer
96 views

Make Brackets open maximised?

I'm running Ubuntu 14.04 with brackets installed (btw, does brackets work on Ubuntu 17? Coz when I checked with 16 it didn't? But anyway...) The problem When I open Brackets it always comes up in ...
Abraham Murciano Benzadon's user avatar
1 vote
0 answers
169 views

Obtain last active time of window from ID

Distribution used (if that helps): Ubuntu 16.04 LTS with Gnome 3.18.5 I am trying to automate raising a specific application window using a keyboard shortcut. My requirements: Use keyboard shortcut ...
yamatau's user avatar
  • 153
11 votes
3 answers
5k views

How do I look up the name of the current workspace?

Is there any way for a bash script to look up the name of the current workspace (virtual desktop)? This seems really useful for things like customizing behaviors in my .bashrc file based on the ...
DonGar's user avatar
  • 213
4 votes
1 answer
2k views

Why does my wmctrl -a command not raise my minimized Rhythmbox window?

The problem I am currently adding a few custom shortcuts. I fail at revealing a minimized Rhythmbox window. I use wmctrl in a shell script, see below, for this task. When I press the key combo, ...
Reum12's user avatar
  • 53
1 vote
1 answer
1k views

How can I make wmctrl raise the most recently fosused window of an application?

I have a script running wmctrl -x -a "$1". It brings up the window, passed as the argument to the script e.g.: wmctrl -x -a "Firefox" activates firefox. However, with applications that have ...
Salil Surendran's user avatar
12 votes
5 answers
8k views

How can I kill a specific X window

Given IDs produced by wmctrl -l, I d like to be able to kill the process linked to the window ID. How would you suggest to do it?'
user123456's user avatar
  • 2,368
9 votes
2 answers
2k views

Command to span window across multiple monitors

Trying to create a shortcut to take the active window and display it across two displays. Using the following only maximizes it on a single monitor: wmctrl -r :ACTIVE: -e 0,0,0,1800,2300
nullsteph's user avatar
  • 423
2 votes
1 answer
2k views

wmctrl fails to resize/move windows inside script

I'm trying to write a script that opens a bunch of programs and moves/resizes the windows on the screen. For example, #!/bin/bash zim wmctrl -r Zim -b toggle,maximized_vert wmctrl -r Zim -e 0,700,0,-...
user3653831's user avatar
1 vote
0 answers
123 views

How to resize Android Sutdio using wmctrl?

wmctrl works for other windows, but for android studio, it doesn't work for me. Upon investigation, I found the tile of the window as seen by window.get_active_title() is, FocusProxy. I tried the ...
q126y's user avatar
  • 299
1 vote
1 answer
2k views

Hide GUI of program after auto launching on startup

After suffering from a bug in Redshift, I found a great replacement, Iris. I have put the Iris folder in my home directory, and added the following command to Startup Applications sh /home/arun/Iris/...
Fiksdal's user avatar
  • 2,111
3 votes
1 answer
1k views

Can I automatically send a particular application's window to the lowest z-position, when it loses focus?

I do most of my work in two applications: my web browser and my editor. I switch back and forth between them frequently with Alt-Tab. I also have an IM client (Hipchat) open at all times, but I ...
Sean's user avatar
  • 213
1 vote
2 answers
1k views

Is it possible to cycle through workspaces in Unity (14.04+)?

I have configured my keyboard shortcuts so that Alt + left takes me to the work space left, and Alt + right takes me to the work space to the right, but I would rather have one set of keys to cycle. ...
uhuola's user avatar
  • 11
9 votes
1 answer
4k views

Why can't I move a window to the top left corner with wmctrl in Unity?

I've been playing around with wmctrl to take more control of my windows. I've encountered a weird behaviour where Unity reserves double the space. See this screen shot: I opened the terminal and ...
janw's user avatar
  • 546
1 vote
0 answers
3k views

Why isn't wmctrl working?

I am on Ubuntu 14.04. I installed wmctrl using sudo apt-get install wmctrl. Now in the terminal when I try wmctrl -s 0 or wmctrl -s 1 nothing happens. I don't even get any error.
Inspired_Blue's user avatar
17 votes
2 answers
868 views

Can I minimize a window into a box on Unity?

On Irix's 4Dwm, there was an ability to minimise windows into a box (contrary to the task bar used by modern window managers). I have seen this also on an old HPUX. See the "console" square in the ...
Artium's user avatar
  • 313
3 votes
2 answers
488 views

How can I make a shortcut to raise an application's window if it exists?

I constantly switch between Sublime Text, Terminal and Chrome. I'd like to bind shortcut like "Alt + 1" so my current Terminal and current Google Chrome opens. Right now, each time i launch Google ...
Whatda Fock's user avatar
2 votes
1 answer
1k views

How can I prevent annoying workspace- overlapping window appearance?

In the current workspace, I don't want to see the edge of a window I was working with on another workspace. Also I like being able to shove a window mostly off screen so forcing bounds wouldn't be a ...
Seph Reed's user avatar
  • 558