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
|
#!/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))"
|
IAM="$(realpath $(dirname $0))"
|
||||||
|
|
||||||
mkdir -p ~/.config
|
mkdir -p ~/.config
|
||||||
mkdir -p ~/.bin
|
mkdir -p ~/.bin
|
||||||
|
|
||||||
# shell dotfiles
|
# shell dotfiles
|
||||||
ln -s $IAM/zlogin ~/.zlogin
|
ln -fns $IAM/profilevars ~/.profile
|
||||||
ln -s $IAM/zshrc ~/.zshrc
|
ln -fns $IAM/zlogin ~/.zlogin
|
||||||
|
ln -fns $IAM/zshrc ~/.zshrc
|
||||||
|
ln -fns $IAM/bashrc ~/.bashrc
|
||||||
|
ln -fns $IAM/bash_profile ~/.bash_profile
|
||||||
|
|
||||||
# editor dotfiles
|
# editor dotfiles
|
||||||
ln -s $IAM/emacs.d ~/.emacs.d
|
ln -fns $IAM/emacs.d ~/.emacs.d
|
||||||
ln -s $IAM/vimrc ~/.vimrc
|
ln -fns $IAM/vimrc ~/.vimrc
|
||||||
|
|
||||||
# X dotfiles
|
# X dotfiles
|
||||||
ln -s $IAM/xinitrc ~/.xinitrc
|
ln -fns $IAM/xinitrc ~/.xinitrc
|
||||||
ln -s $IAM/xmodmap ~/.xmodmap
|
ln -fns $IAM/xmodmap ~/.xmodmap
|
||||||
|
ln -fns $IAM/xprofile ~/.xprofile
|
||||||
|
|
||||||
# WM/DE dotfiles
|
# WM/DE dotfiles
|
||||||
ln -s $IAM/i3 ~/.config/i3
|
ln -fns $IAM/i3 ~/.config/i3
|
||||||
ln -s $IAM/i3status ~/.config/i3status
|
ln -fns $IAM/i3status ~/.config/i3status
|
||||||
ln -s $IAM/qt5ct ~/.config/qt5ct
|
ln -fns $IAM/qt5ct ~/.config/qt5ct
|
||||||
|
|
||||||
# misc dotfiles
|
# misc dotfiles
|
||||||
ln -s $IAM/gitconfig ~/.gitconfig
|
ln -fns $IAM/gitconfig ~/.gitconfig
|
||||||
|
|
||||||
# tasks
|
# tasks
|
||||||
emacs --script install-packages.el
|
emacs --script install-packages.el
|
||||||
|
|
6
zlogin
6
zlogin
|
@ -1,8 +1,4 @@
|
||||||
EDITOR=emacs
|
. ~/dotfiles/profilevars
|
||||||
PATH="$HOME/.bin:$PATH"
|
|
||||||
PAGER=most
|
|
||||||
export EDITOR PATH PAGER
|
|
||||||
|
|
||||||
# Load additions
|
# Load additions
|
||||||
case $OSTYPE in
|
case $OSTYPE in
|
||||||
darwin*)
|
darwin*)
|
||||||
|
|
3
zshrc
3
zshrc
|
@ -1,3 +1,4 @@
|
||||||
|
. ~/dotfiles/profilevars
|
||||||
HISTFILE=~/.histfile
|
HISTFILE=~/.histfile
|
||||||
HISTSIZE=1000
|
HISTSIZE=1000
|
||||||
SAVEHIST=1000
|
SAVEHIST=1000
|
||||||
|
@ -9,7 +10,7 @@ autoload -Uz promptinit
|
||||||
promptinit
|
promptinit
|
||||||
prompt clint
|
prompt clint
|
||||||
|
|
||||||
export PATH=$HOME/.bin:$PATH EDITOR=emacs PAGER=most
|
. ~/dotfiles/aliases
|
||||||
|
|
||||||
# Load additions
|
# Load additions
|
||||||
case $OSTYPE in
|
case $OSTYPE in
|
||||||
|
|
Loading…
Reference in New Issue