Menu

New label

Helpdesk
2014-01-21
2014-01-23
  • Hombremaledicto

    Hombremaledicto - 2014-01-21

    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.

     
  • Thomas Luebking

    Thomas Luebking - 2014-01-21

    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.

     
  • Hombremaledicto

    Hombremaledicto - 2014-01-21

    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
  • Thomas Luebking

    Thomas Luebking - 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

     
  • Hombremaledicto

    Hombremaledicto - 2014-01-21

    Fuck yeah!!
    Thanks again (i'll prolly try this tomorrow, i'm kinda drunk now :S ).
    Thumbs up! You rock! :D

     
  • Hombremaledicto

    Hombremaledicto - 2014-01-23

    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?

     
  • Thomas Luebking

    Thomas Luebking - 2014-01-23

    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

     
  • Hombremaledicto

    Hombremaledicto - 2014-01-23

    It works, thanks!

    Solved :-)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.