From 2479d7971a501f6ff7e11afc0a0b80b1e67222ea Mon Sep 17 00:00:00 2001 From: Mika Suomalainen Date: Mon, 24 Dec 2012 18:59:14 +0200 Subject: [PATCH] bashrc & zshrc: automatically enable hidden files + airdrop on Mac. Almost fixes #13 --- bashrc | 8 +++++++- zshrc | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/bashrc b/bashrc index 9b1a5e02..b9ea0828 100644 --- a/bashrc +++ b/bashrc @@ -183,9 +183,15 @@ export LESS_TERMCAP_so=$'\E[01;44;33m' export LESS_TERMCAP_ue=$'\E[0m' export LESS_TERMCAP_us=$'\E[01;32m' -# Sets environmnet variable CPUARCH to output of "uname -p" +# Sets environment variable CPUARCH to output of "uname -p" & UNAME to "uname" +UNAME=`uname` CPUARCH=`uname -p` +# If we are on Mac, show hidden files in Finder and enable AirDrop over Ethernet and on unsupported (by Apple) Macs +if [ $UNAME = "Darwin" ]; then + defaults write com.apple.finder AppleShowAllFiles TRUE && defaults write com.apple.NetworkBrowser BrowseAllInterfaces 1 +fi + ##### Aliases RJ706I ##### # To get sudo work with aliases. diff --git a/zshrc b/zshrc index 9ebfe12b..3888f7d4 100644 --- a/zshrc +++ b/zshrc @@ -113,8 +113,14 @@ export LESS_TERMCAP_so=$'\E[01;44;33m' export LESS_TERMCAP_ue=$'\E[0m' export LESS_TERMCAP_us=$'\E[01;32m' -# Sets environmnet variable CPUARCH to output of "uname -p" +# Sets environment variable CPUARCH to output of "uname -p" and UNAME to "uname" CPUARCH=`uname -p` +UNAME=`uname` + +# If we are on Mac, show hidden files in Finder and enable AirDrop over Ethernet and on unsupported (by Apple) Macs +if [ $UNAME = "Darwin" ]; then + defaults write com.apple.finder AppleShowAllFiles TRUE && defaults write com.apple.NetworkBrowser BrowseAllInterfaces 1 +fi ##### Aliases RJ706I #####