Added launcher module

master
Mark 2022-07-16 16:20:58 -07:00
parent a4f80add9e
commit 13b39f0953
Signed by: Mark
GPG Key ID: AD62BB059C2AAEE4
6 changed files with 20 additions and 4 deletions

View File

@ -8,7 +8,7 @@ local desktop = {
keymap = modules.ibus.widgets.ibus, keymap = modules.ibus.widgets.ibus,
volume = modules.volume.widgets.volume, volume = modules.volume.widgets.volume,
tagindicator = require("desktop.widgets.tagindicator"), tagindicator = require("desktop.widgets.tagindicator"),
launcher = require("desktop.widgets.launcher"), launcher = modules.launcher.widgets.launcher,
shortcut = require("desktop.widgets.shortcut"), shortcut = require("desktop.widgets.shortcut"),
space = function(size) space = function(size)

View File

@ -0,0 +1,5 @@
return {
widgets = {
launcher = require("modules.launcher.widget").widget
}
}

View File

@ -0,0 +1,9 @@
local launcher = {}
local conf = configuration_dir .. "modules/launcher/launcher.rasi"
launcher.launcher = function()
awful.spawn("rofi -show drun -theme \"" .. conf .. "\"")
end
return launcher

View File

@ -1,3 +1,4 @@
local launcher = req_rel(..., "util")
local widget = {} local widget = {}
@ -42,8 +43,8 @@ end)
widget.widget:connect_signal("button::press", widget.widget:connect_signal("button::press",
function(_, _, _, button, mods) function(_, _, _, button, mods)
if (button == 1) then if (button == 1) then
bin.rofi.launcher() launcher.launcher()
end end
end end
) )
return widget.widget return widget

3
rc.lua
View File

@ -48,7 +48,8 @@ modules = {}
for k, v in ipairs({ for k, v in ipairs({
"mpc", "mpc",
"ibus", "ibus",
"volume" "volume",
"launcher"
}) do }) do
modules[v] = require("modules." .. v) modules[v] = require("modules." .. v)