xrandr.lua: Remove useless icon shuffling
There is only a single icon that this code ever uses. However, it goes through lots of trouble to move that icon uselessly around. Remove that. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
96c2e6b43f
commit
49c4316959
|
@ -81,9 +81,7 @@ local function menu()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
menu[#menu + 1] = { label,
|
menu[#menu + 1] = { label, cmd }
|
||||||
cmd,
|
|
||||||
icon_path}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return menu
|
return menu
|
||||||
|
@ -106,18 +104,18 @@ local function xrandr()
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Select one and display the appropriate notification
|
-- Select one and display the appropriate notification
|
||||||
local label, action, icon
|
local label, action
|
||||||
local next = state.menu[state.index]
|
local next = state.menu[state.index]
|
||||||
state.index = state.index + 1
|
state.index = state.index + 1
|
||||||
|
|
||||||
if not next then
|
if not next then
|
||||||
label, icon = "Keep the current configuration", icon_path
|
label = "Keep the current configuration"
|
||||||
state.index = nil
|
state.index = nil
|
||||||
else
|
else
|
||||||
label, action, icon = unpack(next)
|
label, action = unpack(next)
|
||||||
end
|
end
|
||||||
state.cid = naughty.notify({ text = label,
|
state.cid = naughty.notify({ text = label,
|
||||||
icon = icon,
|
icon = icon_path,
|
||||||
timeout = 4,
|
timeout = 4,
|
||||||
screen = mouse.screen,
|
screen = mouse.screen,
|
||||||
replaces_id = state.cid }).id
|
replaces_id = state.cid }).id
|
||||||
|
|
Loading…
Reference in New Issue