Questions tagged [wmctrl]

wmctrl is a command for EWMH- and NetWM-compatible X Window managers on Linux systems. It can be used to control windows by their characteristics on workspaces and on external displays.

Filter by
Sorted by
Tagged with
1
vote
1answer
70 views

wmctrl-like tool or alternative for kde wayland

A big part of my workflow is based on using shortcuts. Currently I use xbindkeys and wmctrl to run-or-raise an application. E.g: Super+F brings up firefox or run it if not running. Autokey works fine ...
3
votes
1answer
213 views

How to get the url from current tab of firefox by help of wmctrl?

It's possible to get the current tab with xdotool: # set focus to address on browser xdotool search --onlyvisible --classname Navigator windowactivate --sync key F6 # copy address from browser tab to ...
1
vote
0answers
194 views

Fedora 33 - gnome-terminal doesn't show up in wmctrl

A while ago I wrote a wmctrl-based script I used to implement a hotkey to focus into running gnome-terminal instance in order to avoid using mouse when I need to run anything in terminal. After an ...
0
votes
1answer
235 views

Ubuntu: XFCE: Is there a workaround for swiching to IntelliJ IDEA with wmctrl after IDEA removed “IntelliJ” from the `window title`?

I have shortcut keys setup that take the focus to a certain application in my Xubuntu setup. So e.g.: START+1 takes me to my main web browser window START+2 takes me to my main Sublime window START+3 ...
0
votes
1answer
42 views

How to use I3 instances

I know I can use assign with instance like this: assign [instance="main terminal"] $ws2 But, how can I start an application and assign it a certain instance name?
1
vote
2answers
258 views

How can I use wmctrl to check if a certain WM_ICON_NAME(STRING) exists?

I'm using I3 and I use WM_ICON_NAME(STRING) to identify my windows. I'm looking for something similar to this, but with WM_ICON_NAME(STRING). It is possible to achieve this? Thank you. if test $(...
0
votes
0answers
51 views

Read text of a open window in a linux shell

i have a little script that runs commands depending on the title of opened windows. I read that titles using wmctrl -l Some of the window titles are very general. Can i read the window text using the ...
0
votes
1answer
156 views

how to let xterm have geometry of 80x1 after disabling decorations?

I use this to toggle-decorations: https://gist.github.com/muktupavels/d03bb14ea6042b779df89b4c87df975d if I start xterm -geometry 80x1 it will have 1 height (in xterm TEXT lines, not in screen dots), ...
1
vote
0answers
84 views

Xfce: launching a program on another desktop without wmctrl

Running in Xfce with several desktops defined, I want to launch a program and have it start in a desktop that's different from the one which has the current focus. I know how to write script which ...
0
votes
1answer
42 views

Open and position (duplicative) windows within GNOME from a script

This question shows how one can address a window by it's title, and then position/resize it around. Now to address a window there are five options: - The window's ID: Changes on application restart =...
0
votes
1answer
153 views

Inconsistent behavior of wmctrl in maximizing terminal from .bashrc

I've got this wmctrl -r :ACTIVE: -b add,maximized_vert,maximized_horz inside my .bashrc in order to maximize my terminal upon opening. The odd thing is that it seems to work only randomly, sometimes ...
3
votes
2answers
3k views

How to minimize an application window from command line

I have a startup application that has no option to "start minimized" or "close to system tray" etc. and therefore would like to use a startup script that will first start the application and then ...
1
vote
1answer
77 views

FvwmCommand WindowList - get layer information

I'm trying to get information about running windows with all the information that is shown in the menu of "FvwmCommand WindowList" output. (Redhat Linux 7) The problem with this command is that it ...
0
votes
0answers
106 views

wmctrl showing and hiding tray programs

Hello there im trying to make my onboard hide/show with a keyboard shortcut (i know ironic, please don't ask why) however i couldn't find a way to do it in their manual, it only shows programs that ...
1
vote
1answer
2k views

How to resize and move a window by its PID using `wmctrl`?

I am using a 21:9 Monitor and wrote a script to tile/align my windows to the left, centre and right side of the monitor, using keyboard-shortcuts: ┌─────────┬─────────┬─────────┐ │ window1 │ window2 │...
2
votes
1answer
764 views

Is it possible to move window out of the screen border?

So I'm currently moving application Windows with wmctrl but I can't move a window outside the screen's border. Not talking about moving outside top left corner which we can't even acheive it by mouse, ...
0
votes
1answer
262 views

How to activate most recently focused app window in xfce4/xfwm4?

I use my function keys for specific applications (F1 chrome, F2 terminal, etc). I have a script bound to a shortcut key to activate the right application, and that works, but it doesn't activate the ...
-1
votes
1answer
85 views

Constantly update .txt file with title of a window in Linux?

I have an application with a window title that, every second, I want to update a .txt file with that window title. I have been trying to pull this off in bash with wmctrl -l, but I can't get anywhere. ...
0
votes
0answers
151 views

move from one xterm and back again using wmctrl

I'm running fvwm and have multiple virtual desktops open. I'd like to be able to write a bash script that would take me from one xterm to another---this part is easy, using wmctrl -a ---and then back ...
1
vote
0answers
136 views

How to superimpose window on panel bar

Fullscreen mode allows a window to cover the whole screen (hence its name), even over the panel bar. How can this be done for a window without entering the fullscreen mode? Assuming a panel bar on ...
5
votes
1answer
484 views

wmctrl doesn't move window when snapped or tiled

I'm using Mint 18.1 cinnamon. I'm trying to write a little bash program to move windows around. I have a command that will remove maximized_vert and maximized_horz then move the window. It works ...
4
votes
1answer
266 views

How can I monitor in real time the changes to the browser's WM_NAME

I need to check how the browser's WM_NAME (let's say google-chrome) is changing in real time. How can I do that ?
2
votes
0answers
466 views

How to launch an application as a dock on openbox

If i do obxprop|grep dock and click on gnome-panel for example, my result is : _OB_APP_TYPE(UTF8_STRING) = "dock" For the rest, it's : _OB_APP_TYPE(UTF8_STRING) = "normal" How can i force a ...
4
votes
1answer
637 views

Command-line tool to get “click and drag” rectangle coordinates from the screen [closed]

I would like to execute a command-line command that activates "click and drag" mouse selection on a single local X11 screen. The goal is to: get the selected rectangle X and Y coordinates, ...
2
votes
5answers
1k views

Getting just the application name from wmctrl -l

I am trying to just get the application name out of this code: wmctrl -l but I don't know how to do it! If you could please explain how I could do this, that would be great. EDIT: The output of ...
12
votes
1answer
8k views

How to customize window tiling zones/grid?

In Cinnamon, pressing super+arrow keys (or other similar shortcut) resizes current window into a tile (snaps to grid). How can I customize this grid? For example I would like to split screen into 3 ...
1
vote
1answer
920 views

Sending key with wmctrl

Is it possible using wmctrl to send keystrokes to a window? I know it's possible by using xdotool. Both tools are very similar, so maybe I missed something when I read the man pages for wmctrl.
1
vote
0answers
183 views

How to run program from specific viewport (not how to move it there)

Is there a way to run a program from a specific viewport (monitor)? All explanations I found, were about moving a window after it has been created, which is not what I am trying to do. Why: I have ...
1
vote
2answers
117 views

How to move windows of dimension range to Workspace 2?

I have many figures of widthxheight (550-570)x(465-486) at the southwest logically set there by Matlab's movegui() function. I would like to open all those southwest windows of the size range in an ...
0
votes
1answer
78 views

Creating a specific chrome window and use it as drop-down search window

I am using a simple script runs as "toggle.sh process1" which toggles visibility of process1 if it exists and if it doesn't exist then it launches process1. It is really simple but useful. I use it ...
2
votes
0answers
66 views

stopping terminal command gnome-open from opening files as maximised

when I use the terminal command 'gnome-open' for opening files it causes them to always open as maximised, this is a problem because in its maximised form I can't change its position and size using '...
1
vote
0answers
241 views

Simplest way to tell if a GTK application (e.g. Firefox) is fully loaded and ready, in order to maximize it

In Linux kiosks, in order to reset some applications'state "behind the scenes" (while the screensaver blanks the screen), I use a BASH script which among other things calls wmctrl, with the task of ...
2
votes
0answers
925 views

How to change title of active window using wmctrl

I'm using fluxbox window manager and recently I've added "always on top" shortcut to my "keys" file. Mod1 a :ExecCommand wmctrl -r :ACTIVE: -b toggle,above But I'd like to know if window state is "...
1
vote
2answers
195 views

How are window-ids given out by MATE window manager?

While trying to write a script involving wmctrl ( since MATE on LMDE 2 doesn't offer as many advanced features as other WM configurations involving Compiz, which I don't have on LMDE 2), I came across ...
8
votes
3answers
6k views

How can I automate window tiling with a custom width? (Cinnamon)

I am running Linux Mint 17 Cinnamon 2.4.8. I really like xdotool, but it conflicts with Cinnamon's awesome snapping/tiling feature. If I run the following command, it does NOT work if the current ...
3
votes
1answer
4k views

Stretch window over two monitors with “gap” in between

I have a dual monitor setup with Compiz as window manager on Ubuntu 14.04. I can resize a window to stretch over both windows. However, while the physical display panels are a few centimeters apart, ...
4
votes
1answer
1k views

Retrieve X11 window ID of a just-launched GUI-program

I want to retrieve the X id of GUI programs I launch in background, in order to work on their windows properties. I've been so far using this workaround: myprogram & sleep 1 winID=$(wmctrl -l | ...
1
vote
1answer
790 views

how to determine in what viewport (compiz/unity) a window is placed?

I am writing a script that requires determining in what viewport a window is placed. My desktop is 2x2 (4 viewports); it is usually thought as being 4 virtual desktops but on compiz/unity, it is ...
1
vote
1answer
288 views

Opening a window in a specific workspace?

In Ubuntu 14.04, is it possible (perhaps using wmctrl?) to activate an instance of a window in a specific workspace? Example: Suppose I'm in workspace 1, and I have a google-chrome window open in ...
1
vote
3answers
2k views

WMCTRL not working after starting xfce4-terminal

If I type these two commands in a terminal: xfce4-terminal --hide-menubar --hide-borders --hide-toolbars --title=dt wmctrl -r dt -e 0,10,10,720,720 I get the desired result (position and resize of ...
7
votes
1answer
3k views

Resizing a maximized window from the command line

The following script fails to resize an already maximized window: wmctrl -i -r :ACTIVE: -b remove,maximized_vert,maximized_horz xdotool windowunmap --sync xdotool windowmap --sync wmctrl -r :ACTIVE:...
0
votes
1answer
246 views

Wmctrl Resizing Issue

The following fails to resize my active window (simply nothing happens). Is there something I'm missing? The command I used is: wmctrl -r -e :ACTIVE: 0,100,100,600,400
1
vote
1answer
831 views

call a script if a zenity window is minimized, resized or moved

I would like to add an event-catcher, if my the zenity window gets minimized, resized or moved. I already call a script if the window is closed or the button is pressed in my typebreak script But I ...
1
vote
2answers
425 views

Get report of the gui application processes

I want to list main applications processes report in this format ps -e -o pid,comm,pmem,pcpu,uname To filter main GUI applications wmctrl -pl is the only way I can get processes ids.its great if ...
5
votes
1answer
5k views

How to move a window to a different workspace using its ID, in bash?

Currently I have successfully used wmctrl -r :SELECT: -t 2 but something like wmctrl -r -i 0x03e00003 -t 2 does not work. How should I write the command in order to select the window to be moved ...
9
votes
2answers
8k views

How do I resize the active window to 50% with wmctrl?

I would like to resize the window to the left half of the screen. A solution to achieve that would be to use wmctrl and keybind the right command to a keyboard shortcut. But the manpage only shows ...