aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2015-10-05 16:27:37 -0300
committerSilvio Rhatto <rhatto@riseup.net>2015-10-05 16:27:37 -0300
commitebe438b8db5290ea5507865eabd8f175e9ad9a21 (patch)
treea6b8f00ba9c22f79c515fd35d7d465eb5829315d
parent944ac67bebc5e3acecbf422462f7c97a4fbef791 (diff)
downloadawesome-ebe438b8db5290ea5507865eabd8f175e9ad9a21.tar.gz
awesome-ebe438b8db5290ea5507865eabd8f175e9ad9a21.tar.bz2
Suppor for custom settings
-rw-r--r--config.dot/awesome.link/rc.lua10
-rw-r--r--config.dot/awesome.link/variables.lua4
-rw-r--r--config.dot/awesome.link/widgets.lua2
3 files changed, 11 insertions, 5 deletions
diff --git a/config.dot/awesome.link/rc.lua b/config.dot/awesome.link/rc.lua
index f7daa40..32e98a6 100644
--- a/config.dot/awesome.link/rc.lua
+++ b/config.dot/awesome.link/rc.lua
@@ -1,10 +1,11 @@
-- Basic settings
homedir = os.getenv("HOME")
-configdir = homedir .. "/.config/awesome"
-themes_dir = configdir .. "/themes"
+configdir = homedir .. "/.config/awesome"
+themes_dir = configdir .. "/themes"
-- Standard awesome library
require("awful")
+require("awful.util")
require("awful.autofocus")
require("awful.rules")
@@ -20,6 +21,11 @@ require("vicious")
-- Load Debian menu entries
require("debian.menu")
+-- Custom config
+if awful.util.file_readable(homedir .. "/.custom/awesome/settings.lua") then
+ dofile(homedir .. "/.custom/awesome/settings.lua")
+end
+
-- Variables
dofile(configdir .. "/variables.lua")
diff --git a/config.dot/awesome.link/variables.lua b/config.dot/awesome.link/variables.lua
index c9633a2..411940b 100644
--- a/config.dot/awesome.link/variables.lua
+++ b/config.dot/awesome.link/variables.lua
@@ -1,7 +1,7 @@
-- {{{ Variable definitions
-- This is used later as the default terminal and editor to run.
-terminal = "terminal"
-editor = os.getenv("EDITOR") or "editor"
+terminal = "terminal"
+editor = os.getenv("EDITOR") or "editor"
editor_cmd = terminal .. " " .. editor
-- Default modkey.
diff --git a/config.dot/awesome.link/widgets.lua b/config.dot/awesome.link/widgets.lua
index c6e5a8f..7317cf2 100644
--- a/config.dot/awesome.link/widgets.lua
+++ b/config.dot/awesome.link/widgets.lua
@@ -3,7 +3,7 @@ dofile(configdir .. "/leds.lua")
dofile(configdir .. "/volume.lua")
dofile(configdir .. "/battery.lua")
-if file_exists(homedir .. "/.custom/awesome/awesompd.lua") then
+if awful.util.file_readable(homedir .. "/.custom/awesome/awesompd.lua") then
awesompd = true
dofile(configdir .. "/awesompd.lua")
end