added pacaur updates module
This commit is contained in:
parent
b28560c788
commit
b4a5567341
|
@ -34,13 +34,21 @@ while read -r line; do
|
|||
fi
|
||||
done
|
||||
|
||||
content=""
|
||||
l_content=""
|
||||
c_content=""
|
||||
r_content=""
|
||||
for i in ${!MODULE_CONTENT[@]}; do
|
||||
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
|
||||
|
||||
printf " %s \n" "$content"
|
||||
printf " %s \n" "%{l}$l_content %{c}$c_content %{r}$r_content"
|
||||
done
|
||||
|
||||
echo -e "\nEND BAR LOG" >> "$BAR_LOG"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
source "$DOTFILES_PATH/variables.bash"
|
||||
source "$DOTFILES_PATH/wm/extras/bar/colors.bash"
|
||||
|
||||
PRIORITY=2500
|
||||
PRIORITY=25000
|
||||
|
||||
MATCH_PREFIX="W"
|
||||
MATCH="$MATCH_PREFIX*"
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
source "$DOTFILES_PATH/variables.bash"
|
||||
source "$DOTFILES_PATH/wm/extras/bar/colors.bash"
|
||||
|
||||
PRIORITY=3800
|
||||
PRIORITY=38000
|
||||
|
||||
MATCH_PREFIX="BM_CLOCK"
|
||||
MATCH="$MATCH_PREFIX*"
|
||||
|
||||
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
|
||||
|
|
|
@ -3,13 +3,14 @@
|
|||
source "$DOTFILES_PATH/variables.bash"
|
||||
source "$DOTFILES_PATH/wm/extras/bar/colors.bash"
|
||||
|
||||
PRIORITY=3500
|
||||
PRIORITY=35000
|
||||
|
||||
MATCH_PREFIX="BM_DATE"
|
||||
MATCH="$MATCH_PREFIX*"
|
||||
|
||||
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
|
||||
|
@ -17,7 +18,7 @@ register_bar_module "$PRIORITY" "$MATCH" "bar_module_date"
|
|||
|
||||
bar_module_date_updater() {
|
||||
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
|
||||
done
|
||||
}
|
||||
|
|
25
wm/extras/bar/modules/pacaur-updates-bm.bash
Normal file
25
wm/extras/bar/modules/pacaur-updates-bm.bash
Normal 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 &
|
||||
|
Reference in a new issue