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")
|
||||||
|
|
||||||
package.path =
|
local hostname = posix.uname("%n")
|
||||||
'/home/slash/projects/avandu-lua/lua/?.lua;' .. package.path
|
local avandu = nil
|
||||||
|
|
||||||
local avandu = require 'avandu'
|
if hostname == "drd" then
|
||||||
|
package.path =
|
||||||
|
'/home/slash/projects/avandu-lua/lua/?.lua;' .. package.path
|
||||||
|
|
||||||
|
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")
|
||||||
avandu.ttrss_url = "https://ryuslash.org/tt-rss/api/"
|
|
||||||
|
if avandu then
|
||||||
|
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,16 +219,18 @@ mymaillisttimer:connect_signal(
|
||||||
end)
|
end)
|
||||||
mymaillisttimer:start()
|
mymaillisttimer:start()
|
||||||
|
|
||||||
myrsslist = wibox.widget.textbox()
|
if avandu then
|
||||||
myrsslist:set_markup(" " .. (avandu.unread() or '?') .. " <span face=\"FontAwesome\"></span>")
|
myrsslist = wibox.widget.textbox()
|
||||||
myrsslisttimer = timer({ timeout = 60 })
|
myrsslist:set_markup(" " .. (avandu.unread() or '?') .. " <span face=\"FontAwesome\"></span>")
|
||||||
myrsslisttimer:connect_signal(
|
myrsslisttimer = timer({ timeout = 60 })
|
||||||
"timeout",
|
myrsslisttimer:connect_signal(
|
||||||
function ()
|
"timeout",
|
||||||
myrsslist:set_markup(" " .. (avandu.unread() or '?') .. " <span face=\"FontAwesome\"></span>")
|
function ()
|
||||||
end
|
myrsslist:set_markup(" " .. (avandu.unread() or '?') .. " <span face=\"FontAwesome\"></span>")
|
||||||
)
|
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