added pacaur updates module

This commit is contained in:
Daniel Flanagan 2016-01-12 15:34:04 -06:00
parent b28560c788
commit b4a5567341
5 changed files with 43 additions and 9 deletions

View file

@ -34,13 +34,21 @@ while read -r line; do
fi fi
done done
content="" l_content=""
c_content=""
r_content=""
for i in ${!MODULE_CONTENT[@]}; do for i in ${!MODULE_CONTENT[@]}; do
echo -e "Processing Module $i Content..." >> "$BAR_LOG" echo -e "Processing Module $i Content..." >> "$BAR_LOG"
content="$content ${MODULE_CONTENT[$i]}" if [ $i -ge 30000 ]; then
r_content="$content ${MODULE_CONTENT[$i]}"
elif [ $i -ge 20000 ]; then
c_content="$content ${MODULE_CONTENT[$i]}"
else
l_content="$content ${MODULE_CONTENT[$i]}"
fi
done done
printf " %s \n" "$content" printf " %s \n" "%{l}$l_content %{c}$c_content %{r}$r_content"
done done
echo -e "\nEND BAR LOG" >> "$BAR_LOG" echo -e "\nEND BAR LOG" >> "$BAR_LOG"

View file

@ -3,7 +3,7 @@
source "$DOTFILES_PATH/variables.bash" source "$DOTFILES_PATH/variables.bash"
source "$DOTFILES_PATH/wm/extras/bar/colors.bash" source "$DOTFILES_PATH/wm/extras/bar/colors.bash"
PRIORITY=2500 PRIORITY=25000
MATCH_PREFIX="W" MATCH_PREFIX="W"
MATCH="$MATCH_PREFIX*" MATCH="$MATCH_PREFIX*"

View file

@ -3,13 +3,13 @@
source "$DOTFILES_PATH/variables.bash" source "$DOTFILES_PATH/variables.bash"
source "$DOTFILES_PATH/wm/extras/bar/colors.bash" source "$DOTFILES_PATH/wm/extras/bar/colors.bash"
PRIORITY=3800 PRIORITY=38000
MATCH_PREFIX="BM_CLOCK" MATCH_PREFIX="BM_CLOCK"
MATCH="$MATCH_PREFIX*" MATCH="$MATCH_PREFIX*"
bar_module_clock() { bar_module_clock() {
echo -e "%{T-}%{r}%{F$COLOR_S1}${1:8}%{F-}" echo -e "%{T-}%{F$COLOR_S1}${1:8}%{F-}"
} }
export -f bar_module_clock export -f bar_module_clock

View file

@ -3,13 +3,14 @@
source "$DOTFILES_PATH/variables.bash" source "$DOTFILES_PATH/variables.bash"
source "$DOTFILES_PATH/wm/extras/bar/colors.bash" source "$DOTFILES_PATH/wm/extras/bar/colors.bash"
PRIORITY=3500 PRIORITY=35000
MATCH_PREFIX="BM_DATE" MATCH_PREFIX="BM_DATE"
MATCH="$MATCH_PREFIX*" MATCH="$MATCH_PREFIX*"
bar_module_date() { bar_module_date() {
echo -e "%{T-}%{r}%{F$COLOR_S2}${1:7}%{F-}" echo -e "$1 "
# echo -e "%{T-}%{r}%{F$COLOR_S2}${1:7}%{F-}"
} }
export -f bar_module_date export -f bar_module_date
@ -17,7 +18,7 @@ register_bar_module "$PRIORITY" "$MATCH" "bar_module_date"
bar_module_date_updater() { bar_module_date_updater() {
while true; do while true; do
echo -e "$MATCH_PREFIX""$(date +"%a %b %d")" > $BAR_FIFO echo -e "$MATCH_PREFIX""$(date +'%a %b %d')" > $BAR_FIFO
sleep 1 sleep 1
done done
} }

View file

@ -0,0 +1,25 @@
#!/usr/bin/env bash
source "$DOTFILES_PATH/variables.bash"
source "$DOTFILES_PATH/wm/extras/bar/colors.bash"
PRIORITY=38000
MATCH_PREFIX="BM_CLOCK"
MATCH="$MATCH_PREFIX*"
bar_module_clock() {
echo -e "%{T-}%{F$COLOR_S1}${1:8}%{F-}"
}
export -f bar_module_clock
register_bar_module "$PRIORITY" "$MATCH" "bar_module_clock"
bar_module_clock_updater() {
while true; do
echo -e "$MATCH_PREFIX""$(date +%H.%M.%S)" > $BAR_FIFO
sleep 1
done
}
bar_module_clock_updater &