DWL: Support for somebar
This commit is contained in:
@@ -24,27 +24,32 @@ done
|
||||
echo "DWL ready!" >> $DWL_LOG_FILE
|
||||
echo "Entourage: " $DWL_TAGS_FILE >> $DWL_LOG_FILE
|
||||
|
||||
DISPLAYS=$(wlr-randr | perl -ne 'print "$1 " if /^([\w-]+)/')
|
||||
DISP_NUM=$(expr 0)
|
||||
for DISP in $DISPLAYS; do
|
||||
DISP_NUM=$(expr $DISP_NUM + 1)
|
||||
TF=${DWL_TAGS_FILE}.${DISP}
|
||||
# ----------------------------------------------------------
|
||||
# Top bar for displaying DWL tags
|
||||
# ----------------------------------------------------------
|
||||
# Dependency - needs inotify-tools package
|
||||
echo "Entourage: Monitor - ${DISP_NUM} ${DISP}, new tags file " ${TF} >> $DWL_LOG_FILE
|
||||
touch ${TF}
|
||||
inotifywait -q -m -e close_write ${TF} |
|
||||
(cat ${TF} ;
|
||||
while read -r filename event; do
|
||||
cat ${TF}
|
||||
done) | dtao -z -z -xs ${DISP_NUM} -ta l -tw 100 -expand r -h 22 -fn 'Iosevka:style=Regular:size=12' &
|
||||
# ----------------------------------------------------------
|
||||
# Bottom bar for displaying context information
|
||||
# ----------------------------------------------------------
|
||||
(conky -c ~/.conkyrc) | dtao -xs ${DISP_NUM} -ta r -tw 100 -expand l -h 22 -fn 'Iosevka:style=Regular:size=12' &
|
||||
done
|
||||
if [ -e /usr/local/bin/somebar ]; then
|
||||
/usr/local/bin/somebar &
|
||||
(sleep 2 && conky -c ~/.conkyrc > $XDG_RUNTIME_DIR/somebar-0) &
|
||||
else
|
||||
DISPLAYS=$(wlr-randr | perl -ne 'print "$1 " if /^([\w-]+)/')
|
||||
DISP_NUM=$(expr 0)
|
||||
for DISP in $DISPLAYS; do
|
||||
DISP_NUM=$(expr $DISP_NUM + 1)
|
||||
TF=${DWL_TAGS_FILE}.${DISP}
|
||||
# ----------------------------------------------------------
|
||||
# Top bar for displaying DWL tags
|
||||
# ----------------------------------------------------------
|
||||
# Dependency - needs inotify-tools package
|
||||
echo "Entourage: Monitor - ${DISP_NUM} ${DISP}, new tags file " ${TF} >> $DWL_LOG_FILE
|
||||
touch ${TF}
|
||||
inotifywait -q -m -e close_write ${TF} |
|
||||
(cat ${TF} ;
|
||||
while read -r filename event; do
|
||||
cat ${TF}
|
||||
done) | dtao -z -z -xs ${DISP_NUM} -ta l -tw 100 -expand r -h 22 -fn 'Iosevka:style=Regular:size=12' &
|
||||
# ----------------------------------------------------------
|
||||
# Bottom bar for displaying context information
|
||||
# ----------------------------------------------------------
|
||||
(conky -c ~/.conkyrc) | dtao -xs ${DISP_NUM} -ta r -tw 100 -expand l -h 22 -fn 'Iosevka:style=Regular:size=12' &
|
||||
done
|
||||
fi
|
||||
|
||||
# ----------------------------------------------------------
|
||||
# Background
|
||||
|
Reference in New Issue
Block a user