summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bashrc17
-rw-r--r--.config/shell/init16
-rw-r--r--.profile46
3 files changed, 79 insertions, 0 deletions
diff --git a/.bashrc b/.bashrc
new file mode 100644
index 0000000..c2b206d
--- /dev/null
+++ b/.bashrc
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+# return when not interactive
+case "$-" in
+*i*)
+ ;;
+*)
+ return
+ ;;
+esac
+
+# bashism
+complete -cf doas
+
+# shism u_u
+[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/init" ] &&
+ . "${XDG_CONFIG_HOME:-$HOME/.config}/shell/init"
diff --git a/.config/shell/init b/.config/shell/init
new file mode 100644
index 0000000..ffa5b56
--- /dev/null
+++ b/.config/shell/init
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+export HISTSIZE=10000
+export SAVEHIST=10000
+alias ls='ls --color=auto --group-directories-first'
+alias grep='grep --color=auto'
+alias cp='cp -iv'
+alias sudo='doas'
+alias yta='yt-dlp -f 251'
+alias genc='gpg -c --no-symkey-cache --cipher-algo AES256'
+alias gcc='gcc -Wvla -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -fsanitize=address'
+alias monerod="monerod --config-file=/etc/monerod.conf --data-dir $XDG_DATA_HOME/bitmonero"
+alias monero-wallet-cli="monero-wallet-cli --config-file ${HOME}/.config/monero/monero-wallet-cli.conf"
+alias mbsync="mbsync -c "$XDG_CONFIG_HOME"/isync/mbsyncrc" # $HOME clean up
+alias irssi="irssi --config="$XDG_CONFIG_HOME"/irssi/config --home="$XDG_DATA_HOME"/irssi" # $HOME clean up
+alias wget="wget --hsts-file="$XDG_DATA_HOME/wget-hsts"" # $HOME clean up
diff --git a/.profile b/.profile
new file mode 100644
index 0000000..7249427
--- /dev/null
+++ b/.profile
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+# user directories
+export XDG_DATA_HOME="$HOME/.local/share"
+export XDG_CONFIG_HOME="$HOME/.config"
+export XDG_STATE_HOME="$HOME/.local/state"
+export XDG_CACHE_HOME="$HOME/.cache"
+export XDG_DESKTOP_DIR="$HOME"
+export XDG_DOWNLOAD_DIR="$HOME/dl"
+export XDG_DOCUMENTS_DIR="$HOME/doc"
+export XDG_PICTURES_DIR="$HOME/pix"
+export XDG_MUSIC_DIR="$HOME/ms"
+export XDG_VIDEOS_DIR="$HOME/vid"
+export GOPATH="${HOME}/.cache/go"
+
+# user programs
+export EDITOR=nvim
+export VISUAL=nvim
+export BROWSER=firefox
+export TERMINAL=foot
+export SUDO_ASKPASS="${HOME}/.local/bin/dmpass"
+export QT_QPA_PLATFORMTHEME=qt5ct
+
+# $HOME clean up
+export ANDROID_HOME="$XDG_DATA_HOME"/android
+export HISTFILE="${XDG_STATE_HOME}"/shell/history
+export CARGO_HOME="$XDG_DATA_HOME"/cargo
+export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nvidia
+export GNUPGHOME="$XDG_DATA_HOME"/gnupg
+export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc
+export LESSHISTFILE="$XDG_STATE_HOME"/less/history
+export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass
+export MBSYNCRC="$XDG_CONFIG_HOME"/isync/mbsyncrc
+
+# etc
+export PATH="${PATH}:${HOME}/.local/bin:${HOME}/.local/bin/sb:${HOME}/.local/bin/sds"
+export _JAVA_AWT_WM_NONREPARENTING=1 # android-studio crash
+
+# display server
+case "$(tty)" in
+*/tty1)
+ clear &
+ exec dbus-launch --exit-with-session \
+ dwl -s "${XDG_CONFIG_HOME:-$HOME/.config}/wayland/winit" > /dev/null 2>&1
+ ;;
+esac