aboutsummaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
Diffstat (limited to 'bash')
-rw-r--r--bash/.bash/01-aliases.bash14
-rw-r--r--bash/.bash/02-prompt.bash21
-rw-r--r--bash/.bash_profile1
3 files changed, 23 insertions, 13 deletions
diff --git a/bash/.bash/01-aliases.bash b/bash/.bash/01-aliases.bash
index 94734e2..8135a40 100644
--- a/bash/.bash/01-aliases.bash
+++ b/bash/.bash/01-aliases.bash
@@ -53,18 +53,18 @@ alias ed='fzf --height=15 --layout=reverse | sed "s/^/\"/g;s/$/\"/g" | xargs -ro
alias dj='python manage.py'
alias smci='sudo make clean install'
alias smi='sudo make install'
-alias lib='xrandr --output HDMI-A-0 --auto --output eDP --off && xset r rate 300 50 && feh --bg-fill ~/git/wallpapers-exorcist/gruvbox/volcano-landscape.jpg'
-alias nolib='xrandr --output HDMI-A-0 --off --output eDP --auto'
+alias lib='xrandr --output HDMI-A-0 --auto --output eDP --off && xset r rate 300 50 && feh --bg-fill ~/git/wallpapers-exorcist/gruvbox/mountains-2.jpg && xmodmap ~/.Xmodmap'
+alias nolib='xrandr --output HDMI-A-0 --off --output eDP --auto && feh --bg-fill ~/git/wallpapers-exorcist/gruvbox/mountains-2.jpg'
+alias hgrep='history | grep'
alias keys='xset r rate 300 50'
alias gits='git status'
+alias mac="rm -rf __MACOSX/; rm \$(find . -name '.DS_Store')"
+alias super='xmodmap -e "remove mod1 = Alt_L"; xmodmap -e "remove mod4 = Super_L"; xmodmap -e "add mod1 = Super_L"; xmodmap -e "add mod4 = Alt_L"'
+alias make-kernel='sudo genkernel --kernel-config=/proc/config.gz all && sudo grub-mkconfig -o /boot/grub/grub.cfg'
# bash navigation
alias aa='vim ~/.bash/01-aliases.bash; . ~/.bash_profile'
-s() {
- find . -type f -exec grep ${1} {} \;
-}
-
ssh-pixel() {
ssh -p 8022 uO_14O@${1}
}
@@ -73,12 +73,12 @@ ssh-pixel() {
alias fixwifi='sudo rc-service wpa_supplicant restart'
alias fixaudio='pacmd set-default-sink alsa_output.usb-0c76_USB_PnP_Audio_Device-00.analog-stereo'
alias fixjava='export _JAVA_AWT_WM_NONREPARENTING=1 && export AWT_TOOLKIT=MToolkit && wmname LG3D'
+alias fixkeb='xmodmap ~/.Xmodmap ; xset r rate 200 80 '
# auto elevate
alias mount='sudo mount'
alias umount='sudo umount'
# other garbage
-alias macos="cd /home/bryson/git/macOS-Simple-KVM && ./basic.sh"
alias server="python3 /home/bryson/git/webserver/server.py"
diff --git a/bash/.bash/02-prompt.bash b/bash/.bash/02-prompt.bash
index 603b292..8181d33 100644
--- a/bash/.bash/02-prompt.bash
+++ b/bash/.bash/02-prompt.bash
@@ -48,7 +48,8 @@ color4='\e[38;5;226m'
function exit_code() {
local ERROR="$?"
if [[ ERROR -ne 0 ]]; then
- echo -n '\['"$RED"'\]'"$ERROR"' '
+ echo -n '\['"$RED"'\]'"$ERROR"'\['"$dgray"'\]!'
+ # echo -n '\['"$RED"'\]'"$ERROR"' '
fi
}
@@ -75,11 +76,15 @@ function _git_prompt() {
echo local`"
fi
if ! [[ "$branch" =~ local ]]; then
- echo -n '\['"$color"'\] ('"$ansi"''"$branch"') '
+ # echo -n '\['"$color"'\] ('"$ansi"''"$branch"') '
+ echo -n '\['"$dgray"'\]#\['"$color"'\]'"$branch"''"$ansi"''
fi
fi
}
+export -f exit_code
+export -f _git_prompt
+
# prompt building
# (2 unicode)[ bryson@hostname ] { /current/path }
# (unicode) $
@@ -108,12 +113,18 @@ function _git_prompt() {
# [ hostname ] Thu Mar 25, 10:00:00 AM, /dev/pts/0
# { /current/path } 8 files, 64 KB (master)
# $
-export _PS1="\[$lgray\][ \[$LBLUE\]\h\[$lgray\] ] \[$LCYAN\]\d, \[$GREEN\]\T"
-export _PS2="\[$lgray\]{ \[$LYELLOW\]\w\[$lgray\] }"
+# export _PS1="\[$lgray\][ \[$LMAGENTA\]\h\[$lgray\] ] \[$LYELLOW\]\d, \[$LRED\]\T"
+# export _PS2="\[$lgray\]{ \[$CYAN\]\w\[$lgray\] }"
+
+# bryson@dingo:/current/path:master
+# $
+#
+export _PS1="\[$LBLUE\]\u\[$dgray\]@\[$LGREEN\]\h\[$dgray\]:\[$LYELLOW\]\w"
# define x titlebar
TITLEBAR='\[\033]0;\u@\h:\w ($(history 1 | cut -c 8-))\]'
# apply prompt and functions
-export PROMPT_COMMAND='export PS1="$TITLEBAR$(exit_code)${_PS1}\n${_PS2}$(_git_prompt)\n\[$NC\]\$ ";history -a'
+# export PROMPT_COMMAND='export PS1="$TITLEBAR$(exit_code)${_PS1}\n${_PS2}$(_git_prompt)\n\[$NC\]\$ ";history -a'
+export PROMPT_COMMAND='export PS1="$TITLEBAR$(exit_code)${_PS1}$(_git_prompt)\n\[$NC\]\$ ";history -a'
diff --git a/bash/.bash_profile b/bash/.bash_profile
index d006e75..c93170e 100644
--- a/bash/.bash_profile
+++ b/bash/.bash_profile
@@ -15,6 +15,5 @@ export BROWSER=/usr/bin/librewolf-bin
export PATH
complete -cf doas
-source /usr/share/autojump/autojump.bash
source /usr/share/bash-completion/completions/fzf
source /usr/share/fzf/key-bindings.bash