aboutsummaryrefslogtreecommitdiff
path: root/bash/.bashrc
blob: eba62b54e8f169d9e8d500ad4f886a079471eab7 (plain) (blame)
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
# Test for an interactive shell. There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
# outputting anything in those cases.
if [[ $- != *i* ]] ; then
    # Shell is non-interactive. That's all, folks!
    return
fi

# Rust env variables
export CARGO_HOME="$XDG_DATA_HOME"/cargo
export RUSTUP_HOME="$XDG_DATA_HOME"/rustup
if which rustc >/dev/null 2>&1 ; then
    export RUST_SRC_PATH=$(rustc --print sysroot)/lib/rustlib/src/rust/library/
fi
# Local path definitions
export PATH=$BIN:$CARGO_HOME/bin:$HOME/.local/npm/bin:$PATH
export NODE_PATH=$NODE_PATH:$HOME/.local/npm/lib/node_modules

# Set default programs
export MAILCAPS=$XDG_CONFIG_HOME/mailcap/mailcap

# Instruct less to use this control sequence every time it needs to
# display bold text. For example, this alters headers and keywords in
# man pages
export LESS_TERMCAP_md="${yellow}"

# Use System fonts for Java applications (added to fix Protegé font
# problems)
export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on"

# SSH connection
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
    export SSH_SESSION=1
fi

# {{{1 ALIASES

# Git-specific aliases
alias gc="git checkout"

# Other
alias z="zathura"
alias mpa="mpv --no-video"
which rc-service >/dev/null 2>&1 && \
    alias wifi="sudo rc-service wpa_supplicant"

# {{{1 MISC

## Other options

# Change cursor shape
# 0 -> blinking block.
# 1 -> blinking block (default).
# 2 -> steady block.
# 3 -> blinking underline.
# 4 -> steady underline.
# 5 -> blinking bar (xterm).
# 6 -> steady bar (xterm).
echo -ne "\e[6 q"

# Network printers
export mono3dup=Ricoh_Aficio_MP_5001_in_horizontal_duplex_mode_cups_cs_ox_ac_

# {{{1 ADDITIONAL FILES

for file in $HOME/.bash/*.bash; do
    [ -r "$file" ] && [ -f "$file" ] && source "$file";
done;
unset file;