This commit is contained in:
Mahesh Asolkar 2022-03-27 12:30:27 -07:00
commit fdbfba1e93
4 changed files with 32 additions and 25 deletions

View File

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

View File

@ -63,6 +63,8 @@ while (<>) {
my $line = $_; my $line = $_;
chomp $line; chomp $line;
print STDOUT "$_";
if (exists $ENV{'DWL_LOG_VERBOSE'}) { if (exists $ENV{'DWL_LOG_VERBOSE'}) {
print_log("DWLTAGS [VV] : $line"); print_log("DWLTAGS [VV] : $line");
} }

View File

@ -3,8 +3,7 @@
# -------------------------------- # --------------------------------
# If git-prompt does not exist, get it with following command: # If git-prompt does not exist, get it with following command:
# #
# $ wget https://raw.github.com/git/git/master/contrib/completion/git-prompt.sh # $ wget https://raw.github.com/git/git/master/contrib/completion/git-prompt.sh [ -r /usr/share/bash-completion/completions/git ] && . /usr/share/bash-completion/completions/git
[ -r /usr/share/bash-completion/completions/git ] && . /usr/share/bash-completion/completions/git
if [ -f /etc/bash_completion.d/git-prompt ]; then if [ -f /etc/bash_completion.d/git-prompt ]; then
source /etc/bash_completion.d/git-prompt source /etc/bash_completion.d/git-prompt
@ -18,7 +17,8 @@ PS1='${debian_chroot:+($debian_chroot)}\[\033[01;92m\]$(hostname)\[\033[01;34m\]
# #
# Variables # Variables
# #
export EDITOR=vim #export EDITOR=vim
export EDITOR=nvim
export PATH=~/bin:$PATH export PATH=~/bin:$PATH
# #

View File

@ -37,6 +37,7 @@ conky.config = {
} }
conky.text = [[ conky.text = [[
${if_existing /usr/local/bin/somebar}status${endif} \
💻 ${cpu}% | \ 💻 ${cpu}% | \
💾 ${memperc}% | \ 💾 ${memperc}% | \
${if_existing /sys/class/net/enp3s0/operstate up}🌐 ${addr enp3s0}${else}\ ${if_existing /sys/class/net/enp3s0/operstate up}🌐 ${addr enp3s0}${else}\