From addab9a334bfa91ba29552be8f24104eeaac2d9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=96=9F=20=E2=96=96=E2=96=9F=20=E2=96=96?= Date: Thu, 11 Dec 2014 02:28:30 +0100 Subject: [PATCH] make modules more global --- rc.lua | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/rc.lua b/rc.lua index c255025..1425523 100644 --- a/rc.lua +++ b/rc.lua @@ -1,16 +1,19 @@ +jit.on() -- Standard awesome library -local gears = require("gears") -local awful = require("awful") +gears = require("gears") +awful = require("awful") awful.autofocus = require("awful.autofocus") awful.rules = require("awful.rules") -- Widget and layout library -local wibox = require("wibox") +wibox = require("wibox") -- Theme handling library -local beautiful = require("beautiful") +beautiful = require("beautiful") -- Notification library -local naughty = require("naughty") -local menubar = require("menubar") -local keydoc = require("keydoc") +naughty = require("naughty") +menubar = require("menubar") +keydoc = require("keydoc") + + -- default values for notifications @@ -29,10 +32,6 @@ if awesome.startup_errors then text = awesome.startup_errors }) end -menubar.cache_entries = true -menubar.show_categories = true -- Change to false if you want only programs to appear in the menu -menubar.geometry.height = 14 - -- Handle runtime errors after startup do local in_error = false @@ -80,6 +79,15 @@ beautiful.init(awful.util.getdir("config") .. "/theme.lua") uzful.notifications.patch() uzful.util.patch.vicious() +menubar.cache_entries = true +menubar.show_categories = true -- Change to false if you want only programs to appear in the menu +menubar.geometry.height = theme.menu_height +repl.geometry.height = theme.menu_height + +-- vicious caching +vicious.cache(vicious.widgets.thermal) +vicious.cache(vicious.widgets.net) + -- This is used later as the default terminal and editor to run. terminal = "x-terminal-emulator" editor = os.getenv("EDITOR") or "vim" @@ -212,6 +220,7 @@ if screen.count() > 1 then end mysystemmenu = {} +unagi = function () awful.util.spawn_with_shell("unagi") end lock = function () awful.util.spawn_with_shell("xtrlock") end screenshot = function () awful.util.spawn("ksnapshot") end invert_screen = function () awful.util.spawn("xcalib -invert -alter", false) end @@ -221,8 +230,7 @@ table.insert(mysystemmenu, { "lock", lock }) if dbus then table.insert(mysystemmenu, { "suspend", function () naughty.notify({ text = "system suspsending ... " }) - awful.util.spawn_with_shell("sync && dbus-send --system --print-reply --dest='org.freedesktop.UPower' /org/freedesktop/UPower org.freedesktop.UPower.Suspend &") - lock() + awful.util.spawn_with_shell("sync && dbus-send --system --print-reply --dest='org.freedesktop.UPower' /org/freedesktop/UPower org.freedesktop.UPower.Suspend & xtrlock") end }) end