2021-05-26 05:23:50 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2023-12-25 19:30:33 +00:00
|
|
|
function log_this() {
|
|
|
|
TSTMP=$(date)
|
|
|
|
echo "$TSTMP : " $1 >> $DWL_LOG_FILE
|
|
|
|
}
|
2021-05-26 05:23:50 +00:00
|
|
|
|
2023-12-25 19:30:33 +00:00
|
|
|
log_this "Entourage: $XDG_RUNTIME_DIR - $DWL_TAGS_FILE"
|
|
|
|
|
|
|
|
NUM_DISPS=$(wlr-randr | grep -E "^\w+" | wc -l)
|
|
|
|
log_this "Entourage: Configuring ${NUM_DISPS} displays"
|
2021-06-01 05:23:35 +00:00
|
|
|
|
2021-06-14 01:19:49 +00:00
|
|
|
if [[ $NUM_DISPS > 1 ]]; then
|
|
|
|
# Dual screen
|
2023-03-19 20:02:51 +00:00
|
|
|
# wlr-randr --output HDMI-A-1 --on --pos 0,0 --output eDP-1 --on --pos 0,1050
|
2023-04-27 03:50:15 +00:00
|
|
|
# wlr-randr --output HDMI-A-1 --on --pos 0,0 --output eDP-1 --on --pos 2560,0
|
2024-03-24 19:37:05 +00:00
|
|
|
|
|
|
|
# With Dell 1920x1200 display - vertical arrangement
|
|
|
|
#
|
|
|
|
# .--------------------------------.
|
|
|
|
# | |
|
|
|
|
# | DELL 24" 1920x1200 |
|
|
|
|
# | (HDMI-A-1) |
|
|
|
|
# | |
|
|
|
|
# `--------------------------------'
|
|
|
|
# | |
|
|
|
|
# | LAPTOP 13" 1366x768 |
|
|
|
|
# | (eDP-1) |
|
|
|
|
# | |
|
|
|
|
# `-------------------------'
|
|
|
|
#
|
|
|
|
wlr-randr --output HDMI-A-1 --on --pos 0,0 --output eDP-1 --on --pos 300,1200
|
2021-06-14 01:19:49 +00:00
|
|
|
else
|
|
|
|
# Single laptop screen
|
|
|
|
wlr-randr --output HDMI-A-1 --off --output eDP-1 --on --pos 0,0
|
|
|
|
fi
|
2021-06-01 05:23:35 +00:00
|
|
|
|
2021-05-29 22:40:00 +00:00
|
|
|
# ----------------------------------------------------------
|
2021-05-26 05:23:50 +00:00
|
|
|
# Let DWL start
|
2021-05-29 22:40:00 +00:00
|
|
|
# ----------------------------------------------------------
|
2021-05-26 05:23:50 +00:00
|
|
|
while [ ! -e "$XDG_RUNTIME_DIR/wayland-0.lock" ]
|
|
|
|
do
|
2023-12-25 19:30:33 +00:00
|
|
|
log_this "DWL getting ready..."
|
2021-05-26 05:23:50 +00:00
|
|
|
sleep 1
|
|
|
|
done
|
2023-12-25 19:30:33 +00:00
|
|
|
log_this "DWL ready!"
|
|
|
|
log_this "Entourage: $DWL_TAGS_FILE"
|
2021-05-26 05:23:50 +00:00
|
|
|
|
2021-05-29 22:40:00 +00:00
|
|
|
# ----------------------------------------------------------
|
2021-05-26 05:23:50 +00:00
|
|
|
# Background
|
2021-05-29 22:40:00 +00:00
|
|
|
# ----------------------------------------------------------
|
2022-11-07 02:07:44 +00:00
|
|
|
# TODO: Consuimng too much CPU - keeps fan spinning
|
|
|
|
# swaybg --mode fill --image ~/.config/wallpaper.jpg &
|
2021-05-26 05:23:50 +00:00
|
|
|
|
2021-12-20 22:44:41 +00:00
|
|
|
# ----------------------------------------------------------
|
|
|
|
# Lock when idle
|
|
|
|
# ----------------------------------------------------------
|
2023-12-25 19:30:33 +00:00
|
|
|
log_this "Entourage: Starting screen locker with 10min idle time"
|
2021-12-20 22:44:41 +00:00
|
|
|
swayidle -w timeout 600 swaylock &
|
|
|
|
|
2021-05-29 22:40:00 +00:00
|
|
|
# ----------------------------------------------------------
|
2021-05-26 05:23:50 +00:00
|
|
|
# Redirect STDIN to STDOUT and pass along to tags script
|
2021-05-29 22:40:00 +00:00
|
|
|
# ----------------------------------------------------------
|
2024-03-24 19:37:05 +00:00
|
|
|
DWL_BAR=$DWL_BAR_PATH/somebar
|
2023-12-25 19:30:33 +00:00
|
|
|
|
|
|
|
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 &
|
|
|
|
|
2021-05-26 05:23:50 +00:00
|
|
|
(while read line
|
|
|
|
do
|
|
|
|
echo $line
|
2024-03-24 19:37:05 +00:00
|
|
|
done) | ($DWL_BAR -s $SOMEBAR_FIFO > $XDG_RUNTIME_DIR/somebar.log 2>&1)
|
2021-05-29 22:40:00 +00:00
|
|
|
|