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/wm/extras/bar/modules/clock-bm.bash

26 lines
518 B
Bash
Raw Normal View History

2016-01-12 15:02:12 -06:00
#!/usr/bin/env bash
source "$DOTFILES_PATH/variables.bash"
source "$DOTFILES_PATH/wm/extras/bar/colors.bash"
2016-01-12 15:34:04 -06:00
PRIORITY=38000
2016-01-12 15:02:12 -06:00
MATCH_PREFIX="BM_CLOCK"
MATCH="$MATCH_PREFIX*"
bar_module_clock() {
2016-01-12 15:34:04 -06:00
echo -e "%{T-}%{F$COLOR_S1}${1:8}%{F-}"
2016-01-12 15:02:12 -06:00
}
export -f bar_module_clock
bar_module_clock_updater() {
while true; do
echo -e "$MATCH_PREFIX""$(date +%H.%M.%S)" > $BAR_FIFO
sleep 1
done
}
2016-07-27 08:57:56 -05:00
export -f bar_module_clock_updater
2016-01-12 15:02:12 -06:00
2016-07-27 08:57:56 -05:00
register_bar_module "$PRIORITY" "$MATCH" "bar_module_clock" "bar_module_clock_updater"