mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-07-09 17:54:22 +02:00
icons: move icon lookup in a seperate module
This commit is contained in:
parent
52090d90ea
commit
335b80262d
8 changed files with 104 additions and 26 deletions
|
@ -1,5 +1,7 @@
|
|||
-- Menu with xrandr choices
|
||||
|
||||
local icons = loadrc("icons", "vbe/icons")
|
||||
|
||||
-- Get active outputs
|
||||
local function outputs()
|
||||
local outputs = {}
|
||||
|
@ -76,7 +78,7 @@ local function menu()
|
|||
|
||||
menu[#menu + 1] = { label,
|
||||
cmd,
|
||||
"/usr/share/icons/gnome/32x32/devices/display.png" }
|
||||
icons.lookup({ name = "display", type = "devices" }) }
|
||||
end
|
||||
|
||||
return menu
|
||||
|
@ -103,7 +105,7 @@ local function xrandr()
|
|||
local next = state.iterator()
|
||||
local label, action, icon
|
||||
if not next then
|
||||
label, icon = "Keep the current configuration", "/usr/share/icons/gnome/32x32/devices/display.png"
|
||||
label, icon = "Keep the current configuration", icons.lookup({ name = "display", type = "devices" })
|
||||
state.iterator = nil
|
||||
else
|
||||
label, action, icon = unpack(next)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue