Update thunderbird devilspie settings

This commit is contained in:
Talia 2020-12-08 13:54:55 +01:00
parent beab2876ba
commit c0a32f7180

View file

@ -1,28 +1,21 @@
local function opacity(value) local function opacity(value)
os.execute(string.format( os.execute(string.format(
"xprop -id %s -f _NET_WM_WINDOW_OPACITY 32c -set _NET_WM_WINDOW_OPACITY 0x%xffffff", "xprop -id %s -f _NET_WM_WINDOW_OPACITY 32c -set _NET_WM_WINDOW_OPACITY 0x%xffffff",
get_window_xid(), math.max(math.min(value, 255), 0) get_window_xid(), math.max(math.min(value, 255), 0)
)) ))
end end
local function rep(n, value) local function rep(n, value)
if n>0 then return value, rep(n-1, value) end if n>0 then return value, rep(n-1, value) end
end end
local margin = { rep(4, 16) } local margin = { rep(4, 16) }
if get_application_name():find("Thunderbird$") then if get_application_name():find("Thunderbird$") then
print(get_window_name()) if get_window_type():find("NORMAL$") then
if get_window_type():find("NORMAL$") then set_window_workspace(get_workspace_count())
set_window_workspace(get_workspace_count()) unmaximize()
unmaximize() set_window_fullscreen(true)
if get_window_name():find("Thunderbird$") then maximize()
undecorate_window() opacity(230)
set_window_geometry2(1680+margin[1], margin[2], 900-margin[1]-margin[3], 1440-margin[2]-margin[4]) end
else
set_window_geometry(1680+margin[1], margin[2], 900-margin[1]-margin[3], 1440-margin[2]-margin[4])
set_window_fullscreen(true)
end
--maximize()
opacity(230)
end
end end