trim out the bashrc

This commit is contained in:
randomuser 2023-07-10 22:55:37 -05:00
parent 220ec93a6a
commit a7f32dbbf0
1 changed files with 1 additions and 46 deletions

View File

@ -1,24 +1,20 @@
#!/bin/bash #!/bin/bash
# some housekeeping # some housekeeping
set -o vi
shopt -s autocd shopt -s autocd
alias rc=". ~/.config/bash/bashrc" alias rc=". ~/.config/bash/bashrc"
alias erc="nvim ~/.config/bash/bashrc" alias erc="nvim ~/.config/bash/bashrc"
alias reload=". ~/.config/bash/bashrc; . ~/.config/bash/profile" alias reload=". ~/.config/bash/bashrc"
# remind alias
alias sched="nvim $DOTREMINDERS" alias sched="nvim $DOTREMINDERS"
alias cal="rem -cl" alias cal="rem -cl"
alias shutdown="sudo shutdown -h now" alias shutdown="sudo shutdown -h now"
alias ls="ls --color=auto" alias ls="ls --color=auto"
alias ll="ls -lah --color=auto" alias ll="ls -lah --color=auto"
alias irssi="irssi --home=$HOME/.config/irssi" alias irssi="irssi --home=$HOME/.config/irssi"
PS1="\w\$ " PS1="\w\$ "
# repos func
repos() { repos() {
sel="$(ls ~/git | fzy | awk '{print "/home/usr/git/"$1}')" sel="$(ls ~/git | fzy | awk '{print "/home/usr/git/"$1}')"
[ "$?" -eq 1 ] && exit [ "$?" -eq 1 ] && exit
@ -26,50 +22,9 @@ repos() {
cd "$sel" cd "$sel"
} }
files() {
sel=$(find /home/$(whoami) |
grep -v '\.cache\|\.pki\|/scratch/\|\.config/chromium\|\.git\|\.local/lib\|\.mozilla/firefox/' |
fzy -l 50)
[ -z "$sel" ] && return 1
[ -d "$sel" ] && cd "$sel" || nvim "$sel"
return 0
}
rss() { rss() {
cd ~/.local/share/sfeed/ cd ~/.local/share/sfeed/
touch .urls touch .urls
sfeed_curses * sfeed_curses *
cd - cd -
} }
# stolen from stackoverflow
# code from a stranger is always perfect
git_main_branch () {
git branch | cut -c 3- | grep -E '^master$|^main$'
}
gp() {
# a bodge -- git authentication doesn't work quite right
pash c tildegit
git push -u origin $(git_main_branch)
}
start_bitlbee() {
mkdir -p $HOME/.config/bitlbee/
touch $HOME/.config/bitlbee/config
bitlbee #-D -c $HOME/.config/bitlbee/config -d $HOME/.config/bitlbee/
}
dock-kill() {
docker stop $(
docker ps |
grep -v 'CONTAINER' |
fzy |
awk -F' ' '{print $1}'
)
}
alias gs='git status'
alias f=files
alias lofi="mpv https://www.youtube.com/watch?v=jfKfPfyJRdk --no-video"
alias pavucontrol="ncpamixer"