LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 02-20-2017, 02:16 AM   #1
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,357

Rep: Reputation: 213Reputation: 213Reputation: 213
Minimize the current window with WMCTRL ?


Hello,

xdotool can do everything but it is not installed everywhere at schools.
wmctrl is a standard that is available everywhere.

How can one minimize the current Window with wmctrl ?

To maximize, easy:
Code:
"  wmctrl -r :ACTIVE: -b toggle,maximized_vert,maximized_horz   "

But minimize?

Thank you in advance
 
Old 02-21-2017, 03:49 PM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 8,745
Blog Entries: 5

Rep: Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141
Quote:
Originally Posted by man wmctrl
ACTIONS

-b ( add | remove | toggle),prop1 [,prop2 ]
Add, remove, or toggle up to two window properties simultaneously. The window that
is being modified must be identified with a -r action. The property change is
achived by using the EWMH _NET_WM_STATE request. The supported property names (for
prop1 and prop2) are modal, sticky, maximized_vert, maximized_horz, shaded,
skip_taskbar, skip_pager, hidden, fullscreen, above and below. Two properties are
supported to allow operations like maximizing a window to full screen mode. Note
that this action is made up of exactly two shell command line arguments.
???
 
Old 02-24-2017, 01:06 AM   #3
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,357

Original Poster
Rep: Reputation: 213Reputation: 213Reputation: 213
Quote:
Originally Posted by ondoho View Post
???
I meant to minimize ....

it is not easy, believe me, since wmctrl to get the current win for minimize is not made.. by default.
 
Old 02-24-2017, 10:51 AM   #4
rholt
LQ Newbie
 
Registered: Dec 2003
Location: Venezuela
Distribution: MX Linux
Posts: 12

Rep: Reputation: 1
I tried using hidden but it didn't work nor complain.
 
Old 02-24-2017, 03:40 PM   #5
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,357

Original Poster
Rep: Reputation: 213Reputation: 213Reputation: 213
Quote:
Originally Posted by rholt View Post
I tried using hidden but it didn't work nor complain.
I think that it is possibel with this first idea ...


Code:
WMCX=$( wmctrl -l )
CURRENTAPP=` xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2 | awk ' { gsub("0x" , "0x0" ); print $0  } '`
CURRENTDESKTOP=` echo "$WMCX" | grep  "$CURRENTAPP" | awk ' {  print $2 } ' `
 
Old 02-24-2017, 04:41 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 16,738

Rep: Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471Reputation: 2471
Keep in mind that wayland is approaching - for some is already the default. wmctrl is yet another that doesn't work.
 
Old 02-25-2017, 01:53 AM   #7
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,357

Original Poster
Rep: Reputation: 213Reputation: 213Reputation: 213
Quote:
Originally Posted by syg00 View Post
Keep in mind that wayland is approaching - for some is already the default. wmctrl is yet another that doesn't work.

it is really bad that nothing never works in LINUX.
 
Old 02-25-2017, 12:11 PM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 8,745
Blog Entries: 5

Rep: Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141Reputation: 2141
it seems indeed that wmctrl cannot do it.
here'a an interesting article:
https://askubuntu.com/questions/4876...e-command-line

however:
Quote:
Originally Posted by Xeratul View Post
xdotool can do everything but it is not installed everywhere at schools.
wmctrl is a standard that is available everywhere.
i'm not sure i agree that wmctrl is "the standard everywhere". i would rather expect the X utilites to be that.

i was always under the impression that wmctrl is a very handy, but increasingly outdated program, but if you're a bit more proficient you can achieve the same (and more) with xwininfo, xprop and such.

Last edited by ondoho; 02-25-2017 at 12:14 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to maximize window through command,wmctrl is not working santosh vyduyla Linux - Newbie 1 05-28-2013 09:25 AM
wmctrl: moving current window up/down/left/right? Xeratul Linux - Desktop 9 03-29-2013 01:50 AM
Making screenshot of current window using Wmctrl ... Xeratul Programming 0 01-07-2013 09:45 AM
wmctrl to place a window on top / bottom layer ? Xeratul Linux - General 0 05-19-2012 05:00 AM
LXer: Take charge of your window manager with WMCTRL and Devil's Pie LXer Syndicated Linux News 0 12-21-2007 05:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 10:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration