diff --git a/localconf.lua.template b/localconf.lua.template index 7d7100e..3b23383 100644 --- a/localconf.lua.template +++ b/localconf.lua.template @@ -41,5 +41,7 @@ conf.cmd = { -- Mod-r binding for running programs conf.cmd.run = function() awful.util.spawn("dmenu_run -l 10 -y 350") end +local menubar = require("menubar") +conf.cmd.drun = menubar.show return conf diff --git a/mybindings.lua b/mybindings.lua index 4b298c5..928f151 100644 --- a/mybindings.lua +++ b/mybindings.lua @@ -57,6 +57,13 @@ if conf.mprisplayer then playerctl = playerctl .. " -p " .. conf.mprisplayer end +local displaymap = { + {"n", binder.spawn("rotate n"), "normal" }, + {"i", binder.spawn("rotate i"), "invert" }, + {"l", binder.spawn("rotate l"), "left" }, + {"r", binder.spawn("rotate r"), "right" }, +} + local mprismap = { {"m", binder.spawn(playerctl .. " play-pause"), "Toggle" }, {"n", binder.spawn(playerctl .. " next"), "Next" }, @@ -175,6 +182,8 @@ local myglobalkeys = awful.util.table.join( awful.key({ }, "XF86AudioNext", mpd.ctrl.next), awful.key({ }, "XF86AudioPrev", mpd.ctrl.prev), + awful.key({ }, "XF86Display", mb.grabf{keymap=displaymap, name="Rotate"}), + awful.key({ modkey }, "e", binder.spawn('rofi -show emoji')), awful.key( {}, "Num_Lock", lockhl("Num")), awful.key( {}, "Caps_Lock", lockhl("Caps")) diff --git a/separable/binder.lua b/separable/binder.lua index 77777fa..6efce1a 100644 --- a/separable/binder.lua +++ b/separable/binder.lua @@ -242,7 +242,7 @@ local default_bindings = awful.util.table.join( --{{{ Prompt awful.key({ modkey }, "r", conf.cmd.run), - awful.key({ modkey, "Shift" }, "r", menubar.show), + awful.key({ modkey, "Shift" }, "r", conf.cmd.drun), --}}}