diff --git a/awesome/bindings/keys/client.lua b/awesome/bindings/keys/client.lua index 9c9fe26..02cc845 100644 --- a/awesome/bindings/keys/client.lua +++ b/awesome/bindings/keys/client.lua @@ -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 }) diff --git a/awesome/bindings/keys/tags.lua b/awesome/bindings/keys/tags.lua index 329f4ce..52085d1 100644 --- a/awesome/bindings/keys/tags.lua +++ b/awesome/bindings/keys/tags.lua @@ -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 }) diff --git a/awesome/bindings/mouse/client.lua b/awesome/bindings/mouse/client.lua index 64a1b32..837fc56 100644 --- a/awesome/bindings/mouse/client.lua +++ b/awesome/bindings/mouse/client.lua @@ -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 }) \ No newline at end of file diff --git a/awesome/bindings/mouse/global.lua b/awesome/bindings/mouse/global.lua index 52ed6af..b0cb05d 100644 --- a/awesome/bindings/mouse/global.lua +++ b/awesome/bindings/mouse/global.lua @@ -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 }) \ No newline at end of file diff --git a/awesome/main/error-handling.lua b/awesome/main/errors.lua similarity index 100% rename from awesome/main/error-handling.lua rename to awesome/main/errors.lua diff --git a/awesome/main/menu.lua b/awesome/main/menu.lua index 363ced3..a33debe 100644 --- a/awesome/main/menu.lua +++ b/awesome/main/menu.lua @@ -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 }) diff --git a/awesome/main/user-variables.lua b/awesome/main/user_vars.lua similarity index 100% rename from awesome/main/user-variables.lua rename to awesome/main/user_vars.lua diff --git a/awesome/rc.lua b/awesome/rc.lua index 3bd239b..37c57fc 100644 --- a/awesome/rc.lua +++ b/awesome/rc.lua @@ -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") --- }}} \ No newline at end of file +------ startup +require("main.startup") \ No newline at end of file diff --git a/awesome/themes/spacestation/theme.lua b/awesome/themes/spacestation/theme.lua index 348071a..860bff0 100644 --- a/awesome/themes/spacestation/theme.lua +++ b/awesome/themes/spacestation/theme.lua @@ -1,6 +1,6 @@ ---------------------------- --- Default awesome theme -- ---------------------------- +------------------------------ +--- spacestation - ngoomie --- +------------------------------ local theme_assets = require("beautiful.theme_assets") local xresources = require("beautiful.xresources")