-- awesome_mode: api-level=4:screen=on -- If LuaRocks is installed, make sure that packages installed through it are -- found (e.g. lgi). If LuaRocks is not installed, do nothing. pcall(require, 'luarocks.loader') local gtimer = require 'gears.timer' local legacy = require 'awesome-legacy' local naughty = require 'naughty' local ruled = require 'ruled' local slot = require 'awesome-slot' -- Load global awesome components from the C API local capi = { client = _G.client, screen = _G.screen, tag = _G.tag } -- Beautiful needs to be initialized as soon as possible to make theme -- variables available to the configuration module. legacy.beautiful { base = 'default', theme = require 'rc.theme' } legacy.manage_error() legacy.autofocus() legacy.sloppy_focus() local configuration = require 'rc.configuration' local my_slots = require 'rc.slots' -- This needs to be run after awesome has completed C API initialization and -- the `root` object is available. gtimer.delayed_call(function () legacy.global_mouse_bindings(configuration.global_mousebindings) legacy.global_keybindings(configuration.global_keybindings) end) -- luacheck: ignore unused variable load_wallpaper local load_wallpaper = slot { id = 'LOAD_WALLPAPER', action = slot.actions.CREATE | slot.actions.CONNECT, target = capi.screen, signal = 'request::wallpaper', slot = slot.slots.screen.wallpaper } -- luacheck: ignore unused variable default_layout local default_layout = slot { id = 'DEFAULT_LAYOUTS', action = slot.actions.CREATE | slot.actions.CONNECT, target = capi.tag, signal = 'request::default_layouts', slot = slot.slots.tag.default_layouts, slot_params = { layouts = configuration.tag_layouts } } -- luacheck: ignore unused variable create_tag local create_tag = slot { id = 'CREATE_TAGS', action = slot.actions.CREATE | slot.actions.CONNECT, target = capi.screen, signal = 'request::desktop_decoration', slot = my_slots.create_tags } -- luacheck: ignore unused variable desktop_decoration local desktop_decoration = slot { id = 'DESKTOP_DECORATION', action = slot.actions.CREATE | slot.actions.CONNECT, target = capi.screen, signal = 'request::desktop_decoration', slot = my_slots.build_desktop_decoration } -- luacheck: ignore unused variable client_mousebinding local client_mousebinding = slot { id = 'CLIENT_MOUSE_BINDINGS', action = slot.actions.CREATE | slot.actions.CONNECT, target = capi.client, signal = 'request::default_mousebindings', slot = slot.slots.client.append_mousebindings, slot_params = { mousebindings = configuration.client_mousebindings } } -- luacheck: ignore unused variable client_keybinding local client_keybinding = slot { id = 'CLIENT_KEY_BINDINGS', action = slot.actions.CREATE | slot.actions.CONNECT, target = capi.client, signal = 'request::default_keybindings', slot = slot.slots.client.append_keybindings, slot_params = { keybindings = configuration.client_keybindings } } -- luacheck: ignore unused variable ruled_client local ruled_client = slot { id = 'RULED_CLIENT', action = slot.actions.CREATE | slot.actions.CONNECT, target = ruled.client, signal = 'request::rules', slot = slot.slots.ruled.append_client_rules, slot_params = { rules = configuration.rules.client } } -- luacheck: ignore unused variable client_titlebar local client_titlebar = slot { id = 'CLIENT_TITLEBAR', action = slot.actions.CREATE | slot.actions.CONNECT, target = capi.client, signal = 'request::titlebars', slot = my_slots.build_client_titlebars } -- luacheck: ignore unused variable ruled_notification local ruled_notification = slot { id = 'RULED_NOTIFICATION', action = slot.actions.CREATE | slot.actions.CONNECT, target = ruled.notification, signal = 'request::rules', slot = slot.slots.ruled.append_notification_rules, slot_params = { rules = configuration.rules.notification } } -- luacheck: ignore unused variable naughty_display local naughty_display = slot { id = 'NAUGHTY_DISPLAY', action = slot.actions.CREATE | slot.actions.CONNECT, target = naughty, signal = 'request::display', slot = my_slots.naughty_display } naughty.notify { title = 'Aire-One dots', message = 'You successfully ran the Aire-One default rc!' }