snips/dwl.entourage

45 lines
1.6 KiB
Bash
Executable File

#!/usr/bin/env bash
echo "Entourage: $XDG_RUNTIME_DIR - $DWL_TAGS_FILE" >> $DWL_LOG_FILE
# ----------------------------------------------------------
# Let DWL start
# ----------------------------------------------------------
while [ ! -e "$XDG_RUNTIME_DIR/wayland-0.lock" ]
do
echo "DWL getting ready..." >> $DWL_LOG_FILE
sleep 1
done
echo "DWL ready!" >> $DWL_LOG_FILE
echo "Entourage: " $DWL_TAGS_FILE >> $DWL_LOG_FILE
# ----------------------------------------------------------
# Top bar for displaying DWL tags
# ----------------------------------------------------------
# Dependency - needs inotify-tools package
touch $DWL_TAGS_FILE
inotifywait -q -m -e close_write $DWL_TAGS_FILE |
(cat $DWL_TAGS_FILE ;
while read -r filename event; do
cat $DWL_TAGS_FILE
done) | dtao -z -z -ta l -tw 100 -expand r -h 22 -fn 'Iosevka Term:style=Regular:size=12' &
# ----------------------------------------------------------
# Bottom bar for displaying context information
# ----------------------------------------------------------
(conky -c ~/.conkyrc) | dtao -ta r -tw 100 -expand l -h 22 -fn 'Iosevka Term:style=Regular:size=12' &
# ----------------------------------------------------------
# Background
# ----------------------------------------------------------
swaybg --mode fill --image ~/.config/wallpaper.jpg &
# ----------------------------------------------------------
# Redirect STDIN to STDOUT and pass along to tags script
# ----------------------------------------------------------
(while read line
do
echo $line
done) | dwltags.pl --file $DWL_TAGS_FILE