Only use avandu on drd, add dependency file
This commit is contained in:
parent
df9f1f278b
commit
00f5f3ed9d
2 changed files with 47 additions and 16 deletions
22
awesome/.config/awesome/awesomerc-1-1.rockspec
Normal file
22
awesome/.config/awesome/awesomerc-1-1.rockspec
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
package = "AwesomeRC"
|
||||||
|
version = "1-1"
|
||||||
|
|
||||||
|
description = {
|
||||||
|
license = "GPL-3"
|
||||||
|
}
|
||||||
|
|
||||||
|
source = {
|
||||||
|
url = "file://rc.lua"
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies = {
|
||||||
|
"luafilesystem",
|
||||||
|
"luaposix"
|
||||||
|
}
|
||||||
|
|
||||||
|
build = {
|
||||||
|
type = "builtin",
|
||||||
|
modules = {
|
||||||
|
rc = "rc.lua"
|
||||||
|
}
|
||||||
|
}
|
|
@ -13,13 +13,17 @@ local menubar = require("menubar")
|
||||||
local lfs = require("lfs")
|
local lfs = require("lfs")
|
||||||
local posix = require("posix")
|
local posix = require("posix")
|
||||||
|
|
||||||
|
local hostname = posix.uname("%n")
|
||||||
|
local avandu = nil
|
||||||
|
|
||||||
|
if hostname == "drd" then
|
||||||
package.path =
|
package.path =
|
||||||
'/home/slash/projects/avandu-lua/lua/?.lua;' .. package.path
|
'/home/slash/projects/avandu-lua/lua/?.lua;' .. package.path
|
||||||
|
|
||||||
local avandu = require 'avandu'
|
avandu = require 'avandu'
|
||||||
|
end
|
||||||
|
|
||||||
local maildir_base = os.getenv("HOME") .. "/documents/mail/"
|
local maildir_base = os.getenv("HOME") .. "/documents/mail/"
|
||||||
local hostname = posix.uname("%n")
|
|
||||||
|
|
||||||
function new_mail(maildir)
|
function new_mail(maildir)
|
||||||
local count = 0
|
local count = 0
|
||||||
|
@ -81,7 +85,10 @@ end
|
||||||
-- {{{ Variable definitions
|
-- {{{ Variable definitions
|
||||||
-- Themes define colours, icons, font and wallpapers.
|
-- Themes define colours, icons, font and wallpapers.
|
||||||
beautiful.init("/usr/share/awesome/themes/default/theme.lua")
|
beautiful.init("/usr/share/awesome/themes/default/theme.lua")
|
||||||
|
|
||||||
|
if avandu then
|
||||||
avandu.ttrss_url = "https://ryuslash.org/tt-rss/api/"
|
avandu.ttrss_url = "https://ryuslash.org/tt-rss/api/"
|
||||||
|
end
|
||||||
|
|
||||||
-- This is used later as the default terminal and editor to run.
|
-- This is used later as the default terminal and editor to run.
|
||||||
terminal = "urxvtc"
|
terminal = "urxvtc"
|
||||||
|
@ -212,6 +219,7 @@ mymaillisttimer:connect_signal(
|
||||||
end)
|
end)
|
||||||
mymaillisttimer:start()
|
mymaillisttimer:start()
|
||||||
|
|
||||||
|
if avandu then
|
||||||
myrsslist = wibox.widget.textbox()
|
myrsslist = wibox.widget.textbox()
|
||||||
myrsslist:set_markup(" " .. (avandu.unread() or '?') .. " <span face=\"FontAwesome\"></span>")
|
myrsslist:set_markup(" " .. (avandu.unread() or '?') .. " <span face=\"FontAwesome\"></span>")
|
||||||
myrsslisttimer = timer({ timeout = 60 })
|
myrsslisttimer = timer({ timeout = 60 })
|
||||||
|
@ -222,6 +230,7 @@ myrsslisttimer:connect_signal(
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
myrsslisttimer:start()
|
myrsslisttimer:start()
|
||||||
|
end
|
||||||
|
|
||||||
function unlocked()
|
function unlocked()
|
||||||
if awful.util.pread("gkeyring -1 --name unlocked") == "true" then
|
if awful.util.pread("gkeyring -1 --name unlocked") == "true" then
|
||||||
|
@ -282,7 +291,7 @@ for s = 1, screen.count() do
|
||||||
-- Widgets that are aligned to the right
|
-- Widgets that are aligned to the right
|
||||||
local right_layout = wibox.layout.fixed.horizontal()
|
local right_layout = wibox.layout.fixed.horizontal()
|
||||||
if s == 1 then
|
if s == 1 then
|
||||||
right_layout:add(myrsslist)
|
if avandu then right_layout:add(myrsslist) end
|
||||||
right_layout:add(mymaillist)
|
right_layout:add(mymaillist)
|
||||||
right_layout:add(mykeyringlist)
|
right_layout:add(mykeyringlist)
|
||||||
right_layout:add(wibox.widget.systray())
|
right_layout:add(wibox.widget.systray())
|
||||||
|
|
Loading…
Reference in a new issue