-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.bashrc
More file actions
110 lines (86 loc) · 2.71 KB
/
.bashrc
File metadata and controls
110 lines (86 loc) · 2.71 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
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
# if we have GNU ls, do color stuff
if ls --color -d . >/dev/null 2>&1; then
eval "$(dircolors ~/.dir_colors)"
alias ls='ls --color=auto'
fi
# Ensure Flatpak user apps are on PATH
if [ -d "$HOME/.local/share/flatpak/exports/bin" ] && ! printf '%s' "$PATH" | grep -q "$HOME/.local/share/flatpak/exports/bin"; then
export PATH="$HOME/.local/share/flatpak/exports/bin:$PATH"
fi
# Fancy prompt
PS1='\u@\h:\w\$ '
# Nifty programmable completion
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
# Fancy xterm titles
if [ -z "$PROMPT_COMMAND" ] && [ "$TERM" == 'xterm' ]; then
export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
fi
# Include any machine-specific config
if [ -f ~/.bashrc.local ]
then
. ~/.bashrc.local
fi
# it'll change your life man
alias Grep=grep
# alias ldapsearch="ldapsearch -x -W"
export EDITOR="vi"
# close shell if hour of activity for non-login shells
#shopt -q login_shell || export TMOUT=300
alias curlbrowser='curl -k -L -I -A '\''Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36'\'''
export PATH=$PATH:~/bin:~/packages:~/git/cwage/ai/botutils
# . ~/dotfiles/.bashrc.laptop
alias ssh="cat ~/.ssh/config.d/* > ~/.ssh/config; ssh"
certdate () {
echo | openssl s_client -servername $1 -connect $1:443 2> /dev/null | openssl x509 -noout -dates
}
export TERM=xterm-256color
alias e="emacsclient -t -a ''"
alias eb="emacsbare"
alias ec="emacsclient -c -n -a ''"
alias emacsbare="emacs -nw -Q --eval \"(load-theme 'misterioso)\""
alias vim="e"
alias vi="e"
alias emacs="e"
alias vi=vim
alias screen="echo you use tmux now idiot"
alias chrome=brave-browser
alias gist="gh gist create -w"
# Youtube-dl aliases
alias yta='docker run --rm \
-u $(id -u):$(id -g) \
-v "$PWD":/workdir \
-w /workdir \
jauderho/yt-dlp:latest \
-f bestaudio \
--extract-audio \
--audio-format mp3 \
--audio-quality 0'
alias ytdl='docker run --rm -i \
-u $(id -u):$(id -g) \
-v "$PWD":/workdir \
-w /workdir \
jauderho/yt-dlp:latest'
export COLORTERM=truecolor
# Created by `pipx` on 2025-11-09 18:39:46
export PATH="$PATH:/home/cwage/.local/bin"
# necessary for mpd
export MPD_HOST="$HOME/.config/mpd/socket"
# Track comma (nix-run) usage to identify packages worth installing permanently
, () {
local cmd="${1:-}"
if [ -n "$cmd" ]; then
mkdir -p ~/.local/state
echo "$(date -Is) $cmd" >> ~/.local/state/comma-usage.log
fi
command , "$@"
}
comma-report () {
if [ ! -f ~/.local/state/comma-usage.log ]; then
echo "No comma usage logged yet."
return
fi
echo "Comma usage (all time):"
awk '{print $2}' ~/.local/state/comma-usage.log | sort | uniq -c | sort -rn
}