forked from ashpie/simple-awesome
Make default rofi run with drun
and add alternative shortcut to run with run
This commit is contained in:
parent
0a240358f8
commit
90d8d45efb
@ -21,7 +21,8 @@ config.awesome = {
|
||||
|
||||
-- Application launcher
|
||||
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
|
||||
lock_command = "i3lock --blur=5 -f -k --timecolor=ffffffff --datecolor=ffffffff --indicator --ringcolor=aaaaaaaa",
|
||||
@ -78,6 +79,7 @@ config.keys = {
|
||||
config.keys.global_keys = {
|
||||
-- Application launcher
|
||||
launcher = { { config.keys.modkey }, "space", },
|
||||
launcher_cmd = { { "Ctrl", config.keys.modkey }, "space", },
|
||||
|
||||
-- Screen locker
|
||||
lock_screen = { { config.keys.modkey }, "l" },
|
||||
|
@ -40,16 +40,22 @@ end
|
||||
-- Application launcher
|
||||
local menubar = require("menubar")
|
||||
menubar.utils.terminal = config.awesome.terminal
|
||||
function showAppLauncher()
|
||||
function showAppLauncher(commandOnly)
|
||||
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
|
||||
menubar.show()
|
||||
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" }))
|
||||
hotkey.registerKeys(hotkey.make(config.keys.global_keys.launcher_cmd, function() showAppLauncher(true) end,
|
||||
{ description = "show the application launcher (command line)", group = "launcher" }))
|
||||
|
||||
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user