-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.bashrc
More file actions
69 lines (58 loc) · 1.96 KB
/
Copy path.bashrc
File metadata and controls
69 lines (58 loc) · 1.96 KB
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
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# SSH agent
if ! pgrep -u "$USER" ssh-agent > /dev/null; then
ssh-agent -t 24h > "$XDG_RUNTIME_DIR/ssh-agent.env"
fi
if [[ ! -f "$SSH_AUTH_SOCK" ]]; then
source "$XDG_RUNTIME_DIR/ssh-agent.env" >/dev/null
fi
alias ls='ls -A --color=auto'
alias diff='diff --color=auto'
alias grep='grep --color=auto'
alias ip='ip -color=auto'
alias nv='nvim'
alias hx='helix'
alias dc='docker compose'
alias uhk='DESKTOPINTEGRATION=no /opt/appimages/UHK.Agent.AppImage --ozone-platform-hint=auto'
# alias slack='slack --enable-features=WaylandWindowDecorations,WebRTCPipeWireCapturer --ozone-platform-hint=auto'
# https://bugzilla.mozilla.org/show_bug.cgi?id=1368063
# https://github.com/ammen99/wf-recorder/pull/202
alias wfr='wf-recorder -g "$(slurp)" -c libvpx-vp9'
alias wfra='wf-recorder -g "$(slurp)" -c libvpx-vp9 -C libvorbis --audio=alsa_input.pci-0000_00_1f.3.analog-stereo'
# Add custom bin to path
export PATH="${PATH}:/home/john/bin"
# Customize prompt
source /usr/share/git/git-prompt.sh
PS1='\[\e[0;35m\][\W]$(__git_ps1 " (%s)") > \[\e[m\]'
export XDG_CONFIG_HOME=$HOME/.config
# Set default editor
export EDITOR=helix
# Use rbenv for ruby version management
eval "$(rbenv init -)"
# Use bat as a colorizing pager for man
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
export MANROFFOPT="-c"
# source: https://codeberg.org/dnkl/foot/wiki#shell-integration
osc7_cwd() {
local strlen=${#PWD}
local encoded=""
local pos c o
for (( pos=0; pos<strlen; pos++ )); do
c=${PWD:$pos:1}
case "$c" in
[-/:_.!\'\(\)~[:alnum:]] ) o="${c}" ;;
* ) printf -v o '%%%02X' "'${c}" ;;
esac
encoded+="${o}"
done
printf '\e]7;file://%s%s\e\\' "${HOSTNAME}" "${encoded}"
}
prompt_marker() {
printf '\e]133;A\e\\'
}
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }osc7_cwd
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }prompt_marker