Hi, i'm looking to create a new script. Since you're the cool guy(and if i understood correctly you're a kwin dev), i'll just ask you: is there some whay to know the current status of a window (like normal/maximized) through dbus?
And in case, i'd like to create a script with close/minimize/maximize actions, that i'd bind to a label applet.
Is this possible?
Waiting you for a reply.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
those attributes are stored on the X11 window and can be queried (set) using xprop/xwininfo
eg.
xprop -id <win_id_here> WM_STATE # mapping
or
xprop -id <win_id_here> _NET_WM_STATE # maximized, keepabove etc.
but if you want an easy life, look into wmctrl and xdotool to remote-control window managers (will work with all) and X11
What in particular are you trying to do, though - sounds like a taskmanager or sth.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, there are widgets that export the deco buttons in the panel (unity alike, but i was thinking to a plasmoid which does the same), i'm currently looking to create a script that shows close/min/max buttons for maximized windows. I do like the idea, setting apps to have no borders through kwin rules + this... It would be nice IMO.
Last edit: Hombremaledicto 2014-01-21
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
sleep 5; wmctrl -r ':ACTIVE:' -b toggle,maximized_vert,maximized_horz
toggle maximization of the active window (sleep only to move from eg. yaquake to sth. different ;-)
sleep 5; wmctrl -r ':ACTIVE:'
close the active window
sleep 5; xdotool getactivewindow windowminimize
minimize the active window
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
These commands work like a charm, although i'm also looking to remove borders for maximized windows. By searching on google i saw that this feature was removed in the latest kwin releases. Marting has posted a script for this, but (prolly my fault, not being confident with kwin scripting) importing it gives me an error and fails. IIRC now it this feature must be implemented within the decorator - please, correct me if i'm wrong.
In case i'm right, may i present this as a feature request for bespin?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The decoration thing is a completely different topic (about side/bottom-borders)
The script approach has not been pushed upstream as it suffers from a recursion issue (that was in the original implementation as well - see my comment on the review)
Hi, i'm looking to create a new script. Since you're the cool guy(and if i understood correctly you're a kwin dev), i'll just ask you: is there some whay to know the current status of a window (like normal/maximized) through dbus?
And in case, i'd like to create a script with close/minimize/maximize actions, that i'd bind to a label applet.
Is this possible?
Waiting you for a reply.
those attributes are stored on the X11 window and can be queried (set) using xprop/xwininfo
eg.
xprop -id <win_id_here> WM_STATE # mapping
or
xprop -id <win_id_here> _NET_WM_STATE # maximized, keepabove etc.
but if you want an easy life, look into wmctrl and xdotool to remote-control window managers (will work with all) and X11
What in particular are you trying to do, though - sounds like a taskmanager or sth.
Thank you very much!! I'll try this immediately!
Well, there are widgets that export the deco buttons in the panel (unity alike, but i was thinking to a plasmoid which does the same), i'm currently looking to create a script that shows close/min/max buttons for maximized windows. I do like the idea, setting apps to have no borders through kwin rules + this... It would be nice IMO.
Last edit: Hombremaledicto 2014-01-21
sleep 5; wmctrl -r ':ACTIVE:' -b toggle,maximized_vert,maximized_horz
toggle maximization of the active window (sleep only to move from eg. yaquake to sth. different ;-)
sleep 5; wmctrl -r ':ACTIVE:'
close the active window
sleep 5; xdotool getactivewindow windowminimize
minimize the active window
Fuck yeah!!
Thanks again (i'll prolly try this tomorrow, i'm kinda drunk now :S ).
Thumbs up! You rock! :D
These commands work like a charm, although i'm also looking to remove borders for maximized windows. By searching on google i saw that this feature was removed in the latest kwin releases. Marting has posted a script for this, but (prolly my fault, not being confident with kwin scripting) importing it gives me an error and fails. IIRC now it this feature must be implemented within the decorator - please, correct me if i'm wrong.
In case i'm right, may i present this as a feature request for bespin?
The decoration thing is a completely different topic (about side/bottom-borders)
The script approach has not been pushed upstream as it suffers from a recursion issue (that was in the original implementation as well - see my comment on the review)
Try:
kwriteconfig --file kwinrc --group Windows --key BorderlessMaximizedWindows true
qdbus org.kde.kwin /KWin reconfigure
It works, thanks!
Solved :-)