1

How can I set devilspie to detect if an application was started with the flag --hello-world from terminal?

For example window_name detects the window title. How can transform in devilspie the following sentence: if one of flags is --hello-world?

(if (is (window_name) 'My-title')
    (begin
       ...
    )   
)
1

You have not specified if you are using the obsolete devilspie or the newer devilspie2. In any case, as far as I can tell from their manuals, neither one of them has access to the information you want.

Devilspie is a window matching utility, it interacts with the X server. The commandline switches you give when you launch a program are not passed to the X server since they only affect the way the program is launched and are internal switches of that particular piece of software.

The closest seems to be the get_application_name() call but I doubt that would include the command line arguments. You might be able to do what you need using xdotool (see here) and parsing the output of ps aux or pgrep -al $APP_NAME.

References:

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.