.xinitrc: Add xprofile and i3initrc for launching i3 from GDM

This commit is contained in:
2019-11-03 15:02:26 +01:00
parent c8a55f0f70
commit 174d4b1124
4 changed files with 32 additions and 24 deletions

View File

@@ -1,21 +1,18 @@
#!/bin/bash
#$1 is -
#echo "DISP:eDP1"
#exit 0
function primary() {
xrandr | grep primary | awk '{print $1}'
}
#displays=($(xrandr | sed -rn 's/(^|(.* ))([^ ]*) connected(( .*)|$)/\3/g; T; p' ))
displays=$(xrandr | grep " connected" | awk '{print $1}')
displays=$(xrandr --listactivemonitors | grep -v Monitors | awk '{print $NF}')
case "$1" in
"auto")
echo "$displays" | while read display; do
xrandr --output $display --auto
done
;;
"connected")
echo "$displays"
# for i in "${displays[@]}"; do
# echo "$i"
# done
;;
"lemonbar")
echo "DISP ${displays[@]}" | sed "s/ /:/g"