You are not logged in.

#1 2009-08-30 09:11:37

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Help with customization of xinitrc

Hello guys,

I'm trying to include a small snippet

X=`xrandr | awk '/VGA/ {print $2}'`

        if [ "$X" = "connected" ]
    then
        xrandr --output TV --off --output LVDS --off --output VGA --mode 1280x1024 --pos 0x0 --rotate normal
    fi

in my xinitrc

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

# exec gnome-session
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice



while true 
do

    xsetroot -name "`acpi -b | awk '{print $4}' | sed 's/,//g'` | `acpi -t | awk '{print $4 $6}'` | `date +"%a %x | %H:%M"`"        

    sleep 1s

done &
exec dwm

to check if an external monitor is plugged. I tried it already on different positions but once I had no longer a statusbar in dwm, the other time I recognized some display errors.

So my question, where to go with it?

I have to admit that I have no experiences with Bash-Coding.

Thank you in advance. smile

orschiro

Offline

#2 2009-09-01 00:59:38

hunterthomson
Member
Registered: 2008-06-22
Posts: 794
Website

Re: Help with customization of xinitrc

Bla I am dumb....

Last edited by hunterthomson (2009-09-01 05:10:56)


OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec

Offline

#3 2009-09-01 04:18:39

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: Help with customization of xinitrc

Does it work if you run the xrandr command alone in a terminal?  It looks fine to me...


thayer williams ~ cinderwick.ca

Offline

Board footer

Powered by FluxBB