Update various stuff
This commit is contained in:
parent
8d61745f9c
commit
ae4c7f06c5
2
handy
2
handy
|
@ -1 +1 @@
|
|||
Subproject commit 36de22a1f3a46b0a4f81083a056f1854ad0ab7af
|
||||
Subproject commit 6f6d7bfdb37c6dbcd9f97a5c2f4347b8c3b1a65d
|
|
@ -23,17 +23,21 @@ conf.mpd = {
|
|||
}
|
||||
|
||||
-- default programs (for keybindings)
|
||||
conf.cmd = {}
|
||||
conf.cmd.terminal = "terminal" -- Mod-Enter
|
||||
conf.cmd.terminal_exec = "terminal -e" -- used by some mappings
|
||||
conf.cmd.browser = "webbrowser" -- Mod-c f
|
||||
conf.cmd.im_client = "im-client" -- Mod-c i
|
||||
conf.cmd.irc_client = "irc-client" -- Mod-c I
|
||||
conf.cmd.mail_client = "mail-client" -- Mod-c m
|
||||
conf.cmd.mpd_client = "gmpc" -- Mod-m g
|
||||
conf.cmd.editor = {}
|
||||
conf.cmd.editor.terminal = conf.cmd.terminal_exec .. " vim"
|
||||
conf.cmd.editor.gui = "gvim"
|
||||
conf.cmd = {
|
||||
terminal = "terminal" -- Mod-Enter
|
||||
-- used by some mappings, parameter to terminal for executing a specific program
|
||||
terminal_exec = "-e"
|
||||
-- used by some mappings, parameter to terminal for setting the wm class
|
||||
terminal_wmclass = "--class"
|
||||
browser = "webbrowser" -- Mod-c f
|
||||
irc_client = "irc-client" -- Mod-c I
|
||||
mail_client = "mail-client" -- Mod-c m
|
||||
mpd_client = "gmpc" -- Mod-m g
|
||||
editor = {
|
||||
terminal = conf.cmd.terminal_exec .. " vim"
|
||||
gui = "gvim"
|
||||
}
|
||||
}
|
||||
|
||||
-- Mod-r binding for running programs
|
||||
conf.cmd.run = function() awful.util.spawn("dmenu_run -l 10 -y 350") end
|
||||
|
|
|
@ -8,7 +8,7 @@ local modkey = conf.modkey or "Mod4"
|
|||
local binder = binder or require("separable.binder")
|
||||
local mb = binder.modal
|
||||
|
||||
local mpd = require("separable.mpd")
|
||||
local mpd = require("mpd")
|
||||
local handy = require("handy")
|
||||
local myglobalkeys = {}
|
||||
|
||||
|
@ -27,9 +27,11 @@ local function mpdserver(host)
|
|||
end
|
||||
end
|
||||
|
||||
local terminal_handy = conf.cmd.terminal .. " " .. conf.cmd.terminal_wmclass .. " handy "
|
||||
local terminal_handy_exec = terminal_handy .. conf.cmd.terminal_exec .. " "
|
||||
|
||||
local mpdhosts = {
|
||||
{"n", mpdserver("nas"), "NAS" },
|
||||
{"b", mpdserver("berryhorst"), "Berry" },
|
||||
{"n", mpdserver("nashorn"), "NAS" },
|
||||
{"l", mpdserver("127.0.0.1"), "Local" }
|
||||
}
|
||||
|
||||
|
@ -143,15 +145,10 @@ local myglobalkeys = awful.util.table.join(
|
|||
--}}}
|
||||
|
||||
-- {{{ handy console
|
||||
awful.key({ }, "F12", nil, function ()
|
||||
handy("alacritty --class handy -e tmux", awful.placement.centered, 0.9, 0.7, nil, "handy")
|
||||
end ),
|
||||
awful.key({ modkey }, "x", function ()
|
||||
handy("alacritty --class handy -e ikhal", awful.placement.centered, 0.9, 0.7, 'single', "handy")
|
||||
end ),
|
||||
awful.key({ modkey }, "a", function ()
|
||||
handy("pavucontrol", awful.placement.centered, 0.6, 0.8, 'single')
|
||||
end ),
|
||||
awful.key({ }, "F12", nil, handy.fun(terminal_handy, awful.placement.centered, 0.9, 0.7, nil, "handy")),
|
||||
awful.key({ modkey }, "y", handy.fun(terminal_handy_exec .. "ikhal", awful.placement.centered, 0.9, 0.7, 'single', "handy")),
|
||||
awful.key({ modkey }, "a", handy.fun("pavucontrol", awful.placement.centered, 0.6, 0.8, 'single')),
|
||||
awful.key({ modkey }, "/", handy.fun("qalculate-gtk", awful.placement.centered, 0.4, 0.5, 'single')),
|
||||
-- }}}
|
||||
|
||||
--{{{ dmenu prompts
|
||||
|
@ -178,8 +175,6 @@ local myglobalkeys = awful.util.table.join(
|
|||
awful.key({ }, "XF86AudioNext", mpd.ctrl.next),
|
||||
awful.key({ }, "XF86AudioPrev", mpd.ctrl.prev),
|
||||
|
||||
awful.key({ modkey }, "y", binder.spawn("copyq toggle")),
|
||||
awful.key({ modkey }, "/", binder.spawn("rofi -show calc -modi calc -no-show-match -no-sort")),
|
||||
awful.key({ modkey }, "e", binder.spawn('rofi -show emoji')),
|
||||
awful.key( {}, "Num_Lock", lockhl("Num")),
|
||||
awful.key( {}, "Caps_Lock", lockhl("Caps"))
|
||||
|
|
|
@ -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,11 +102,9 @@ function binder.clear()
|
|||
globalkeyfuncs = {}
|
||||
end
|
||||
|
||||
|
||||
function binder.apply()
|
||||
naughty.notify { text="Reloading key bindings" }
|
||||
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()
|
||||
|
@ -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 ()
|
||||
|
|
Loading…
Reference in a new issue