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
|
||||
|
||||
menu[#menu + 1] = { label,
|
||||
cmd,
|
||||
icon_path}
|
||||
menu[#menu + 1] = { label, cmd }
|
||||
end
|
||||
|
||||
return menu
|
||||
|
@ -106,18 +104,18 @@ local function xrandr()
|
|||
end
|
||||
|
||||
-- Select one and display the appropriate notification
|
||||
local label, action, icon
|
||||
local label, action
|
||||
local next = state.menu[state.index]
|
||||
state.index = state.index + 1
|
||||
|
||||
if not next then
|
||||
label, icon = "Keep the current configuration", icon_path
|
||||
label = "Keep the current configuration"
|
||||
state.index = nil
|
||||
else
|
||||
label, action, icon = unpack(next)
|
||||
label, action = unpack(next)
|
||||
end
|
||||
state.cid = naughty.notify({ text = label,
|
||||
icon = icon,
|
||||
icon = icon_path,
|
||||
timeout = 4,
|
||||
screen = mouse.screen,
|
||||
replaces_id = state.cid }).id
|
||||
|
|
Loading…
Reference in New Issue