summaryrefslogtreecommitdiffstats
path: root/clerk
diff options
context:
space:
mode:
Diffstat (limited to 'clerk')
-rwxr-xr-xclerk8
1 files changed, 6 insertions, 2 deletions
diff --git a/clerk b/clerk
index 6017489..cc199f3 100755
--- a/clerk
+++ b/clerk
@@ -120,8 +120,8 @@ fi
# set help color
if [[ $help_color == "" ]]; then
- help_color=$(dmenu_t -dump-xresources | grep -P '^rofi.color.normal' | awk -F ',' '{ print $2 }')
- help_separator_color=$(dmenu_t -dump-xresources | grep -P 'rofi.color.normal' | awk -F ',' '{ print $2 }')
+ help_color=$(dmenu_t -dump-xresources | grep -P '^rofi.color.normal' | awk -F ',' '{ print $2 }' | xargs)
+ help_separator_color=$(dmenu_t -dump-xresources | grep -P 'rofi.color.normal' | awk -F ',' '{ print $2 }' | xargs)
fi
fix_date_format() {
@@ -196,6 +196,9 @@ updateCache () {
# | gawk -F '\t' '{ printf "%.2s\t%.40s\t%.40s\t%.200s\t%.500s\n", $1, $2, $3, $4, $5, $6 }' \
}
+if [[ $1 == "--update" ]]; then
+ :
+else
date=$(mpc stats | grep 'DB Updated: ')
file="$HOME/.config/clerk/.lastupdate"
if [ "$(< $file)" = "$date" ] && [ -f "$file" ] ; then
@@ -203,6 +206,7 @@ updateCache () {
else
updateCache
echo "${date}" > "${file}"
+ fi
fi
# Use GNU coreutils on OSX