aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2020-05-07 21:58:26 -0300
committerSilvio Rhatto <rhatto@riseup.net>2020-05-07 21:58:26 -0300
commitcd8ac79024094890cb90c9dcb3005a1f3c74cee7 (patch)
tree6d91d16b5bc6b214de247243f67bddf6ccc8484f
parent04a6abcf4b75e606eb1ef881fcc1419acd94c1e9 (diff)
downloadawesome-feature/buster.tar.gz
awesome-feature/buster.tar.bz2
Fix: xrandr.lua update for debian busterfeature/buster
-rw-r--r--config.dot/awesome.link/xrandr.lua19
1 files changed, 10 insertions, 9 deletions
diff --git a/config.dot/awesome.link/xrandr.lua b/config.dot/awesome.link/xrandr.lua
index dbf1445..f803996 100644
--- a/config.dot/awesome.link/xrandr.lua
+++ b/config.dot/awesome.link/xrandr.lua
@@ -1,7 +1,8 @@
---- Separating Multiple Monitor functions as a separated module (taken from awesome wiki)
+--- Separating Multiple Monitor functions as a separeted module (taken from awesome wiki)
-local awful = require("awful")
-local naughty = require("naughty")
+local gtable = require("gears.table")
+local spawn = require("awful.spawn")
+local naughty = require("naughty")
-- A path to a fancy icon
local icon_path = ""
@@ -37,12 +38,12 @@ local function arrange(out)
local new = {}
for _, p in pairs(previous) do
for _, o in pairs(out) do
- if not awful.util.table.hasitem(p, o) then
- new[#new + 1] = awful.util.table.join(p, {o})
+ if not gtable.hasitem(p, o) then
+ new[#new + 1] = gtable.join(p, {o})
end
end
end
- choices = awful.util.table.join(choices, new)
+ choices = gtable.join(choices, new)
previous = new
end
@@ -66,7 +67,7 @@ local function menu()
end
-- Disabled outputs
for _, o in pairs(out) do
- if not awful.util.table.hasitem(choice, o) then
+ if not gtable.hasitem(choice, o) then
cmd = cmd .. " --output " .. o .. " --off"
end
end
@@ -95,7 +96,7 @@ local function naughty_destroy_callback(reason)
reason == naughty.notificationClosedReason.dismissedByUser then
local action = state.index and state.menu[state.index - 1][2]
if action then
- awful.util.spawn(action, false)
+ spawn(action, false)
-- See https://www.reddit.com/r/linux/comments/6odeur/i3_automatically_resize_wallpaperconky_on/
-- https://github.com/ritave/xeventbind
@@ -122,7 +123,7 @@ local function xrandr()
label = "Keep the current configuration"
state.index = nil
else
- label, action = unpack(next)
+ label, action = next[1], next[2]
end
state.cid = naughty.notify({ text = label,
icon = icon_path,