From 71d6c6353ea110f549513eba3b37707db5d8b013 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 14 Apr 2011 20:15:15 -0400 Subject: Fiddle with .profile, add a v-www-browser script, configure browse-url in .emacs Move login-stuff from `.bashrc' to `.profile', which loads `.bashrc' if it is a bash shell (hopefully). Add `.Xsession', wich includes `.profile'. `bin/v-www-browser' (technically not a dotfile), is a script that loads either www-browser or x-www-browser, depending on if we're using X11 or not (really, whether $DISPLAY is set). `.emacs' was edited to have browse-url run v-www-browser instead of www-browser. --- .Xsession | 1 + .bashrc | 7 +++---- .emacs | 6 ++++-- .profile | 14 ++++++++++++++ bin/v-www-browser | 7 +++++++ 5 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 .Xsession create mode 100644 .profile create mode 100755 bin/v-www-browser diff --git a/.Xsession b/.Xsession new file mode 100644 index 0000000..b35cc23 --- /dev/null +++ b/.Xsession @@ -0,0 +1 @@ +. .profile diff --git a/.bashrc b/.bashrc index 5a47a68..133ff9f 100644 --- a/.bashrc +++ b/.bashrc @@ -2,6 +2,9 @@ # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) # for examples +# I include this file for all interactive invocations of bash(1), whether +# they are login shells or not. + # If not running interactively, don't do anything [ -z "$PS1" ] && return @@ -79,10 +82,6 @@ if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fi -if [ -d ~/bin ]; then - export PATH=$HOME/bin:$PATH -fi - # enable programmable completion features (you don't need to enable # this, if it's already enabled in /etc/bash.bashrc and /etc/profile # sources /etc/bash.bashrc). diff --git a/.emacs b/.emacs index cac63f7..9b8ef7a 100644 --- a/.emacs +++ b/.emacs @@ -45,6 +45,9 @@ (load "folding" 'nomessage 'noerror) (folding-mode-add-find-file-hook) +(setq browse-url-generic-program (executable-find "v-www-browser") + browse-url-browser-function 'browse-url-generic) + (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. @@ -61,5 +64,4 @@ ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. - '(default ((t (:inherit default :height 80)))) -) + '(default ((t (:inherit default :height 80))))) diff --git a/.profile b/.profile new file mode 100644 index 0000000..f483ba3 --- /dev/null +++ b/.profile @@ -0,0 +1,14 @@ +# ~/.profile: executed by bash(1) for login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples. + +# I include this in all login environements, bash(1) or not + +export PATH=$HOME/bin:$PATH + +# The rest is for bash(1) logins only +if [ -n "$SHLVL" ]; then + if [ -f "$HOME/.bashrc" ]; then + . "$HOME/.bashrc" + fi +fi diff --git a/bin/v-www-browser b/bin/v-www-browser new file mode 100755 index 0000000..005b7a1 --- /dev/null +++ b/bin/v-www-browser @@ -0,0 +1,7 @@ +#!/bin/sh + +if [ -n "$DISPLAY" ]; then + x-www-browser $@ +else + www-browser $@ +fi -- cgit v1.2.3-2-g168b