snips/dwl.entourage

43 lines
1.3 KiB
Bash
Executable File

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