tcshrc - dotfiles - leot's dotfiles
(HTM) hg clone https://bitbucket.org/iamleot/dotfiles
(DIR) Log
(DIR) Files
(DIR) Refs
---
cshrc
---
1 bindkey -v
2 bindkey \ magic-space
3 bindkey -a \ magic-space
4 bindkey -b ^T run-help
5 bindkey -b ^Z run-fg-editor
6 bindkey -b -c ^N noice
7 bindkey -a -b ^T run-help
8 bindkey -a -b -c ^N noice
9
10 # XDG_* variables
11 setenv XDG_CACHE_HOME "/tmp/.xdg-${USER}/.cache"
12
13 # Create directory for tcsh cache files
14 set tcshcachedir = "${XDG_CACHE_HOME}/tcsh"
15 if (! -d "${tcshcachedir}" ) then
16 mkdir -p "${tcshcachedir}"
17 endif
18
19 set autolist
20 set backslash_quote
21 set echo_style = both
22 set editors = (vi less noice pvi)
23 set histfile = "${tcshcachedir}/history"
24 set histlit
25 set prompt = "%B%#%b "
26 set prompt2 = "... "
27 set promptchars = %#
28 set rprompt = "%U%c3%u"
29 set savehist = (1000000 merge lock)
30 set vimoveback # XXX: experimental!
31
32 alias helpcommand '( man -h \!:1 > /dev/tty ) >& /dev/null'
33
34 source ~/.tcsh.complete
35
36 #
37 # ~/.tcshrc.private does not contain actually anything particularly private
38 # but also not so interesting in general!
39 #
40 # chat/ircii variables: IRCLOG, IRCNICK, IRCNAME, IRCSERVER
41 # send-pr(1) variables: NAME, ORGANIZATION, REPLYTO
42 # pkgtools/url2pkg: PKGMAINTAINER
43 # owm variables: OWM_APIKEY, OWM_CITYID
44 # statusbar variables: STATUSBAR_*
45 # t variables: T_TODO_FILE, T_DONE_FILE
46 #
47 source ~/.tcshrc.private
48
49 # PATH
50 setenv PATH ${HOME}/bin:${HOME}/localbin:${HOME}/private_localbin
51 setenv PATH ${PATH}:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R7/bin:/usr/pkg/bin
52 setenv PATH ${PATH}:/usr/pkg/sbin:/usr/games:/usr/local/bin:/usr/local/sbin
53
54 # Other useful variables
55 setenv EDITOR vi
56 setenv LESS '-m -R'
57 setenv LESSHISTFILE -
58 setenv PAGER less
59
60 # locale(1) setenvtings
61 setenv LANG "en_US.UTF-8"
62
63 # timezone setenvtings
64 setenv TZ "Europe/Rome"
65
66 # wtf(6)
67 setenv ACRONYMDB "/usr/share/misc/acronyms /usr/share/misc/acronyms-o /usr/share/misc/acronyms.comp ${HOME}/.acronyms"
68
69 # bc(1)
70 setenv BC_ENV_ARGS ~/.bcrc
71
72 # mail/nmh
73 setenv MHTMPDIR /tmp
74
75 # Perl-ish stuffs
76 setenv PERL_BADLANG 0
77 setenv PERL_LWP_ENV_PROXY 1
78
79 # Python-ic stuffs
80 #setenv PYTHONSTARTUP "${HOME}/.pythonrc"
81
82 # nethack setenvtings
83 setenv NETHACKOPTIONS '\!autopick,color'
84
85 setenv PKGSRCDIR /usr/pkgsrc
86
87 # chicken
88 setenv CHICKEN_INSTALL_REPOSITORY "${HOME}/.eggs/lib/chicken/9"
89 setenv CHICKEN_EGG_CACHE "${XDG_CACHE_HOME}/chicken/cache"
90
91 # chicken-doc
92 setenv CHICKEN_DOC_REPOSITORY "${HOME}/.eggs/share/chicken/chicken-doc"
93 setenv CHICKEN_DOC_COLORS auto
94 setenv CHICKEN_DOC_WRAP 80
95
96 # xdg-open (XXX: this hack is needed in order to avoid disturbing dbus-daemon)
97 setenv XDG_CURRENT_DESKTOP X-Generic
98
99 setenv SXHKD_SHELL "/bin/sh"
100
101 # password-store stuffs
102 setenv PASSWORD_STORE_X_SELECTION "primary"
103
104 # Firefox kludge: avoid hunging when trying to print.
105 setenv MOZILLA_POSTSCRIPT_ENABLED 0
106
107 setenv BROWSER webbrowser
108
109 # alias-es
110 alias ag "ag --nocolor"
111 alias cal "cal -d 1"
112 alias chibi-scheme "chibi-scheme -R"
113 #alias cdwrk "[ -d '../../pkgsrc' ] && set wrkdir = `make show-var VARNAME=WRKSRC` && cd $wrkdir"
114 alias gdb "gdb -q"
115 alias gdbtui "gdbtui -q"
116 alias googler "googler -n 7"
117 alias hangups "hangups --token-path ~/.local/share/hangups/refresh_token.txt"
118 alias irc "irc -b"
119 alias jq "jq -M"
120 alias pdfgrep "pdfgrep --color never"
121 alias sh "sh -V"
122 alias theme-light "printf '\033[?5h'"
123 alias theme-dark "printf '\033[?5l'"
124 alias rprompt-on 'set rprompt = "%U%c3%u"'
125 alias rprompt-off 'set rprompt = ""'
126
127 # single letter aliases
128 alias a ag
129 alias b bg
130 alias e ${EDITOR}
131 alias f fg
132 alias j jobs
133 alias J "[ -f ~/.journal.txt ] && ${EDITOR} -c $ ~/.journal.txt"
134 alias h history
135 alias l ls-F
136 alias n noice
137 alias o plumb
138 alias p ${PAGER}
139 alias s surfraw
140 alias T todo.sh
141 alias t justdoit
142
143 # two letters aliases
144 alias xi xclip -i
145 alias xo xclip -o
146 alias xu 'printf "" | xclip -f | xclip -f -selection clipboard | xclip -f -selection secondary'
147
148 # three letters aliases
149 alias xic xclip -i -selection clipboard
150 alias xoc xclip -o -selection clipboard
151
152 if ( $?term ) then
153 if ( $term == emacs ) then
154 # Emacs, or - better - `:script' in vi!
155 unset rprompt
156 setenv PAGER catless
157 endif
158 else if ( $?TMUX ) then
159 # XXX: Kludge to reset #{pane_title} for tmux
160 echo -n "\e]0;\a" > /dev/tty
161 alias cwdcmd 'echo -n "\e]0;${cwd:s;'${HOME}';~;}/\a" > /dev/tty'
162 endif
163
164 # Start ssh-agent(1)
165 if ((! $?SSH_AGENT_PID ) && (! $?SSH_TTY ) && (! $?SSH_CLIENT )) then
166 eval `ssh-agent -c` > /dev/null
167 endif
168
169 # Needed by gpg-agent (needs security/gnupg2)
170 setenv GPG_TTY `tty`
171
172 set printexitvalue