Questions tagged [wmctrl]

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

The tool provides command line access to almost all the features defined in the EWMH specification. It can be used, for example, to get information about the window manager, to get a detailed list of desktops and managed windows, to switch and re-size desktops, to make windows full-screen, always-above or sticky, and to activate, close, move, re-size, maximize and minimize them.

The command line access to these window management functions makes it easy to automate and execute them from any application that is able to run a command in response to an event.

Source:wmctrl

83 questions
24
votes
4 answers

How do I permanently change window titles?

Which files are involved in generating the window title? For example, if you open Rhythmbox, you see the program name as the window title. But it’s not generated by the .desktop file. Which file(s) do I need to edit to add text to the title of an…
Maud Kon
  • 561
17
votes
2 answers

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 linked image: Is it possible to accomplish on…
Artium
  • 333
17
votes
2 answers

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. However, in some respects, its behaviour seems…
Jacob Vlijm
  • 85,475
16
votes
1 answer

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 --onlyvisible --maxdepth 2 --class "" and then moves…
v010dya
  • 1,502
12
votes
5 answers

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
  • 2,478
11
votes
3 answers

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 desktop in which the shell was created.
DonGar
  • 213
9
votes
2 answers

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
9
votes
1 answer

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 moved the window using the top command. It should be…
janw
  • 556
9
votes
3 answers

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 can create a bash script or a keyboard shortcut (which I did)…
Frakcool
  • 245
8
votes
3 answers

Get Active Window ID in Hex not Decimal

How to get the window ID of the focus(active) window in Hex ?
8
votes
5 answers

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 like to focus the last "focused" window. Same as in…
mreq
  • 4,932
7
votes
1 answer

wmctrl ignore other workspaces

My question is very similar to Make wmctrl ignore other-than-current workspace's windows. The fact is I use XFCE so wmctrl actually sees more desktops. petr@sova:~$ wmctrl -d 0 * DG: 1600x900 VP: 0,0 WA: 62,21 1538x879 1 1 - DG: 1600x900 VP:…
mreq
  • 4,932
6
votes
2 answers

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)
R S
  • 2,649
6
votes
1 answer

Window 'grouping'?

I was just wondering, is there any way of 'grouping' windows? I mean, is there a way of joining the edges of two or more windows together so that when one is moved, the other moves with it, acting as one large window? Or at least something similar…
user364819
6
votes
3 answers

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 on. The only way to recover from this short of a…
1
2 3 4 5 6