]> git.rmz.io Git - dotfiles.git/commitdiff
awesome: replace decrecated awful.util with corresponding gears module
authorSamir Benmendil <me@rmz.io>
Sun, 18 Oct 2020 10:17:31 +0000 (11:17 +0100)
committerSamir Benmendil <me@rmz.io>
Sat, 5 Dec 2020 12:56:45 +0000 (12:56 +0000)
awesome/bindings.lua
awesome/rc.lua
awesome/themes/mlp/theme.lua
awesome/themes/shattered/theme.lua
awesome/topbar.lua
awesome/utils.lua
awesome/widgets/calendar.lua
awesome/widgets/pomodoro
awesome/widgets/pomodoro.lua
awesome/widgets/volume_progressbar_widget.lua
awesome/widgets/volume_widget.lua

index 96b31eac003820a51442dd02e55c0ce21e1bd402..dd3edff7e0958e4c25efd7cc83524c2e933f6e39 100644 (file)
@@ -5,12 +5,12 @@ modkey = "Mod4"
 altkey = "Mod1"
 
 -- Mouse bindings {{{1
 altkey = "Mod1"
 
 -- Mouse bindings {{{1
-root.buttons(awful.util.table.join(
+root.buttons(gears.table.join(
     awful.button({ }, 3, function () mymainmenu:toggle() end)
 ))
 
 -- Global Keys {{{1
     awful.button({ }, 3, function () mymainmenu:toggle() end)
 ))
 
 -- Global Keys {{{1
-globalkeys = awful.util.table.join(globalkeys,
+globalkeys = gears.table.join(globalkeys,
     awful.key({ modkey,           }, "s",      hotkeys_popup.show_help,
               {description="show help", group="awesome"}),
     awful.key({ modkey,           }, "Left",   awful.tag.viewprev,
     awful.key({ modkey,           }, "s",      hotkeys_popup.show_help,
               {description="show help", group="awesome"}),
     awful.key({ modkey,           }, "Left",   awful.tag.viewprev,
@@ -114,7 +114,7 @@ globalkeys = awful.util.table.join(globalkeys,
                     prompt       = "Run Lua code: ",
                     textbox      = awful.screen.focused().mypromptbox.widget,
                     exe_callback = awful.util.eval,
                     prompt       = "Run Lua code: ",
                     textbox      = awful.screen.focused().mypromptbox.widget,
                     exe_callback = awful.util.eval,
-                    history_path = awful.util.get_cache_dir() .. "/history_eval"
+                    history_path = gears.filesystem.get_cache_dir() .. "/history_eval"
                   }
               end,
               {description = "lua execute prompt", group = "awesome"}),
                   }
               end,
               {description = "lua execute prompt", group = "awesome"}),
@@ -147,7 +147,7 @@ globalkeys = awful.util.table.join(globalkeys,
 )
 
 -- Client keys {{{1
 )
 
 -- Client keys {{{1
-clientkeys = awful.util.table.join(
+clientkeys = gears.table.join(
     awful.key({ modkey,           }, "f",
         function (c)
             c.fullscreen = not c.fullscreen
     awful.key({ modkey,           }, "f",
         function (c)
             c.fullscreen = not c.fullscreen
@@ -192,7 +192,7 @@ clientkeys = awful.util.table.join(
 -- Be careful: we use keycodes to make it works on any keyboard layout.
 -- This should map on the top row of your keyboard, usually 1 to 9.
 for i = 1, 9 do
 -- Be careful: we use keycodes to make it works on any keyboard layout.
 -- This should map on the top row of your keyboard, usually 1 to 9.
 for i = 1, 9 do
-    globalkeys = awful.util.table.join(globalkeys,
+    globalkeys = gears.table.join(globalkeys,
         -- View tag only.
         awful.key({ modkey }, "#" .. i + 9,
                   function ()
         -- View tag only.
         awful.key({ modkey }, "#" .. i + 9,
                   function ()
@@ -243,7 +243,7 @@ for i = 1, 9 do
 end
 
 -- Client Buttons {{{1
 end
 
 -- Client Buttons {{{1
-clientbuttons = awful.util.table.join(
+clientbuttons = gears.table.join(
     awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
     awful.button({ modkey }, 1, awful.mouse.client.move),
     awful.button({ modkey }, 3, awful.mouse.client.resize))
     awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
     awful.button({ modkey }, 1, awful.mouse.client.move),
     awful.button({ modkey }, 3, awful.mouse.client.resize))
index 93a28f0c88cb15b04cd36849ef012e5b67957478..c932e62208e37615fe71949de23670dda17fc849 100644 (file)
@@ -34,7 +34,7 @@ end
 
 -- Variable definitions {{{1
 -- Themes define colours, icons, font and wallpapers.
 
 -- Variable definitions {{{1
 -- Themes define colours, icons, font and wallpapers.
-beautiful.init(awful.util.getdir("config").."/themes/mlp/theme.lua")
+beautiful.init(gears.filesystem.get_dir("config").."/themes/mlp/theme.lua")
 
 -- This is used later as the default terminal and editor to run.
 terminal = "urxvtc"
 
 -- This is used later as the default terminal and editor to run.
 terminal = "urxvtc"
index f883ff02cf2fda8bbc95c2263e8f859003bb91ef..d19e8f4049c1ca1e15c12301f21cf13c9402d507 100644 (file)
@@ -5,7 +5,7 @@
 local theme = {}
 local awful = require("awful")
 
 local theme = {}
 local awful = require("awful")
 
-theme.path = awful.util.getdir("config").."/themes/mlp"
+theme.path = gears.filesystem.get_dir("config").."/themes/mlp"
 
 theme.font          = "Droid Sans 8"
 
 
 theme.font          = "Droid Sans 8"
 
index b2adbfea330c6fb971ec1bae60edf50be028888c..d494cadcdac6dcbd860331bed5a5c8c178f11c42 100644 (file)
@@ -4,7 +4,7 @@
 
 theme = {}
 
 
 theme = {}
 
-local themes = awful.util.getdir("config").."/themes/shattered"
+local themes = gears.filesystem.get_dir("config").."/themes/shattered"
 
 theme.font          = "sans 8"
 
 
 theme.font          = "sans 8"
 
index 3d73e11034b13fc3e7fd38abb698d026b3b15002..6f97887408b9ae6f858421d7d8c3bda7606423db 100644 (file)
@@ -23,7 +23,7 @@ end
 
 -- Wibox {{{1
 -- Create a wibox for each screen and add it
 
 -- Wibox {{{1
 -- Create a wibox for each screen and add it
-local taglist_buttons = awful.util.table.join(
+local taglist_buttons = gears.table.join(
                     awful.button({ }, 1, function(t) t:view_only() end),
                     awful.button({ modkey }, 1, function(t)
                                               if client.focus then
                     awful.button({ }, 1, function(t) t:view_only() end),
                     awful.button({ modkey }, 1, function(t)
                                               if client.focus then
@@ -40,7 +40,7 @@ local taglist_buttons = awful.util.table.join(
                     awful.button({ }, 5, function(t) awful.tag.viewprev(t.screen) end)
                 )
 
                     awful.button({ }, 5, function(t) awful.tag.viewprev(t.screen) end)
                 )
 
-local tasklist_buttons = awful.util.table.join(
+local tasklist_buttons = gears.table.join(
                      awful.button({ }, 1, function (c)
                                               if c == client.focus then
                                                   c.minimized = true
                      awful.button({ }, 1, function (c)
                                               if c == client.focus then
                                                   c.minimized = true
@@ -73,7 +73,7 @@ awful.screen.connect_for_each_screen(function(s)
     -- Create an imagebox widget which will contains an icon indicating which layout we're using.
     -- We need one layoutbox per screen.
     s.mylayoutbox = awful.widget.layoutbox(s)
     -- Create an imagebox widget which will contains an icon indicating which layout we're using.
     -- We need one layoutbox per screen.
     s.mylayoutbox = awful.widget.layoutbox(s)
-    s.mylayoutbox:buttons(awful.util.table.join(
+    s.mylayoutbox:buttons(gears.table.join(
                            awful.button({ }, 1, function () awful.layout.inc( 1) end),
                            awful.button({ }, 3, function () awful.layout.inc(-1) end),
                            awful.button({ }, 4, function () awful.layout.inc( 1) end),
                            awful.button({ }, 1, function () awful.layout.inc( 1) end),
                            awful.button({ }, 3, function () awful.layout.inc(-1) end),
                            awful.button({ }, 4, function () awful.layout.inc( 1) end),
index 070cb3ea51c1678dba196709675a80436f16247e..b8dd97fd122ad2347193fccc53677b930fbe5e94 100644 (file)
@@ -79,11 +79,11 @@ function utils.joinTables(t1, t2)
 end
 
 function utils.rules.append(rules)
 end
 
 function utils.rules.append(rules)
-    awful.rules.rules = awful.util.table.join(awful.rules.rules, rules)
+    awful.rules.rules = gears.table.join(awful.rules.rules, rules)
 end
 
 function utils.globalkeys.append(keys)
 end
 
 function utils.globalkeys.append(keys)
-    globalkeys = awful.util.table.join(globalkeys, keys)
+    globalkeys = gears.table.join(globalkeys, keys)
 end
 
 function utils.has_battery()
 end
 
 function utils.has_battery()
index 565e390c41b4c7441dc1a15e8a4f82770df0dd45..a8acb07aa8249806f58f83bbc55c5d8a8dad9814 100644 (file)
@@ -27,7 +27,7 @@ local calwidget = wibox.widget.textclock(" %a %b %d, %H:%M ", 10)
 
 calwidget:connect_signal("mouse::enter", function () calendar:show(0) end)
 calwidget:connect_signal("mouse::leave", function () calendar:hide() end)
 
 calwidget:connect_signal("mouse::enter", function () calendar:show(0) end)
 calwidget:connect_signal("mouse::leave", function () calendar:hide() end)
-calwidget:buttons(awful.util.table.join(
+calwidget:buttons(gears.table.join(
     awful.button({ }, 1, function () calendar:show(-1) end),
     awful.button({ }, 3, function () calendar:show( 1) end),
     awful.button({ }, 4, function () calendar:show(-1) end),
     awful.button({ }, 1, function () calendar:show(-1) end),
     awful.button({ }, 3, function () calendar:show( 1) end),
     awful.button({ }, 4, function () calendar:show(-1) end),
index a81f1f27ef1d2c1c8e4c062f3993bab8cd4706a2..ef2d060a154198db7f4612c1d861168c1e1d10e3 160000 (submodule)
@@ -1 +1 @@
-Subproject commit a81f1f27ef1d2c1c8e4c062f3993bab8cd4706a2
+Subproject commit ef2d060a154198db7f4612c1d861168c1e1d10e3
index 69d312d0b5a1948e6776ab2c027817c151c3c274..b6e9116a33556f01001ddf94aa932125cff93f64 100644 (file)
@@ -25,7 +25,7 @@ pomodoro:connect_signal("work_stop", function ()
     awful.spawn(terminal.." -name diary -e diary")
 end)
 
     awful.spawn(terminal.." -name diary -e diary")
 end)
 
-globalkeys = awful.util.table.join(globalkeys,
+globalkeys = gears.table.join(globalkeys,
     awful.key({ modkey, "Shift" }, "p", function() pomodoro:toggle() end)
 )
 
     awful.key({ modkey, "Shift" }, "p", function() pomodoro:toggle() end)
 )
 
index d920113005745373501d2d5b99c641b8a6438d1e..6fe911699b803f746783777607d7f1a6136703b0 100644 (file)
@@ -22,7 +22,7 @@ if utils.host == "hactar"   then device = "alsa_output.pci-0000_00_14.2.analog-s
 vicious.register(volwidget, vicious.contrib.pulse, "$1", 1, device)
 
 -- Mouse bindings
 vicious.register(volwidget, vicious.contrib.pulse, "$1", 1, device)
 
 -- Mouse bindings
-volwidget:buttons(awful.util.table.join( awful.button({ }, 1, function () utils.run_or_kill("kmix") end),
+volwidget:buttons(gears.table.join( awful.button({ }, 1, function () utils.run_or_kill("kmix") end),
     awful.button({ }, 2,
         function ()
             vicious.contrib.pulse.toggle(device)
     awful.button({ }, 2,
         function ()
             vicious.contrib.pulse.toggle(device)
index 91035758b081b43f18225b72f4d89fc5c4728638..d0812eefb76412c9a51f8ab58fc3f857ee4e4c6d 100644 (file)
@@ -12,7 +12,7 @@ volwidget = wibox.widget.textbox()
 vicious.register(volwidget, vicious.contrib.pulse, '<span font="Symbola 12">🔊</span> '.."$1", 1, device)
 
 -- Mouse bindings
 vicious.register(volwidget, vicious.contrib.pulse, '<span font="Symbola 12">🔊</span> '.."$1", 1, device)
 
 -- Mouse bindings
-volwidget:buttons(awful.util.table.join(
+volwidget:buttons(gears.table.join(
     awful.button({ }, 1,
         function () 
             utils.run_or_kill("urxvt -name pulsemixer -e pulsemixer", {class = "urxvt", instance = "pulsemixer"})
     awful.button({ }, 1,
         function () 
             utils.run_or_kill("urxvt -name pulsemixer -e pulsemixer", {class = "urxvt", instance = "pulsemixer"})