Compare commits

..

No commits in common. "464d2a6a25612e6c49cb3e81df5972cd44cab339" and "4fd1cc8d319f9847569fdfb305ecd43fb459c2db" have entirely different histories.

6 changed files with 46 additions and 61 deletions

View File

@ -1,14 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
function log_this() { echo "Entourage: $XDG_RUNTIME_DIR - $DWL_TAGS_FILE" >> $DWL_LOG_FILE
TSTMP=$(date)
echo "$TSTMP : " $1 >> $DWL_LOG_FILE
}
log_this "Entourage: $XDG_RUNTIME_DIR - $DWL_TAGS_FILE" NUM_DISPS=$(wlr-randr | egrep "^\w+" | wc -l)
echo "Entourage: Configuring ${NUM_DISPS} displays" >> $DWL_LOG_FILE
NUM_DISPS=$(wlr-randr | grep -E "^\w+" | wc -l)
log_this "Entourage: Configuring ${NUM_DISPS} displays"
if [[ $NUM_DISPS > 1 ]]; then if [[ $NUM_DISPS > 1 ]]; then
# Dual screen # Dual screen
@ -26,11 +21,39 @@ fi
# ---------------------------------------------------------- # ----------------------------------------------------------
while [ ! -e "$XDG_RUNTIME_DIR/wayland-0.lock" ] while [ ! -e "$XDG_RUNTIME_DIR/wayland-0.lock" ]
do do
log_this "DWL getting ready..." echo "DWL getting ready..." >> $DWL_LOG_FILE
sleep 1 sleep 1
done done
log_this "DWL ready!" echo "DWL ready!" >> $DWL_LOG_FILE
log_this "Entourage: $DWL_TAGS_FILE" echo "Entourage: " $DWL_TAGS_FILE >> $DWL_LOG_FILE
if [ -e /usr/local/bin/somebar ]; then
dbus-run-session /usr/local/bin/somebar > $XDG_RUNTIME_DIR/somebar.log &
(sleep 2 && conky -c ~/.conkyrc > $XDG_RUNTIME_DIR/somebar-0) &
echo "Entourage: Started somebar " >> $DWL_LOG_FILE
else
DISPLAYS=$(wlr-randr | perl -ne 'print "$1 " if /^([\w-]+)/')
DISP_NUM=$(expr 0)
for DISP in $DISPLAYS; do
DISP_NUM=$(expr $DISP_NUM + 1)
TF=${DWL_TAGS_FILE}.${DISP}
# ----------------------------------------------------------
# Top bar for displaying DWL tags
# ----------------------------------------------------------
# Dependency - needs inotify-tools package
echo "Entourage: Monitor - ${DISP_NUM} ${DISP}, new tags file " ${TF} >> $DWL_LOG_FILE
touch ${TF}
inotifywait -q -m -e close_write ${TF} |
(cat ${TF} ;
while read -r filename event; do
cat ${TF}
done) | dtao -z -z -xs ${DISP_NUM} -ta l -tw 100 -expand r -h 22 -fn 'Iosevka:style=Regular:size=12' &
# ----------------------------------------------------------
# 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
@ -41,22 +64,13 @@ log_this "Entourage: $DWL_TAGS_FILE"
# ---------------------------------------------------------- # ----------------------------------------------------------
# Lock when idle # Lock when idle
# ---------------------------------------------------------- # ----------------------------------------------------------
log_this "Entourage: Starting screen locker with 10min idle time"
swayidle -w timeout 600 swaylock & swayidle -w timeout 600 swaylock &
# ---------------------------------------------------------- # ----------------------------------------------------------
# Redirect STDIN to STDOUT and pass along to tags script # Redirect STDIN to STDOUT and pass along to tags script
# ---------------------------------------------------------- # ----------------------------------------------------------
BAR_PATH=/usr/local/bin/somebar
# BAR_PATH=/home/mahesh/git/somebar_20231001/build/somebar
export SOMEBAR_FIFO=$XDG_RUNTIME_DIR/somebar.fifo
mkfifo $SOMEBAR_FIFO -m666
log_this "Entourage: Starting somebar using $SOMEBAR_FIFO"
conky -c ~/.conkyrc > $SOMEBAR_FIFO &
(while read line (while read line
do do
echo $line echo $line
done) | ($BAR_PATH -s $SOMEBAR_FIFO > $XDG_RUNTIME_DIR/somebar.log 2>&1) done) | dwltags.pl --file $DWL_TAGS_FILE

View File

@ -36,7 +36,6 @@ Environment=XDG_RUNTIME_DIR=%I
Environment=DWL_TAGS_FILE=%I/dwl.tags Environment=DWL_TAGS_FILE=%I/dwl.tags
Environment=DWL_LOG_FILE=%I/dwl.log Environment=DWL_LOG_FILE=%I/dwl.log
Environment=DWLTAGS_FMT=DZEN Environment=DWLTAGS_FMT=DZEN
Environment=PIPEWIRE_RUNTIME_DIR=/run/user/501
ExecStart=%h/bin/dwl.session ExecStart=%h/bin/dwl.session
Restart=on-failure Restart=on-failure
RestartSec=1 RestartSec=1

26
dwl_act
View File

@ -1,26 +0,0 @@
#!/usr/bin/env bash
act=$1
echo "$0 - $act" >> ~/dwl_key_act.log
# In Wayland, use the following like X11's xev:
#
# % wev | grep "sym"
#
case $act in
vol_mute) wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle;;
vol_lower) wpctl set-volume --limit 1.0 @DEFAULT_AUDIO_SINK@ 10%-;;
vol_raise) wpctl set-volume --limit 1.0 @DEFAULT_AUDIO_SINK@ 10%+;;
# mic_mute) ;;
# bright_low) ;;
# bright_high) ;;
# disp) ;;
# wlan) ;;
# tools) ;;
# search) ;;
# launch) ;;
# explore) ;;
*) echo "Unknown action '$act'";;
esac

View File

@ -42,7 +42,6 @@ require("lazy").setup({
}, },
{ {
'nvim-telescope/telescope-fzf-native.nvim', 'nvim-telescope/telescope-fzf-native.nvim',
-- build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build'
build = 'make' build = 'make'
} }
}) })
@ -117,8 +116,7 @@ require('onedark').load()
-- See `:help vim.o` -- See `:help vim.o`
if vim.g.neovide then if vim.g.neovide then
vim.o.guifont = "Iosevka Term:h12" vim.o.guifont = "Iosevka Term:h16"
vim.g.neovide_scale_factor = 1.0
end end
-- Set highlight on search -- Set highlight on search

View File

@ -94,14 +94,15 @@ require('packer').startup(function(use)
'williamboman/mason-lspconfig.nvim', 'williamboman/mason-lspconfig.nvim',
-- Useful status updates for LSP -- Useful status updates for LSP
{'j-hui/fidget.nvim', branch = 'legacy'},
use { use {
'j-hui/fidget.nvim', 'j-hui/fidget.nvim',
tag = 'legacy', tag = 'legacy',
config = function() config = function()
require("fidget").setup { require("fidget").setup {
-- options -- options
} }
end, end,
} }
}, },
} }
@ -176,8 +177,7 @@ vim.api.nvim_create_autocmd('BufWritePost', {
-- See `:help vim.o` -- See `:help vim.o`
if vim.g.neovide then if vim.g.neovide then
vim.o.guifont = "Iosevka Term:h12" vim.o.guifont = "Iosevka Term:h16"
vim.g.neovide_scale_factor = 1.0
end end
-- Set highlight on search -- Set highlight on search

View File

@ -46,7 +46,7 @@ ${if_existing /sys/class/net/wlp4s0/operstate up}📶 ${addr wlp4s0}${else}\
${if_up eth0}🌎 ${addr eth0}${else}\ ${if_up eth0}🌎 ${addr eth0}${else}\
network down ${endif}${endif}${endif} \ network down ${endif}${endif}${endif} \
${execi 600 curl 'wttr.in/~45.54,-122.83?u&format=%c%t'} \ ${execi 600 curl 'wttr.in/~45.54,-122.83?u&format=%c%t'} \
🔊 ${execi 10 wpctl get-volume 54 | tail -1 | perl -ne 'm/([\d\.]+)/; print scalar (($1>1) ? 100 : ($1*100))'} \ 🔊 ${execi 10 amixer get Master | tail -1 | sed 's/.*\[\([0-9]*%\)\].*/\1/'} \
🔋 ${battery_percent}% \ 🔋 ${battery_percent}% \
📅 ${time %Y %h %d} \ 📅 ${time %Y %h %d} \
🕑 ${time %I:%M%p %Z} 🕑 ${time %I:%M%p %Z}