Bindings and rules
This commit is contained in:
parent
81cba76bde
commit
dcf3a84ba8
7 changed files with 40 additions and 55 deletions
|
@ -1,10 +1,11 @@
|
|||
-- key bindings
|
||||
local awful = require("awful")
|
||||
local conf = conf
|
||||
local conf = require("localconf")
|
||||
|
||||
local naughty = require("naughty")
|
||||
local actions = require("actions")
|
||||
|
||||
local modkey = conf.modkey or "Mod4"
|
||||
local hyper = {"Ctrl", "Shift", "Mod1", "Mod4"}
|
||||
local binder = binder or require("separable.binder")
|
||||
local mb = binder.modal
|
||||
|
||||
|
@ -27,8 +28,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 .. " "
|
||||
print("terminal_handy: " .. terminal_handy)
|
||||
print("terminal_handy_exec: " .. terminal_handy_exec)
|
||||
|
||||
local mpdhosts = {
|
||||
{"n", mpdserver("nashorn"), "NAS" },
|
||||
|
@ -43,7 +47,8 @@ local mpdmap = {
|
|||
{"S", binder.spawn("mpd --kill"), "kill MPD" },
|
||||
{"g", binder.spawn(conf.cmd.mpd_client), "Gmpc", stay_in_mode=false },
|
||||
{"separator", "Search" },
|
||||
{"a", mpd.prompt.artist, "artist" },
|
||||
{"a", mpd.prompt.albumartist, "albumartist" },
|
||||
{"A", mpd.prompt.artist, "artist" },
|
||||
{"b", mpd.prompt.album, "album" },
|
||||
{"t", mpd.prompt.title, "title" },
|
||||
{"j", mpd.prompt.jump, "jump" },
|
||||
|
@ -68,11 +73,11 @@ local mprismap = {
|
|||
{"m", binder.spawn(playerctl .. " play-pause"), "Toggle" },
|
||||
{"n", binder.spawn(playerctl .. " next"), "Next" },
|
||||
{"N", binder.spawn(playerctl .. " previous"), "Prev" },
|
||||
{"s", binder.spawn(playerctl .. " stop"), "Prev" },
|
||||
{"s", binder.spawn(playerctl .. " stop"), "Stop" },
|
||||
}
|
||||
|
||||
local messengermap = {
|
||||
{"e", binder.spawn("launch-elements"), "Element" },
|
||||
{"e", binder.spawn("schildichat"), "Element" },
|
||||
{"i", binder.spawn(conf.cmd.irc_client), "IRC" },
|
||||
{"m", binder.spawn(conf.cmd.mail_client), "Mail" },
|
||||
{"r", binder.spawn("rocketchat"), "RocketChat" },
|
||||
|
@ -120,7 +125,7 @@ local notifymap = {
|
|||
|
||||
local myglobalkeys = awful.util.table.join(
|
||||
awful.key({ }, "Pause", binder.spawn('rofi -show window')),
|
||||
--awful.key({ }, "Print", binder.spawn('dmscrot')),
|
||||
awful.key({ modkey }, "w", binder.spawn('rofi -show window')),
|
||||
awful.key({ }, "Print", binder.spawn('flameshot gui')),
|
||||
|
||||
--{{{ Modal mappings
|
||||
|
@ -140,15 +145,7 @@ local myglobalkeys = awful.util.table.join(
|
|||
awful.key({ modkey }, "c", mb.grabf{keymap=progmap, name="Commands"}),
|
||||
awful.key({ modkey }, "d", mb.grabf{keymap=docmap, name="Documents"}),
|
||||
awful.key({ modkey }, "b", mb.grabf{keymap=brightnessmap, name="Brightness"}),
|
||||
awful.key({ modkey }, "n", function()
|
||||
if naughty.is_suspended() then
|
||||
naughty.resume()
|
||||
naughty.notify({ text = "Notifications enabled", timeout = 2 })
|
||||
else
|
||||
naughty.notify({ text = "Notifications disabled", timeout = 2 })
|
||||
naughty.suspend()
|
||||
end
|
||||
end),
|
||||
awful.key({ modkey }, "n", actions.toggle_naughty),
|
||||
--}}}
|
||||
|
||||
-- {{{ handy console
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue