Update various stuff

This commit is contained in:
Alexander Gehrke 2021-07-12 11:44:13 +02:00
parent 8d61745f9c
commit ae4c7f06c5
5 changed files with 39 additions and 41 deletions

View file

@ -1,6 +1,6 @@
-- key bindings
local awful = require("awful")
local beautiful = beautiful
local beautiful = require("beautiful")
local modkey = conf.modkey or "Mod4"
local mb = require("modalbind")
@ -102,19 +102,17 @@ function binder.clear()
globalkeyfuncs = {}
end
function binder.apply()
local allkeys = awful.util.table.clone(globalkeys)
inspect=require("lib/inspect")
print(inspect(globalkeyfuncs))
for k,v in pairs(globalkeyfuncs) do
print("k:" .. k)
local loadedkeys = v()
print(inspect(loadedkeys))
allkeys = awful.util.table.join(allkeys, loadedkeys)
end
print(inspect(allkeys))
root.keys(allkeys)
naughty.notify { text="Reloading key bindings" }
local allkeys = awful.util.table.clone(globalkeys)
for k,v in pairs(globalkeyfuncs) do
print("k:" .. k)
local loadedkeys = v()
print(inspect(loadedkeys))
allkeys = awful.util.table.join(allkeys, loadedkeys)
end
print(inspect(allkeys))
root.keys(allkeys)
end
local function client_opacity_set(c, default, max, step)
@ -147,8 +145,8 @@ awful.key({ }, "XF86Calculater", awful.client.movetoscreen
awful.key({ modkey }, "i", function(c)
require("naughty").notify({ text =
string.format(
"name: %s\nclass: %s\ninstance: %s\ntype: %s",
c["name"], c["class"], c["instance"], c["type"])
"name: %s\nclass: %s\ninstance: %s\ntype: %s\npid: %d",
c["name"], c["class"], c["instance"], c["type"], c["pid"])
})
end)
)
@ -190,6 +188,7 @@ local default_bindings = awful.util.table.join(
awful.key({ modkey, "Control" }, "r", awesome.restart),
awful.key({ modkey, "Shift" }, "q", awesome.quit),
awful.key({ modkey, }, "Return", spawnf(conf.cmd.terminal)),
awful.key({ modkey, "Shift" }, "Return", spawnf("kitty-session")),
--{{{ Layout manipulation and client position
awful.key({ modkey }, "j", function ()