- awful.prompt.run({ prompt = "Run Lua code: " },
- mypromptbox[mouse.screen].widget,
- awful.util.eval, nil,
- awful.util.getdir("cache") .. "/history_eval")
- end),
- -- Menubar
- awful.key({ modkey }, "p", function() menubar.show() end)
-
- -- Pulseaudio widget
- --awful.key({ }, "XF86AudioRaiseVolume", APW.Up),
- --awful.key({ }, "XF86AudioLowerVolume", APW.Down),
- --awful.key({ }, "XF86AudioMute", APW.ToggleMute)
+ awful.prompt.run {
+ prompt = "Run Lua code: ",
+ textbox = awful.screen.focused().mypromptbox.widget,
+ exe_callback = awful.util.eval,
+ history_path = gears.filesystem.get_cache_dir() .. "/history_eval"
+ }
+ end,
+ {description = "lua execute prompt", group = "awesome"}),
+
+ -- Applications {{{2
+ -- Ksnapshot
+ awful.key({ }, "F13", function () awful.spawn("ksnapshot") end),
+ awful.key({ }, "Print", function () awful.spawn("ksnapshot") end),
+ -- ranger
+ 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"}),
+ awful.key({ }, "XF86AudioLowerVolume", function () awful.spawn("pulsemixer --change-volume -5") end,
+ {description = "decrease volume", group = "volume"}),
+ awful.key({ }, "XF86AudioRaiseVolume", function () awful.spawn("pulsemixer --change-volume +5") end,
+ {description = "increase volume", group = "volume"}),
+ awful.key({ modkey }, "F10", function () awful.spawn("pulsemixer --toggle-mute") end,
+ {description = "toggle mute", group = "volume"}),
+ awful.key({ modkey }, "F11", function () awful.spawn("pulsemixer --change-volume -5") end,
+ {description = "decrease volume", group = "volume"}),
+ awful.key({ modkey }, "F12", function () awful.spawn("pulsemixer --change-volume +5") end,
+ {description = "increase volume", group = "volume"}),
+ -- Lock
+ awful.key({ modkey, "Control" }, "Escape", function () awful.spawn("i3lock -c 000000") end),
+ -- VimWiki
+ awful.key({ modkey }, "i", function ()
+ utils.spawn_terminal("vim -c 'call vimwiki#base#goto_index(v:count1)'", { instance = "vimwiki"})
+ end),
+ -- clipboard
+ -- requires a little sleep before simulating shift+Insert, otherwise I
+ -- believe the focus is still on awful and not the current window
+ awful.key({ modkey }, "\\", function () awful.spawn('xdotool sleep 0.2 key --clearmodifiers shift+Insert') end,
+ {description = "paste primary selection", group = "awesome"}),
+ -- utf8 picker
+ -- TODO: the mapping is similar to kitty's <C-S-u>, but worth changing maybe?
+ awful.key({ modkey, "Shift"}, "u", function () awful.spawn('rofimoji') end,
+ { description = "select utf8 character", group = "awesome"})