]> git.rmz.io Git - dotfiles.git/blobdiff - awesome/bindings.lua
qutebrowser: bind gl/gr to move between tabs
[dotfiles.git] / awesome / bindings.lua
index 96b31eac003820a51442dd02e55c0ce21e1bd402..8d960099baa5797174b1e71f48919f83018c1582 100644 (file)
@@ -1,16 +1,17 @@
 local hotkeys_popup = require("awful.hotkeys_popup").widget
+local utils = require("utils")
 
 -- Default modkey.
 modkey = "Mod4"
 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
-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,
@@ -114,7 +115,7 @@ globalkeys = awful.util.table.join(globalkeys,
                     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"}),
@@ -124,7 +125,7 @@ globalkeys = awful.util.table.join(globalkeys,
     awful.key({        }, "F13",   function () awful.spawn("ksnapshot") end),
     awful.key({        }, "Print", function () awful.spawn("ksnapshot") end),
     -- ranger
-    awful.key({ modkey }, "r", function () awful.spawn(terminal .. " -e ranger") end),
+    awful.key({ modkey }, "r", function () utils.spawn_terminal("ranger") end),
     -- Volume
     awful.key({        }, "XF86AudioMute",        function () awful.spawn("pulsemixer --toggle-mute")     end,
               {description = "toggle mute", group = "volume"}),
@@ -142,12 +143,12 @@ globalkeys = awful.util.table.join(globalkeys,
     awful.key({ modkey, "Control" }, "Escape", function () awful.spawn("i3lock -c 000000") end),
     -- VimWiki
     awful.key({ modkey }, "i", function ()
-        awful.spawn(terminal.." -name vimwiki -e vim -c 'call vimwiki#base#goto_index(v:count1)'")
+        utils.spawn_terminal("vim -c 'call vimwiki#base#goto_index(v:count1)'", { instance = "vimwiki"})
     end)
 )
 
 -- Client keys {{{1
-clientkeys = awful.util.table.join(
+clientkeys = gears.table.join(
     awful.key({ modkey,           }, "f",
         function (c)
             c.fullscreen = not c.fullscreen
@@ -192,7 +193,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
-    globalkeys = awful.util.table.join(globalkeys,
+    globalkeys = gears.table.join(globalkeys,
         -- View tag only.
         awful.key({ modkey }, "#" .. i + 9,
                   function ()
@@ -243,7 +244,7 @@ for i = 1, 9 do
 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))