Compare commits

...

10 Commits

5 changed files with 144 additions and 2 deletions

View File

@ -2,15 +2,18 @@
[[ $- != *i* ]] && return
# History settings ########################################
shopt -s histappend
HISTCONTROL=ignoreboth
HISTSIZE=1000
HISTFILESIZE=2000
###########################################################
export PS1='\[\e[0;33m\][\t] \[\e[0;32m\][\W]\[\e[0m\] \[\e[0;31m\]> \[\e[0m\]'
#export PS1='\[\e[0;33m\][\t] \[\e[0;32m\][\W]\[\e[0m\] \[\e[0;31m\]> \[\e[0m\]'
source ${HOME}/PS1.bash
export GPG_TTY=$(tty)
export PATH="$PATH:$HOME/.local/bin"
export PKGEXT=.pkg.tar # disable compress packages (ArchLinux makepkg)
# PMNG ####################################################
export PMNG_PWD_FILE="$HOME/Vault/.password.yml"
@ -40,6 +43,12 @@ if command -v shards &> /dev/null; then
fi
###########################################################
# Alias definitions #######################################
if [ -f ~/.bash_aliases ]; then
source $HOME/.bash_aliases
fi
###########################################################
# NVM (Node.js version manager) ###########################
if [ -d "$HOME/.nvm" ]; then
export NVM_DIR="$HOME/.nvm"
@ -64,3 +73,14 @@ if ! shopt -oq posix; then
fi
fi
###########################################################
# WakaTime Terminal #######################################
_WAKATIME_BASH="$HOME/Git/bash-wakatime/bash-wakatime.sh"
if [ -f ${_WAKATIME_BASH} ]; then
source ${_WAKATIME_BASH}
fi
###########################################################
# XMake ###################################################
test -f "/home/user/.xmake/profile" && source "/home/user/.xmake/profile"
###########################################################

30
~/Bash/PS1.bash Normal file
View File

@ -0,0 +1,30 @@
RST='\e[0m'
PS1_LINE=`printf -- '- %.0s' {1..200}` # Background lines
update() {
# Exit code
# [ $? == 0 ] && PS1_STATUS="" || PS1_STATUS=""
# [ $? == 0 ] && PS1_STATUS="\e[38;5;113m${RST}" || PS1_STATUS="\e[38;5;167m${RST}"
PS1_FILL=${PS1_LINE:0:$COLUMNS} # Background fill
FREE_RAM=$(free | awk '/Mem/{printf("%2d%"), $3/$2*100}')
# Git branch
GIT_BRANCH=''
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
GIT_BRANCH="[git ${ref#refs/heads/}] "
}
PROMPT_COMMAND=update
PS1_HOST="\e[38;5;159m \h${RST}" # Host
PS1_CLOCK="\e[38;5;227m \t${RST}" # Clock
PS1_USER="\e[38;5;218m \u${RST}" # User
PS1_RAM="\e[38;5;113m \$FREE_RAM${RST}" # RAM
PS1_FOLDER="\e[38;5;215m \W${RST}" # Folder
PS1_GIT="\e[38;5;215m\$GIT_BRANCH${RST}" # Git branch (if exist)
PS1="\e[0;90m\${PS1_FILL}\[\033[0G\]${PS1_HOST} ${PS1_USER} ${PS1_FOLDER} \
\[\033[\$((COLUMNS-17))G\] ${PS1_RAM} ${PS1_CLOCK}${RST}\n${PS1_GIT}\
(\e[38;5;113m\$(if [ \$? == 0 ]; then echo ''; else echo ''; fi)${RST})> "

View File

@ -18,7 +18,7 @@
eol = lf
autocrlf = input
excludesFile = ~/.gitignore
editor = micro
editor = subl -w
[commit]
gpgsign = false
[gpg]

1
~/Git/.gitignore vendored
View File

@ -5,3 +5,4 @@ vendor/
.buildozer/
composer.phar
.directory
.env

91
~/s3cmd/.s3cfg Normal file
View File

@ -0,0 +1,91 @@
[default]
access_key = <REPLACE>
access_token =
add_encoding_exts =
add_headers =
bucket_location = ru-1
ca_certs_file =
cache_file =
check_ssl_certificate = True
check_ssl_hostname = True
cloudfront_host = cloudfront.amazonaws.com
connection_max_age = 5
connection_pooling = True
content_disposition =
content_type =
default_mime_type = binary/octet-stream
delay_updates = False
delete_after = False
delete_after_fetch = False
delete_removed = False
dry_run = False
enable_multipart = True
encoding = UTF-8
encrypt = False
expiry_date =
expiry_days =
expiry_prefix =
follow_symlinks = False
force = False
get_continue = False
gpg_command = /usr/bin/gpg
gpg_decrypt = %(gpg_command)s -d --verbose --no-use-agent --batch --yes --passphrase-fd %(passphrase_fd)s -o %(output_file)s %(input_file)s
gpg_encrypt = %(gpg_command)s -c --verbose --no-use-agent --batch --yes --passphrase-fd %(passphrase_fd)s -o %(output_file)s %(input_file)s
gpg_passphrase =
guess_mime_type = True
host_base = s3.timeweb.com
host_bucket = s3.timeweb.com
human_readable_sizes = False
invalidate_default_index_on_cf = False
invalidate_default_index_root_on_cf = True
invalidate_on_cf = False
keep_dirs = False
kms_key =
limit = -1
limitrate = 0
list_allow_unordered = False
list_md5 = False
log_target_prefix =
long_listing = False
max_delete = -1
max_retries = 5
mime_type =
multipart_chunk_size_mb = 15
multipart_copy_chunk_size_mb = 1024
multipart_max_chunks = 10000
preserve_attrs = True
progress_meter = True
proxy_host =
proxy_port = 0
public_url_use_https = False
put_continue = False
recursive = False
recv_chunk = 65536
reduced_redundancy = False
requester_pays = False
restore_days = 1
restore_priority = Standard
secret_key = <REPLACE>
send_chunk = 65536
server_side_encryption = False
signature_v2 = False
signurl_use_https = False
simpledb_host = sdb.amazonaws.com
skip_destination_validation = False
skip_existing = False
socket_timeout = 300
ssl_client_cert_file =
ssl_client_key_file =
stats = False
stop_on_error = False
storage_class =
throttle_max = 100
upload_id =
urlencoding_mode = normal
use_http_expect = False
use_https = True
use_mime_magic = True
verbosity = WARNING
website_endpoint = http://%(bucket)s.s3-website-%(location)s.amazonaws.com/
website_error =
website_index = index.html