forked from colonelpanic/dotfiles
Move a bunch of stuff around. fix fullscreen emacs issue.
This commit is contained in:
parent
b5f1542f9b
commit
04b9d61696
@ -1,33 +1,3 @@
|
||||
function add_to_front_of_path {
|
||||
export PATH=$@:$(echo $PATH | sed "s|:*$@||g" | sed "s|^:||")
|
||||
}
|
||||
|
||||
function add_to_back_of_path {
|
||||
export PATH=$(echo $PATH | sed "s|:*$@||g" | sed "s|^:||"):$@
|
||||
}
|
||||
|
||||
add_to_back_of_path "$HOME/.local/lib/python2.6/site-packages"
|
||||
hash brew 2>/dev/null && add_to_front_of_path "$(brew --prefix coreutils)/libexec/gnubin"
|
||||
add_to_front_of_path "/usr/local/bin"
|
||||
hash brew 2>/dev/null && add_to_front_of_path "$(brew --prefix emacs)/libexec/gnubin"
|
||||
|
||||
for filename in ~/.lib/shellrc/*; do
|
||||
source $filename
|
||||
done
|
||||
|
||||
if is_osx; then
|
||||
export CFLAGS=-Qunused-arguments
|
||||
export CPPFLAGS=-Qunused-arguments
|
||||
add_to_back_of_path "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/"
|
||||
export JAVA_HOME="$(find /Library/Java/JavaVirtualMachines -depth 1 | head -n 1)/Contents/Home"
|
||||
# Access gnu man pages.
|
||||
hash brew 2> /dev/null && export MANPATH="$(brew --prefix)/opt/coreutils/libexec/gnuman:$MANPATH"
|
||||
else
|
||||
export JAVA_HOME="$(update-alternatives --config java | get_cols ' -1' | head -n 1)"
|
||||
is_osx && export VISUAL="which emacsclient -c -n"
|
||||
fi
|
||||
|
||||
add_to_front_of_path "$JAVA_HOME/bin"
|
||||
|
||||
add_to_back_of_path "$(dotfiles_directory)/resources/python"
|
||||
add_to_back_of_path "/usr/local/sbin"
|
||||
|
@ -1,3 +0,0 @@
|
||||
dircolors_file="$HOME/.dircolors"
|
||||
|
||||
[ ! -z "$SHELL" ] && test -r $dircolors_files && eval "$(dircolors $dircolors_file)"
|
@ -1,13 +1,17 @@
|
||||
alias emacs='cemacs'
|
||||
alias cemacs='_emacs -c -n'
|
||||
alias temacs='_emacs -t'
|
||||
alias emacs='temacs'
|
||||
is_osx && alias emacs='cocoa_emacs'
|
||||
alias terminal_emacs='_emacs -t'
|
||||
alias ec='_emacs -n '
|
||||
|
||||
function cocoa_emacs {
|
||||
reattach-to-user-namespace zsh -c "source ~/.zshrc && _emacs -c -n"
|
||||
}
|
||||
|
||||
function _emacs {
|
||||
local server_name="$(_current_dot_directory)"
|
||||
if ! _emacs_daemon_exists "$server_name"; then
|
||||
echo "Starting emacs with server name '$server_name'"
|
||||
\emacs --daemon="$server_name"
|
||||
command emacs --daemon="$server_name"
|
||||
fi
|
||||
emacsclient $* --server-file=$server_name
|
||||
}
|
||||
|
@ -75,3 +75,11 @@ function set_modifier_keys_on_all_keyboards() {
|
||||
function get_keyboard_vendor_id_product_id_pairs() {
|
||||
ioreg -n IOHIDKeyboard -r | grep -e 'class IOHIDKeyboard' -e VendorID\" -e Product | gawk 'BEGIN { RS = "class IOHIDKeyboard" } match($0, /VendorID. = ([0-9]*)/, arr) { printf arr[1]} match($0, /ProductID. = ([0-9]*)/, arr) { printf " %s\n", arr[1]} '
|
||||
}
|
||||
|
||||
function set_osx_hostname() {
|
||||
local new_hostname="${1-imalison}"
|
||||
sudo scutil --set ComputerName $new_hostname
|
||||
sudo scutil --set HostName $new_hostname
|
||||
sudo scutil --set LocalHostName $new_hostname
|
||||
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string $new_hostname
|
||||
}
|
||||
|
@ -1,3 +0,0 @@
|
||||
function vimstall() {
|
||||
vim +BundleInstall! +q +q
|
||||
}
|
@ -94,3 +94,10 @@ zstyle ':completion:*:(ssh|scp):*:hosts-ipaddr' ignored-patterns \
|
||||
'^<->.<->.<->.<->' '127.0.0.<->'
|
||||
zstyle ':completion:*:(ssh|scp):*:users' ignored-patterns \
|
||||
adm bin daemon halt lp named shutdown sync
|
||||
|
||||
zstyle -e ':completion:*:(ssh|scp):*' hosts 'reply=(
|
||||
${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) \
|
||||
/dev/null)"}%%[# ]*}//,/ }
|
||||
${=${(f)"$(cat /etc/hosts(|)(N) <<(ypcat hosts 2>/dev/null))"}%%\#*}
|
||||
${=${${${${(@M)${(f)"$(<~/.ssh/config)"}:#Host *}#Host }:#*\**}:#*\?*}}
|
||||
)'
|
||||
|
@ -1,3 +1,5 @@
|
||||
set-option -g default-command "reattach-to-user-namespace -l zsh"
|
||||
|
||||
unbind C-g
|
||||
set -g prefix C-o
|
||||
bind-key C-o send-prefix
|
||||
|
@ -1,25 +1,30 @@
|
||||
# ssh, scp, ping, host
|
||||
zstyle ':completion:*:scp:*' tag-order \
|
||||
'hosts:-host hosts:-domain:domain hosts:-ipaddr:IP\ address *'
|
||||
zstyle ':completion:*:scp:*' group-order \
|
||||
users files all-files hosts-domain hosts-host hosts-ipaddr
|
||||
zstyle ':completion:*:ssh:*' tag-order \
|
||||
users 'hosts:-host hosts:-domain:domain hosts:-ipaddr:IP\ address *'
|
||||
zstyle ':completion:*:ssh:*' group-order \
|
||||
hosts-domain hosts-host users hosts-ipaddr
|
||||
source ~/.lib/shellrc/functions.sh
|
||||
function add_to_front_of_path {
|
||||
export PATH=$@:$(echo $PATH | sed "s|:*$@||g" | sed "s|^:||")
|
||||
}
|
||||
|
||||
zstyle ':completion:*:(ssh|scp):*:hosts-host' ignored-patterns \
|
||||
'*.*' loopback localhost
|
||||
zstyle ':completion:*:(ssh|scp):*:hosts-domain' ignored-patterns \
|
||||
'<->.<->.<->.<->' '^*.*' '*@*'
|
||||
zstyle ':completion:*:(ssh|scp):*:hosts-ipaddr' ignored-patterns \
|
||||
'^<->.<->.<->.<->' '127.0.0.<->'
|
||||
zstyle ':completion:*:(ssh|scp):*:users' ignored-patterns \
|
||||
adm bin daemon halt lp named shutdown sync
|
||||
function add_to_back_of_path {
|
||||
export PATH=$(echo $PATH | sed "s|:*$@||g" | sed "s|^:||"):$@
|
||||
}
|
||||
|
||||
zstyle -e ':completion:*:(ssh|scp):*' hosts 'reply=(
|
||||
${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) \
|
||||
/dev/null)"}%%[# ]*}//,/ }
|
||||
${=${(f)"$(cat /etc/hosts(|)(N) <<(ypcat hosts 2>/dev/null))"}%%\#*}
|
||||
${=${${${${(@M)${(f)"$(<~/.ssh/config)"}:#Host *}#Host }:#*\**}:#*\?*}}
|
||||
)'
|
||||
add_to_back_of_path "$HOME/.local/lib/python2.6/site-packages"
|
||||
hash brew 2>/dev/null && add_to_front_of_path "$(brew --prefix coreutils)/libexec/gnubin"
|
||||
add_to_front_of_path "/usr/local/bin"
|
||||
hash brew 2>/dev/null && add_to_front_of_path "$(brew --prefix emacs)/libexec/gnubin"
|
||||
|
||||
if is_osx; then
|
||||
export CFLAGS=-Qunused-arguments
|
||||
export CPPFLAGS=-Qunused-arguments
|
||||
add_to_back_of_path "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/"
|
||||
export JAVA_HOME="$(find /Library/Java/JavaVirtualMachines -depth 1 | head -n 1)/Contents/Home"
|
||||
# Access gnu man pages.
|
||||
hash brew 2> /dev/null && export MANPATH="$(brew --prefix)/opt/coreutils/libexec/gnuman:$MANPATH"
|
||||
else
|
||||
export JAVA_HOME="$(update-alternatives --config java | get_cols ' -1' | head -n 1)"
|
||||
is_osx && export VISUAL="which emacsclient -c -n"
|
||||
fi
|
||||
|
||||
add_to_front_of_path "$JAVA_HOME/bin"
|
||||
|
||||
add_to_back_of_path "$(dotfiles_directory)/resources/python"
|
||||
add_to_back_of_path "/usr/local/sbin"
|
||||
|
Loading…
Reference in New Issue
Block a user