blob: 0dbaef6e0d7fd064a289184be1852cdb636f0fca (
plain)
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
122
123
124
125
126
127
128
129
130
131
|
# .profile
# Craig Jennings <c@cjennings.net>
# if connecting via Emacs tramp, simplify prompt for easy identification.
# keeping this statement at the top of the file prevent PS1 modifications
if [ "$TERM" = "tramp" ] || [ "$TERM" = "dumb" ]; then
PS1='$ '
fi
##
## ENVIRONMENT VARIABLES
##
# Locale
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
# General
export LANGUAGE=en_US
export GPG_TTY="$(tty)"
# Path
[ -d "$HOME/.local/share/gem/ruby/3.4.0/bin" ]; PATH="$PATH:$HOME/.local/share/gem/ruby/3.4.0/bin"
[ -d "$HOME/.cargo/bin" ]; PATH="$PATH:$HOME/.cargo/bin"
export PATH="$PATH:$HOME/.local/bin:/usr/sbin:$HOME/.config/rofi/scripts"
# Editor
export ALTERNATE_EDITOR=""
export EDITOR="emacsclient -c -a ''"
export SUDO_EDITOR="$(which vi)"
# Browser
export ALTBROWSER="$(which firefox)"
export BROWSER="$(which google-chrome-stable)"
# export BROWSER="$(which librewolf)"
# Terminal
export COLORTERM=truecolor
#export TERM="vt100"
export TERM="st-256color"
export TERMINAL="$(which st)"
export VISUAL="emacsclient -c -a ''"
# XDG
export XDG_CONFIG_HOME="$HOME/.config/"
export XDG_CURRENT_DESKTOP=dwm
export XDG_SESSION_TYPE=x11
export XDG_DATA_DIRS="$XDG_DATA_DIRS:/var/lib/flatpak/exports/share:$HOME/.local/share/flatpak/exports/share:/usr/share"
if [ -z "$XDG_RUNTIME_DIR" ]; then
export XDG_RUNTIME_DIR="$HOME/.local/xdg/runtime"
if [ ! -d "$XDG_RUNTIME_DIR" ]; then
mkdir -p "$XDG_RUNTIME_DIR"
chmod 0700 "$XDG_RUNTIME_DIR"
fi
fi
# INFO
export INFOPATH=/home/cjennings/.emacs.d/assets/info:
##
## ALIASES
##
# change to specific directory
alias cdot="cd ~/code/archsetup/dotfiles"
alias cdpf="cd ~/projects/finances/"
alias cdpj="cd ~/projects/jr-estate/"
alias cdpd="cd ~/projects/documents/"
# general software aliases
alias crm="tickrs -s CRM"
alias handbrake="ghb"
alias linkdel="find . -type l ! -exec test -d {} \; -delete"
alias linkfind="find . -type l ! -exec test -d {} \; -print"
alias smerge="/usr/bin/smerge"
alias steam="flatpak run com.valvesoftware.Steam"
alias stext="/opt/sublime_text/sublime_text"
alias stow="stow --target=/home/cjennings" # required as dotfiles are in non-standard location
alias sysupgrade="topgrade"
alias vim="nvim"
alias weather="wego"
alias whereami="curl ipinfo.io"
alias xterm="xterm -ti 340"
# claude code
alias hey='claude "Please read ./docs/NOTES.org"'
# general utility
# alias mount="sudo mount -o uid=$(id -u),gid=$(id -g),umask=0022 "
alias backup='sudo rsyncshot backup 1000'
alias boot2bios="sudo systemctl reboot --firmware-setup"
alias df='dfc -p /dev/'
alias ducks='du -cksh * | sort -rh | head -n11'
alias ls="exa --group-directories-first "
alias l="exa -lhF --group-directories-first "
alias ll="exa -lhAF --group-directories-first "
alias lt="exa -lthAF --group-directories-first "
alias mkd="mkdir -pv"
alias myip='curl -4 https://chroot-me.in/ip/ 2> /dev/null || w3m -4 -dump https://chroot-me.in/ip'
alias open="xdg-open"
alias ptop="sudo powertop"
alias running_services='systemctl list-units --type=service --state=running'
alias speedtest="speedtest-go"
alias ssn="sudo shutdown now"
alias sysinfo='sudo inxi -v 8 -a -xxxA -xxxB -xxxC -xxxD -xxxG -xxxI -xxxm -xxxN -xxxR -xxxS -xxx --usb -d -I -pl -n -s --slots '
alias timeshift='sudo timeshift-gtk'
# programming
alias cc="gcc -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wconversion -Wextra -std=c2x -pedantic"
alias gdbx="gdb --batch --ex r --ex bt --ex q --args"
# ranger
# when exiting ranger, leave the prompt at the destination
alias cdr='. ranger'
alias r='. ranger'
# source sh files in .profile.d
PROFILE_D="$HOME/.profile.d/"
if [ -d "$PROFILE_D" ]; then
for file in $(find "$PROFILE_D" -name "*.sh"); do
source "$file"
done
fi
# launch x automatically
# if [ -z "$DISPLAY" ] && [ "$(tty)" = /dev/tty1 ]; then
# startx
# fi
|