Trying to make Microsoft Useful


Making Microsoft Usable with Cygwin

Making Microsoft Useful Through Cygwin

  1. Making Microsoft Useful Through Cygwin
    1. .bashrc changes
    2. .xinitrc


.bashrc changes

if [ "i686-pc-cygwin" = "${BASH_VERSINFO[5]}" ]; then   # uses UTF-8 now
        LC_CTYPE=en_US;
        export LC_CTYPE;
        LANG=en_US.UTF-8;
        export LANG;
fi
STMP=/cygdrive/c/Temp
export STMP
if [ -x /cygdrive/c/WINDOWS/system32/tracert ]; then
    alias traceroute="/cygdrive/c/WINDOWS/system32/tracert "
fi
alias startxbig="/usr/bin/startx -- -multiwindow -multimonitors -nowinkill -unixkill -clipboard -emulate3buttons 50"
alias ls="${DIR}/ls --color=auto -AFC "
if grep --color=auto me /etc/passwd > /dev/null 2>&1 ; then
        alias grep="grep --color=auto "
fi


.xinitrc

#!/bin/bash
cd || exit 127
#
STDOPTS="-sl 2000 +tb -bg black -fg @FGCOLOR@ -n @FGCOLOR@ -T @FGCOLOR@ -cr red -fn 6x13 -fb 6x13bold -geometry 90x28";
#
ssh-agent -s -t 28800 > .ssh.import
set -x
. .ssh.import
set +x
#
[ -r .Xresources ] && xrdb -merge .Xresources
#
DIMEN=`xdpyinfo | grep dimensions | perl -e'
    while (<STDIN>)
    {
        if ($_ =~ /^.*\s+([0-9][0-9]*x[0-9][0-9]*).*$/)
        {
            print $1;
        }
    }'`
printf "DIMEN=${DIMEN}\n"
#
#
xsetroot -solid midnightblue
##  native laptop dispaly only
if [ "1280x800" = "$DIMEN" ]; then
    set -x
    xterm `echo "$STDOPTS" | sed -e"s/@FGCOLOR@/green/g"`+0-5              &
    xterm `echo "$STDOPTS" | sed -e"s/@FGCOLOR@/white/g"`+0+0              &
    xterm `echo "$STDOPTS" | sed -e"s/@FGCOLOR@/Orange/g"`-0-5 -ls         &
    xterm `echo "$STDOPTS" | sed -e"s/@FGCOLOR@/steelblue/g"`-0+0          &
    set +x
##  native laptop dispaly + external monitor
elif [ "2560x1024" = "$DIMEN" ]; then
    set -x
    xterm `echo "$STDOPTS" | sed -e"s/@FGCOLOR@/green/g"`+0-5              &
    xterm `echo "$STDOPTS" | sed -e"s/@FGCOLOR@/white/g"`+0+0              &
    xterm `echo "$STDOPTS" | sed -e"s/@FGCOLOR@/Orange/g"`+715-5 -ls       &
    xterm `echo "$STDOPTS" | sed -e"s/@FGCOLOR@/steelblue/g"`+715+0        &
    set +x
##  docked at HQ, dual monitors, full width
elif [ "2960x1050" = "$DIMEN" ]; then
    printf "in 2960x1050 section\n"
    set -x
    xterm `echo "$STDOPTS" | sed -e"s/@FGCOLOR@/Orange/g"`-3-5 -ls          &
    xterm `echo "$STDOPTS" | sed -e"s/@FGCOLOR@/green/g"`+1285-5            &
    xterm `echo "$STDOPTS" | sed -e"s/@FGCOLOR@/white/g"`+1285+5            &
    xterm `echo "$STDOPTS" | sed -e"s/@FGCOLOR@/steelblue/g"`-3+0           &
    set +x
##  docked at HQ, dual monitors, 3/4 width
elif [ "2200x998" = "$DIMEN" ]; then
    set -x
    xterm `echo "$STDOPTS" | sed -e"s/@FGCOLOR@/green/g"`+0-5              &
    xterm `echo "$STDOPTS" | sed -e"s/@FGCOLOR@/white/g"`+0+0              &
    xterm `echo "$STDOPTS" | sed -e"s/@FGCOLOR@/Orange/g"`+715-5 -ls       &
    xterm `echo "$STDOPTS" | sed -e"s/@FGCOLOR@/steelblue/g"`+715+0        &
    set +x
elif [ "1280x998" = "$DIMEN" ]; then
    set -x
    xterm `echo "$STDOPTS" | sed -e"s/@FGCOLOR@/green/g"`+0-5            &
    xterm `echo "$STDOPTS" | sed -e"s/@FGCOLOR@/white/g"`+0+0            &
    xterm `echo "$STDOPTS" | sed -e"s/@FGCOLOR@/Orange/g"`-0-5 -ls       &
    xterm `echo "$STDOPTS" | sed -e"s/@FGCOLOR@/steelblue/g"`-0+0          &
    set +x
else
    set -x
    xterm `echo "$STDOPTS" | sed -e"s/@FGCOLOR@/Orange/g"`-0-0 -ls         &
    xterm `echo "$STDOPTS" | sed -e"s/@FGCOLOR@/green/g"`+0-0              &
    xterm `echo "$STDOPTS" | sed -e"s/@FGCOLOR@/white/g"`+0+0              &
    xterm `echo "$STDOPTS" | sed -e"s/@FGCOLOR@/steelblue/g"`-0+0          &
    set +x
fi
#
#
echo $DIMEN
export DIMEN
#
wait
ssh-agent -k



Comments

Popular posts from this blog

Xubuntu Home Server on Dell XPS 13 9370

Cygwin + syslog-ng

Fedora - VNC through systemd/xinetd