bash, X, profiles, and a better script
parent
1d93e1c8ac
commit
ac0913a9f2
|
@ -0,0 +1,20 @@
|
|||
# portable aliases written here
|
||||
alias emacs="emacsclient -n"
|
||||
# aliases
|
||||
alias mkdir='mkdir -p'
|
||||
alias psgrep='ps aux | grep -v grep | grep -i -e VSZ -e'
|
||||
case $OSTYPE in
|
||||
darwin*)
|
||||
;;
|
||||
freebsd*)
|
||||
alias ps='ps auxd'
|
||||
;;
|
||||
linux-gnu)
|
||||
alias ls='ls -CF --color=auto'
|
||||
alias ll='s -lisa --color=auto'
|
||||
alias free='free -mt'
|
||||
alias ps='ps auxf'
|
||||
alias wget='wget -c'
|
||||
alias fetch='wget -c'
|
||||
;;
|
||||
esac
|
|
@ -0,0 +1,2 @@
|
|||
. ~/dotfiles/profilevars
|
||||
[[ -f ~/.bashrc ]] && . ~/.bashrc
|
|
@ -0,0 +1,11 @@
|
|||
#
|
||||
# ~/.bashrc
|
||||
#
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
. ~/dotfiles/aliases
|
||||
|
||||
# Set prompt
|
||||
PS1="\[\e[0;33m\]\u@\h\[\e[m\]: \[\e[0;34m\]\w\[\e[m\] \$ "
|
|
@ -0,0 +1,23 @@
|
|||
# this and included scripts should be written in portable shell.
|
||||
PATH=$HOME/.bin:$PATH
|
||||
EDITOR="emacsclient -n"
|
||||
GIT_EDITOR="emacsclient"
|
||||
BROWSER="firefox"
|
||||
PAGER=most
|
||||
LC_ALL=en_US.UTF-8
|
||||
if [ -z "SSH_AGENT_PID" ] ; then
|
||||
eval `ssh-agent`
|
||||
fi
|
||||
# Platorm Specific Vars
|
||||
case $OSTYPE in
|
||||
darwin*)
|
||||
. ~/dotfiles/profilevars_mac
|
||||
;;
|
||||
freebsd*)
|
||||
. ~/dotfiles/profilevars_bsd
|
||||
;;
|
||||
linux-gnu)
|
||||
. ~/dotfiles/profilevars_linux
|
||||
;;
|
||||
esac
|
||||
export PATH EDITOR GIT_EDITOR PAGER BROSWER LC_ALL
|
32
setup.sh
32
setup.sh
|
@ -1,29 +1,41 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
echo "This script will clobber existing links and files."
|
||||
echo "Press Control C in the next 5 seconds to abort"
|
||||
for x in 5 4 3 2 1 ; do
|
||||
printf "%s." "$x"
|
||||
sleep 1
|
||||
done
|
||||
echo clobbering linked files!
|
||||
|
||||
IAM="$(realpath $(dirname $0))"
|
||||
|
||||
mkdir -p ~/.config
|
||||
mkdir -p ~/.bin
|
||||
|
||||
# shell dotfiles
|
||||
ln -s $IAM/zlogin ~/.zlogin
|
||||
ln -s $IAM/zshrc ~/.zshrc
|
||||
ln -fns $IAM/profilevars ~/.profile
|
||||
ln -fns $IAM/zlogin ~/.zlogin
|
||||
ln -fns $IAM/zshrc ~/.zshrc
|
||||
ln -fns $IAM/bashrc ~/.bashrc
|
||||
ln -fns $IAM/bash_profile ~/.bash_profile
|
||||
|
||||
# editor dotfiles
|
||||
ln -s $IAM/emacs.d ~/.emacs.d
|
||||
ln -s $IAM/vimrc ~/.vimrc
|
||||
ln -fns $IAM/emacs.d ~/.emacs.d
|
||||
ln -fns $IAM/vimrc ~/.vimrc
|
||||
|
||||
# X dotfiles
|
||||
ln -s $IAM/xinitrc ~/.xinitrc
|
||||
ln -s $IAM/xmodmap ~/.xmodmap
|
||||
ln -fns $IAM/xinitrc ~/.xinitrc
|
||||
ln -fns $IAM/xmodmap ~/.xmodmap
|
||||
ln -fns $IAM/xprofile ~/.xprofile
|
||||
|
||||
# WM/DE dotfiles
|
||||
ln -s $IAM/i3 ~/.config/i3
|
||||
ln -s $IAM/i3status ~/.config/i3status
|
||||
ln -s $IAM/qt5ct ~/.config/qt5ct
|
||||
ln -fns $IAM/i3 ~/.config/i3
|
||||
ln -fns $IAM/i3status ~/.config/i3status
|
||||
ln -fns $IAM/qt5ct ~/.config/qt5ct
|
||||
|
||||
# misc dotfiles
|
||||
ln -s $IAM/gitconfig ~/.gitconfig
|
||||
ln -fns $IAM/gitconfig ~/.gitconfig
|
||||
|
||||
# tasks
|
||||
emacs --script install-packages.el
|
||||
|
|
6
zlogin
6
zlogin
|
@ -1,8 +1,4 @@
|
|||
EDITOR=emacs
|
||||
PATH="$HOME/.bin:$PATH"
|
||||
PAGER=most
|
||||
export EDITOR PATH PAGER
|
||||
|
||||
. ~/dotfiles/profilevars
|
||||
# Load additions
|
||||
case $OSTYPE in
|
||||
darwin*)
|
||||
|
|
Loading…
Reference in New Issue