Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Devilspie question

  1. #11
    Join Date
    Sep 2009
    Location
    California U.S.A.
    Beans
    398

    Re: Devilspie question

    Quote Originally Posted by Ol' Craig View Post
    These are the .ds configuration files i'm using

    Code:
    ; generated_rule matlab
    ( if 
        ( begin
            ( is ( application_name ) "<Student Version> MATLAB  7.8.0 (R2009a)" )
        ) 
    
        ( begin 
            ( maximize )
            ( maximize_vertically )
            ( maximize_horizontally )
            ( set_workspace 3 )
            
        )
    )
    Code:
    ; generated_rule matlab_command_window
    ( if 
        ( begin 
            ( is ( application_name ) "<Student Version> Command Window" )
        ) 
        ( begin 
            ( maximize )
            ( maximize_vertically )
            ( maximize_horizontally )
            ( set_workspace 3 )
            
        )
    )

    I just tried this

    Code:
    (if
    (is (application_name) "Firefox")
    (begin
    (set_workspace 2)
    (maximize)
    )
    )
    In metacity and it worked for me (on compiz I use viewport). Are all of your rules in the same file? That is all I can think of. Other than that I am not sure.

  2. #12
    Join Date
    Mar 2011
    Beans
    11
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Devilspie question

    Hmm...I'll try putting them all in one file.

    Have you ever used the command "kstart" ?

    It seems to be better suited for writing a startup script, but i'm having some troubles with it as well
    Last edited by Ol' Craig; March 31st, 2011 at 07:19 AM. Reason: Oh...it's for KDE :?

  3. #13
    Join Date
    Sep 2009
    Location
    California U.S.A.
    Beans
    398

    Re: Devilspie question

    Quote Originally Posted by Ol' Craig View Post
    Hmm...I'll try putting them all in one file.

    Have you ever used the command "kstart" ?

    It seems to be better suited for writing a startup script, but i'm having some troubles with it as well
    kstart? Do you use kde?

  4. #14
    Join Date
    Mar 2011
    Beans
    11
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Devilspie question

    no.
    i tried to edit that last post.
    kstart worked, in that it started the program,
    but it rearranged everything i had open
    ehh...time to call it a night
    thanks again for your time
    i'll post again later on my progress

  5. #15
    Join Date
    Mar 2011
    Beans
    11
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Devilspie question

    ok, i've got my .ds files working properly
    the script works well on startup if i have devilspie set to run automatically, by the gui, in which case i remove the devilspie command at the beginning of the script.
    i have tried it as presented below, but nothing happens.
    when run, as below, the devilspie daemon and the running script both appear in the system monitor.
    i'm a bit confused as to why the script would open the programs and then kill the already running devilspie, but not start devilspie itself, open the programs and kill devilspie.
    is there a command that should be included to "run" devilspie?

    Code:
    #! /bin/bash
    devilspie
    sleep 5
    /usr/local/matlab/bin/matlab -glnx86 -desktop -r "edit %f" & 
    sleep 45 
    pkill -f devilspie
    exit
    Got it working!
    I added an ampersand after the devilspie command....it was waiting till devilspie was "done" before executing the remaining commands.

    Code:
    #! /bin/bash
    
    devilspie &
    /usr/local/matlab/bin/matlab -glnx86 -desktop -r "edit %f" &
    evolution &
    firefox &
    gnome-terminal &
    sleep 45 
    pkill -f devilspie
    
    exit
    The only other problem I have, is getting firefox to open in the proper place when there are multiple tabs to be restored. if it's just opening a blank browser window it works fine. weird!!

    Thanks again for all your help d
    Last edited by Ol' Craig; April 1st, 2011 at 05:50 AM. Reason: solved

  6. #16
    Join Date
    Mar 2011
    Beans
    11
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Devilspie question

    Also, for reference, here are my devilspie .ds configurations. I found a good balance of using the gdevilspie gui and adjusting the files by hand worked best.

    Code:
    ; generated_rule email
    ( if 
        ( begin 
            ( is ( window_class ) "evolution" )
            ( is ( application_name ) "evolution" )
            ( contains ( window_name ) "Evolution" )
        )
        ( begin 
            ( maximize )
            ( geometry "1280x980+1280+23" )
            ( set_viewport 2 )
        )
    )
    Code:
    ; generated_rule firefox
    ( if 
        ( begin 
            ( is ( window_class ) "Firefox" )
            ( is ( application_name ) "Firefox" )
        ) 
        ( begin 
            ( maximize )
            ( geometry "1280x979+0+24" )
            ( set_viewport 4 )
        )
    )
    Code:
    ; generated_rule matlab
    ( if 
        ( begin 
            ( is ( window_class ) "com-mathworks-util-PostVMInit" )
            ( is ( application_name ) "<Student Version> MATLAB  7.8.0 (R2009a)" )
            ( is ( window_name ) "<Student Version> MATLAB  7.8.0 (R2009a)" )
        ) 
        ( begin 
            ( maximize )
            ( set_viewport 3 )
        )
    )
    Code:
    ; generated_rule matlab_editor
    ( if 
        ( begin 
            ( is ( window_class ) "com-mathworks-util-PostVMInit" )
            ( is ( application_name ) "Editor" )
            ( contains ( window_name ) "Editor" )
        ) 
        ( begin 
            ( maximize )
            ( geometry "1280x980+1280+23" )
            ( set_viewport 3 )
        )
    )
    Code:
    ; generated_rule terminal
    ( if 
        ( begin 
            ( is ( window_class ) "Terminal" )
            ( is ( application_name ) "Terminal" )
            ( is ( window_name ) "Terminal" )
        ) 
        ( begin 
            ( geometry "657x465+1591+97" )
            ( set_viewport 4 )
        )
    )
    Hope this will be helpful

Page 2 of 2 FirstFirst 12

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
  •