From 1a0c875477c1ca4fb94beecf416554000f9933a3 Mon Sep 17 00:00:00 2001 From: petrucci4prez Date: Mon, 17 Jul 2017 23:33:56 -0400 Subject: [PATCH] clean up System.lua --- module/System.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/module/System.lua b/module/System.lua index fbcceb6..fac0814 100644 --- a/module/System.lua +++ b/module/System.lua @@ -7,9 +7,6 @@ local schema = require 'default_patterns' local __string_match = string.match -local UPGRADE_CMD = "sed -n '/ starting full system upgrade/p' /var/log/pacman.log | tail -1" -local SYNC_CMD = "sed -n '/ synchronizing package lists/p' /var/log/pacman.log | tail -1" - local _TEXT_SPACING_ = 20 local extract_date = function(cmd) @@ -53,8 +50,10 @@ local draw = function(cr, current_interface, log_is_changed) TextColumn.set(info, cr, 2, util.conky('$uptime')) if log_is_changed then - TextColumn.set(info, cr, 3, extract_date(UPGRADE_CMD)) - TextColumn.set(info, cr, 4, extract_date(SYNC_CMD)) + TextColumn.set(info, cr, 3, extract_date("sed -n ".. + "'/ starting full system upgrade/p' /var/log/pacman.log | tail -1")) + TextColumn.set(info, cr, 4, extract_date("sed -n ".. + "'/ synchronizing package lists/p' /var/log/pacman.log | tail -1")) end if current_interface == 0 then