From 5f6abad7db07643183d3f16f9a95e41162f30215 Mon Sep 17 00:00:00 2001 From: Louis Vallat Date: Wed, 22 Jun 2022 15:14:00 +0200 Subject: [PATCH] Don't save bspwmrc logs and also kill polybar on launch, as well as block autorandr from switching to laptop-only when screen goes off Signed-off-by: Louis Vallat --- .config/autorandr/laptop-only/block | 9 +++++++++ .config/bspwm/bspwmrc | 5 +++-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100755 .config/autorandr/laptop-only/block diff --git a/.config/autorandr/laptop-only/block b/.config/autorandr/laptop-only/block new file mode 100755 index 0000000..50d28bd --- /dev/null +++ b/.config/autorandr/laptop-only/block @@ -0,0 +1,9 @@ +#!/bin/bash + +xset -q | grep 'On' > /dev/null + +if [ $? -eq 0 ]; then + exit 1 +else + exit 0 +fi diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc index c5dee4f..8628d10 100755 --- a/.config/bspwm/bspwmrc +++ b/.config/bspwm/bspwmrc @@ -11,6 +11,7 @@ picom --experimental-backends & $HOME/.fehbg & /usr/lib/kdeconnectd & disown pgrep 'nextcloud' || nextcloud & disown +killall polybar xset -b @@ -30,12 +31,12 @@ killall -q polybar if [ "${EXT_DISPLAY}" != "" ]; then bspc monitor ${PRIMARY_DISPLAY} -d 1 2 3 4 5 bspc monitor ${EXT_DISPLAY} -d 6 7 8 9 0 - MONITOR=${EXT_DISPLAY} polybar main 2>&1 | tee -a /tmp/polybar.log & disown + MONITOR=${EXT_DISPLAY} polybar main & disown else bspc monitor ${PRIMARY_DISPLAY} -d 1 2 3 4 5 6 7 8 9 0 fi -MONITOR=${PRIMARY_DISPLAY} polybar main 2>&1 | tee -a /tmp/polybar.log & disown +MONITOR=${PRIMARY_DISPLAY} polybar main & disown # Fix for Java applications wmname LG3D