This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/env/wm/extras/bar/modules/date-bm.bash

25 lines
498 B
Bash
Raw Normal View History

#!/usr/bin/env bash
source "$DOTFILES_PATH/variables.bash"
2016-07-29 11:20:11 -05:00
source "$BAR_PATH/colors.bash"
2016-01-12 15:34:04 -06:00
PRIORITY=35000
MATCH_PREFIX="BM_DATE"
MATCH="$MATCH_PREFIX*"
bar_module_date() {
2016-01-12 15:41:12 -06:00
echo -e "%{T-}%{r}%{F$COLOR_S2}${1:7}%{F-}"
}
export -f bar_module_date
bar_module_date_updater() {
while true; do
2016-01-12 15:34:04 -06:00
echo -e "$MATCH_PREFIX""$(date +'%a %b %d')" > $BAR_FIFO
2016-01-12 15:41:12 -06:00
sleep 60
done
}
2016-07-27 08:57:56 -05:00
export -f bar_module_date_updater
2016-07-27 08:57:56 -05:00
register_bar_module "$PRIORITY" "$MATCH" "bar_module_date" "bar_module_date_updater"