organizational changes
This commit is contained in:
parent
3b040ad1e4
commit
4f85d44623
|
@ -4,7 +4,7 @@ local awful = require("awful")
|
||||||
|
|
||||||
local _M = {}
|
local _M = {}
|
||||||
local modkey = RC.vars.modkey
|
local modkey = RC.vars.modkey
|
||||||
------------------
|
------------------------------------------
|
||||||
function _M.get()
|
function _M.get()
|
||||||
local client_keys = gears.table.join(
|
local client_keys = gears.table.join(
|
||||||
awful.key({ modkey, }, "f",
|
awful.key({ modkey, }, "f",
|
||||||
|
@ -48,13 +48,9 @@ function _M.get()
|
||||||
c:raise()
|
c:raise()
|
||||||
end ,
|
end ,
|
||||||
{description = "(un)maximize horizontally", group = "client"})
|
{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
|
return client_keys
|
||||||
end
|
end
|
||||||
------------------
|
------------------------------------------
|
||||||
return setmetatable({}, { __call = function(_, ...) return _M.get(...) end })
|
return setmetatable({}, { __call = function(_, ...) return _M.get(...) end })
|
||||||
|
|
|
@ -4,7 +4,7 @@ local awful = require("awful")
|
||||||
|
|
||||||
local _M = {}
|
local _M = {}
|
||||||
local modkey = RC.vars.modkey
|
local modkey = RC.vars.modkey
|
||||||
------------------
|
------------------------------------------
|
||||||
function _M.get(global_keys)
|
function _M.get(global_keys)
|
||||||
-- Bind all key numbers to tags.
|
-- Bind all key numbers to tags.
|
||||||
-- Be careful: we use keycodes to make it work on any keyboard layout.
|
-- 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
|
return global_keys
|
||||||
end
|
end
|
||||||
-- }}}
|
------------------------------------------
|
||||||
------------------
|
|
||||||
return setmetatable({}, { __call = function(_, ...) return _M.get(...) end })
|
return setmetatable({}, { __call = function(_, ...) return _M.get(...) end })
|
||||||
|
|
|
@ -3,7 +3,7 @@ local gears = require("gears")
|
||||||
local awful = require("awful")
|
local awful = require("awful")
|
||||||
|
|
||||||
local _M = {}
|
local _M = {}
|
||||||
------------------
|
------------------------------------------
|
||||||
function _M.get()
|
function _M.get()
|
||||||
local client_buttons = gears.table.join(
|
local client_buttons = gears.table.join(
|
||||||
awful.button({ }, 1, function (c)
|
awful.button({ }, 1, function (c)
|
||||||
|
@ -21,5 +21,5 @@ function _M.get()
|
||||||
end))
|
end))
|
||||||
return client_buttons
|
return client_buttons
|
||||||
end
|
end
|
||||||
------------------
|
------------------------------------------
|
||||||
return setmetatable({}, { __call = function(_, ...) return _M.get(...) end })
|
return setmetatable({}, { __call = function(_, ...) return _M.get(...) end })
|
|
@ -3,7 +3,7 @@ local gears = require("gears")
|
||||||
local awful = require("awful")
|
local awful = require("awful")
|
||||||
|
|
||||||
local _M = {}
|
local _M = {}
|
||||||
------------------
|
------------------------------------------
|
||||||
function _M.get()
|
function _M.get()
|
||||||
local global_buttons = gears.table.join(
|
local global_buttons = gears.table.join(
|
||||||
awful.button({ }, 3, function () RC.mainmenu:toggle() end),
|
awful.button({ }, 3, function () RC.mainmenu:toggle() end),
|
||||||
|
@ -12,5 +12,5 @@ function _M.get()
|
||||||
)
|
)
|
||||||
return global_buttons
|
return global_buttons
|
||||||
end
|
end
|
||||||
------------------
|
------------------------------------------
|
||||||
return setmetatable({}, { __call = function(_, ...) return _M.get(...) end })
|
return setmetatable({}, { __call = function(_, ...) return _M.get(...) end })
|
|
@ -1,28 +1,25 @@
|
||||||
-- standard awesome library -----------------------------------------
|
--- awesome stdlib
|
||||||
local awful = require("awful")
|
local awful = require("awful")
|
||||||
local hotkeys_popup = require("awful.hotkeys_popup").widget
|
local hotkeys_popup = require("awful.hotkeys_popup").widget
|
||||||
-- theme handling library ------------------------------------------
|
--- theme lib
|
||||||
local beautiful = require("beautiful") -- for awesome.icon
|
local beautiful = require("beautiful") --- for awesome.icon
|
||||||
|
|
||||||
local M = {} -- menu
|
local M = {}
|
||||||
local _M = {} -- module
|
local _M = {}
|
||||||
|
------------------------------------------
|
||||||
---------------------------------------------------------------------
|
--- import terminal variable from rc.lua
|
||||||
|
|
||||||
-- import terminal variable from rc.lua -----------------------------
|
|
||||||
local terminal = RC.vars.terminal
|
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 = os.getenv("EDITOR") or "nano"
|
||||||
local editor_cmd = terminal .. " -e " .. editor
|
local editor_cmd = terminal .. " -e " .. editor
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
------------------------------------------
|
||||||
|
--- make it harder to quit awesome accidentally
|
||||||
-- make it harder to quit awesome accidentally ----------------------
|
|
||||||
M.quitmenu =
|
M.quitmenu =
|
||||||
{{ "i mean it!", function() awesome.quit() end }}
|
{{ "i mean it!", function() awesome.quit() end }}
|
||||||
|
|
||||||
-- "awesome" menu ---------------------------------------------------
|
--- "awesome" menu
|
||||||
M.awesome = {
|
M.awesome = {
|
||||||
{ "hotkeys" , function() hotkeys_popup.show_help(nil,awful.screen.focused())
|
{ "hotkeys" , function() hotkeys_popup.show_help(nil,awful.screen.focused())
|
||||||
end },
|
end },
|
||||||
|
@ -36,7 +33,7 @@ M.awesome = {
|
||||||
{ "quit" , M.quitmenu }
|
{ "quit" , M.quitmenu }
|
||||||
}
|
}
|
||||||
|
|
||||||
-- browsers and other network-oriented software ---------------------
|
--- browsers and other network-oriented software
|
||||||
M.network = {
|
M.network = {
|
||||||
{ "firefox" , "firefox" },
|
{ "firefox" , "firefox" },
|
||||||
{ "discord" , "flatpak run\
|
{ "discord" , "flatpak run\
|
||||||
|
@ -47,18 +44,18 @@ M.network = {
|
||||||
{ "keepassxc" , "keepassxc" }
|
{ "keepassxc" , "keepassxc" }
|
||||||
}
|
}
|
||||||
|
|
||||||
-- DEVELOPERS, DEVELOPERS, DEVELOPERS, DEVELOPERS -------------------
|
--- DEVELOPERS, DEVELOPERS, DEVELOPERS, DEVELOPERS
|
||||||
M.develop = {
|
M.develop = {
|
||||||
{ "vs code" , "code" },
|
{ "vs code" , "code" },
|
||||||
{ "bless" , "bless" },
|
{ "bless" , "bless" },
|
||||||
{ "dbeaver studio" , "flatpak run\
|
-- { "dbeaver studio" , "flatpak run\
|
||||||
io.dbeaver.DBeaverCommunity" },
|
-- io.dbeaver.DBeaverCommunity" },
|
||||||
{ "beekeeper studio" , "flatpak run\
|
-- { "beekeeper studio" , "flatpak run\
|
||||||
io.beekeeperstudio.Studio" },
|
-- io.beekeeperstudio.Studio" },
|
||||||
{ "sqlite browser" , "sqlitebrowser" }
|
{ "sqlite browser" , "sqlitebrowser" }
|
||||||
}
|
}
|
||||||
|
|
||||||
-- emulators --------------------------------------------------------
|
--- emulators
|
||||||
M.emulators = {
|
M.emulators = {
|
||||||
{ "citra" , "flatpak run\
|
{ "citra" , "flatpak run\
|
||||||
org.citra_emu.citra" },
|
org.citra_emu.citra" },
|
||||||
|
@ -72,14 +69,14 @@ M.emulators = {
|
||||||
org.ppsspp.PPSSPP" }
|
org.ppsspp.PPSSPP" }
|
||||||
}
|
}
|
||||||
|
|
||||||
-- vintage story [different versions of VS for mods] ----------------
|
--- vintage story [different versions of VS for mods]
|
||||||
M.vtgstry = {
|
M.vtgstry = {
|
||||||
{ "latest" , "vintagestory" },
|
{ "latest" , "vintagestory" },
|
||||||
{ "flatpak" , "flatpak run\
|
{ "flatpak" , "flatpak run\
|
||||||
at.vintagestory.VintageStory" }
|
at.vintagestory.VintageStory" }
|
||||||
}
|
}
|
||||||
|
|
||||||
-- videogames -------------------------------------------------------
|
--- videogames
|
||||||
M.games = {
|
M.games = {
|
||||||
{ "emulators" , M.emulators },
|
{ "emulators" , M.emulators },
|
||||||
{ "vintage story" , M.vtgstry },
|
{ "vintage story" , M.vtgstry },
|
||||||
|
@ -97,7 +94,7 @@ M.games = {
|
||||||
{ "solitaire" , "pysol" }
|
{ "solitaire" , "pysol" }
|
||||||
}
|
}
|
||||||
|
|
||||||
-- utilities [kind of a misc category] ------------------------------
|
--- utilities [kind of a misc category]
|
||||||
M.utils = {
|
M.utils = {
|
||||||
{ "xed" , "xed" },
|
{ "xed" , "xed" },
|
||||||
{ "catfish" , "catfish" },
|
{ "catfish" , "catfish" },
|
||||||
|
@ -112,16 +109,18 @@ M.utils = {
|
||||||
{ "wally" , "wally" }
|
{ "wally" , "wally" }
|
||||||
}
|
}
|
||||||
|
|
||||||
-- "media" programs [image viewers, video players, etc] -------------
|
--- "media" programs [image viewers, video players, etc]
|
||||||
M.media = {
|
M.media = {
|
||||||
{ "hydrus" , "flatpak run io.github.hydrusnetwork.hydrus" },
|
{ "hydrus" , "flatpak run io.github.hydrusnetwork.hydrus" },
|
||||||
|
{ "vlc" , "vlc" },
|
||||||
{ "youtube" , "/usr/lib64/chromium-browser/chromium-browser.sh\
|
{ "youtube" , "/usr/lib64/chromium-browser/chromium-browser.sh\
|
||||||
--profile-directory=Default\
|
--profile-directory=Default\
|
||||||
--app-id=agimnkijcaahngcdmfeangaknmldooml" },
|
--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 = {
|
M.vis = {
|
||||||
{ "blender" , "steam\
|
{ "blender" , "steam\
|
||||||
steam://rungameid/365670" },
|
steam://rungameid/365670" },
|
||||||
|
@ -130,12 +129,10 @@ M.vis = {
|
||||||
{ "beeref" , "flatpak run\
|
{ "beeref" , "flatpak run\
|
||||||
org.beeref.BeeRef" }
|
org.beeref.BeeRef" }
|
||||||
}
|
}
|
||||||
|
------------------------------------------
|
||||||
---------------------------------------------------------------------
|
|
||||||
|
|
||||||
function _M.get()
|
function _M.get()
|
||||||
|
|
||||||
-- main menu --------------------------------------------------------
|
--- main menu
|
||||||
local menu_items = {
|
local menu_items = {
|
||||||
{ "awesome" , M.awesome,
|
{ "awesome" , M.awesome,
|
||||||
beautiful.awesome_subicon },
|
beautiful.awesome_subicon },
|
||||||
|
@ -148,10 +145,7 @@ local menu_items = {
|
||||||
{ "games" , M.games },
|
{ "games" , M.games },
|
||||||
{ "utils" , M.utils }
|
{ "utils" , M.utils }
|
||||||
}
|
}
|
||||||
|
|
||||||
return menu_items
|
return menu_items
|
||||||
end
|
end
|
||||||
|
------------------------------------------
|
||||||
---------------------------------------------------------------------
|
|
||||||
|
|
||||||
return setmetatable({}, { __call = function(_, ...) return _M.get(...) end })
|
return setmetatable({}, { __call = function(_, ...) return _M.get(...) end })
|
||||||
|
|
|
@ -1,40 +1,38 @@
|
||||||
-- If LuaRocks is installed, make sure that packages installed through it are
|
------ includes
|
||||||
-- found (e.g. lgi). If LuaRocks is not installed, do nothing.
|
--- enable luarocks if installed
|
||||||
pcall(require, "luarocks.loader")
|
pcall(require, "luarocks.loader")
|
||||||
|
|
||||||
-- Standard awesome library
|
--- awesome stdlib
|
||||||
local gears = require("gears")
|
local gears = require("gears")
|
||||||
local awful = require("awful")
|
local awful = require("awful")
|
||||||
|
|
||||||
-- Theme handling library
|
--- theme lib
|
||||||
local beautiful = require("beautiful")
|
local beautiful = require("beautiful")
|
||||||
|
|
||||||
-- Miscellaneous awesome library
|
--- other awesome libs
|
||||||
local menubar = require("menubar")
|
local menubar = require("menubar")
|
||||||
|
|
||||||
RC = {} -- global namespace, on top before require any modules
|
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 -- }}}
|
------ theme stuff
|
||||||
require("main.error-handling")
|
--- TODO: implement a not-shitty way of handling multiple themes
|
||||||
|
|
||||||
-- {{{ Variable definitions
|
|
||||||
-- Themes define colours, icons, font and wallpapers.
|
|
||||||
beautiful.init("~/.config/awesome/themes/spacestation/theme.lua")
|
beautiful.init("~/.config/awesome/themes/spacestation/theme.lua")
|
||||||
beautiful.wallpaper = RC.vars.wallpaper
|
beautiful.wallpaper = RC.vars.wallpaper
|
||||||
-- }}}
|
|
||||||
|
|
||||||
modkey = RC.vars.modkey
|
------- custom Local Library
|
||||||
|
--- main
|
||||||
-- Custom Local Library
|
|
||||||
local main = {
|
local main = {
|
||||||
layouts = require("main.layouts"),
|
layouts = require("main.layouts"),
|
||||||
tags = require("main.tags" ),
|
tags = require("main.tags" ),
|
||||||
menu = require("main.menu" ),
|
menu = require("main.menu" ),
|
||||||
rules = require("main.rules"),
|
rules = require("main.rules" )
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Custom Local Library: Keys and Mouse Binding
|
--- keybindings and mouse buttons
|
||||||
local bindings = {
|
local bindings = {
|
||||||
global_keys = require("bindings.keys.global" ),
|
global_keys = require("bindings.keys.global" ),
|
||||||
tags = require("bindings.keys.tags" ),
|
tags = require("bindings.keys.tags" ),
|
||||||
|
@ -43,21 +41,13 @@ local bindings = {
|
||||||
client_buttons = require("bindings.mouse.client")
|
client_buttons = require("bindings.mouse.client")
|
||||||
}
|
}
|
||||||
|
|
||||||
-- {{{ Layouts
|
modkey = RC.vars.modkey
|
||||||
-- Table of layouts to cover with awful.layout.inc, order matters.
|
|
||||||
-- a variable needed in main.tags, and statusbar
|
------ layouts
|
||||||
-- awful.layout.layouts = { ... }
|
|
||||||
RC.layouts = main.layouts()
|
RC.layouts = main.layouts()
|
||||||
-- }}}
|
------ tags
|
||||||
|
|
||||||
-- {{{ Tags
|
|
||||||
-- Define a tag table which hold all screen tags.
|
|
||||||
-- a variable needed in rules, tasklist, and globalkeys
|
|
||||||
RC.tags = main.tags()
|
RC.tags = main.tags()
|
||||||
-- }}}
|
------ menu
|
||||||
|
|
||||||
-- {{{ Menu
|
|
||||||
-- Create a laucher widget and a main menu
|
|
||||||
RC.mainmenu = awful.menu({ items = main.menu() }) -- in globalkeys
|
RC.mainmenu = awful.menu({ items = main.menu() }) -- in globalkeys
|
||||||
|
|
||||||
-- a variable needed in statusbar (helper)
|
-- a variable needed in statusbar (helper)
|
||||||
|
@ -65,40 +55,33 @@ RC.launcher = awful.widget.launcher(
|
||||||
{ image = beautiful.awesome_icon, menu = RC.mainmenu }
|
{ image = beautiful.awesome_icon, menu = RC.mainmenu }
|
||||||
)
|
)
|
||||||
|
|
||||||
-- Menubar configuration
|
------ menubar config
|
||||||
-- Set the terminal for applications that require it
|
|
||||||
menubar.utils.terminal = RC.vars.terminal
|
menubar.utils.terminal = RC.vars.terminal
|
||||||
|
|
||||||
-- }}}
|
------ enable keybindings and mouse buttons
|
||||||
|
|
||||||
-- {{{ Mouse and Key bindings
|
|
||||||
RC.global_keys = bindings.global_keys()
|
RC.global_keys = bindings.global_keys()
|
||||||
RC.global_keys = bindings.tags(RC.global_keys)
|
RC.global_keys = bindings.tags(RC.global_keys)
|
||||||
|
|
||||||
-- Set root
|
------ set root
|
||||||
root.buttons(bindings.global_buttons())
|
root.buttons(bindings.global_buttons())
|
||||||
root.keys(RC.global_keys)
|
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()
|
mykeyboardlayout = awful.widget.keyboardlayout()
|
||||||
|
|
||||||
-- {{{ Statusbar: Wibar
|
------ statusbar
|
||||||
require("deco.statusbar")
|
require("deco.statusbar")
|
||||||
-- }}}
|
|
||||||
|
|
||||||
-- {{{ Rules
|
------ rules
|
||||||
-- Rules to apply to new clients (through the "manage" signal).
|
--- rules to apply to new clients
|
||||||
awful.rules.rules = main.rules(
|
awful.rules.rules = main.rules(
|
||||||
bindings.client_keys(),
|
bindings.client_keys(),
|
||||||
bindings.client_buttons()
|
bindings.client_buttons()
|
||||||
)
|
)
|
||||||
-- }}}
|
|
||||||
|
|
||||||
-- {{{ Signals
|
------ signals
|
||||||
require("main.signals")
|
require("main.signals")
|
||||||
-- }}}
|
|
||||||
|
|
||||||
-- {{{ Startup applications
|
------ startup
|
||||||
require("main.startup")
|
require("main.startup")
|
||||||
-- }}}
|
|
|
@ -1,6 +1,6 @@
|
||||||
---------------------------
|
------------------------------
|
||||||
-- Default awesome theme --
|
--- spacestation - ngoomie ---
|
||||||
---------------------------
|
------------------------------
|
||||||
|
|
||||||
local theme_assets = require("beautiful.theme_assets")
|
local theme_assets = require("beautiful.theme_assets")
|
||||||
local xresources = require("beautiful.xresources")
|
local xresources = require("beautiful.xresources")
|
||||||
|
|
Loading…
Reference in New Issue