devilspie2 window sizing control

The devilspie2  utility is really awesome.  Primarily I use it to keep my browser windows in place and at the right size for my screens.  Caution, these settings are for 4k monitors.

Firefox is tricky because I want my compose windows for OWA to be small but I don't get a lot of window information from Firefox.
I use separate configuration for google-chrome and that makes it convenient to ID the right window.

-- debug_print command does only print anything to stdout-- if devilspie2 is run using the --debug optiondebug_print("----------------------------------------------------------")debug_print("Window Name:                  " .. get_window_name());debug_print("Application name:             " .. get_application_name());debug_print("get_window_geometry():        " .. get_window_geometry());debug_print("get_window_client_geometry(): " .. get_window_client_geometry());debug_print("get_window_type():            " .. get_window_type());debug_print("get_class_instance_name():    " .. get_class_instance_name());debug_print("get_window_role:              " .. get_window_role());debug_print("get_window_xid:               " .. get_window_xid());debug_print("get_window_class:             " .. get_window_class());debug_print("----------------------------------------------------------")
if (get_window_class() == "Firefox") then    if (get_window_name() == "My Username - Outlook Web App - Mozilla Firefox") then        set_window_geometry2(3840,0,1200,1000);    elseif (get_window_geometry()==0) then        set_window_geometry2(3830,200,1100,550);    elseif (get_window_geometry()>0) then        set_window_geometry2(3840,0,1200,1000);    else        set_window_geometry2(3830,200,1100,550);    endelseif (get_window_class()=="google-chrome-beta") then    if (get_class_instance_name()     == "google-chrome-beta (/home/myuser/.config/google-chrome-google.email)") then        set_window_geometry2(3840,1000,1200,920);    elseif (get_class_instance_name() == "google-chrome-beta (/home/myuser/.config/google-chrome-google.email.work)") then        set_window_geometry2(0,0,1920,1080);    elseif (get_class_instance_name() == "google-chrome-beta (/home/myuser/.config/google-chrome-google.email.alt)") then        set_window_geometry2(2560,1440,1280,720);    endelseif (get_window_class()=="Google-chrome") then    if (get_class_instance_name()     == "google-chrome-beta (/home/myuser/.config/google-chrome-google.email)") then        set_window_geometry2(3840,1000,1200,920);    elseif (get_class_instance_name() == "google-chrome-beta (/home/myuser/.config/google-chrome-google.email.work)") then        set_window_geometry2(0,0,1920,1080);    elseif (get_class_instance_name() == "google-chrome-beta (/home/myuser/.config/google-chrome-google.email.alt)") then        set_window_geometry2(2560,1440,1280,720);    endend

Comments

Popular posts from this blog

Xubuntu Home Server on Dell XPS 13 9370

Cygwin + syslog-ng

Installing Fedora 21 on a (late 2014) Mac Mini