Results 1 to 5 of 5

Thread: Script-command to raise window above others

  1. #1
    Join Date
    Nov 2009
    Beans
    39

    Script-command to raise window above others

    Hello

    I'm writing a script to run a program inside the terminal. I want that terminal-window to always be on top. But neither Compiz or Devilspie seem to work. So, I was wondering if it is possible with some scripting to make that window always on top.

    My script looks like this:

    Code:
    #!/bin/bash
    gnome-terminal --profile=twitter --geometry=120x10+50+1000 -e ttytter

  2. #2
    Join Date
    Oct 2008
    Beans
    3,509

    Re: Script-command to raise window above others

    Try wmctrl (need to install)
    Give your terminal twitter profile a unique name in the title and command tab for initial title
    and choose to keep initial title.
    115.jpg
    eg If I wanted to start htop in terminal and above
    I could use a script like...
    Code:
    #!/bin/bash
    
    gnome-terminal --profile=myhtop --geometry=120x10+50+1000 -e htop 
    sleep 3
    wmctrl -a myhtop -b toggle,above
    The wmctrl command needs to use the title of the terminal window.
    116.jpg

    Edit: Just had a look at ccsm and can add the window to be always above
    in the window rules plugin, so no need for the wmctrl command.
    It doesn't allow me to grab a window using title but I can add manually.
    eg
    Code:
    title=myhtop
    118.jpg
    Last edited by stinkeye; June 2nd, 2013 at 12:01 PM.

  3. #3
    Join Date
    Nov 2009
    Beans
    39

    Re: Script-command to raise window above others

    Thanks for your reply!

    But seriously I dont get it

    Here is my window:


    and in windows rules (above) I write: "title=Terminal".

    But it still does not work :s

  4. #4
    Join Date
    Oct 2008
    Beans
    3,509

    Re: Script-command to raise window above others

    Quote Originally Posted by joehc View Post
    Thanks for your reply!

    But seriously I dont get it

    Here is my window:


    and in windows rules (above) I write: "title=Terminal".

    But it still does not work :s
    What release are you using?

    Is compiz the window manager?
    Code:
    wmctrl -m
    What session?
    Code:
    echo $DESKTOP_SESSION

    glen@Raring:~$ wmctrl -m
    Name: Compiz
    Class: N/A
    PID: N/A
    Window manager's "showing the desktop" mode: OFF

    glen@Raring:~$ echo $DESKTOP_SESSION
    ubuntu
    Does the wmctrl command work.
    Eg
    Code:
    wmctrl -a MyWindowTitle -b toggle,above
    Last edited by stinkeye; June 2nd, 2013 at 03:42 PM.

  5. #5
    Join Date
    Nov 2009
    Beans
    39

    Re: Script-command to raise window above others

    Hey it worked!
    compiz was not the windows manager - dont know why

    So I just made compiz the window manager and with "title=Terminal" in Above it works like a charm.

    Many thanks!

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
  •