DWL launching with systemd and setup changes

This commit is contained in:
2021-05-25 22:23:50 -07:00
parent d2386bca8d
commit b794ef8737
4 changed files with 103 additions and 34 deletions

View File

@@ -1,37 +1,16 @@
#!/usr/bin/env bash
export XDG_RUNTIME_DIR=$(mktemp --directory --suffix=.${USER})
echo $XDG_RUNTIME_DIR used for Wayland session
export WLR_LIBINPUT_NO_DEVICES=1
export PATH=~/bin:$PATH
export DWLTAGS_FILE=/tmp/dwl.tags.$USER.out
export DWLTAGS_FILE=${XDG_RUNTIME_DIR}/dwl.tags.${USER}.out
# export DWLTAGS_FMT=TXT # Waybar uses this
export DWLTAGS_FMT=DZEN
# Clean up
ps aux | grep $USER | grep wl_show_bars | awk '{ print $2 }' | xargs -n 1 kill -9
ps aux | grep $USER | grep dtao | awk '{ print $2 }' | xargs -n 1 kill -9
rm $DWLTAGS_FILE
echo "Session: in $1 " $DWLTAGS_FILE
echo "Session: " $DWLTAGS_FILE >> $XDG_RUNTIME_DIR/dwl.log
(/usr/local/bin/dwl | dwltags.pl) &
# Let DWL start
while [ ! -e "$XDG_RUNTIME_DIR/wayland-0.lock" ]
do
echo "DWL getting ready..."
sleep 1
done
echo "DWL ready!"
# Top bar for displaying DWL tags
# TODO: Dependency - needs inotify-tools package
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' &
# Bottom bar for displaying context information
(conky -c ~/.conkyrc) | dtao -b -z -z -ta r -h 20 -fn 'Iosevka Term:style=Regular:size=12' &
# Background
swaybg --mode fill --image ~/.config/wallpaper.jpg &
exec /usr/local/bin/dwl -s $HOME/bin/dwl.entourage