Results 1 to 8 of 8

Thread: Three things

  1. #1
    Join Date
    Jan 2007
    Beans
    28

    Three things

    Is it possible to:

    - bind windows key + c to have the currently selected window centre itself
    - have parole resize itself to the size of the video being played
    - configure the focus so that I can have a web browser open in the background, mplayer in the foreground, and still be able to scroll the web page I have open without the web browser stealing focus

    If so, how?

  2. #2
    Join Date
    Jun 2009
    Beans
    21

    Re: Three things

    I think that wmctrl can do that, but it needs some configuration knowledge. To install wmctrl :
    Code:
    sudo apt-get install wmctrl

  3. #3
    Join Date
    Dec 2008
    Location
    the Netherlands
    Beans
    34
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Three things

    Quote Originally Posted by mandarke View Post
    - configure the focus so that I can have a web browser open in the background, mplayer in the foreground, and still be able to scroll the web page I have open without the web browser stealing focus

    If so, how?
    Go to settings manager -> window manager -> focus and check your "raise on click" setting, you probably want to turn this feature off.

  4. #4
    Join Date
    Jun 2005
    Location
    Toronto, Canada
    Beans
    Hidden!
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: Three things

    Quote Originally Posted by mandarke View Post
    Is it possible to:

    - bind windows key + c to have the currently selected window centre itself
    Install xdotool, then use this script:
    Code:
    #!/bin/bash
    
    PANEL_HEIGHTS=24
    PANEL_WIDTHS=0
    
    SCREEN_WIDTH=`xdotool getdisplaygeometry | cut -d' ' -f1`
    SCREEN_HEIGHT=`xdotool getdisplaygeometry | cut -d' ' -f2`
    
    ACTIVE_WINDOW_ID=`xdotool getactivewindow`
    
    ACTIVE_WINDOW_WIDTH=`xwininfo -id $ACTIVE_WINDOW_ID | grep Width | cut -d' ' -f4`
    ACTIVE_WINDOW_HEIGHT=`xwininfo -id $ACTIVE_WINDOW_ID | grep Height | cut -d' ' -f4`
    
    xpos=$((($SCREEN_WIDTH-$PANEL_WIDTHS-$ACTIVE_WINDOW_WIDTH)/2))
    ypos=$((($SCREEN_HEIGHT-$PANEL_HEIGHTS-$ACTIVE_WINDOW_HEIGHT)/2))
    
    xdotool windowmove $ACTIVE_WINDOW_ID $xpos $ypos
    Make sure to adjust the values of PANEL_HEIGHTS and PANEL_WIDTHS to the size of the panels that don't allow windows to go over them (struts enabled by default).

    Assign this script to your hotkey at Settings->Settings Manager->Keyboard->Application Shortcuts.
    Last edited by Toz; January 8th, 2012 at 07:52 PM.

  5. #5
    Join Date
    Jan 2007
    Beans
    28

    Re: Three things

    Quote Originally Posted by BobMarleyy View Post
    Go to settings manager -> window manager -> focus and check your "raise on click" setting, you probably want to turn this feature off.
    doesn't work exactly how i'd like, but it is a start. an example of what i am after is having a web browser maximised with wireshark in the foreground but i am still able to have some interaction (ctrl-click links, scroll up and down pages) with the web browser. as soon as i have the data i'm after from wireshark, i click on the web browser and it has full focus again with wireshark relegated to the background. this worked a treat in ubuntu 10.10.

  6. #6
    Join Date
    Jan 2007
    Beans
    28

    Re: Three things

    Quote Originally Posted by wkrekik View Post
    I think that wmctrl can do that, but it needs some configuration knowledge.
    Quote Originally Posted by Toz View Post
    Install xdotool
    looks like other than the placement tab in the window manager tweaks there isn't an easy way to achieve what i'm after in xfce.

  7. #7
    Join Date
    Jun 2005
    Location
    Toronto, Canada
    Beans
    Hidden!
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: Three things

    Did you try the script in post #4? It will centre the active window on your screen.

  8. #8
    Join Date
    Jan 2007
    Beans
    28

    Re: Three things

    Quote Originally Posted by Toz View Post
    Did you try the script in post #4? It will centre the active window on your screen.
    i'm trying to avoid installing little things so there is less to go wrong.

Tags for this Thread

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
  •