summary refs log tree commit diff
diff options
context:
space:
mode:
authorDruid520 <r.ustydruid520@proton.me>2026-08-11 22:09:52 -0700
committerDruid520 <r.ustydruid520@proton.me>2026-08-11 22:09:52 -0700
commit5b9999e219f94b47ec5b621dd06e11b51f5a2340 (patch)
treee9d42d002892e181196f93e16db02858086a3590
parent21ffa8356c07eb3f4c84b1d218d9d09c7a2d37aa (diff)
MOD: upd
-rw-r--r--okshrc4
-rw-r--r--okshrc~119
2 files changed, 121 insertions, 2 deletions
diff --git a/okshrc b/okshrc index 2a1ec18..61b9eb8 100644 --- a/okshrc +++ b/okshrc
@@ -32,8 +32,8 @@ export CCACHE_SLOPPINESS="time_macros,include_file_time,include_file_ctime,file_
32export CCACHE_BASEDIR="$HOME" 32export CCACHE_BASEDIR="$HOME"
33 33
34# editors, pagers, aliases, funcs 34# editors, pagers, aliases, funcs
35export EDITOR="em" 35export EDITOR="mg"
36export VISUAL="em" 36export VISUAL="mg"
37export PAGER="less" 37export PAGER="less"
38export MANPAGER="less -R" 38export MANPAGER="less -R"
39 39
diff --git a/okshrc~ b/okshrc~ new file mode 100644 index 0000000..2a1ec18 --- /dev/null +++ b/okshrc~
@@ -0,0 +1,119 @@
1# for st and uemacs
2stty -ixon
3
4# history
5export HISTFILE="$HOME/.history"
6export HISTSIZE=10000
7export HISTFILESIZE=20000
8export HISTCONTROL=ignoredups:ignorespace
9
10# de/wm
11export DESKTOP_SESSION="sowm"
12
13# terminal
14export GPG_TTY=$(tty)
15export COLORTERM=truecolor
16
17# gpg
18export GPG_KEY=""
19
20# deepseek
21export DEEPSEEK_API_KEY=""
22
23# paths
24export PATH="/usr/lib/ccache/bin:$PATH"
25export PATH="$HOME/.local/bin:$PATH"
26
27# ccache
28export CCACHE_MAXSIZE="20G"
29export CCACHE_COMPRESS="1"
30export CCACHE_COMPRESSLEVEL="1"
31export CCACHE_SLOPPINESS="time_macros,include_file_time,include_file_ctime,file_macro"
32export CCACHE_BASEDIR="$HOME"
33
34# editors, pagers, aliases, funcs
35export EDITOR="em"
36export VISUAL="em"
37export PAGER="less"
38export MANPAGER="less -R"
39
40alias german='export LANG=de_DE.UTF-8 LC_ALL=de_DE.UTF-8'
41alias english='export LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8'
42alias timestamp='date +%Y-%m-%d_%H-%M -u'
43alias monero='monero-wallet-cli'
44alias filehash='openssl dgst -shake256 -xoflen 128'
45alias rconnect='rtl_fm -f 467.7125M -M fm -s 22050 -g 40 -l 50 | aplay -r 22050 -f S16_LE'
46
47gpgsign() {
48 if [ $# -eq 0 ]; then
49 echo "err: bad usage."
50 return 2
51 fi
52
53 local binary_mode=0
54 local file=""
55
56 while [ $# -gt 0 ]; do
57 case "$1" in
58 -b)
59 binary_mode=1
60 shift
61 ;;
62 -*)
63 echo "err: not a option '$1'."
64 return 2
65 ;;
66 *)
67 file="$1"
68 shift
69 ;;
70 esac
71 done
72
73 if [ -z "$file" ]; then
74 echo "err: no filename specified."
75 return 1
76 fi
77
78 local backup_file="${file}.bak.$$"
79 cp "$file" "$backup_file" || return 1
80
81 local temp_file=$(mktemp -p /tmp gpgsign.XXXXXX) || {
82 rm -f "$backup_file"
83 return 1
84 }
85
86 trap "rm -f '$temp_file' '$backup_file'" EXIT INT TERM
87
88 local sign_cmd="gpg --batch --yes --clearsign"
89 [ $binary_mode -eq 1 ] && sign_cmd="gpg --batch --yes --sign"
90
91 echo "signing file..."
92 $sign_cmd -u "$GPG_KEY" -o "$temp_file" "$file" 2>/dev/null || {
93 echo "err: failed to sign."
94 mv "$backup_file" "$file"
95 rm -f "$temp_file"
96 return 1
97 }
98
99 if gpg --verify "$temp_file" 2>/dev/null; then
100 mv "$temp_file" "$file" && rm -f "$backup_file"
101 echo "ok: signed successfully."
102 trap - EXIT INT TERM
103 return 0
104 else
105 echo "err: verification failed"
106 mv "$backup_file" "$file"
107 rm -f "$temp_file"
108 return 1
109 fi
110}
111
112# ps1
113# export PS1='[${PWD}]\n> ' this is fancy
114export PS1="> "
115
116# dircolors eval
117if command -v dircolors >/dev/null 2>&1; then
118 eval "$(dircolors -b)"
119fi