Questions tagged [wmctrl]

24 questions
1
vote
0 answers

Consecutive identical wmctrl command resizes xfce4-terminal

I'm writing a tiling script that uses wmctrl to move windows. When using it on an xfce4-terminal instance, the second consecutive identical run resizes the window. Here is the important code: #!/usr/bin/python3 import subprocess import os import…
1
vote
1 answer

java and wmctrl to resize windows

I'm writing a library to cover WMctrl shell program. I have problem with resizing windows: String command = "wmctrl -r \"Calculator\" -e 0,100,100,500,500"; System.out.println(command); String output =…
Simon
  • 1,099
  • 1
  • 11
  • 29
0
votes
0 answers

Ubuntu 22.04: Is it possible to get the directory of a specific nautilus window in a script?

I have tried to use this: Is it possible to get the directory of a specific nautilus window in a script? I used sudo apt install python3-nautilus and then followed the suggestions in the previous post for building an extension:…
bjohas
  • 181
  • 6
0
votes
0 answers

Get Window Id from wymctrl

wmctrl -l gives me the following 0x00600003 0 arundeep-desktop takeScreenshot.py - GunzBossImageDetection - Visual Studio Code 0x0300001d 0 arundeep-desktop Obtain Active window using Python - Stack Overflow - Google Chrome 0x04400003 -1…
Arundeep Chohan
  • 9,779
  • 5
  • 15
  • 32
0
votes
0 answers

Run gnome-terminal if it's not running

I'm trying to write a script which will check if gnome-terminal is already open, switch to it if it is, or open it if it doesn't. # check if terminal is running EXISTS=$(pgrep gnome-terminal) # if exists is a number if [[ $EXISTS =~ ^[0-9]+$ ]];…
William
  • 77
  • 8
0
votes
1 answer

Tkinter doesn't associate a window with a pid

I'm using the wmctrl -lp to try and find the process id associated with a tkinter GUI window. However, it looks like the tkinter window is not associated with a pid. 0x06400010 0 0 N/A tk Using xprop, it looks like the…
samfrances
  • 3,405
  • 3
  • 25
  • 40
0
votes
1 answer

how to get a complete command of X apps via 'wmctl' and 'ps'?

I'm working on a program that can query running X apps, save all the commands of running apps and them reopen them latter. I encounter an issue. wmctctl can query the pid of Onlyoffice, for example the pid is 123. Then run ps -ef -q 123, I see that…
0
votes
1 answer

After run firefox go to full screen but not kiosk mode

I would like to start Firefox automatically on startup, and then maximize the window. With the code below, I am currently able to start Firefox, however I cannot get past that. #!/bin/bash firefox & while [ "$(wmctrl -l | grep \"Mozilla Firefox\"…
Peter
  • 499
  • 10
  • 30
-1
votes
1 answer

How to write and run terminal command to be execute in java program

String str; Process p; try { String command = "wmctrl -l|awk '{$1=\"\"; $2=\"\"; $3=\"\"; print}'"; p = Runtime.getRuntime().exec(command); BufferedReader br = new…
Ankush
  • 9
  • 2
1
2