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
1 vote
0 answers
81 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. ...
6 votes
2 answers
6k views

How to force an application window to be automatically maximized after starting the application?

I tried to use Docky, then I removed it and after that my browser (Chromium) can't be opened in maximum height, every time I should maximize it myself. (XFCE desktop)
1 vote
0 answers
119 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 ...
0 votes
0 answers
33 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 ...
0 votes
0 answers
126 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 ...
8 votes
4 answers
5k views

wmctrl - focus most recent window of an app

I've created some shortcuts mimicking the Unity's Mod4 + num behavior. wmctrl -xa Sublime || subl What I don't like, is that once sublime is running, it always focuses the first opened window. I'd ...
8 votes
3 answers
6k views

Get Active Window ID in Hex not Decimal

How to get the window ID of the focus(active) window in Hex ?
1 vote
1 answer
282 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 ...
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.
1 vote
0 answers
73 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:~$ ...
2 votes
1 answer
537 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?
0 votes
1 answer
599 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 ...
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
5 votes
6 answers
6k views

Focus or open window in gnome on keyboard shortcut

As described here (askubuntu.com/questions/234206/shortcut-to-switch-to-app/328842) the wmctrl gives you access to your windows. So you can switch via keyboard. But I like to have one shortcut to open ...
0 votes
1 answer
849 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 ...
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 ...
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 ...
0 votes
0 answers
86 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 ...
0 votes
1 answer
972 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 ...
0 votes
1 answer
100 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 ...
3 votes
2 answers
985 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 ...
0 votes
0 answers
595 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 ...
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) ...
3 votes
2 answers
714 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 ...
1 vote
1 answer
413 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,...
1 vote
1 answer
236 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 ...
6 votes
1 answer
4k 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 ...
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. ...
0 votes
1 answer
319 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 ...
16 votes
1 answer
5k 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 --...
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 ...
4 votes
1 answer
3k views

Gracefully close applications on shutdown

How to automatically close an application on shutdown (graceful close, not kill)? I try to call wmctrl -c "App" in powerbtn.sh, but it does not work. The same wmctrl command works perfectly when ...
1 vote
1 answer
605 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 ...
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-...
1 vote
0 answers
4k 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.
1 vote
0 answers
68 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 ...
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 ...
17 votes
2 answers
4k views

What causes the deviation in the wmctrl window move command

About wmctrl With wmctrl (not installed by default), we can get information on windows, their id, their geometry, the pid they belong to etc. We can also move or resize windows with several commands. ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
6 votes
3 answers
7k views

Saving and restoring window positions

I'm experiencing a bug where when the machine comes back from standby a monitor connected via displayport (MST) does not come back on, however the windows are still in the area it cover if it did come ...
3 votes
2 answers
1k views

How to make equally sized windows in corners of the screen?

I recently saw this answer to a great question, and I wondered, is this also possible on Ubuntu GNOME 15.10 with GNOME 3.18 and GDM, as well as on Compiz as the answer to that question shows? But the ...
1 vote
0 answers
170 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 ...
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 ...
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, ...
12 votes
5 answers
9k 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?'