organizational changes

This commit is contained in:
ngoomie 2023-05-22 23:35:51 -06:00
parent 3b040ad1e4
commit 4f85d44623
9 changed files with 77 additions and 105 deletions

View File

@ -4,7 +4,7 @@ local awful = require("awful")
local _M = {}
local modkey = RC.vars.modkey
------------------
------------------------------------------
function _M.get()
local client_keys = gears.table.join(
awful.key({ modkey, }, "f",
@ -48,13 +48,9 @@ function _M.get()
c:raise()
end ,
{description = "(un)maximize horizontally", group = "client"})
-- cyclefocus.key({modkey, }, "Tab", {
-- cycle_filters = { cyclefocus.filters.same_screen, cyclefocus.filters.common_tag }},
-- {description = "cycle through clients from the same screen and tag", group = "client"})
)
return client_keys
end
------------------
------------------------------------------
return setmetatable({}, { __call = function(_, ...) return _M.get(...) end })

View File

@ -4,7 +4,7 @@ local awful = require("awful")
local _M = {}
local modkey = RC.vars.modkey
------------------
------------------------------------------
function _M.get(global_keys)
-- Bind all key numbers to tags.
-- Be careful: we use keycodes to make it work on any keyboard layout.
@ -68,6 +68,5 @@ function _M.get(global_keys)
return global_keys
end
-- }}}
------------------
------------------------------------------
return setmetatable({}, { __call = function(_, ...) return _M.get(...) end })

View File

@ -3,7 +3,7 @@ local gears = require("gears")
local awful = require("awful")
local _M = {}
------------------
------------------------------------------
function _M.get()
local client_buttons = gears.table.join(
awful.button({ }, 1, function (c)
@ -21,5 +21,5 @@ function _M.get()
end))
return client_buttons
end
------------------
------------------------------------------
return setmetatable({}, { __call = function(_, ...) return _M.get(...) end })

View File

@ -3,7 +3,7 @@ local gears = require("gears")
local awful = require("awful")
local _M = {}
------------------
------------------------------------------
function _M.get()
local global_buttons = gears.table.join(
awful.button({ }, 3, function () RC.mainmenu:toggle() end),
@ -12,5 +12,5 @@ function _M.get()
)
return global_buttons
end
------------------
------------------------------------------
return setmetatable({}, { __call = function(_, ...) return _M.get(...) end })

View File

@ -1,28 +1,25 @@
-- standard awesome library -----------------------------------------
--- awesome stdlib
local awful = require("awful")
local hotkeys_popup = require("awful.hotkeys_popup").widget
-- theme handling library ------------------------------------------
local beautiful = require("beautiful") -- for awesome.icon
--- theme lib
local beautiful = require("beautiful") --- for awesome.icon
local M = {} -- menu
local _M = {} -- module
---------------------------------------------------------------------
-- import terminal variable from rc.lua -----------------------------
local M = {}
local _M = {}
------------------------------------------
--- import terminal variable from rc.lua
local terminal = RC.vars.terminal
-- import editor variable from OS environment -----------------------
--- import editor variable from OS environment
local editor = os.getenv("EDITOR") or "nano"
local editor_cmd = terminal .. " -e " .. editor
---------------------------------------------------------------------
-- make it harder to quit awesome accidentally ----------------------
------------------------------------------
--- make it harder to quit awesome accidentally
M.quitmenu =
{{ "i mean it!", function() awesome.quit() end }}
-- "awesome" menu ---------------------------------------------------
--- "awesome" menu
M.awesome = {
{ "hotkeys" , function() hotkeys_popup.show_help(nil,awful.screen.focused())
end },
@ -36,7 +33,7 @@ M.awesome = {
{ "quit" , M.quitmenu }
}
-- browsers and other network-oriented software ---------------------
--- browsers and other network-oriented software
M.network = {
{ "firefox" , "firefox" },
{ "discord" , "flatpak run\
@ -47,18 +44,18 @@ M.network = {
{ "keepassxc" , "keepassxc" }
}
-- DEVELOPERS, DEVELOPERS, DEVELOPERS, DEVELOPERS -------------------
--- DEVELOPERS, DEVELOPERS, DEVELOPERS, DEVELOPERS
M.develop = {
{ "vs code" , "code" },
{ "bless" , "bless" },
{ "dbeaver studio" , "flatpak run\
io.dbeaver.DBeaverCommunity" },
{ "beekeeper studio" , "flatpak run\
io.beekeeperstudio.Studio" },
-- { "dbeaver studio" , "flatpak run\
-- io.dbeaver.DBeaverCommunity" },
-- { "beekeeper studio" , "flatpak run\
-- io.beekeeperstudio.Studio" },
{ "sqlite browser" , "sqlitebrowser" }
}
-- emulators --------------------------------------------------------
--- emulators
M.emulators = {
{ "citra" , "flatpak run\
org.citra_emu.citra" },
@ -72,14 +69,14 @@ M.emulators = {
org.ppsspp.PPSSPP" }
}
-- vintage story [different versions of VS for mods] ----------------
M.vtgstry ={
--- vintage story [different versions of VS for mods]
M.vtgstry = {
{ "latest" , "vintagestory" },
{ "flatpak" , "flatpak run\
at.vintagestory.VintageStory" }
}
-- videogames -------------------------------------------------------
--- videogames
M.games = {
{ "emulators" , M.emulators },
{ "vintage story" , M.vtgstry },
@ -97,7 +94,7 @@ M.games = {
{ "solitaire" , "pysol" }
}
-- utilities [kind of a misc category] ------------------------------
--- utilities [kind of a misc category]
M.utils = {
{ "xed" , "xed" },
{ "catfish" , "catfish" },
@ -112,16 +109,18 @@ M.utils = {
{ "wally" , "wally" }
}
-- "media" programs [image viewers, video players, etc] -------------
--- "media" programs [image viewers, video players, etc]
M.media = {
{ "hydrus" , "flatpak run io.github.hydrusnetwork.hydrus" },
{ "vlc" , "vlc" },
{ "youtube" , "/usr/lib64/chromium-browser/chromium-browser.sh\
--profile-directory=Default\
--app-id=agimnkijcaahngcdmfeangaknmldooml" },
{ "spotify" , "flatpak run com.spotify.Client" }
{ "spotify" , "flatpak run com.spotify.Client" },
{ "nomacs" , "nomacs" }
}
-- "visual arts" stuff ----------------------------------------------
--- "visual arts" stuff
M.vis = {
{ "blender" , "steam\
steam://rungameid/365670" },
@ -130,12 +129,10 @@ M.vis = {
{ "beeref" , "flatpak run\
org.beeref.BeeRef" }
}
---------------------------------------------------------------------
------------------------------------------
function _M.get()
-- main menu --------------------------------------------------------
--- main menu
local menu_items = {
{ "awesome" , M.awesome,
beautiful.awesome_subicon },
@ -148,10 +145,7 @@ local menu_items = {
{ "games" , M.games },
{ "utils" , M.utils }
}
return menu_items
end
---------------------------------------------------------------------
------------------------------------------
return setmetatable({}, { __call = function(_, ...) return _M.get(...) end })

View File

@ -1,63 +1,53 @@
-- If LuaRocks is installed, make sure that packages installed through it are
-- found (e.g. lgi). If LuaRocks is not installed, do nothing.
------ includes
--- enable luarocks if installed
pcall(require, "luarocks.loader")
-- Standard awesome library
--- awesome stdlib
local gears = require("gears")
local awful = require("awful")
-- Theme handling library
--- theme lib
local beautiful = require("beautiful")
-- Miscellaneous awesome library
--- other awesome libs
local menubar = require("menubar")
RC = {} -- global namespace, on top before require any modules
RC.vars = require("main.user-variables")
RC.vars = require("main.user_vars")
------------------------------------------
------ error handling
require("main.errors")
-- {{{ Error handling -- }}}
require("main.error-handling")
-- {{{ Variable definitions
-- Themes define colours, icons, font and wallpapers.
------ theme stuff
--- TODO: implement a not-shitty way of handling multiple themes
beautiful.init("~/.config/awesome/themes/spacestation/theme.lua")
beautiful.wallpaper = RC.vars.wallpaper
-- }}}
modkey = RC.vars.modkey
-- Custom Local Library
------- custom Local Library
--- main
local main = {
layouts = require("main.layouts"),
tags = require("main.tags"),
menu = require("main.menu"),
rules = require("main.rules"),
tags = require("main.tags" ),
menu = require("main.menu" ),
rules = require("main.rules" )
}
-- Custom Local Library: Keys and Mouse Binding
--- keybindings and mouse buttons
local bindings = {
global_keys = require("bindings.keys.global"),
tags = require("bindings.keys.tags"),
client_keys = require("bindings.keys.client"),
global_keys = require("bindings.keys.global" ),
tags = require("bindings.keys.tags" ),
client_keys = require("bindings.keys.client" ),
global_buttons = require("bindings.mouse.global"),
client_buttons = require("bindings.mouse.client")
}
-- {{{ Layouts
-- Table of layouts to cover with awful.layout.inc, order matters.
-- a variable needed in main.tags, and statusbar
-- awful.layout.layouts = { ... }
modkey = RC.vars.modkey
------ layouts
RC.layouts = main.layouts()
-- }}}
-- {{{ Tags
-- Define a tag table which hold all screen tags.
-- a variable needed in rules, tasklist, and globalkeys
------ tags
RC.tags = main.tags()
-- }}}
-- {{{ Menu
-- Create a laucher widget and a main menu
------ menu
RC.mainmenu = awful.menu({ items = main.menu() }) -- in globalkeys
-- a variable needed in statusbar (helper)
@ -65,40 +55,33 @@ RC.launcher = awful.widget.launcher(
{ image = beautiful.awesome_icon, menu = RC.mainmenu }
)
-- Menubar configuration
-- Set the terminal for applications that require it
------ menubar config
menubar.utils.terminal = RC.vars.terminal
-- }}}
-- {{{ Mouse and Key bindings
------ enable keybindings and mouse buttons
RC.global_keys = bindings.global_keys()
RC.global_keys = bindings.tags(RC.global_keys)
-- Set root
------ set root
root.buttons(bindings.global_buttons())
root.keys(RC.global_keys)
-- }}}
-- Keyboard map indicator and switcher
------ keyboard layout indicator
--- * since i use ibus, i don't know if this does anything?
mykeyboardlayout = awful.widget.keyboardlayout()
-- {{{ Statusbar: Wibar
------ statusbar
require("deco.statusbar")
-- }}}
-- {{{ Rules
-- Rules to apply to new clients (through the "manage" signal).
------ rules
--- rules to apply to new clients
awful.rules.rules = main.rules(
bindings.client_keys(),
bindings.client_buttons()
)
-- }}}
-- {{{ Signals
------ signals
require("main.signals")
-- }}}
-- {{{ Startup applications
require("main.startup")
-- }}}
------ startup
require("main.startup")

View File

@ -1,6 +1,6 @@
---------------------------
-- Default awesome theme --
---------------------------
------------------------------
--- spacestation - ngoomie ---
------------------------------
local theme_assets = require("beautiful.theme_assets")
local xresources = require("beautiful.xresources")