summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2023-05-28 14:42:40 +0100
committerubq323 <ubq323@ubq323.website>2023-05-28 14:42:40 +0100
commitffb0eea576135599eb565e70be8404ae74db99e2 (patch)
treef2c15c8575c0b6213ac0030b18e6f7b680d8481a
parent3ca073e1d3b19a38e6a72803c3e08763567b3d16 (diff)
restructure bashrc
-rw-r--r--.bashrc24
-rw-r--r--.snail.bashrc25
2 files changed, 28 insertions, 21 deletions
diff --git a/.bashrc b/.bashrc
index b2c03fd..0c0ed32 100644
--- a/.bashrc
+++ b/.bashrc
@@ -18,21 +18,13 @@ alias xqrs='xbps-query -Rs'
bind -s 'set completion-ignore-case on'
-runtimeify() {
- sudo mkdir /run/user/1000
- sudo chown rebecca:rebecca /run/user/1000
- sudo chmod 700 /run/user/1000
- export XDG_RUNTIME_DIR=/run/user/1000
-}
+
alias kb='kak ~/.bashrc'
alias .b='source ~/.bashrc'
alias l='ls -lah'
-export SSH_AUTH_SOCK=/run/user/1000/ssh-agent.sock
-( pgrep -u $USER ssh-agent || ssh-agent -a $SSH_AUTH_SOCK ; ) >/dev/null
-
export XDG_CONFIG_HOME=$HOME/.config
export EDITOR=kak
@@ -58,19 +50,9 @@ add_path () {
export PATH="$1:$PATH"
}
-shed () {
- # week year, week week
- wy=$(date +%G)
- ww=$(date +%V)
- d="$HOME/shed/$wy/w$ww"
- mkdir -p "$d"
- cd "$d"
- ln -sfT "$PWD" ~/shed/current
-
-}
add_path ~/.local/bin
add_path ~/bin
-. ~/bin/rws
-gowork
+lb=~/."$(uname -n)".bashrc
+[ -f "$lb" ] && . "$lb"
diff --git a/.snail.bashrc b/.snail.bashrc
new file mode 100644
index 0000000..bdbd517
--- /dev/null
+++ b/.snail.bashrc
@@ -0,0 +1,25 @@
+runtimeify() {
+ sudo mkdir /run/user/1000
+ sudo chown rebecca:rebecca /run/user/1000
+ sudo chmod 700 /run/user/1000
+ export XDG_RUNTIME_DIR=/run/user/1000
+}
+
+export SSH_AUTH_SOCK=/run/user/1000/ssh-agent.sock
+( pgrep -u $USER ssh-agent || ssh-agent -a $SSH_AUTH_SOCK ; ) >/dev/null
+
+
+shed () {
+ # week year, week week
+ wy=$(date +%G)
+ ww=$(date +%V)
+ d="$HOME/shed/$wy/w$ww"
+ mkdir -p "$d"
+ cd "$d"
+ ln -sfT "$PWD" ~/shed/current
+}
+
+
+. ~/bin/rws
+gowork
+