-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4a5e56d
commit 51cea63
Showing
34 changed files
with
1,879 additions
and
954 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
! ~/.Xresources | ||
|
||
! colors, defaults | ||
"color0":"#282936" | ||
"color1":"#ea51b2" | ||
"color2":"#00f769" | ||
"color3":"#ebff87" | ||
"color4":"#62d6e8" | ||
"color5":"#b45bcf" | ||
"color6":"#a1efe4" | ||
"color7":"#e9e9f4" | ||
"color8":"#4d4f68" | ||
"color9":"#ea51b2" | ||
"color10":"#00f769" | ||
"color11":"#ebff87" | ||
"color12":"#62d6e8" | ||
"color13":"#b45bcf" | ||
"color14":"#a1efe4" | ||
"color15":"#f7f7fb" | ||
|
||
! rofi | ||
rofi.color-enabled: true | ||
rofi.separator-style: solid | ||
rofi.font: FONT SIZE | ||
rofi.bw: 2 | ||
rofi.columns: 1 | ||
rofi.yoffset: 0 | ||
rofi.fake-transparency: false | ||
rofi.hide-scrollbar: true | ||
|
||
rofi.location: 0 | ||
rofi.width: 30 | ||
rofi.lines: 10 | ||
rofi.fixed-num-lines: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,240 @@ | ||
#!/bin/bash | ||
|
||
info() { | ||
printf "\\r [ \\033[00;34m..\\033[0m ] %s\\n" "${1}" | ||
} | ||
|
||
user() { | ||
printf "\\r [ \\033[0;33m??\\033[0m ] %s\\n" "${1}" | ||
} | ||
|
||
success() { | ||
printf "\\r\\033[2K [ \\033[00;32mOK\\033[0m ] %s\\n" "${1}" | ||
} | ||
|
||
in_progress() { | ||
printf "\\r [ \\033[00;34m\\u23F0\\033[0m ] %s\\r" "${1}" | ||
} | ||
|
||
fail() { | ||
printf "\\r\\033[2K [\\033[0;31mFAIL\\033[0m] %s\\n" "${1}" >&2 | ||
exit 666 | ||
} | ||
|
||
exists() { | ||
command -v "$1" &>/dev/null | ||
} | ||
|
||
retry() { | ||
local n=1 | ||
local max=50 | ||
local delay=2 | ||
|
||
while true; do | ||
if "$@"; then | ||
break | ||
else | ||
if [[ $n -lt $max ]]; then | ||
((n++)) | ||
sleep $delay | ||
else | ||
fail "The command has failed after $n attempts." | ||
fi | ||
fi | ||
done | ||
} | ||
|
||
validate_bin_accessible() ( | ||
bins_to_check=( | ||
# founations | ||
nvim | ||
zsh | ||
terminator | ||
# containers & stuff | ||
docker | ||
docker-compose | ||
# git & utils | ||
git | ||
git-lfs | ||
git-extras | ||
exiftool | ||
# gotta have python dawg | ||
python2 | ||
python3 | ||
# node should be provided as well | ||
node | ||
# do not forget golang | ||
go | ||
# browsers | ||
google-chrome-unstable | ||
firefox | ||
brave-browser-beta | ||
# linters matter | ||
shellcheck | ||
yamllint | ||
# utilities | ||
purge-old-kernels | ||
snap | ||
http | ||
tree | ||
aria2c | ||
ctags | ||
htop | ||
jq | ||
) | ||
|
||
for bin in "${bins_to_check[@]}"; do | ||
if retry exists "${bin}"; then | ||
success "${bin} is accessible via $(whereis "${bin}")" | ||
else | ||
fail "${bin} is not accessible" | ||
fi | ||
done | ||
) | ||
|
||
validate_interactive_bins() ( | ||
bins_to_check=( | ||
pyenv | ||
nodenv | ||
goenv | ||
jenv | ||
fzf | ||
) | ||
|
||
for bin in "${bins_to_check[@]}"; do | ||
bin_path="${HOME}/.${bin}/bin/${bin}" | ||
|
||
if [[ -s "${bin_path}" ]]; then | ||
v_out=$($bin_path --version | tr "'${bin}'" ' ' | sed -e 's/^[[:space:]]*//') | ||
success "${bin} is accessible via ${bin_path} with version ${v_out}" | ||
else | ||
fail "${bin} is not accessible" | ||
fi | ||
|
||
if retry exists "${bin}"; then | ||
success "${bin} is accessible via $(whereis "${bin}")" | ||
else | ||
fail "${bin} is not accessible" | ||
fi | ||
done | ||
) | ||
|
||
validate_pyenv() ( | ||
if [[ ! -s "${HOME}/.pyenv" ]]; then | ||
fail "Failed to locate pyenv directory in \$HOME" | ||
else | ||
success "pyenv directory set" | ||
|
||
local venvs_to_check | ||
venvs_to_check=( | ||
neovim2 | ||
neovim3 | ||
) | ||
|
||
for venv in "${venvs_to_check[@]}"; do | ||
if ! "${HOME}/.pyenv/bin/pyenv" versions | grep -q "${venv}"; then | ||
fail "Virtualenv ${venv} was not installed" | ||
else | ||
success "Virtualenv ${venv} :: $(${HOME}/.pyenv/bin/pyenv shell ${venv} | python --version) is installed" | ||
fi | ||
done | ||
|
||
zsh -mil -c "pyenv doctor" | ||
if [[ ! -f "${HOME}/.pyenv/version" ]]; then | ||
fail "pyenv did not set global system version" | ||
fi | ||
fi | ||
) | ||
|
||
validate_nodenv() ( | ||
if [[ ! -s "${HOME}/.nodenv" ]]; then | ||
fail "Failed to locate nodenv directory in \$HOME" | ||
else | ||
success "nodenv directory set" | ||
zsh -mil -c "npx -p @nodenv/nodenv-installer nodenv-doctor" | ||
if [[ ! -f "${HOME}/.nodenv/version" ]]; then | ||
fail "nodenv did not set global system version" | ||
fi | ||
fi | ||
|
||
local bins_to_check | ||
bins_to_check=( | ||
neovim-node-host | ||
prettier | ||
tsc | ||
elm-language-server | ||
bash-language-server | ||
vim-language-server | ||
docker-langserver | ||
) | ||
for bin in "${bins_to_check[@]}"; do | ||
bin_path="$(command -v "${bin}")" | ||
|
||
if [[ -s "${bin_path}" ]]; then | ||
if $bin_path --version 2>/dev/null 1>/dev/null; then | ||
v_out=$($bin_path --version | tr -d 'Version ' | tr "'${bin}'" ' ' | sed -e 's/^[[:space:]]*//') | ||
else | ||
v_out="?" | ||
fi | ||
success "${bin} is accessible via ${bin_path} with version ${v_out}" | ||
else | ||
fail "${bin} is not accessible" | ||
fi | ||
|
||
done | ||
|
||
) | ||
|
||
validate_goenv() ( | ||
if [[ ! -s "${HOME}/.goenv" ]]; then | ||
fail "Failed to locate goenv directory in \$HOME" | ||
else | ||
success "goenv directory set" | ||
if [[ ! -f "${HOME}/.goenv/version" ]]; then | ||
fail "goenv did not set global system version" | ||
fi | ||
fi | ||
) | ||
|
||
validate_jenv() ( | ||
if [[ ! -s "${HOME}/.jenv" ]]; then | ||
fail "Failed to locate jenv directory in \$HOME" | ||
else | ||
success "jenv directory set" | ||
jenv doctor | ||
if [[ ! -f "${HOME}/.jenv/version" ]]; then | ||
fail "jenv did not set global system version" | ||
fi | ||
fi | ||
) | ||
|
||
validate_git_config() ( | ||
if [[ ! -f "${HOME}/.gitconfig.local" ]]; then | ||
fail "Local git configuration not set" | ||
else | ||
success "git configured" | ||
fi | ||
) | ||
|
||
validate_wakatime_config() ( | ||
if [[ ! -f "${HOME}/.wakatime.cfg" ]]; then | ||
fail "Local wakatime configuration not set" | ||
else | ||
success "wakatime configured" | ||
fi | ||
) | ||
|
||
info 'Validating installation' | ||
( | ||
info "Path is [ $(echo "${PATH}" | tr ':' '\t\r\n') ]" | ||
validate_git_config | ||
validate_wakatime_config | ||
validate_bin_accessible | ||
validate_interactive_bins | ||
validate_pyenv | ||
validate_nodenv | ||
validate_goenv | ||
validate_jenv | ||
) | ||
info 'Validation successful' | ||
screenfetch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
XDG_CONFIG_HOME DEFAULT=@{HOME}/.config | ||
XDG_CACHE_HOME DEFAULT=@{HOME}/.cache |
Oops, something went wrong.