snips/dwl.entourage

45 lines
1.5 KiB
Plaintext
Raw Normal View History

#!/usr/bin/env bash
2021-05-29 22:40:00 +00:00
echo "Entourage: $XDG_RUNTIME_DIR - $DWL_TAGS_FILE" >> $DWL_LOG_FILE
2021-05-29 22:40:00 +00:00
# ----------------------------------------------------------
# Let DWL start
2021-05-29 22:40:00 +00:00
# ----------------------------------------------------------
while [ ! -e "$XDG_RUNTIME_DIR/wayland-0.lock" ]
do
2021-05-29 22:40:00 +00:00
echo "DWL getting ready..." >> $DWL_LOG_FILE
sleep 1
done
2021-05-29 22:40:00 +00:00
echo "DWL ready!" >> $DWL_LOG_FILE
echo "Entourage: " $DWL_TAGS_FILE >> $DWL_LOG_FILE
2021-05-29 22:40:00 +00:00
# ----------------------------------------------------------
# Top bar for displaying DWL tags
2021-05-29 22:40:00 +00:00
# ----------------------------------------------------------
# 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
2021-05-29 22:40:00 +00:00
cat $DWL_TAGS_FILE
done) | dtao -z -z -ta l -h 22 -fn 'Iosevka Term:style=Regular:size=12' &
2021-05-29 22:40:00 +00:00
# ----------------------------------------------------------
# Bottom bar for displaying context information
2021-05-29 22:40:00 +00:00
# ----------------------------------------------------------
(conky -c ~/.conkyrc) | dtao -b -z -z -ta r -h 20 -fn 'Iosevka Term:style=Regular:size=12' &
2021-05-29 22:40:00 +00:00
# ----------------------------------------------------------
# Background
2021-05-29 22:40:00 +00:00
# ----------------------------------------------------------
swaybg --mode fill --image ~/.config/wallpaper.jpg &
2021-05-29 22:40:00 +00:00
# ----------------------------------------------------------
# Redirect STDIN to STDOUT and pass along to tags script
2021-05-29 22:40:00 +00:00
# ----------------------------------------------------------
(while read line
do
echo $line
2021-05-29 22:40:00 +00:00
done) | dwltags.pl --file $DWL_TAGS_FILE