Make default rofi run with drun and add alternative shortcut to run with run

This commit is contained in:
Alice Gaudon 2019-11-17 07:18:26 +01:00
parent 0a240358f8
commit 90d8d45efb
2 changed files with 12 additions and 4 deletions

View File

@ -21,7 +21,8 @@ config.awesome = {
-- Application launcher -- Application launcher
application_launcher_check = "rofi -version", application_launcher_check = "rofi -version",
application_launcher = "rofi -show run -config " .. awful.util.getdir("config") .. "/assets/rofi/themes/paper-float.rasi", application_launcher = "rofi -show drun -modi drun -show-icons -config " .. awful.util.getdir("config") .. "/assets/rofi/themes/paper-float.rasi",
application_launcher_cmd = "rofi -show run -config " .. awful.util.getdir("config") .. "/assets/rofi/themes/paper-float.rasi",
-- Screen locker -- Screen locker
lock_command = "i3lock --blur=5 -f -k --timecolor=ffffffff --datecolor=ffffffff --indicator --ringcolor=aaaaaaaa", lock_command = "i3lock --blur=5 -f -k --timecolor=ffffffff --datecolor=ffffffff --indicator --ringcolor=aaaaaaaa",
@ -78,6 +79,7 @@ config.keys = {
config.keys.global_keys = { config.keys.global_keys = {
-- Application launcher -- Application launcher
launcher = { { config.keys.modkey }, "space", }, launcher = { { config.keys.modkey }, "space", },
launcher_cmd = { { "Ctrl", config.keys.modkey }, "space", },
-- Screen locker -- Screen locker
lock_screen = { { config.keys.modkey }, "l" }, lock_screen = { { config.keys.modkey }, "l" },

View File

@ -40,16 +40,22 @@ end
-- Application launcher -- Application launcher
local menubar = require("menubar") local menubar = require("menubar")
menubar.utils.terminal = config.awesome.terminal menubar.utils.terminal = config.awesome.terminal
function showAppLauncher() function showAppLauncher(commandOnly)
if os.execute(config.awesome.application_launcher_check) then if os.execute(config.awesome.application_launcher_check) then
awful.spawn(config.awesome.application_launcher) if commandOnly then
awful.spawn(config.awesome.application_launcher_cmd)
else
awful.spawn(config.awesome.application_launcher)
end
else else
menubar.show() menubar.show()
end end
end end
hotkey.registerKeys(hotkey.make(config.keys.global_keys.launcher, showAppLauncher, hotkey.registerKeys(hotkey.make(config.keys.global_keys.launcher, function() showAppLauncher(false) end,
{ description = "show the application launcher", group = "launcher" })) { description = "show the application launcher", group = "launcher" }))
hotkey.registerKeys(hotkey.make(config.keys.global_keys.launcher_cmd, function() showAppLauncher(true) end,
{ description = "show the application launcher (command line)", group = "launcher" }))
-- --