Rebuild shells configs

This commit is contained in:
samedamci 2020-03-17 18:14:29 +01:00
parent d59a4ea20d
commit 3e08f76bc4
7 changed files with 188 additions and 64 deletions

View File

@ -1,5 +1,24 @@
# #!/usr/bin/env bash
# ~/.bash_profile #
# # ████ ██ ██
# ██████ ░██░ ░░ ░██
# ░██░░░██ ██████ ██████ ██████ ██ ░██ █████
# ░██ ░██░░██░░█ ██░░░░██░░░██░ ░██ ░██ ██░░░██
# ░██████ ░██ ░ ░██ ░██ ░██ ░██ ░██░███████
# ░██░░░ ░██ ░██ ░██ ░██ ░██ ░██░██░░░░
# ░██ ░███ ░░██████ ░██ ░██ ███░░██████
# ░░ ░░░ ░░░░░░ ░░ ░░ ░░░ ░░░░░░
[[ -f ~/.bashrc ]] && . ~/.bashrc #~~~~~~~~~~~~~~
# Default Apps
#~~~~~~~~~~~~~~
export EDITOR="nvim"
export BROWSER="qutebrowser"
export TERMINAL="st"
#~~~~~~
# PATH
#~~~~~~
export PATH="$PATH:$HOME/Dotfiles:$HOME/.local/bin"
export SCRD=$HOME/.scripts/

View File

@ -1,9 +1,21 @@
# #
# ~/.bashrc # ██ ██
# # ░██ ░██
# ░██ ██████ ██████░██
# ░██████ ░░░░░░██ ██░░░░ ░██████
# ░██░░░██ ███████ ░░█████ ░██░░░██
# ░██ ░██ ██░░░░██ ░░░░░██░██ ░██
# ░██████ ░░████████ ██████ ░██ ░██
# ░░░░░ ░░░░░░░░ ░░░░░░ ░░ ░░
# If not running interactively, don't do anything # If not running interactively, don't do anything
[[ $- != *i* ]] && return [[ $- != *i* ]] && return
alias ls='ls --color=auto' # Vi mode
PS1='[\u@\h \W]\$ ' set -o vi
# Load global shell config
source $HOME/.shellrc
# Prompt
export PS1="\033[0;32m\h\033[0m in \033[0;36m\w\033[0m\n{\033[0;31m${?}\033[0m}\033[0;36m> \033[0m"

24
botfiles/.profile Normal file
View File

@ -0,0 +1,24 @@
#!/usr/bin/env bash
#
# ████ ██ ██
# ██████ ░██░ ░░ ░██
# ░██░░░██ ██████ ██████ ██████ ██ ░██ █████
# ░██ ░██░░██░░█ ██░░░░██░░░██░ ░██ ░██ ██░░░██
# ░██████ ░██ ░ ░██ ░██ ░██ ░██ ░██░███████
# ░██░░░ ░██ ░██ ░██ ░██ ░██ ░██░██░░░░
# ░██ ░███ ░░██████ ░██ ░██ ███░░██████
# ░░ ░░░ ░░░░░░ ░░ ░░ ░░░ ░░░░░░
#~~~~~~~~~~~~~~
# Default Apps
#~~~~~~~~~~~~~~
export EDITOR="nvim"
export BROWSER="qutebrowser"
export TERMINAL="st"
#~~~~~~
# PATH
#~~~~~~
export PATH="$PATH:$HOME/Dotfiles:$HOME/.local/bin"
export SCRD=$HOME/.scripts/

72
botfiles/.shellrc Normal file
View File

@ -0,0 +1,72 @@
#
# ██ ██ ██
# ░██ ░██ ░██
# ██████░██ █████ ░██ ░██ ██████ █████
# ██░░░░ ░██████ ██░░░██ ░██ ░██░░██░░█ ██░░░██
# ░░█████ ░██░░░██░███████ ░██ ░██ ░██ ░ ░██ ░░
# ░░░░░██░██ ░██░██░░░░ ░██ ░██ ░██ ░██ ██
# ██████ ░██ ░██░░██████ ███ ███░███ ░░█████
# ░░░░░░ ░░ ░░ ░░░░░░ ░░░ ░░░ ░░░ ░░░░░
#~~~~~~~~~
# General
#~~~~~~~~~
source "$HOME/.profile"
#~~~~~~~~~
# Aliases
#~~~~~~~~~
alias vi='nvim'
alias vim='nvim'
alias suvi='sudo -E nvim'
alias owo='yay --editmenu --nodiffmenu --save'
alias uwu="yay -Slq | fzf -m --preview 'yay -Si {1}' | yay -S -"
alias pass='keepassxc-cli clip ~/Passwords/keepass.kdbx'
alias torrent='transmission-cli'
alias ascii='figlet'
alias ytdl-audio='youtube-dl -i --extract-audio --audio-format opus'
alias mirrors='sudo reflector --latest 200 --protocol http --protocol https --sort rate --save /etc/pacman.d/mirrorlist'
alias copy='xclip -selection clipboard'
alias battery='upower -i /org/freedesktop/UPower/devices/battery_BAT0'
# git
alias ga='git add'
alias gc='git commit'
alias gp='git push'
alias gpom='git push origin master'
alias gl='git log'
alias gpu='git pull'
alias gs='git status'
alias gr='git rm -f'
#~~~~~~~~~~~~~~~~~
# Commands Colors
#~~~~~~~~~~~~~~~~~
alias ls='ls --color=auto'
alias ip='grc ip'
alias ping='grc ping'
alias ps='grc ps'
export SUDO_PROMPT='sudo -p "$(printf "\033[0;31m")[ sudo ]$(printf "\033[0m"): "'
# man
man() {
LESS_TERMCAP_md=$'\e[01;31m' \
LESS_TERMCAP_me=$'\e[0m' \
LESS_TERMCAP_se=$'\e[0m' \
# LESS_TERMCAP_so=$'\e[01;44;33m' \
LESS_TERMCAP_ue=$'\e[0m' \
LESS_TERMCAP_us=$'\e[01;32m' \
command man "$@"
}
# less
export LESS=-R
export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink
export LESS_TERMCAP_md=$'\E[1;36m' # begin bold
export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink
#export LESS_TERMCAP_so=$'\E[01;44;33m' # begin reverse video
export LESS_TERMCAP_se=$'\E[0m' # reset reverse video
export LESS_TERMCAP_us=$'\E[1;32m' # begin underline
export LESS_TERMCAP_ue=$'\E[0m' # reset underline

View File

@ -1,5 +1,24 @@
#!/usr/bin/zsh #!/usr/bin/env bash
#
# ████ ██ ██
# ██████ ░██░ ░░ ░██
# ░██░░░██ ██████ ██████ ██████ ██ ░██ █████
# ░██ ░██░░██░░█ ██░░░░██░░░██░ ░██ ░██ ██░░░██
# ░██████ ░██ ░ ░██ ░██ ░██ ░██ ░██░███████
# ░██░░░ ░██ ░██ ░██ ░██ ░██ ░██░██░░░░
# ░██ ░███ ░░██████ ░██ ░██ ███░░██████
# ░░ ░░░ ░░░░░░ ░░ ░░ ░░░ ░░░░░░
export EDITOR=nvim #~~~~~~~~~~~~~~
# Default Apps
#~~~~~~~~~~~~~~
export EDITOR="nvim"
export BROWSER="qutebrowser"
export TERMINAL="st"
#~~~~~~
# PATH
#~~~~~~
export PATH="$PATH:$HOME/Dotfiles:$HOME/.local/bin"
export SCRD=$HOME/.scripts/ export SCRD=$HOME/.scripts/

View File

@ -1,24 +1,28 @@
# _ #
# _______| |__ # ██
# |_ / __| '_ \ # ░██
# / /\__ \ | | | # ██████ ██████░██
# /___|___/_| |_| # ░░░░██ ██░░░░ ░██████
# ██ ░░█████ ░██░░░██
# ██ ░░░░░██░██ ░██
# ██████ ██████ ░██ ░██
# ░░░░░░ ░░░░░░ ░░ ░░
#~~~~~~~~~ #~~~~~~~~~
# GENERAL # General
#~~~~~~~~~ #~~~~~~~~~
# ZSH directory # zsh directory
ZDIR="${HOME}/.config/zsh" ZDIR="${HOME}/.config/zsh"
# History # history
SAVEHIST=9999999 SAVEHIST=9999999
HISTFILE="${ZDIR}/history" HISTFILE="${ZDIR}/history"
# Imports # imports
source "${HOME}/.aliases" source $HOME/.profile
source "${HOME}/.zprofile" source $HOME/.shellrc
# Prompt # prompt
setopt prompt_subst setopt prompt_subst
setopt autocd setopt autocd
PROMPT='%F{green}%m%f in %B%F{#299b9b}%~%f%b $(git_status) PROMPT='%F{green}%m%f in %B%F{#299b9b}%~%f%b $(git_status)
@ -32,29 +36,24 @@ function git_status() {
fi fi
} }
# Completetion # completetion
autoload -U compinit autoload -U compinit
zstyle ':completion:*' menu select zstyle ':completion:*' menu select
setopt complete_aliases setopt complete_aliases
# Setopt correct # setopt correct
zmodload zsh/complist zmodload zsh/complist
compinit compinit
_comp_options+=(globdots) _comp_options+=(globdots)
#~~~~~~
# PATH
#~~~~~~
export PATH=$PATH:~/Dotfiles
#~~~~~~~~~~ #~~~~~~~~~~
# BINDINGS # Bindings
#~~~~~~~~~~ #~~~~~~~~~~
# Vi mode # vi mode
bindkey -v bindkey -v
export KEYTIMEOUT=1 export KEYTIMEOUT=1
# Cursor change # cursor change
function zle-keymap-select { function zle-keymap-select {
if [[ ${KEYMAP} == vicmd ]] || if [[ ${KEYMAP} == vicmd ]] ||
[[ $1 = 'block' ]]; then [[ $1 = 'block' ]]; then
@ -76,44 +75,19 @@ zle-line-init() {
echo -ne '\e[6 q' echo -ne '\e[6 q'
preexec() { echo -ne '\e[6 q' ;} preexec() { echo -ne '\e[6 q' ;}
# Other # other
bindkey '^x' clear-screen bindkey '^x' clear-screen
#~~~~~~~~~ #~~~~~~~~~
# PLUGINS # Plugins
#~~~~~~~~~ #~~~~~~~~~
PDIR="${ZDIR}/plugins" PDIR="${ZDIR}/plugins"
source "${PDIR}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
# zsh-autosuggestions
source "${PDIR}/zsh-autosuggestions/zsh-autosuggestions.zsh" source "${PDIR}/zsh-autosuggestions/zsh-autosuggestions.zsh"
#~~~~~~~~ # zsh-syntax-highlighting
# Colors source "${PDIR}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
#~~~~~~~~
#MAN
man() {
LESS_TERMCAP_md=$'\e[01;31m' \
LESS_TERMCAP_me=$'\e[0m' \
LESS_TERMCAP_se=$'\e[0m' \
# LESS_TERMCAP_so=$'\e[01;44;33m' \
LESS_TERMCAP_ue=$'\e[0m' \
LESS_TERMCAP_us=$'\e[01;32m' \
command man "$@"
}
#LESS
export LESS=-R
export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink
export LESS_TERMCAP_md=$'\E[1;36m' # begin bold
export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink
#export LESS_TERMCAP_so=$'\E[01;44;33m' # begin reverse video
export LESS_TERMCAP_se=$'\E[0m' # reset reverse video
export LESS_TERMCAP_us=$'\E[1;32m' # begin underline
export LESS_TERMCAP_ue=$'\E[0m' # reset underline
#TETRIS
autoload -Uz tetriscurses
alias tetris='tetriscurses'
ZSH_HIGHLIGHT_STYLES[default]='none' ZSH_HIGHLIGHT_STYLES[default]='none'
ZSH_HIGHLIGHT_STYLES[unknown-token]='bg=red' ZSH_HIGHLIGHT_STYLES[unknown-token]='bg=red'
@ -138,3 +112,7 @@ ZSH_HIGHLIGHT_STYLES[double-quoted-argument]='fg=red'
ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]='fg=cyan' ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]='fg=cyan'
ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]='fg=cyan' ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]='fg=cyan'
ZSH_HIGHLIGHT_STYLES[assign]='none' ZSH_HIGHLIGHT_STYLES[assign]='none'
# tetris easter-egg
autoload -Uz tetriscurses
alias tetris='tetriscurses'

2
updot
View File

@ -3,7 +3,7 @@
echo "Adding configs to dotfiles repo..." echo "Adding configs to dotfiles repo..."
cd ~ cd ~
cp .zshrc .Xresources .aliases .bashrc .zprofile .bash_profile .local/share/TelegramDesktop/tdata/shortcuts-custom.json ~/Dotfiles/botfiles/ &>/dev/null cp .zshrc .Xresources .profile .shellrc .bashrc .zprofile .bash_profile .local/share/TelegramDesktop/tdata/shortcuts-custom.json ~/Dotfiles/botfiles/ &>/dev/null
cd ~/.scripts/ cd ~/.scripts/
cp lockscreen powermenu screenshot update-check updater websearch ~/Dotfiles/botfiles/.scripts/ &>/dev/null cp lockscreen powermenu screenshot update-check updater websearch ~/Dotfiles/botfiles/.scripts/ &>/dev/null
cd ~/.config cd ~/.config