2023-05-23 05:35:51 +00:00
|
|
|
--- awesome stdlib
|
2023-05-01 23:51:42 +00:00
|
|
|
local awful = require("awful")
|
2023-04-20 04:08:44 +00:00
|
|
|
local hotkeys_popup = require("awful.hotkeys_popup").widget
|
2023-05-23 05:35:51 +00:00
|
|
|
--- theme lib
|
|
|
|
local beautiful = require("beautiful") --- for awesome.icon
|
2023-04-20 04:08:44 +00:00
|
|
|
|
2023-05-23 05:35:51 +00:00
|
|
|
local M = {}
|
|
|
|
local _M = {}
|
|
|
|
------------------------------------------
|
2023-05-26 02:15:43 +00:00
|
|
|
--- import preferred programs
|
|
|
|
local terminal = RC.vars.terminal
|
|
|
|
local file_manager = RC.vars.file_manager
|
2023-04-20 04:08:44 +00:00
|
|
|
|
2023-05-23 05:35:51 +00:00
|
|
|
--- import editor variable from OS environment
|
2023-05-01 23:51:42 +00:00
|
|
|
local editor = os.getenv("EDITOR") or "nano"
|
2023-04-20 04:08:44 +00:00
|
|
|
local editor_cmd = terminal .. " -e " .. editor
|
|
|
|
|
2023-05-23 05:35:51 +00:00
|
|
|
------------------------------------------
|
|
|
|
--- make it harder to quit awesome accidentally
|
2023-05-01 23:51:42 +00:00
|
|
|
M.quitmenu =
|
2023-05-26 02:15:43 +00:00
|
|
|
{{ "i mean it!",
|
2023-06-27 00:52:06 +00:00
|
|
|
function() awesome.quit() end }}
|
2023-04-23 01:32:15 +00:00
|
|
|
|
2023-05-23 05:35:51 +00:00
|
|
|
--- "awesome" menu
|
2023-04-20 04:08:44 +00:00
|
|
|
M.awesome = {
|
2023-05-26 02:15:43 +00:00
|
|
|
{ "hotkeys",
|
|
|
|
function()
|
|
|
|
hotkeys_popup.show_help(nil,awful.screen.focused())
|
|
|
|
end },
|
|
|
|
|
|
|
|
{ "manual",
|
|
|
|
terminal .. " -e man awesome" },
|
|
|
|
|
|
|
|
{ "edit config",
|
|
|
|
editor_cmd .. " " .. awesome.conffile },
|
|
|
|
|
|
|
|
{ "terminal", terminal },
|
|
|
|
|
|
|
|
{ "restart", awesome.restart },
|
|
|
|
|
|
|
|
{ "quit", M.quitmenu }
|
2023-04-20 04:08:44 +00:00
|
|
|
}
|
|
|
|
|
2023-06-27 00:52:06 +00:00
|
|
|
--- stuff that doesn't show up in rofi
|
|
|
|
M.misc = {
|
2023-05-26 02:15:43 +00:00
|
|
|
{ "youtube",
|
|
|
|
"/usr/lib64/chromium-browser/chromium-browser.sh\
|
|
|
|
--profile-directory=Default\
|
|
|
|
--app-id=agimnkijcaahngcdmfeangaknmldooml" },
|
|
|
|
}
|
2023-05-01 23:51:42 +00:00
|
|
|
|
2023-05-23 05:35:51 +00:00
|
|
|
------------------------------------------
|
2023-04-20 04:08:44 +00:00
|
|
|
function _M.get()
|
|
|
|
|
2023-05-23 05:35:51 +00:00
|
|
|
--- main menu
|
2023-05-01 23:51:42 +00:00
|
|
|
local menu_items = {
|
2023-05-26 02:15:43 +00:00
|
|
|
{ "awesome",
|
|
|
|
M.awesome, beautiful.awesome_subicon },
|
|
|
|
{ "terminal", terminal },
|
|
|
|
{ "files" , file_manager },
|
2023-06-27 00:52:06 +00:00
|
|
|
{ "search" , "catfish" },
|
|
|
|
{ "wally" , "wally" },
|
|
|
|
{ "misc" , M.misc }
|
2023-05-01 23:51:42 +00:00
|
|
|
}
|
2023-04-20 04:08:44 +00:00
|
|
|
return menu_items
|
|
|
|
end
|
2023-05-23 05:35:51 +00:00
|
|
|
------------------------------------------
|
2023-04-20 04:08:44 +00:00
|
|
|
return setmetatable({}, { __call = function(_, ...) return _M.get(...) end })
|