Skip to content

Instantly share code, notes, and snippets.

@mjyut
Created November 11, 2014 16:58
Show Gist options
  • Save mjyut/57e6803afc0f92994c31 to your computer and use it in GitHub Desktop.
Save mjyut/57e6803afc0f92994c31 to your computer and use it in GitHub Desktop.
Devilspie2 config file (undecorate some window)
--[[ Debug
local debug_funcs = {
"get_window_name",
"get_window_has_name",
"get_application_name",
"get_window_geometry",
"get_window_client_geometry",
"get_window_is_maximized",
"get_window_is_maximized_vertically",
"get_window_is_maximized_horizontally",
"get_window_type",
"get_class_instance_name",
"get_window_role",
"get_window_xid",
"get_window_class",
"get_workspace_count",
"get_window_fullscreen",
"get_screen_geometry",
}
local debug_env = getfenv()
for i, f in ipairs(debug_funcs) do
debug_print(f .. "() == " .. tostring(debug_env[f]()))
end
debug_print("\n")
-- End debug ]]
-- called when windows are closed
scripts_window_close = {"close.lua"}
-- Set var
local w_class = get_window_class()
local w_has_name = get_window_has_name()
local w_role = get_window_role()
local w_type = get_window_type()
-- Vim
if (w_class == "Gvim" and w_has_name) then
undecorate_window()
end
-- Google Chrome
if(w_class == "Google-chrome" and w_role == "browser") then
undecorate_window()
end
-- Firefox
if(w_class == "Firefox" and w_role == "browser") then
undecorate_window()
end
-- Thunar
if(w_class == "Thunar" and w_type == "WINDOW_TYPE_NORMAL") then
undecorate_window()
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment