tie tpm into my config
This commit is contained in:
parent
fd05d838ad
commit
c2ab336384
2 changed files with 21 additions and 1 deletions
|
|
@ -93,6 +93,25 @@ spacer = widget({type = "textbox"})
|
|||
separator = widget({type = "textbox"})
|
||||
spacer.text = " "
|
||||
separator.text = "|"
|
||||
-- Execute command and return its output. You probably won't only execute commands with one
|
||||
-- line of output
|
||||
function execute_command(command)
|
||||
local fh = io.popen(command)
|
||||
local str = ""
|
||||
for i in fh:lines() do
|
||||
str = str .. i
|
||||
end
|
||||
io.close(fh)
|
||||
return str
|
||||
end
|
||||
|
||||
pom = widget({type = "textbox"})
|
||||
pom.text = " " .. execute_command("~/src/tpm/tpm") .. " "
|
||||
pomtimer = timer({ timeout = 1})
|
||||
pomtimer:add_signal("timeout", function()
|
||||
pom.text = " " .. execute_command("~/src/tpm/tpm") .. " "
|
||||
end)
|
||||
pomtimer:start()
|
||||
|
||||
-- {{{ Menu
|
||||
-- Create a laucher widget and a main menu
|
||||
|
|
@ -275,6 +294,7 @@ for s = 1, screen.count() do
|
|||
spacer,
|
||||
separator,
|
||||
spacer,
|
||||
pom,
|
||||
mytasklist[s],
|
||||
layout = awful.widget.layout.horizontal.rightleft
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ set -g status-fg white
|
|||
set -g status-interval 1
|
||||
set -g status-left '#[fg=green]#H#[default]'
|
||||
set -g status-left-length 20
|
||||
set -g status-right '#[fg=cyan,bold]%Y-%m-%d %H:%M:%S#[default]'
|
||||
set -g status-right '#[fg=green]#(~/src/tpm/tpm) #[fg=cyan,bold]%Y-%m-%d %H:%M:%S#[default]'
|
||||
|
||||
# Notifying if other windows has activities
|
||||
setw -g monitor-activity on
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue