blob: 94b499397b98145e746fca958d6ecdfa025fb7b4 (
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
 | # .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
##
# X Org
export XAUTHORITY=$HOME/.Xauthority
export DISPLAY=:0
# 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="$(which emacs)"
export SUDO_EDITOR="$(which vi)"
# Browser
export BROWSER="$(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="$(which em)"
# 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
##
## ALIASES
##
# general software aliases
alias cdot="cd ~/code/archsetup/dotfiles"
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 in non-standard location
alias vim="nvim"
alias weather="wego"
alias whereami="curl ipinfo.io"
alias xterm="xterm -ti 340"
# general utility
# alias mount="sudo mount -o uid=$(id -u),gid=$(id -g),umask=0022 "
alias backup='sudo rsyncshot backup 1000'
alias df='dfc -p /dev/'
alias ducks='du -cksh * | sort -rh | head -n11'
alias l="ls -lhF"
alias ll="ls -lhAF"
alias lt="ls -lthAF"
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 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
 |