-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgyrrc
121 lines (105 loc) · 3.42 KB
/
gyrrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
########################################################
#
# Author: Gustavo Yokoyama Ribeiro
# File: .gyrrc
# Update: 20110404 15:00:01
# (C) Copyright 2010 Gustavo Yokoyama Ribeiro
# Licensed under CreativeCommons Attribution-ShareAlike 3.0 Unsupported
# http://creativecommons.org/licenses/by-sa/3.0/ for more info.
# Description: gyr interactive shell set up.
#
########################################################
###################
# #
# ENVIRONMENT #
# #
###################
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"
# disable beep
#xset b off
# or
#setterm -bfreq 0
#echo stty `stty -g` > restore-tty; chmod 755 restore-tty
# Disable flow control if stdin is a terminal
# Turn off TTY "start" and "stop" commands (they default to C-q and C-s)
[ -t 0 ] && stty -ixon -ixoff
export GPG_TTY=$(tty)
if [ "${PAGER}" = 'less' ]; then
# Less Colors for Man Pages
# Blue theme
# LESS_TERMCAP_mb=$'\E[01;31m' # begin blinking
# LESS_TERMCAP_md=$'\E[01;38;5;74m' # begin bold
# LESS_TERMCAP_so=$'\E[38;5;246m' # begin standout-mode - info box
# LESS_TERMCAP_us=$'\E[04;38;5;146m' # begin underline
# export LESS_TERMCAP_mb=$'\E[01;34m'
# export LESS_TERMCAP_md=$'\E[34m'
# export LESS_TERMCAP_so=$'\E[44;01;37m'
# export LESS_TERMCAP_us=$'\E[04;01;34m'
# Red theme
# export LESS_TERMCAP_mb=$'\E[33m'
# export LESS_TERMCAP_md=$'\E[01;31m'
# export LESS_TERMCAP_so=$'\E[41;30m'
# export LESS_TERMCAP_us=$'\E[04;31m'
# Green theme
export LESS_TERMCAP_mb=$'\E[36m'
export LESS_TERMCAP_md=$'\E[01;32m'
export LESS_TERMCAP_so=$'\E[41;30m'
export LESS_TERMCAP_us=$'\E[04;32m'
# Cyan theme
# LESS_TERMCAP_mb=$'\E[01;34m'
# LESS_TERMCAP_md=$'\E[36m'
# LESS_TERMCAP_so=$'\E[46;30m'
# LESS_TERMCAP_us=$'\E[04;01;36m'
# Common
export LESS_TERMCAP_me=$'\E[0m' # end mode
export LESS_TERMCAP_se=$'\E[0m' # end standout-mode
export LESS_TERMCAP_ue=$'\E[0m' # end underline
fi
# Specifies default options for grep
#GREP_OPTIONS="--color=always -I --exclude=*~ --exclude-dir=.hg --exclude-dir=.git --exclude-dir=vim/tmp --directories=skip"
###################
# #
# GYR SETUP #
# #
###################
# Load any supplementary scripts
if [ -d ${GYR_PATH}/dotfiles/gyrrc.d ] ; then
for config in "${GYR_PATH}"/dotfiles/gyrrc.d/*.rc ; do
source "$config"
done
fi
unset -v config
###################
# #
# DISTRO SETUP #
# #
###################
if [ "${GYR_OS}" = 'debian' ]; then
. ${GYR_PATH}/dotfiles/debianrc
elif [ "${GYR_OS}" = 'arch' ]; then
. ${GYR_PATH}/dotfiles/archrc
elif [ "${GYR_OS}" = 'rh' ]; then
. ${GYR_PATH}/dotfiles/rhrc
elif [ "${GYR_OS}" = 'freebsd' ]; then
. ${GYR_PATH}/dotfiles/bsdrc
elif [ "${GYR_OS}" = 'darwin' ]; then
. ${GYR_PATH}/dotfiles/darwinrc
fi
###################
# #
# PROJECTS RC #
# #
###################
for proj_dir in "${GYR_PATH}"/*.d ; do
if [ -d "${proj_dir}" ]; then
proj_rc_file=$(basename ${proj_dir})
proj_rc_file=${proj_dir}/${proj_rc_file%.*}rc
if [ -f "${proj_rc_file}" ]; then
. ${proj_rc_file}
fi
fi
done
unset -v proj_dir
unset -v proj_rc_file
# vim: set filetype=sh fileformat=unix foldmethod=indent