From 15aae4388679c800359043212a1a9426f2db7558 Mon Sep 17 00:00:00 2001 From: Druid520 Date: Thu, 13 Aug 2026 19:54:54 +0000 Subject: MOD: update cfgs. --- hushlogin | 0 okshrc | 119 -------------------------------------------------------------- profile | 11 +++--- rc | 87 +++++++++++++++++++++++++++++++++++++++++++++ rizinrc | 5 --- 5 files changed, 94 insertions(+), 128 deletions(-) create mode 100644 hushlogin delete mode 100644 okshrc create mode 100644 rc delete mode 100644 rizinrc diff --git a/hushlogin b/hushlogin new file mode 100644 index 0000000..e69de29 diff --git a/okshrc b/okshrc deleted file mode 100644 index 2e0b382..0000000 --- a/okshrc +++ /dev/null @@ -1,119 +0,0 @@ -# for st and uemacs -stty -ixon - -# history -export HISTFILE="$HOME/.history" -export HISTSIZE=10000 -export HISTFILESIZE=20000 -export HISTCONTROL=ignoredups:ignorespace - -# de/wm -export DESKTOP_SESSION="sowm" - -# terminal -export GPG_TTY=$(tty) -export COLORTERM=truecolor - -# gpg -export GPG_KEY="" - -# deepseek -export DEEPSEEK_API_KEY="" - -# paths -export PATH="/usr/lib/ccache/bin:$PATH" -export PATH="$HOME/.local/bin:$PATH" - -# ccache -export CCACHE_MAXSIZE="20G" -export CCACHE_COMPRESS="1" -export CCACHE_COMPRESSLEVEL="1" -export CCACHE_SLOPPINESS="time_macros,include_file_time,include_file_ctime,file_macro" -export CCACHE_BASEDIR="$HOME" - -# editors, pagers, aliases, funcs -export EDITOR="mg" -export VISUAL="mg" -export PAGER="less" -export MANPAGER="less -R" - -alias german='export LANG=de_DE.UTF-8 LC_ALL=de_DE.UTF-8' -alias english='export LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8' -alias timestamp='date +%Y-%m-%d_%H-%M -u' -alias filehash='openssl dgst -shake256 -xoflen 128' -alias rconnect='rtl_fm -f 467.7125M -M fm -s 22050 -g 40 -l 50 | aplay -r 22050 -f S16_LE' -alias ls='ls -p' - -gpgsign() { - if [ $# -eq 0 ]; then - echo "err: bad usage." - return 2 - fi - - local binary_mode=0 - local file="" - - while [ $# -gt 0 ]; do - case "$1" in - -b) - binary_mode=1 - shift - ;; - -*) - echo "err: not a option '$1'." - return 2 - ;; - *) - file="$1" - shift - ;; - esac - done - - if [ -z "$file" ]; then - echo "err: no filename specified." - return 1 - fi - - local backup_file="${file}.bak.$$" - cp "$file" "$backup_file" || return 1 - - local temp_file=$(mktemp -p /tmp gpgsign.XXXXXX) || { - rm -f "$backup_file" - return 1 - } - - trap "rm -f '$temp_file' '$backup_file'" EXIT INT TERM - - local sign_cmd="gpg --batch --yes --clearsign" - [ $binary_mode -eq 1 ] && sign_cmd="gpg --batch --yes --sign" - - echo "signing file..." - $sign_cmd -u "$GPG_KEY" -o "$temp_file" "$file" 2>/dev/null || { - echo "err: failed to sign." - mv "$backup_file" "$file" - rm -f "$temp_file" - return 1 - } - - if gpg --verify "$temp_file" 2>/dev/null; then - mv "$temp_file" "$file" && rm -f "$backup_file" - echo "ok: signed successfully." - trap - EXIT INT TERM - return 0 - else - echo "err: verification failed" - mv "$backup_file" "$file" - rm -f "$temp_file" - return 1 - fi -} - -# ps1 -# export PS1='[${PWD}]\n> ' this is fancy -export PS1="> " - -# dircolors eval -if command -v dircolors >/dev/null 2>&1; then - eval "$(dircolors -b)" -fi diff --git a/profile b/profile index a7e2d8a..943feca 100644 --- a/profile +++ b/profile @@ -1,5 +1,8 @@ -export ENV="$HOME/.okshrc" +# path and env +PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R7/bin:/usr/pkg/bin +PATH=${PATH}:/usr/pkg/sbin:/usr/games:/usr/local/bin:/usr/local/sbin +export PATH +export ENV=$HOME/.rc -if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then - startx ~/.xinitrc -fi +# show date n cal +cal -h diff --git a/rc b/rc new file mode 100644 index 0000000..cc9fc43 --- /dev/null +++ b/rc @@ -0,0 +1,87 @@ +# for history +export HISTFILE="$HOME/.history" +export HISTSIZE=10000 +export HISTFILESIZE=20000 +export HISTCONTROL=ignoredups:ignorespace + +# terminal +export GPG_TTY=$(tty) +export COLORTERM=truecolor + +# gpg +export GPG_KEY="BBA6732C9C740D27" + +# editors, pagers, aliases, funcs +export EDITOR="mg" +export VISUAL="mg" +export PAGER="less" +export MANPAGER="less -R" + +alias ls='ls -p' + +gpgsign() { + if [ $# -eq 0 ]; then + echo "err: bad usage." + return 2 + fi + + local binary_mode=0 + local file="" + + while [ $# -gt 0 ]; do + case "$1" in + -b) + binary_mode=1 + shift + ;; + -*) + echo "err: not a option '$1'." + return 2 + ;; + *) + file="$1" + shift + ;; + esac + done + + if [ -z "$file" ]; then + echo "err: no filename specified." + return 1 + fi + + local backup_file="${file}.bak.$$" + cp "$file" "$backup_file" || return 1 + + local temp_file=$(mktemp -p /tmp gpgsign.XXXXXX) || { + rm -f "$backup_file" + return 1 + } + + trap "rm -f '$temp_file' '$backup_file'" EXIT INT TERM + + local sign_cmd="gpg --batch --yes --clearsign" + [ $binary_mode -eq 1 ] && sign_cmd="gpg --batch --yes --sign" + + echo "signing file..." + $sign_cmd -u "$GPG_KEY" -o "$temp_file" "$file" 2>/dev/null || { + echo "err: failed to sign." + mv "$backup_file" "$file" + rm -f "$temp_file" + return 1 + } + + if gpg --verify "$temp_file" 2>/dev/null; then + mv "$temp_file" "$file" && rm -f "$backup_file" + echo "ok: signed successfully." + trap - EXIT INT TERM + return 0 + else + echo "err: verification failed" + mv "$backup_file" "$file" + rm -f "$temp_file" + return 1 + fi +} + +export PS1="> " diff --git a/rizinrc b/rizinrc deleted file mode 100644 index 1888cbb..0000000 --- a/rizinrc +++ /dev/null @@ -1,5 +0,0 @@ -e asm.syntax=att -e asm.comments=true -e scr.color=true -e search.from=0 -e search.to=0xffffffff -- cgit 1.4.1