From 80c8b5f6e7561cf25765237a5bf362db975cb4a9 Mon Sep 17 00:00:00 2001 From: Mika Suomalainen Date: Sun, 16 Sep 2012 15:03:56 +0300 Subject: [PATCH 1/8] Remove useless (and possibly wrong) comment. --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index eb34036f..7809f0c0 100755 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -# It seems that running install.sh causes ~ files in this git repo. They are lockfiles. *~ *.swp pgprules.xml From 3fedadcdc48a06f6c2c82bd74c6d9611ec3821f9 Mon Sep 17 00:00:00 2001 From: Mika Suomalainen Date: Sun, 16 Sep 2012 15:24:34 +0300 Subject: [PATCH 2/8] bashrc & zshrc: Fix order of lines & add uname=`uname` I will use $uname somewhere later. --- bashrc | 16 ++++++++++------ zshrc | 16 ++++++++++------ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/bashrc b/bashrc index 6f78c80a..a47ea391 100755 --- a/bashrc +++ b/bashrc @@ -136,12 +136,6 @@ hostname && uptime # Source before mentioned locations if they exist. -# Don't check for mail! -unset MAILCHECK - -# Enable core files. -ulimit -c unlimited - # .environment if [ -f ~/.environment ]; then source ~/.environment @@ -152,6 +146,16 @@ if [ -f ~/.bash_environment ]; then source ~/.bash_environment fi +# $uname should tell which OS is used. +$uname=`uname` + +# Don't check for mail! +unset MAILCHECK + +# Enable core files. +ulimit -c unlimited + + # More colours :D if [[ $TERM == 'xterm' ]]; then export TERM=xterm-256color diff --git a/zshrc b/zshrc index 63aca325..c08408e8 100755 --- a/zshrc +++ b/zshrc @@ -58,12 +58,6 @@ hostname && uptime # Source before mentioned locations if they exist. -# Don't check for mail! -unset MAILCHECK - -# Enable core files -ulimit -c unlimited - # .environment if [ -f ~/.environment ]; then source ~/.environment @@ -79,6 +73,16 @@ if [ -f ~/.zshenv ]; then source ~/.zshenv fi +# uname should be readable in $uname +uname=`uname` + +# Don't check for mail! +unset MAILCHECK + +# Enable core files. +ulimit -c unlimited + + #More colours :D if [[ $TERM == 'xterm' ]]; then export TERM=xterm-256color From d445ee82bb07b3bc098a72f4f57c12451667a18d Mon Sep 17 00:00:00 2001 From: Mika Suomalainen Date: Sun, 16 Sep 2012 15:27:48 +0300 Subject: [PATCH 3/8] bashrc & zshrc: move uname to the top --- zshrc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zshrc b/zshrc index c08408e8..e95a7d13 100755 --- a/zshrc +++ b/zshrc @@ -6,6 +6,9 @@ # Aliases RJ706I # Functions ZGC5QQ +# uname should be readable in $uname +uname=`uname` + ##### Defaults etc... M0TZLS ##### # This is based on zshrc which came with Debian (Third option in wizard for new users.) @@ -73,9 +76,6 @@ if [ -f ~/.zshenv ]; then source ~/.zshenv fi -# uname should be readable in $uname -uname=`uname` - # Don't check for mail! unset MAILCHECK From 8119994674b7466714a63424dc6d2edd22c659e4 Mon Sep 17 00:00:00 2001 From: Mika Suomalainen Date: Sun, 16 Sep 2012 15:28:10 +0300 Subject: [PATCH 4/8] fix previous commit I forgot bashrc --- bashrc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bashrc b/bashrc index a47ea391..693f9176 100755 --- a/bashrc +++ b/bashrc @@ -6,6 +6,9 @@ # Aliases RJ706I # Functions ZGC5QQ +# $uname should tell which OS is used. +$uname=`uname` + # For Mac OS X + SSH sessions. bashrc must be sourced by hand at least once. echo "if [ -f ~/.bashrc ]; then source ~/.bashrc @@ -146,9 +149,6 @@ if [ -f ~/.bash_environment ]; then source ~/.bash_environment fi -# $uname should tell which OS is used. -$uname=`uname` - # Don't check for mail! unset MAILCHECK From 20d0ec4a4a8efa6455db2c28bd3ff4f9abd94475 Mon Sep 17 00:00:00 2001 From: Mika Suomalainen Date: Sun, 16 Sep 2012 15:47:02 +0300 Subject: [PATCH 5/8] recommends: check for redshift only on linux --- recommends | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/recommends b/recommends index 67a40c40..119a191e 100755 --- a/recommends +++ b/recommends @@ -1,6 +1,11 @@ +uname=`uname` + command -v \youtube-dl >/dev/null 2>&1 || { echo >&2 "shell-things contains youtube-dl alias for automatically setting video title as name, so you might want to install youtube-dl."; } -command -v \gtk-redshift >/dev/null 2>&1 || { echo >&2 "xsessionrc tries to start gtk-redshift automatically on boot, so you might want to install it (or redshift in some distributions)."; } +if [ $uname = "linux" ] +then + command -v \gtk-redshift >/dev/null 2>&1 || { echo >&2 "xsessionrc tries to start gtk-redshift automatically on boot, so you might want to install it (or redshift in some distributions)."; } +fi if [ ! -f /usr/share/doc/gnupg-curl/copyright ] then From e32bd88a69f6875fe7bec609923d20506b3ce4b6 Mon Sep 17 00:00:00 2001 From: Mika Suomalainen Date: Sun, 16 Sep 2012 15:54:52 +0300 Subject: [PATCH 6/8] vimrc: use dark colours on Mac --- vimrc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vimrc b/vimrc index e1e69a4f..a27299cc 100644 --- a/vimrc +++ b/vimrc @@ -92,3 +92,10 @@ set visualbell if has('gui_running') set background=light endif + +if has("unix") + let s:uname = system("uname") + if s:uname == "Darwin\n" + set background=light + endif +endif From ff16dd58fd1646742200e996a37fba51cc1afdfe Mon Sep 17 00:00:00 2001 From: Mika Suomalainen Date: Sun, 16 Sep 2012 15:57:57 +0300 Subject: [PATCH 7/8] vimrc: don't set terminal title --- vimrc | 3 --- 1 file changed, 3 deletions(-) diff --git a/vimrc b/vimrc index a27299cc..a8088850 100644 --- a/vimrc +++ b/vimrc @@ -81,9 +81,6 @@ runtime macros/matchit.vim set wildmenu set wildmode=list:longest -" Set terminal title (This probably helps with tmux) -set title - " Flash, do not beep! set visualbell " End of copied from http://items.sjbach.com/319/configuring-vim-right From fe19864394d0ac13a9962d4406b56af406c67e62 Mon Sep 17 00:00:00 2001 From: Mika Suomalainen Date: Sun, 16 Sep 2012 16:07:59 +0300 Subject: [PATCH 8/8] recommends: mention what can be ignored if not on Linux. --- recommends | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recommends b/recommends index 119a191e..a920c1f2 100755 --- a/recommends +++ b/recommends @@ -9,10 +9,10 @@ fi if [ ! -f /usr/share/doc/gnupg-curl/copyright ] then - echo "You might want to install gnupg-curl. It allows you to use shortened URLs with gpg1." + echo "You might want to install gnupg-curl. It allows you to use shortened URLs with gpg1." && echo "If you aren't on Linux, you can ignore this." fi if [ ! -f /usr/share/doc/popularity-contest/copyright ] then - echo "You might want to install popularity-contest. See http://popcon.debian.org/" + echo "You might want to install popularity-contest. See http://popcon.debian.org/" && echo "If you aren't on Linux you can ignore this." fi