Added autorandr config to dotfiles and rewrote bspwm
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
This commit is contained in:
parent
0e58ebada0
commit
90ebbd7e23
19
.config/autorandr/laptop-only/config
Normal file
19
.config/autorandr/laptop-only/config
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
output HDMI-A-0
|
||||||
|
off
|
||||||
|
output DisplayPort-0
|
||||||
|
off
|
||||||
|
output DisplayPort-1
|
||||||
|
off
|
||||||
|
output eDP
|
||||||
|
crtc 0
|
||||||
|
mode 1920x1080
|
||||||
|
pos 0x0
|
||||||
|
primary
|
||||||
|
rate 60.03
|
||||||
|
x-prop-max_bpc 16
|
||||||
|
x-prop-non_desktop 0
|
||||||
|
x-prop-scaling_mode None
|
||||||
|
x-prop-tearfree auto
|
||||||
|
x-prop-underscan off
|
||||||
|
x-prop-underscan_hborder 0
|
||||||
|
x-prop-underscan_vborder 0
|
1
.config/autorandr/laptop-only/setup
Normal file
1
.config/autorandr/laptop-only/setup
Normal file
@ -0,0 +1 @@
|
|||||||
|
eDP 00ffffffffffff0006af3d5700000000001c0104a51f1178022285a5544d9a270e505400000001010101010101010101010101010101b43780a070383e401010350035ae100000180000000f0000000000000000000000000020000000fe0041554f0a202020202020202020000000fe004231343048414e30352e37200a0070
|
4
.config/autorandr/postswitch
Executable file
4
.config/autorandr/postswitch
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
dunstify "Autorandr" "Changed configuration to $AUTORANDR_CURRENT_PROFILE."
|
||||||
|
"${HOME}"/.config/bspwm/bspwmrc
|
29
.config/autorandr/work/config
Normal file
29
.config/autorandr/work/config
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
output DisplayPort-0
|
||||||
|
off
|
||||||
|
output DisplayPort-1
|
||||||
|
off
|
||||||
|
output HDMI-A-0
|
||||||
|
crtc 0
|
||||||
|
mode 1920x1080
|
||||||
|
pos 0x0
|
||||||
|
primary
|
||||||
|
rate 60.00
|
||||||
|
x-prop-max_bpc 8
|
||||||
|
x-prop-non_desktop 0
|
||||||
|
x-prop-scaling_mode None
|
||||||
|
x-prop-tearfree auto
|
||||||
|
x-prop-underscan off
|
||||||
|
x-prop-underscan_hborder 0
|
||||||
|
x-prop-underscan_vborder 0
|
||||||
|
output eDP
|
||||||
|
crtc 1
|
||||||
|
mode 1920x1080
|
||||||
|
pos 1920x0
|
||||||
|
rate 60.03
|
||||||
|
x-prop-max_bpc 16
|
||||||
|
x-prop-non_desktop 0
|
||||||
|
x-prop-scaling_mode None
|
||||||
|
x-prop-tearfree auto
|
||||||
|
x-prop-underscan off
|
||||||
|
x-prop-underscan_hborder 0
|
||||||
|
x-prop-underscan_vborder 0
|
2
.config/autorandr/work/setup
Normal file
2
.config/autorandr/work/setup
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
HDMI-A-0 00ffffffffffff0004721103ae3140342c17010380301b782a2795a55550a2270b5054b30c00714f81c0810081809500b300d1c00101023a801871382d40582c4500dd0c1100001e000000fd00384b1e5311000a202020202020000000fc0041636572204732323648514c0a000000ff004c57554545303035343334310a01ef020316324b010203040590111213149f65030c001000023a801871382d40582c4500dd0c1100001e011d8018711c1620582c2500dd0c1100009e011d80d0721c1620102c2580dd0c1100009e023a80d072382d40102c4580dd0c1100001e00000000000000000000000000000000000000000000000000000000000000000070
|
||||||
|
eDP 00ffffffffffff0006af3d5700000000001c0104a51f1178022285a5544d9a270e505400000001010101010101010101010101010101b43780a070383e401010350035ae100000180000000f0000000000000000000000000020000000fe0041554f0a202020202020202020000000fe004231343048414e30352e37200a0070
|
@ -1,5 +1,8 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
|
# Enable debug
|
||||||
|
set -x
|
||||||
|
|
||||||
# Autostart
|
# Autostart
|
||||||
pgrep -x sxhkd > /dev/null || sxhkd & disown
|
pgrep -x sxhkd > /dev/null || sxhkd & disown
|
||||||
xrdb -load $HOME/.config/.Xresources &
|
xrdb -load $HOME/.config/.Xresources &
|
||||||
@ -7,37 +10,32 @@ dunst -conf $HOME/.config/dunst/dunstrc &
|
|||||||
picom --experimental-backends &
|
picom --experimental-backends &
|
||||||
$HOME/.fehbg &
|
$HOME/.fehbg &
|
||||||
/usr/lib/kdeconnectd & disown
|
/usr/lib/kdeconnectd & disown
|
||||||
nextcloud & disown
|
pgrep 'nextcloud' || nextcloud & disown
|
||||||
|
|
||||||
xset -b
|
xset -b
|
||||||
|
|
||||||
DISPLAYS=$(xrandr -q | grep -w 'connected' | cut -d ' ' -f 1)
|
DISPLAYS=$(xrandr -q | grep -w 'connected' | grep -v 'primary' | cut -d ' ' -f 1)
|
||||||
EXT_PRIMARY=""
|
PRIMARY_DISPLAY=$(xrandr -q | grep -w 'connected primary' | cut -d ' ' -f 1)
|
||||||
INTEGRATED_DISPLAY=$(xrandr -q | grep -w 'connected primary' | cut -d ' ' -f 1)
|
|
||||||
|
|
||||||
for DISP in ${DISPLAYS}; do
|
echo "Displays '${DISPLAYS}' have been detected. '${PRIMARY_DISPLAY}' is primary."
|
||||||
if [ ${DISP} != ${INTEGRATED_DISPLAY} ]; then
|
|
||||||
EXT_PRIMARY=${DISP}
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
killall -q polybar
|
|
||||||
if [ "${EXT_PRIMARY}" != "" ]; then
|
|
||||||
xrandr --output ${EXT_PRIMARY} --primary --output ${INTEGRATED_DISPLAY} --right-of ${EXT_PRIMARY}
|
|
||||||
bspc monitor ${EXT_PRIMARY} -d 1 2 3 4 5
|
|
||||||
bspc monitor ${INTEGRATED_DISPLAY} -d 6 7 8 9 0
|
|
||||||
MONITOR=${EXT_PRIMARY} polybar main 2>&1 | tee -a /tmp/polybar.log & disown
|
|
||||||
else
|
|
||||||
bspc monitor ${INTEGRATED_DISPLAY} -d 1 2 3 4 5 6 7 8 9 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
MONITOR=${INTEGRATED_DISPLAY} polybar main 2>&1 | tee -a /tmp/polybar.log & disown
|
|
||||||
|
|
||||||
bspc config border_width 0
|
bspc config border_width 0
|
||||||
bspc config window_gap 8
|
bspc config window_gap 8
|
||||||
bspc config top_padding 20
|
bspc config top_padding 20
|
||||||
bspc config split_ratio 0.6
|
bspc config split_ratio 0.6
|
||||||
|
|
||||||
|
EXT_DISPLAY=${DISPLAYS%% *}
|
||||||
|
|
||||||
|
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
|
||||||
|
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
|
||||||
|
|
||||||
# Fix for Java applications
|
# Fix for Java applications
|
||||||
wmname LG3D
|
wmname LG3D
|
||||||
|
Loading…
Reference in New Issue
Block a user