.xinitrc: Add xprofile and i3initrc for launching i3 from GDM
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user