Update require for lua 5.2
This commit is contained in:
parent
a7528527cd
commit
da59cbb168
31
rc.lua
31
rc.lua
@ -1,14 +1,18 @@
|
|||||||
-- Standard awesome library
|
-- Standard awesome library
|
||||||
require("awful")
|
local gears = require("gears")
|
||||||
|
local awful = require("awful")
|
||||||
require("awful.autofocus")
|
require("awful.autofocus")
|
||||||
require("awful.rules")
|
-- Widget and layout library
|
||||||
|
local wibox = require("wibox")
|
||||||
-- Theme handling library
|
-- Theme handling library
|
||||||
require("beautiful")
|
local beautiful = require("beautiful")
|
||||||
-- Notification library
|
-- Notification library
|
||||||
require("naughty")
|
local naughty = require("naughty")
|
||||||
|
local menubar = require("menubar")
|
||||||
|
|
||||||
require("util")
|
local util = require("util")
|
||||||
config_loaded = pcall(function() require("config") end)
|
local config = {}
|
||||||
|
config_loaded = pcall(function() config = require("config") end)
|
||||||
|
|
||||||
-- {{{ Error handling
|
-- {{{ Error handling
|
||||||
-- Check if awesome encountered an error during startup and fell back to
|
-- Check if awesome encountered an error during startup and fell back to
|
||||||
@ -57,6 +61,7 @@ modkey = "Mod4"
|
|||||||
-- Table of layouts to cover with awful.layout.inc, order matters.
|
-- Table of layouts to cover with awful.layout.inc, order matters.
|
||||||
layouts =
|
layouts =
|
||||||
{
|
{
|
||||||
|
awful.layout.suit.floating,
|
||||||
awful.layout.suit.tile,
|
awful.layout.suit.tile,
|
||||||
awful.layout.suit.tile.left,
|
awful.layout.suit.tile.left,
|
||||||
awful.layout.suit.tile.bottom,
|
awful.layout.suit.tile.bottom,
|
||||||
@ -68,29 +73,29 @@ layouts =
|
|||||||
awful.layout.suit.max,
|
awful.layout.suit.max,
|
||||||
awful.layout.suit.max.fullscreen,
|
awful.layout.suit.max.fullscreen,
|
||||||
--awful.layout.suit.magnifier
|
--awful.layout.suit.magnifier
|
||||||
awful.layout.suit.floating,
|
|
||||||
}
|
}
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Loading of additionnal libraries
|
-- {{{ Loading of additionnal libraries
|
||||||
-- Dynamic tagging library
|
-- Dynamic tagging library
|
||||||
shifty_loaded = pcall(function() require("shifty") end)
|
local shifty = {}
|
||||||
|
shifty_loaded = pcall(function() shifty = require("shifty") end)
|
||||||
-- Stop loading this config if shifty is not available
|
-- Stop loading this config if shifty is not available
|
||||||
if not shifty_loaded then
|
if not shifty_loaded then
|
||||||
error("needs shifty to run properly")
|
error("needs shifty to run properly")
|
||||||
end
|
end
|
||||||
-- Widgets library
|
-- Widgets library
|
||||||
iniquitous_loaded = pcall(function() require("iniquitous") end)
|
local iniquitous = {}
|
||||||
|
iniquitous_loaded = pcall(function() iniquitous = require("iniquitous") end)
|
||||||
if not iniquitous_loaded then
|
if not iniquitous_loaded then
|
||||||
naughty.notify({ preset = naughty.config.presets.critical,
|
naughty.notify({ preset = naughty.config.presets.critical,
|
||||||
title = "Oops, Iniquitous is not available!",
|
title = "Oops, Iniquitous is not available!",
|
||||||
text = "Install Iniquitous library to use more widgets." })
|
text = "Install Iniquitous library to use more widgets." })
|
||||||
io.stderr:write("needs iniquitous for more advanced widgets\n")
|
io.stderr:write("needs iniquitous for more advanced widgets\n")
|
||||||
end
|
end
|
||||||
vicious_loaded = pcall(function() require("vicious") end)
|
local vicious = {}
|
||||||
if vicious_loaded then
|
vicious_loaded = pcall(function() vicious = require("vicious") end)
|
||||||
vicious = package.loaded["vicious"]
|
if not vicious_loaded then
|
||||||
else
|
|
||||||
naughty.notify({ preset = naughty.config.presets.critical,
|
naughty.notify({ preset = naughty.config.presets.critical,
|
||||||
title = "Oops, Vicious is not available!",
|
title = "Oops, Vicious is not available!",
|
||||||
text = "Install Vicious library to use more widgets." })
|
text = "Install Vicious library to use more widgets." })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user