Results 1 to 5 of 5

Thread: How to get current window & it's title?

  1. #1
    Join Date
    Apr 2008
    Beans
    2

    Angry How to get current window & it's title?

    I have google a lot.
    But have not a clue.

    thanks for any tips.

  2. #2
    Join Date
    Nov 2006
    Location
    Saskatchewan, Canada
    Beans
    41
    Distro
    Kubuntu 10.10 Maverick Meerkat

    Re: How to get current window & it's title?

    Quote Originally Posted by codecopier View Post
    I have google a lot.
    But have not a clue.

    thanks for any tips.
    might not be the ideal way but if you go to the compiz settings manager > window management > place windows plugin then the fixed windows placement tab. click new on either you get an edit window hit the + then you get an edit match window. change window class to window title then grab the window of interest.

  3. #3
    Join Date
    Apr 2008
    Beans
    2

    Re: How to get current window & it's title?

    Quote Originally Posted by bran View Post
    click new on either you get an edit window hit the + then you get an edit match window. change window class to window title then grab the window of interest.
    Thank you~

    But when I reach the place, I can't find "edit match window", "window class" or "window title".
    My os is ubuntu 7.1.
    It is just a plain edit control.

  4. #4
    Join Date
    Jan 2010
    Beans
    1

    Smile Re: How to get current window & it's title?

    You have it 90% done already. Here's how to "grab" the title or class value of any Window which you have opened.... although the Window does need to be dragged into the same viewport as CSSM, because the "cross-hairs" target selector can NOT drag across over an edge to select a Window in another viewport. So, you must have at least a little bit of the Window for which you want to define "fixed placement" inside the same viewport as CSSM. (CSSM is showing the "Fixed Window Placement" tab of the "Place Windows" plugin.)

    With that application window visible (to the side, or above/below CSSM's "Place Windows" window,) use either "New" or Edit" to open the definition panel for creating a "fixed position", or "fixed placement", or "fixed viewport" Window. This Panel is named Edit.

    Within the "Edit Pop-up, press the big plus sign to the right of the match criterion. This opens a child pop-up Panel, named Edit match. Choose your criterion (I always use "class", it seems to work really well).Now, press the "grab" button. Your mouse pointer should convert into a targeting cross-hairs pattern. You don't need to hold a button down; just move into the body of the application Window (NOT it's title bar-- the actual body). Click and the value will be filled in auto-magically, and your mouse will be set back to it's normal pointer appearance.

    BTW, you can define the exact same windows to be placed with both "fixed position" AND "fixed viewport". I do with all my favorite Apps (putting email in viewport #1, browser in viewport #2, and etc.) while they're also defined with "fixed position" to keep them away from my taskbars and panels.

    I'm not on Ubuntu, but like you, I searched Internet and didn't get a good answer. (Using Mandriva+KDE.) But Google showed this Thread near the top of my query results, so I registered in this forum to create this post after I figured out how to do it. I hope this info is useful for both Ubuntu programmers AND compiz users is general.

  5. #5
    Join Date
    Aug 2005
    Location
    Fargo, ND, USA
    Beans
    1,499
    Distro
    Kubuntu 10.04 Lucid Lynx

    Re: How to get current window & it's title?

    AFAIK, getting the focused window is dependent on the window manager, because the WM determines focus.

    It's easy to get info about a particular window.
    Code:
    xprop | grep "WM_NAME(STRING)"
    The usual identifiers are WM_NAME, WM_ICON_NAME, WM_CLASS, and the window id.
    Help yourself: Search the community docs or try other resources.
    Quote Originally Posted by Henry Spencer
    Those who do not understand Unix are condemned to reinvent it, poorly.
    Let science use your computer when you aren't: Folding@Home.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •