├── .VERSION ├── settings.gradle ├── tests ├── stubs │ ├── base64 │ ├── shasum │ ├── sample-version │ ├── decode │ ├── encode │ └── gpg ├── hhs-aliases.bats ├── test_helper.bash ├── venv-tests.bats ├── check-ip.bats ├── hhs-taylor.bats └── hhs-text.bats ├── assets ├── colorls │ ├── hhs-preset │ │ ├── folder_aliases.yaml │ │ ├── folders.yaml │ │ ├── light_colors.yaml │ │ ├── dark_colors.yaml │ │ └── files.yaml │ └── orig-preset │ │ ├── folder_aliases.yaml │ │ ├── folders.yaml │ │ ├── light_colors.yaml │ │ ├── dark_colors.yaml │ │ └── files.yaml ├── images │ ├── hs-cover.png │ ├── hs-logo.xcf │ ├── hs-cover-zsh.png │ ├── hs-github-image.png │ ├── misc │ │ ├── vi-teclado.png │ │ └── starship-colors.png │ └── icons │ │ ├── hs-logo-x32.png │ │ └── hhs-gherkin-gpt.png ├── contrib │ ├── gpt │ │ └── tests │ │ │ ├── resources │ │ │ ├── audio-1.mp3 │ │ │ └── video-1.mov │ │ │ ├── test_temperature_converter.bats │ │ │ ├── test_iso_to_cron.bats │ │ │ ├── test_cron_scheduler.bats │ │ │ ├── test_file_archiver.bats │ │ │ └── test_media_converter.bats │ └── hhs │ │ ├── java-switch.bash │ │ └── multi-user-install.bash ├── fonts │ ├── Font-Awesome-5-Free-Solid-900.otf │ ├── Font-Awesome-5-Free-Regular-400.otf │ ├── Font-Awesome-5-Brands-Regular-400.otf │ └── Droid-Sans-Mono-for-Powerline-Nerd-Font-Complete.otf ├── devel │ ├── nginx │ │ ├── sites-available │ │ │ └── default │ │ ├── nginx.conf │ │ └── nginx.conf.orig │ └── wezterm.actions.txt ├── hhs-tailor-settings.csv ├── hhs-icons.csv └── nvim │ └── init.vim ├── gradle.properties ├── gradle ├── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── idea.gradle └── docker.gradle ├── .github ├── FUNDING.yml ├── workflows │ ├── gh-pages.yml │ └── create-release.yml └── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── docs ├── misc │ ├── cheatsheets │ │ ├── vscode-shortcuts-macos.pdf │ │ └── bash-dotfiles.md │ └── linux-releases.md ├── man │ └── man.1 │ │ ├── __hhs_code.1 │ │ ├── __hhs_gradle.1 │ │ ├── __hhs_os_info.1 │ │ ├── __hhs_git_add.1 │ │ ├── __hhs_git_retag.1 │ │ ├── __hhs_docker_exec.1 │ │ ├── __hhs_docker_info.1 │ │ ├── __hhs_docker_logs.1 │ │ ├── __hhs_get_codename.1 │ │ ├── __hhs_docker_count.1 │ │ ├── __hhs_git_pull_all.1 │ │ ├── __hhs_sysinfo.1 │ │ ├── __hhs_git_changelog.1 │ │ ├── __hhs_git_branch_all.1 │ │ ├── __hhs_git_status_all.1 │ │ ├── __hhs_docker_kill_all.1 │ │ ├── __hhs_git_show_changes.1 │ │ ├── __hhs_git_branch_select.1 │ │ ├── __hhs_git_show_file_diff.1 │ │ ├── __hhs_docker_compose_exec.1 │ │ ├── __hhs_git_branch_previous.1 │ │ ├── __hhs_shell_select.1 │ │ ├── __hhs_partitions.1 │ │ ├── __hhs_paths.1 │ │ ├── __hhs_about.1 │ │ ├── __hhs_active_ifaces.1 │ │ ├── __hhs_docker_remove_volumes.1 │ │ ├── __hhs_edit.1 │ │ ├── __hhs_git_show_file_contents.1 │ │ ├── __hhs_activate_jenv.1 │ │ ├── __hhs_toml_groups.1 │ │ ├── __hhs_ip_info.1 │ │ ├── __hhs_version.1 │ │ ├── __hhs_ip_lookup.1 │ │ ├── __hhs_activate_docker.1 │ │ ├── __hhs_ascof.1 │ │ ├── __hhs_toolcheck.1 │ │ ├── __hhs_tools.1 │ │ ├── __hhs_ip_resolve.1 │ │ ├── __hhs_activate_nvm.1 │ │ ├── __hhs_activate_rvm.1 │ │ ├── __hhs_utoh.1 │ │ ├── __hhs_punch.1 │ │ ├── __hhs_defs.1 │ │ ├── __hhs_hist_stats.1 │ │ ├── __hhs_history.1 │ │ ├── __hhs_tailor.1 │ │ ├── __hhs_process_kill.1 │ │ ├── __hhs_pwgen.1 │ │ ├── __hhs_toml_keys.1 │ │ ├── __hhs_toml_get_all.1 │ │ ├── __hhs_minput.1 │ │ ├── __hhs_godir.1 │ │ ├── __hhs_list_tree.1 │ │ ├── __hhs_highlight.1 │ │ ├── __hhs_random.1 │ │ ├── __hhs_toml_get.1 │ │ ├── __hhs_changeback_ndirs.1 │ │ ├── __hhs_repeat.1 │ │ ├── __hhs_search_file.1 │ │ ├── __hhs_toml_set.1 │ │ ├── __hhs_encrypt_file.1 │ │ ├── __hhs_decrypt_file.1 │ │ ├── __hhs_mkcd.1 │ │ ├── __hhs_search_dir.1 │ │ ├── __hhs_venv.1 │ │ ├── __hhs_du.1 │ │ ├── __hhs_envs.1 │ │ ├── __hhs_save_dir.1 │ │ ├── __hhs_load_dir.1 │ │ ├── __hhs_port_check.1 │ │ ├── __hhs_del_tree.1 │ │ ├── __hhs_change_dir.1 │ │ ├── __hhs_ip.1 │ │ ├── __hhs_aliases.1 │ │ ├── __hhs_process_list.1 │ │ ├── __hhs_command.1 │ │ ├── __hhs_dirs.1 │ │ ├── __hhs_classic_mselect.1 │ │ ├── __hhs_mselect.1 │ │ ├── __hhs_where_am_i.1 │ │ ├── __hhs_shopt.1 │ │ ├── __hhs_classic_mchoose.1 │ │ ├── __hhs_search_string.1 │ │ ├── __hhs_mchoose.1 │ │ ├── __hhs_md_viewer.1 │ │ └── __hhs_ls_sorted.1 ├── PULL_REQUEST_TEMPLATE.md ├── CONTRIBUTING.md ├── COLOR_LS_SETUP.md └── handbook │ └── pages │ ├── applications.md │ ├── applications │ └── bash │ │ └── hhs-app │ │ ├── functions │ │ └── web.md │ │ └── plugins │ │ └── setup.md │ └── functions.md ├── .gitattributes ├── .MOTD ├── homesetup.code-workspace ├── templates ├── git │ ├── git-diff-cmd.bash │ ├── commits │ ├── gitignore │ └── hooks │ │ └── prepare-commit-msg ├── md │ └── handbook.md └── txt │ ├── man.1 │ └── help.txt ├── dotfiles ├── glow.yml ├── hhs-bindings ├── bash │ ├── bash_profile.bash │ ├── bash_icons.bash │ ├── bashrc.bash │ └── bash_functions.bash ├── tmux.conf ├── inputrc ├── homesetup.toml └── zsh │ └── zsh_functions.zsh ├── .vscode ├── settings.json └── tasks.json ├── .gitmodules ├── bin ├── apps │ └── bash │ │ └── hhs-app │ │ ├── plugins │ │ ├── hspm │ │ │ └── recipes │ │ │ │ ├── Darwin │ │ │ │ ├── xcode-select.recipe │ │ │ │ ├── jenv.recipe │ │ │ │ ├── ollama.recipe │ │ │ │ ├── node.recipe │ │ │ │ ├── vue.recipe │ │ │ │ ├── qt.recipe │ │ │ │ ├── rvm.recipe │ │ │ │ ├── default.recipe │ │ │ │ └── nvm.recipe │ │ │ │ └── Linux │ │ │ │ ├── ollama.recipe │ │ │ │ └── default.recipe │ │ ├── ask │ │ │ └── install-ollama.bash │ │ ├── starship │ │ │ └── hhs-presets │ │ │ │ ├── hhs-p10k.toml │ │ │ │ ├── hhs-andrews.toml │ │ │ │ ├── hhs-ryo-arak.toml │ │ │ │ └── hhs-eltonminetto.toml │ │ └── firebase │ │ │ └── firebase.bash │ │ └── functions │ │ └── web.bash ├── completions │ └── bash │ │ └── ssh-completion.bash └── dev-tools │ └── bash │ ├── hhs-gradle-tools.bash │ └── hhs-vscode-tools.bash ├── bumpver.toml ├── .editorconfig ├── docker ├── fedora │ └── Dockerfile ├── ubuntu │ └── Dockerfile ├── alpine │ └── Dockerfile └── centos │ └── Dockerfile ├── LICENSE.md ├── .gitignore └── Formula └── homesetup.rb /.VERSION: -------------------------------------------------------------------------------- 1 | 1.9.11 -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'HomeSetup' 2 | -------------------------------------------------------------------------------- /tests/stubs/base64: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cat 3 | -------------------------------------------------------------------------------- /assets/colorls/hhs-preset/folder_aliases.yaml: -------------------------------------------------------------------------------- 1 | bin: config 2 | include: config -------------------------------------------------------------------------------- /assets/colorls/orig-preset/folder_aliases.yaml: -------------------------------------------------------------------------------- 1 | bin: config 2 | include: config -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | app_version = '1.9.11' 2 | app_name = 'HomeSetup' 3 | bashVersion = '3.2.57' 4 | -------------------------------------------------------------------------------- /assets/images/hs-cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HS-Teams/homesetup/HEAD/assets/images/hs-cover.png -------------------------------------------------------------------------------- /assets/images/hs-logo.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HS-Teams/homesetup/HEAD/assets/images/hs-logo.xcf -------------------------------------------------------------------------------- /assets/images/hs-cover-zsh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HS-Teams/homesetup/HEAD/assets/images/hs-cover-zsh.png -------------------------------------------------------------------------------- /assets/images/hs-github-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HS-Teams/homesetup/HEAD/assets/images/hs-github-image.png -------------------------------------------------------------------------------- /assets/images/misc/vi-teclado.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HS-Teams/homesetup/HEAD/assets/images/misc/vi-teclado.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HS-Teams/homesetup/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /assets/images/icons/hs-logo-x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HS-Teams/homesetup/HEAD/assets/images/icons/hs-logo-x32.png -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: yorevs 2 | custom: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=J5CDEFLF6M3H4 3 | -------------------------------------------------------------------------------- /assets/images/icons/hhs-gherkin-gpt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HS-Teams/homesetup/HEAD/assets/images/icons/hhs-gherkin-gpt.png -------------------------------------------------------------------------------- /assets/images/misc/starship-colors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HS-Teams/homesetup/HEAD/assets/images/misc/starship-colors.png -------------------------------------------------------------------------------- /assets/contrib/gpt/tests/resources/audio-1.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HS-Teams/homesetup/HEAD/assets/contrib/gpt/tests/resources/audio-1.mp3 -------------------------------------------------------------------------------- /assets/contrib/gpt/tests/resources/video-1.mov: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HS-Teams/homesetup/HEAD/assets/contrib/gpt/tests/resources/video-1.mov -------------------------------------------------------------------------------- /assets/fonts/Font-Awesome-5-Free-Solid-900.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HS-Teams/homesetup/HEAD/assets/fonts/Font-Awesome-5-Free-Solid-900.otf -------------------------------------------------------------------------------- /assets/fonts/Font-Awesome-5-Free-Regular-400.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HS-Teams/homesetup/HEAD/assets/fonts/Font-Awesome-5-Free-Regular-400.otf -------------------------------------------------------------------------------- /docs/misc/cheatsheets/vscode-shortcuts-macos.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HS-Teams/homesetup/HEAD/docs/misc/cheatsheets/vscode-shortcuts-macos.pdf -------------------------------------------------------------------------------- /assets/fonts/Font-Awesome-5-Brands-Regular-400.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HS-Teams/homesetup/HEAD/assets/fonts/Font-Awesome-5-Brands-Regular-400.otf -------------------------------------------------------------------------------- /tests/stubs/shasum: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | hash="${HHS_SHA_SUM:-0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef}" 3 | printf "%s -\n" "$hash" 4 | exit 0 5 | -------------------------------------------------------------------------------- /assets/fonts/Droid-Sans-Mono-for-Powerline-Nerd-Font-Complete.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HS-Teams/homesetup/HEAD/assets/fonts/Droid-Sans-Mono-for-Powerline-Nerd-Font-Complete.otf -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # 2 | # https://help.github.com/articles/dealing-with-line-endings/ 3 | # 4 | # These are explicitly windows files and should use crlf 5 | *.bat text eol=crlf 6 | 7 | -------------------------------------------------------------------------------- /.MOTD: -------------------------------------------------------------------------------- 1 | ${ORANGE} 2 | [${HHS_MY_OS}-${HHS_MY_OS_RELEASE}/${HHS_MY_SHELL}] ${WHITE}${HAND_PEACE_ICN} \ 3 | ${GREEN}Welcome ${USER:-user} to HomeSetup ${BLUE}v${HHS_VERSION} \ 4 | "$(__hhs_is_venv && echo "${YELLOW}via $(python3 -V)")" 5 | ${NC} 6 | -------------------------------------------------------------------------------- /assets/colorls/hhs-preset/folders.yaml: -------------------------------------------------------------------------------- 1 | .atom: "" 2 | .git: "" 3 | .github: "" 4 | .rvm: "" 5 | .Trash: "" 6 | .vscode: "" 7 | config: "" 8 | folder: "" 9 | hidden: "" 10 | lib: "" 11 | node_modules: "" 12 | -------------------------------------------------------------------------------- /assets/colorls/orig-preset/folders.yaml: -------------------------------------------------------------------------------- 1 | .atom: "" 2 | .git: "" 3 | .github: "" 4 | .rvm: "" 5 | .Trash: "" 6 | .vscode: "" 7 | config: "" 8 | folder: "" 9 | hidden: "" 10 | lib: "" 11 | node_modules: "" 12 | -------------------------------------------------------------------------------- /homesetup.code-workspace: -------------------------------------------------------------------------------- 1 | { 2 | "folders": [ 3 | { 4 | "path": "." 5 | } 6 | ], 7 | "settings": { 8 | "python.pythonPath": "/usr/local/bin/python2-32", 9 | "workbench.colorTheme": "Eclipse", 10 | "hide-files.files": [] 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /templates/git/git-diff-cmd.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | DIFFTOOL=${DIFFTOOL:-git diff --no-index --color} 4 | 5 | xattr -w com.apple.TextEncoding "UTF-8;134217984" "$2" 6 | xattr -w com.apple.TextEncoding "UTF-8;134217984" "$5" 7 | 8 | ${DIFFTOOL} "$2" "$5" 9 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /tests/stubs/sample-version: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | case "$1" in 4 | --version) 5 | echo "sample-version 1.0.0" 6 | exit 0 7 | ;; 8 | -v) 9 | echo "sample-version v1.0.0" 10 | exit 0 11 | ;; 12 | -V) 13 | echo "sample-version V1.0.0" 14 | exit 0 15 | ;; 16 | esac 17 | 18 | exit 1 19 | -------------------------------------------------------------------------------- /dotfiles/glow.yml: -------------------------------------------------------------------------------- 1 | # Glow configuration file: glow.yml 2 | 3 | # style name or JSON path (default "auto") 4 | style: "dracula" 5 | # mouse support (TUI-mode only) 6 | mouse: true 7 | # use pager to display markdown 8 | pager: true 9 | # word-wrap at width 10 | width: 120 11 | # show all files, including hidden and ignored. 12 | all: true 13 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.exclude": { 3 | "**/.git": true, 4 | "**/.svn": true, 5 | "**/.hg": true, 6 | "**/CVS": true, 7 | "**/.DS_Store": true, 8 | "**/Thumbs.db": true, 9 | ".vscode": true, 10 | "**/*.pyc": true, 11 | ".gradle": true, 12 | ".idea": true 13 | }, 14 | "hide-files.files": [] 15 | } -------------------------------------------------------------------------------- /assets/devel/nginx/sites-available/default: -------------------------------------------------------------------------------- 1 | # Default server configuration 2 | # 3 | server { 4 | listen 80 default_server; 5 | listen [::]:80 default_server; 6 | 7 | root /var/www/html; 8 | 9 | index index.html index.htm index.nginx-debian.html; 10 | 11 | server_name _; 12 | 13 | location / { 14 | try_files $uri $uri/ =404; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "tests/bats/bats-core"] 2 | path = tests/bats/bats-core 3 | url = https://github.com/bats-core/bats-core.git 4 | [submodule "tests/bats/bats-support"] 5 | path = tests/bats/bats-support 6 | url = https://github.com/bats-core/bats-support.git 7 | [submodule "tests/bats/bats-assert"] 8 | path = tests/bats/bats-assert 9 | url = https://github.com/bats-core/bats-assert.git 10 | -------------------------------------------------------------------------------- /bin/apps/bash/hhs-app/plugins/hspm/recipes/Darwin/xcode-select.recipe: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | function _which_() { 4 | xcode-select -p 5 | return $? 6 | } 7 | 8 | function _install_() { 9 | xcode-select --install 10 | return $? 11 | } 12 | 13 | function _uninstall_() { 14 | echo "${YELLOW}### There is no automated way to uninstall this app. Consult XCode uninstallation manual${NC}" 15 | return 1 16 | } 17 | -------------------------------------------------------------------------------- /tests/stubs/decode: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | if [[ "${HHS_DECODE_FAIL:-}" == "1" ]]; then 3 | exit 1 4 | fi 5 | input="" 6 | output="" 7 | while [[ $# -gt 0 ]]; do 8 | case "$1" in 9 | -i) 10 | shift 11 | input="$1" 12 | ;; 13 | -o) 14 | shift 15 | output="$1" 16 | ;; 17 | esac 18 | shift 19 | done 20 | [[ -n "$input" && -n "$output" ]] || exit 1 21 | [[ -f "$input" ]] && cp "$input" "$output" || : 22 | exit 0 23 | -------------------------------------------------------------------------------- /tests/stubs/encode: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | if [[ "${HHS_ENCODE_FAIL:-}" == "1" ]]; then 3 | exit 1 4 | fi 5 | input="" 6 | output="" 7 | while [[ $# -gt 0 ]]; do 8 | case "$1" in 9 | -i) 10 | shift 11 | input="$1" 12 | ;; 13 | -o) 14 | shift 15 | output="$1" 16 | ;; 17 | esac 18 | shift 19 | done 20 | [[ -n "$input" && -n "$output" ]] || exit 1 21 | [[ -f "$input" ]] && cp "$input" "$output" || : 22 | exit 0 23 | -------------------------------------------------------------------------------- /bin/apps/bash/hhs-app/plugins/hspm/recipes/Darwin/jenv.recipe: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | function _depends_() { 4 | if ! command -v java >/dev/null; then 5 | __hhs_errcho "hspm.bash: Java is required to install jenv" 6 | return 1 7 | fi 8 | 9 | return 0 10 | } 11 | 12 | function _install_() { 13 | unset nvm 14 | command brew install jenv 15 | return $? 16 | } 17 | 18 | function _uninstall_() { 19 | command brew uninstall jenv 20 | unset nvm 21 | return $? 22 | } 23 | -------------------------------------------------------------------------------- /bin/apps/bash/hhs-app/plugins/hspm/recipes/Darwin/ollama.recipe: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # shellcheck disable=SC2068 3 | 4 | function _which_() { 5 | if command -v ollama &>/dev/null || brew list --formula | grep -q '^ollama$'; then 6 | return 0 7 | fi 8 | return 1 9 | } 10 | 11 | function _install_() { 12 | if brew install ollama; then 13 | return 0 14 | fi 15 | return 1 16 | } 17 | 18 | function _uninstall_() { 19 | if brew uninstall ollama; then 20 | return 0 21 | fi 22 | return 1 23 | } 24 | -------------------------------------------------------------------------------- /templates/git/commits: -------------------------------------------------------------------------------- 1 | Added features: 2 | 3 | [Aa]dded [branch_name:{@author}] 4 | 5 | Changed code: 6 | 7 | [Cc]hanged [branch_name:{@author}] 8 | 9 | Deprecated code: 10 | 11 | [Dd]eprecated [branch_name:{@author}] 12 | 13 | Removed code: 14 | 15 | [Rr]emoved [branch_name:{@author}] 16 | 17 | Bugfixes: 18 | 19 | [Ff]ixed [branch_name:{@author}] 20 | 21 | Security issues: 22 | 23 | [Ss]ecurity [branch_name:{@author}] 24 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_code.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_code" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_code - HomeSetup command. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_code --help 8 | .fi 9 | .SH DESCRIPTION 10 | HomeSetup command. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | bash: line 12: __hhs_code: command not found 16 | .fi 17 | .SH VERSION 18 | __hhs_code (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /bumpver.toml: -------------------------------------------------------------------------------- 1 | [bumpver] 2 | current_version = "1.9.11" 3 | version_pattern = "MAJOR.MINOR.PATCH" 4 | commit_message = "++version {old_version} -> {new_version}" 5 | commit = false 6 | tag = false 7 | push = false 8 | 9 | [bumpver.file_patterns] 10 | "bumpver.toml" = ['current_version = "{version}"'] 11 | "gradle.properties" = ["app_version = '{version}'"] 12 | ".VERSION" = ["{version}"] 13 | "README.md" = ["Release-v{version}-gray"] 14 | "install.bash" = ["VERSION=\"{version}\""] 15 | "Formula/homesetup.rb" = ["tag: \"v{version}\"", "HomeSetup v{version}"] 16 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_gradle.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_gradle" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_gradle - HomeSetup command. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_gradle --help 8 | .fi 9 | .SH DESCRIPTION 10 | HomeSetup command. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | bash: line 12: __hhs_gradle: command not found 16 | .fi 17 | .SH VERSION 18 | __hhs_gradle (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_os_info.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_os_info" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_os_info - Provide information about the OS. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_os_info --help 8 | .fi 9 | .SH DESCRIPTION 10 | Provide information about the OS. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | Unknown OS! 16 | .fi 17 | .SH VERSION 18 | __hhs_os_info (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_git_add.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_git_add" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_git_add - HomeSetup command. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_git_add --help 8 | .fi 9 | .SH DESCRIPTION 10 | HomeSetup command. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | bash: line 12: __hhs_git_add: command not found 16 | .fi 17 | .SH VERSION 18 | __hhs_git_add (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /bin/apps/bash/hhs-app/plugins/hspm/recipes/Darwin/node.recipe: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # shellcheck disable=SC1090 3 | 4 | # Node installation requires nvm loaded 5 | [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" 6 | 7 | function _depends_() { 8 | if ! command -v nvm >/dev/null; then 9 | __hhs_errcho "hspm.bash: NVM is required to install node" 10 | return 1 11 | fi 12 | } 13 | 14 | function _install_() { 15 | nvm install node 16 | return $? 17 | } 18 | 19 | function _uninstall_() { 20 | nvm deactivate node 21 | nvm uninstall node 22 | return $? 23 | } 24 | -------------------------------------------------------------------------------- /bin/apps/bash/hhs-app/plugins/hspm/recipes/Darwin/vue.recipe: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # shellcheck disable=SC1090 3 | 4 | # Vue installation requires nvm loaded 5 | [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" 6 | 7 | function _depends_() { 8 | 9 | if ! command -v nvm >/dev/null; then 10 | __hhs_errcho "hspm.bash: NVM is required to install vue" 11 | return 1 12 | fi 13 | } 14 | 15 | function _install_() { 16 | nvm install vue 17 | return $? 18 | } 19 | 20 | function _uninstall_() { 21 | nvm deactivate vue 22 | nvm uninstall vue 23 | return $? 24 | } 25 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_git_retag.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_git_retag" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_git_retag - HomeSetup command. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_git_retag --help 8 | .fi 9 | .SH DESCRIPTION 10 | HomeSetup command. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | bash: line 12: __hhs_git_retag: command not found 16 | .fi 17 | .SH VERSION 18 | __hhs_git_retag (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_docker_exec.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_docker_exec" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_docker_exec - HomeSetup command. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_docker_exec --help 8 | .fi 9 | .SH DESCRIPTION 10 | HomeSetup command. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | bash: line 12: __hhs_docker_exec: command not found 16 | .fi 17 | .SH VERSION 18 | __hhs_docker_exec (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_docker_info.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_docker_info" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_docker_info - HomeSetup command. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_docker_info --help 8 | .fi 9 | .SH DESCRIPTION 10 | HomeSetup command. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | bash: line 12: __hhs_docker_info: command not found 16 | .fi 17 | .SH VERSION 18 | __hhs_docker_info (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_docker_logs.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_docker_logs" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_docker_logs - HomeSetup command. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_docker_logs --help 8 | .fi 9 | .SH DESCRIPTION 10 | HomeSetup command. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | bash: line 12: __hhs_docker_logs: command not found 16 | .fi 17 | .SH VERSION 18 | __hhs_docker_logs (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_get_codename.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_get_codename" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_get_codename - Get the OS Codename. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_get_codename --help 8 | .fi 9 | .SH DESCRIPTION 10 | Get the OS Codename. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | No additional details captured from --help. 16 | .fi 17 | .SH VERSION 18 | __hhs_get_codename (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_docker_count.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_docker_count" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_docker_count - HomeSetup command. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_docker_count --help 8 | .fi 9 | .SH DESCRIPTION 10 | HomeSetup command. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | bash: line 12: __hhs_docker_count: command not found 16 | .fi 17 | .SH VERSION 18 | __hhs_docker_count (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_git_pull_all.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_git_pull_all" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_git_pull_all - HomeSetup command. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_git_pull_all --help 8 | .fi 9 | .SH DESCRIPTION 10 | HomeSetup command. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | bash: line 12: __hhs_git_pull_all: command not found 16 | .fi 17 | .SH VERSION 18 | __hhs_git_pull_all (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_sysinfo.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_sysinfo" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_sysinfo - Display relevant system information. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_sysinfo 8 | .fi 9 | .SH DESCRIPTION 10 | Display relevant system information. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | No additional details captured from --help. 16 | .fi 17 | .SH VERSION 18 | __hhs_sysinfo (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_git_changelog.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_git_changelog" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_git_changelog - HomeSetup command. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_git_changelog --help 8 | .fi 9 | .SH DESCRIPTION 10 | HomeSetup command. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | bash: line 12: __hhs_git_changelog: command not found 16 | .fi 17 | .SH VERSION 18 | __hhs_git_changelog (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_git_branch_all.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_git_branch_all" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_git_branch_all - HomeSetup command. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_git_branch_all --help 8 | .fi 9 | .SH DESCRIPTION 10 | HomeSetup command. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | bash: line 12: __hhs_git_branch_all: command not found 16 | .fi 17 | .SH VERSION 18 | __hhs_git_branch_all (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_git_status_all.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_git_status_all" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_git_status_all - HomeSetup command. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_git_status_all --help 8 | .fi 9 | .SH DESCRIPTION 10 | HomeSetup command. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | bash: line 12: __hhs_git_status_all: command not found 16 | .fi 17 | .SH VERSION 18 | __hhs_git_status_all (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_docker_kill_all.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_docker_kill_all" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_docker_kill_all - HomeSetup command. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_docker_kill_all --help 8 | .fi 9 | .SH DESCRIPTION 10 | HomeSetup command. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | bash: line 12: __hhs_docker_kill_all: command not found 16 | .fi 17 | .SH VERSION 18 | __hhs_docker_kill_all (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /dotfiles/hhs-bindings: -------------------------------------------------------------------------------- 1 | # HomeSetup Key bindings 2 | 3 | # [TAB] press 4 | TAB: complete 5 | 6 | # [Shift + TAB] press -> menu complete. 7 | "\e[Z": menu-complete 8 | 9 | # Arrows UP & DOWN to search from history. 10 | "\e[A": history-search-backward 11 | "\e[B": history-search-forward 12 | 13 | # bind Alt + Arrows to navigate through words. 14 | # Alt + left 15 | "\e[1;3D": backward-word 16 | "\e\e[D": backward-word 17 | 18 | # Alt + right 19 | "\e[1;3C": forward-word 20 | "\e\e[C": forward-word 21 | 22 | # Launch $EDITOR on the current command and execute when finished editing. 23 | "\ee": edit-and-execute-command 24 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_git_show_changes.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_git_show_changes" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_git_show_changes - HomeSetup command. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_git_show_changes --help 8 | .fi 9 | .SH DESCRIPTION 10 | HomeSetup command. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | bash: line 12: __hhs_git_show_changes: command not found 16 | .fi 17 | .SH VERSION 18 | __hhs_git_show_changes (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_git_branch_select.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_git_branch_select" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_git_branch_select - HomeSetup command. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_git_branch_select --help 8 | .fi 9 | .SH DESCRIPTION 10 | HomeSetup command. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | bash: line 12: __hhs_git_branch_select: command not found 16 | .fi 17 | .SH VERSION 18 | __hhs_git_branch_select (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_git_show_file_diff.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_git_show_file_diff" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_git_show_file_diff - HomeSetup command. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_git_show_file_diff --help 8 | .fi 9 | .SH DESCRIPTION 10 | HomeSetup command. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | bash: line 12: __hhs_git_show_file_diff: command not found 16 | .fi 17 | .SH VERSION 18 | __hhs_git_show_file_diff (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_docker_compose_exec.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_docker_compose_exec" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_docker_compose_exec - HomeSetup command. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_docker_compose_exec --help 8 | .fi 9 | .SH DESCRIPTION 10 | HomeSetup command. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | bash: line 12: __hhs_docker_compose_exec: command not found 16 | .fi 17 | .SH VERSION 18 | __hhs_docker_compose_exec (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_git_branch_previous.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_git_branch_previous" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_git_branch_previous - HomeSetup command. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_git_branch_previous --help 8 | .fi 9 | .SH DESCRIPTION 10 | HomeSetup command. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | bash: line 12: __hhs_git_branch_previous: command not found 16 | .fi 17 | .SH VERSION 18 | __hhs_git_branch_previous (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_shell_select.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_shell_select" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_shell_select - Select a shell from the existing shell list. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_shell_select 8 | .fi 9 | .SH DESCRIPTION 10 | Select a shell from the existing shell list. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | No additional details captured from --help. 16 | .fi 17 | .SH VERSION 18 | __hhs_shell_select (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_partitions.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_partitions" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_partitions - Exhibit a Human readable summary about all partitions. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_partitions 8 | .fi 9 | .SH DESCRIPTION 10 | Exhibit a Human readable summary about all partitions. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | No additional details captured from --help. 16 | .fi 17 | .SH VERSION 18 | __hhs_partitions (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_paths.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_paths" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_paths - Manage your custom PATH entries. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_paths --help 8 | .fi 9 | .SH DESCRIPTION 10 | Manage your custom PATH entries. 11 | .SH ARGUMENTS 12 | .TP 13 | $1..$N (Opt) 14 | Flags and path inputs (see `--help` for options). 15 | .SH DETAILS 16 | .nf 17 | ✘ Fatal: __hhs_paths Invalid option: -- 18 | .fi 19 | .SH VERSION 20 | __hhs_paths (HomeSetup) 1.9.11 21 | .SH AUTHOR 22 | HomeSetup Team 23 | .SH LICENSE 24 | MIT 25 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "label": "Test pprint-xml", 8 | "type": "shell", 9 | "command": "python", 10 | "args": [ 11 | "pprint-xml.py", "samples/unformatted.xml" 12 | ], 13 | "group": "test", 14 | "promptOnClose": false, 15 | "presentation": { 16 | "reveal": "always", 17 | "panel": "new" 18 | }, 19 | "options": { 20 | "cwd": "${workspaceFolder}/bin/apps/py" 21 | } 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_about.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_about" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_about - Display information about the given command. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_about 8 | .fi 9 | .SH DESCRIPTION 10 | Display information about the given command. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The command to check. 15 | .SH DETAILS 16 | .nf 17 | No additional details captured from --help. 18 | .fi 19 | .SH VERSION 20 | __hhs_about (HomeSetup) 1.9.11 21 | .SH AUTHOR 22 | HomeSetup Team 23 | .SH LICENSE 24 | MIT 25 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_active_ifaces.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_active_ifaces" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_active_ifaces - Display a list of active network interfaces. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_active_ifaces [-flat] 8 | .fi 9 | .SH DESCRIPTION 10 | Display a list of active network interfaces. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | No additional details captured from --help. 16 | .fi 17 | .SH VERSION 18 | __hhs_active_ifaces (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_docker_remove_volumes.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_docker_remove_volumes" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_docker_remove_volumes - HomeSetup command. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_docker_remove_volumes --help 8 | .fi 9 | .SH DESCRIPTION 10 | HomeSetup command. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | bash: line 12: __hhs_docker_remove_volumes: command not found 16 | .fi 17 | .SH VERSION 18 | __hhs_docker_remove_volumes (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /.github/workflows/gh-pages.yml: -------------------------------------------------------------------------------- 1 | name: deploy-mkdocs 2 | run-name: Deploy MkDocs 3 | 4 | on: 5 | push: 6 | branches: [ master ] 7 | workflow_dispatch: 8 | 9 | jobs: 10 | deploy: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v4 14 | - uses: actions/setup-python@v5 15 | with: 16 | python-version: 3.x 17 | - run: pip install mkdocs-material 18 | - name: Copy root files 19 | run: | 20 | mkdir -p docs/docs 21 | cp README.md docs/index.md 22 | cp docs/*.md docs/docs/ 23 | find . -name '*.md' 24 | - run: mkdocs gh-deploy --force 25 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_edit.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_edit" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_edit - Create and/or open a file using the default editor. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_edit 8 | .fi 9 | .SH DESCRIPTION 10 | Create and/or open a file using the default editor. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The file path. 15 | .SH DETAILS 16 | .nf 17 | No additional details captured from --help. 18 | .fi 19 | .SH VERSION 20 | __hhs_edit (HomeSetup) 1.9.11 21 | .SH AUTHOR 22 | HomeSetup Team 23 | .SH LICENSE 24 | MIT 25 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_git_show_file_contents.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_git_show_file_contents" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_git_show_file_contents - HomeSetup command. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_git_show_file_contents --help 8 | .fi 9 | .SH DESCRIPTION 10 | HomeSetup command. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | bash: line 12: __hhs_git_show_file_contents: command not found 16 | .fi 17 | .SH VERSION 18 | __hhs_git_show_file_contents (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_activate_jenv.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_activate_jenv" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_activate_jenv - Lazy load helper function to initialize Jenv for the terminal. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_activate_jenv --help 8 | .fi 9 | .SH DESCRIPTION 10 | Lazy load helper function to initialize Jenv for the terminal. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | Activating JENV app... OK 16 | .fi 17 | .SH VERSION 18 | __hhs_activate_jenv (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | end_of_line = lf 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | charset = utf-8 12 | max_line_length = 120 13 | indent_style = space 14 | indent_size = 2 15 | tab_width = 2 16 | 17 | # Matches multiple files with brace expansion notation 18 | 19 | # 4 space indentation 20 | [{*.py,*.txt,*.conf}] 21 | indent_size = 4 22 | tab_width = 4 23 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_toml_groups.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_toml_groups" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_toml_groups - Print all toml file groups (tables). 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_toml_groups 8 | .fi 9 | .SH DESCRIPTION 10 | Print all toml file groups (tables). 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The toml file read from. 15 | .SH DETAILS 16 | .nf 17 | No additional details captured from --help. 18 | .fi 19 | .SH VERSION 20 | __hhs_toml_groups (HomeSetup) 1.9.11 21 | .SH AUTHOR 22 | HomeSetup Team 23 | .SH LICENSE 24 | MIT 25 | -------------------------------------------------------------------------------- /assets/devel/nginx/nginx.conf: -------------------------------------------------------------------------------- 1 | user www-data; 2 | worker_processes auto; 3 | pid /run/nginx.pid; 4 | include /etc/nginx/modules-enabled/*.conf; 5 | 6 | events { 7 | worker_connections 768; 8 | } 9 | 10 | http { 11 | 12 | sendfile on; 13 | tcp_nopush on; 14 | types_hash_max_size 2048; 15 | 16 | include /etc/nginx/mime.types; 17 | default_type application/octet-stream; 18 | 19 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; 20 | ssl_prefer_server_ciphers on; 21 | 22 | access_log /var/log/nginx/access.log; 23 | error_log /var/log/nginx/error.log; 24 | 25 | gzip on; 26 | 27 | include /etc/nginx/conf.d/*.conf; 28 | include /etc/nginx/sites-enabled/*; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_ip_info.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_ip_info" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_ip_info - Retrieve information about the specified IP. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_ip_info 8 | .fi 9 | .SH DESCRIPTION 10 | Retrieve information about the specified IP. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The IP to get information about. 15 | .SH DETAILS 16 | .nf 17 | No additional details captured from --help. 18 | .fi 19 | .SH VERSION 20 | __hhs_ip_info (HomeSetup) 1.9.11 21 | .SH AUTHOR 22 | HomeSetup Team 23 | .SH LICENSE 24 | MIT 25 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_version.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_version" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_version - Check the version of the app using the most common ways. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_version 8 | .fi 9 | .SH DESCRIPTION 10 | Check the version of the app using the most common ways. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The app to check. 15 | .SH DETAILS 16 | .nf 17 | No additional details captured from --help. 18 | .fi 19 | .SH VERSION 20 | __hhs_version (HomeSetup) 1.9.11 21 | .SH AUTHOR 22 | HomeSetup Team 23 | .SH LICENSE 24 | MIT 25 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_ip_lookup.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_ip_lookup" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_ip_lookup - Lookup DNS payload to determine the IP address. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_ip_lookup 8 | .fi 9 | .SH DESCRIPTION 10 | Lookup DNS payload to determine the IP address. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The domain name to lookup. 15 | .SH DETAILS 16 | .nf 17 | No additional details captured from --help. 18 | .fi 19 | .SH VERSION 20 | __hhs_ip_lookup (HomeSetup) 1.9.11 21 | .SH AUTHOR 22 | HomeSetup Team 23 | .SH LICENSE 24 | MIT 25 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_activate_docker.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_activate_docker" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_activate_docker - Lazy load helper function to initialize Docker-Daemon for the terminal. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_activate_docker --help 8 | .fi 9 | .SH DESCRIPTION 10 | Lazy load helper function to initialize Docker-Daemon for the terminal. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | Activating Colima + Docker... 16 | .fi 17 | .SH VERSION 18 | __hhs_activate_docker (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_ascof.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_ascof" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_ascof - Convert string into it's decimal ASCII representation. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_ascof --help 8 | .fi 9 | .SH DESCRIPTION 10 | Convert string into it's decimal ASCII representation. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The string to convert. 15 | .SH DETAILS 16 | .nf 17 | Dec: 045 045 104 101 108 112 18 | Hex: 2 2 68 65 6 70 19 | Str: --help 20 | .fi 21 | .SH VERSION 22 | __hhs_ascof (HomeSetup) 1.9.11 23 | .SH AUTHOR 24 | HomeSetup Team 25 | .SH LICENSE 26 | MIT 27 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_toolcheck.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_toolcheck" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_toolcheck - Check whether a tool is installed on the system. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_toolcheck [options] 8 | .fi 9 | .SH DESCRIPTION 10 | Check whether a tool is installed on the system. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The app to check. 15 | .SH DETAILS 16 | .nf 17 | 18 | Options: 19 | -q : Quiet mode on 20 | .fi 21 | .SH VERSION 22 | __hhs_toolcheck (HomeSetup) 1.9.11 23 | .SH AUTHOR 24 | HomeSetup Team 25 | .SH LICENSE 26 | MIT 27 | -------------------------------------------------------------------------------- /bin/completions/bash/ssh-completion.bash: -------------------------------------------------------------------------------- 1 | # Script: ssh-completion.bash 2 | # Purpose: Bash completion for ssh 3 | # Created: Apr 28, 2020 4 | # Author: Hugo Saporetti Junior 5 | # Mailto: taius.hhs@gmail.com 6 | # Site: https://github.com/yorevs/homesetup 7 | # License: Please refer to 8 | 9 | __ssh_complete() { 10 | 11 | local suggestions=() 12 | 13 | [ "${#COMP_WORDS[@]}" != "2" ] && return 0 14 | 15 | suggestions=($(compgen -W "$(grep '^Host .*' ~/.ssh/config | cut -d ' ' -f2-)" -- "${COMP_WORDS[1]}")) 16 | COMPREPLY=("${suggestions[@]}") 17 | 18 | return 0 19 | } 20 | 21 | complete -o default -F __ssh_complete ssh 22 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_tools.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_tools" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_tools - Check whether a list of development tools are installed or not. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_tools [tool_list] 8 | .fi 9 | .SH DESCRIPTION 10 | Check whether a list of development tools are installed or not. 11 | .SH ARGUMENTS 12 | .TP 13 | $1..$N (Opt) 14 | The tool list to be checked. 15 | .SH DETAILS 16 | .nf 17 | No additional details captured from --help. 18 | .fi 19 | .SH VERSION 20 | __hhs_tools (HomeSetup) 1.9.11 21 | .SH AUTHOR 22 | HomeSetup Team 23 | .SH LICENSE 24 | MIT 25 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_ip_resolve.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_ip_resolve" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_ip_resolve - Resolve domain names associated with the specified IP. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_ip_resolve 8 | .fi 9 | .SH DESCRIPTION 10 | Resolve domain names associated with the specified IP. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The IP address to resolve. 15 | .SH DETAILS 16 | .nf 17 | No additional details captured from --help. 18 | .fi 19 | .SH VERSION 20 | __hhs_ip_resolve (HomeSetup) 1.9.11 21 | .SH AUTHOR 22 | HomeSetup Team 23 | .SH LICENSE 24 | MIT 25 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_activate_nvm.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_activate_nvm" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_activate_nvm - Lazy load helper function to initialize NVM for the terminal. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_activate_nvm --help 8 | .fi 9 | .SH DESCRIPTION 10 | Lazy load helper function to initialize NVM for the terminal. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | Activating NVM app...✘ Fatal: __hhs_activate_nvm FAILED => NVM could not be started ! 16 | .fi 17 | .SH VERSION 18 | __hhs_activate_nvm (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_activate_rvm.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_activate_rvm" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_activate_rvm - Lazy load helper function to initialize RVM for the terminal. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_activate_rvm --help 8 | .fi 9 | .SH DESCRIPTION 10 | Lazy load helper function to initialize RVM for the terminal. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | Activating RVM app...✘ Fatal: __hhs_activate_rvm FAILED => RVM could not be started ! 16 | .fi 17 | .SH VERSION 18 | __hhs_activate_rvm (HomeSetup) 1.9.11 19 | .SH AUTHOR 20 | HomeSetup Team 21 | .SH LICENSE 22 | MIT 23 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_utoh.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_utoh" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_utoh - Convert unicode to hexadecimal. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_utoh <4d-unicode...> 8 | .fi 9 | .SH DESCRIPTION 10 | Convert unicode to hexadecimal. 11 | .SH ARGUMENTS 12 | .TP 13 | $1..$N (Req) 14 | The unicode values to convert. 15 | .SH DETAILS 16 | .nf 17 | 18 | Notes: 19 | - unicode is a four digits hexadecimal number. E.g:. F205 20 | - exceeding digits will be ignored 21 | .fi 22 | .SH VERSION 23 | __hhs_utoh (HomeSetup) 1.9.11 24 | .SH AUTHOR 25 | HomeSetup Team 26 | .SH LICENSE 27 | MIT 28 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_punch.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_punch" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_punch - PUNCH-THE-CLOCK. This is a helper tool to aid with the timesheet. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_punch --help 8 | .fi 9 | .SH DESCRIPTION 10 | PUNCH-THE-CLOCK. This is a helper tool to aid with the timesheet. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Con) 14 | The week list punches from. 15 | .SH DETAILS 16 | .nf 17 | ✘ Fatal: __hhs_punch Not available when HomeSetup python venv is not active! 18 | .fi 19 | .SH VERSION 20 | __hhs_punch (HomeSetup) 1.9.11 21 | .SH AUTHOR 22 | HomeSetup Team 23 | .SH LICENSE 24 | MIT 25 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_defs.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_defs" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_defs - Display all alias definitions using filters. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_defs [regex_filterss] 8 | .fi 9 | .SH DESCRIPTION 10 | Display all alias definitions using filters. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Opt) 14 | If -e is present, edit the .aliasdef file, otherwise a case-insensitive filters to be used when listing. 15 | .SH DETAILS 16 | .nf 17 | No additional details captured from --help. 18 | .fi 19 | .SH VERSION 20 | __hhs_defs (HomeSetup) 1.9.11 21 | .SH AUTHOR 22 | HomeSetup Team 23 | .SH LICENSE 24 | MIT 25 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_hist_stats.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_hist_stats" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_hist_stats - Display statistics about commands in history (aligned + dotted padding) 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_hist_stats [top_N] 8 | .fi 9 | .SH DESCRIPTION 10 | Display statistics about commands in history (aligned + dotted padding) 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Opt) 14 | Limit to the top N commands. 15 | .SH DETAILS 16 | .nf 17 | No additional details captured from --help. 18 | .fi 19 | .SH VERSION 20 | __hhs_hist_stats (HomeSetup) 1.9.11 21 | .SH AUTHOR 22 | HomeSetup Team 23 | .SH LICENSE 24 | MIT 25 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_history.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_history" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_history - Search for previously issued commands from history using filter. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_history [regex_filter] 8 | .fi 9 | .SH DESCRIPTION 10 | Search for previously issued commands from history using filter. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The case-insensitive filter to be used when listing. 15 | .SH DETAILS 16 | .nf 17 | No additional details captured from --help. 18 | .fi 19 | .SH VERSION 20 | __hhs_history (HomeSetup) 1.9.11 21 | .SH AUTHOR 22 | HomeSetup Team 23 | .SH LICENSE 24 | MIT 25 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_tailor.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_tailor" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_tailor - Tail a log using customized colors and patterns. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_tailor [-F | -f | -r] [-q] [-b # | -c # | -n #] 8 | .fi 9 | .SH DESCRIPTION 10 | Tail a log using customized colors and patterns. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The log file name. 15 | .SH DETAILS 16 | .nf 17 | 18 | Notes: 19 | - filename: If not provided, /dev/stdin will be used instead. 20 | .fi 21 | .SH VERSION 22 | __hhs_tailor (HomeSetup) 1.9.11 23 | .SH AUTHOR 24 | HomeSetup Team 25 | .SH LICENSE 26 | MIT 27 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_process_kill.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_process_kill" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_process_kill - Kills ALL processes specified by name 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_process_kill [options] 8 | .fi 9 | .SH DESCRIPTION 10 | Kills ALL processes specified by name 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The process name to kill 15 | .SH DETAILS 16 | .nf 17 | 18 | Options: 19 | -f | --force : Do not prompt for confirmation when killing a process 20 | .fi 21 | .SH VERSION 22 | __hhs_process_kill (HomeSetup) 1.9.11 23 | .SH AUTHOR 24 | HomeSetup Team 25 | .SH LICENSE 26 | MIT 27 | -------------------------------------------------------------------------------- /bin/apps/bash/hhs-app/plugins/hspm/recipes/Darwin/qt.recipe: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | function _install_() { 4 | command brew install qt 5 | local ret=$? 6 | sed -i '' -E -e "s#(^/usr/local/opt/qt/bin$)*##g" -e '/^\s*$/d' "$HHS_PATHS_FILE" 7 | echo '/usr/local/opt/qt/bin' >>"$HHS_PATHS_FILE" 8 | export PATH="/usr/local/opt/qt/bin:$PATH" 9 | if ! command -v qmake >/dev/null; then return 1; fi 10 | 11 | return $ret 12 | } 13 | 14 | function _uninstall_() { 15 | command brew uninstall qt 16 | local ret=$? 17 | sed -i '' -E -e "s#(^/usr/local/opt/qt/bin$)*##g" -e '/^\s*$/d' "$HHS_PATHS_FILE" 18 | export PATH="${PATH//\/usr\/local\/opt\/qt\/bin/}" 19 | if command -v qmake >/dev/null; then return 1; fi 20 | 21 | return $? 22 | } 23 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_pwgen.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_pwgen" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_pwgen - HomeSetup command. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_pwgen --help 8 | .fi 9 | .SH DESCRIPTION 10 | HomeSetup command. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | Password length (default 15) 15 | .TP 16 | $2 (Req) 17 | Password type (1..4 default 4) 18 | .SH DETAILS 19 | .nf 20 | /Users/hjunior/HomeSetup/bin/hhs-functions/bash/hhs-security.bash: line 110: quit: command not found 21 | Password copied to the clipboard! 22 | .fi 23 | .SH VERSION 24 | __hhs_pwgen (HomeSetup) 1.9.11 25 | .SH AUTHOR 26 | HomeSetup Team 27 | .SH LICENSE 28 | MIT 29 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_toml_keys.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_toml_keys" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_toml_keys - Print all toml file group keys (tables). 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_toml_keys [group] 8 | .fi 9 | .SH DESCRIPTION 10 | Print all toml file group keys (tables). 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The toml file read from. 15 | .TP 16 | $2 (Opt) 17 | The group to get the keys from (root if not provided). 18 | .SH DETAILS 19 | .nf 20 | No additional details captured from --help. 21 | .fi 22 | .SH VERSION 23 | __hhs_toml_keys (HomeSetup) 1.9.11 24 | .SH AUTHOR 25 | HomeSetup Team 26 | .SH LICENSE 27 | MIT 28 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_toml_get_all.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_toml_get_all" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_toml_get_all - Print all key=value pairs from a toml group. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_toml_get_all --help 8 | .fi 9 | .SH DESCRIPTION 10 | Print all key=value pairs from a toml group. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The toml file. 15 | .TP 16 | $2 (Opt) 17 | The group (root if omitted). 18 | .SH DETAILS 19 | .nf 20 | ✘ Fatal: __hhs_toml_get_all The file "--help" does not exists or is empty. 21 | .fi 22 | .SH VERSION 23 | __hhs_toml_get_all (HomeSetup) 1.9.11 24 | .SH AUTHOR 25 | HomeSetup Team 26 | .SH LICENSE 27 | MIT 28 | -------------------------------------------------------------------------------- /templates/md/handbook.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # HomeSetup 4 | > 5 | > Description 6 | 7 | ## Table of contents 8 | 9 | 10 | 11 | TODO 12 | 13 | 14 | 15 | ## TITLE 16 | 17 | ------ 18 | 19 | ### __hhs_ 20 | 21 | ```bash 22 | usage: __hhs_ [options] 23 | ``` 24 | 25 | #### **Purpose** 26 | 27 | TODO 28 | 29 | #### **Returns** 30 | 31 | **0** on success; **non-zero** otherwise. 32 | 33 | #### **Parameters** 34 | 35 | - $1 _Required_ : Required parameter. 36 | - $2 _Optional_ : Optional parameter. 37 | 38 | #### **Examples** 39 | 40 | `example command here` 41 | 42 | **Output** 43 | 44 | ```bash 45 | command output 46 | ``` 47 | -------------------------------------------------------------------------------- /bin/apps/bash/hhs-app/plugins/hspm/recipes/Darwin/rvm.recipe: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | function _install_() { 4 | 5 | local ret 6 | 7 | unset rvm RVM_DIR 8 | command brew install gnupg 9 | ret=$? 10 | if [ $ret -eq 0 ]; then 11 | gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB 12 | ret=$? 13 | if [ $ret -eq 0 ]; then 14 | curl -sSL https://get.rvm.io | bash -s stable --ruby 15 | ret=$? 16 | fi 17 | fi 18 | 19 | return $ret 20 | } 21 | 22 | function _uninstall_() { 23 | 24 | local ret 25 | 26 | unset rvm RVM_DIR 27 | command brew uninstall gnupg 28 | rvm implode 29 | [ -d "$RVM_DIR" ] && rm -rf "$RVM_DIR" 30 | 31 | return $ret 32 | } 33 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_minput.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_minput" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_minput - Provide a terminal form input with simple validation. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_errcho 8 | .fi 9 | .SH DESCRIPTION 10 | Provide a terminal form input with simple validation. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The response file. 15 | .TP 16 | $2 (Req) 17 | The render title. 18 | .TP 19 | $3 (Req) 20 | The form fields. 21 | .SH DETAILS 22 | .nf 23 | No additional details captured from --help. 24 | .fi 25 | .SH VERSION 26 | __hhs_minput (HomeSetup) 1.9.11 27 | .SH AUTHOR 28 | HomeSetup Team 29 | .SH LICENSE 30 | MIT 31 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_godir.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_godir" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_godir - Search and cd into the first match of the specified directory name. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_godir [search_path] 8 | .fi 9 | .SH DESCRIPTION 10 | Search and cd into the first match of the specified directory name. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Opt) 14 | The base search path. 15 | .TP 16 | $2 (Req) 17 | The directory glob to search and cd into. 18 | .SH DETAILS 19 | .nf 20 | No additional details captured from --help. 21 | .fi 22 | .SH VERSION 23 | __hhs_godir (HomeSetup) 1.9.11 24 | .SH AUTHOR 25 | HomeSetup Team 26 | .SH LICENSE 27 | MIT 28 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_list_tree.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_list_tree" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_list_tree - List all directories recursively (Nth level depth) as a tree. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_list_tree [dir] [max_depth] 8 | .fi 9 | .SH DESCRIPTION 10 | List all directories recursively (Nth level depth) as a tree. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Opt) 14 | The directory to list from. 15 | .TP 16 | $2 (Opt) 17 | The max level depth to walk into. 18 | .SH DETAILS 19 | .nf 20 | No additional details captured from --help. 21 | .fi 22 | .SH VERSION 23 | __hhs_list_tree (HomeSetup) 1.9.11 24 | .SH AUTHOR 25 | HomeSetup Team 26 | .SH LICENSE 27 | MIT 28 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_highlight.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_highlight" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_highlight - Highlight words from the piped stream. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_highlight [filename] 8 | .fi 9 | .SH DESCRIPTION 10 | Highlight words from the piped stream. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The word to highlight. 15 | .TP 16 | $2 (Opt) 17 | The optional filename (uses stdin if omitted). 18 | .SH DETAILS 19 | .nf 20 | 21 | Notes: 22 | filename: If not provided, stdin will be used instead. 23 | .fi 24 | .SH VERSION 25 | __hhs_highlight (HomeSetup) 1.9.11 26 | .SH AUTHOR 27 | HomeSetup Team 28 | .SH LICENSE 29 | MIT 30 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_random.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_random" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_random - Generate a random number int the range (all limits included). 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_random 8 | .fi 9 | .SH DESCRIPTION 10 | Generate a random number int the range (all limits included). 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The minimum range of the number. 15 | .TP 16 | $2 (Req) 17 | The maximum range of the number. 18 | .SH DETAILS 19 | .nf 20 | No additional details captured from --help. 21 | .fi 22 | .SH VERSION 23 | __hhs_random (HomeSetup) 1.9.11 24 | .SH AUTHOR 25 | HomeSetup Team 26 | .SH LICENSE 27 | MIT 28 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_toml_get.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_toml_get" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_toml_get - Get the key's value from a toml file. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_toml_get [group] 8 | .fi 9 | .SH DESCRIPTION 10 | Get the key's value from a toml file. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The toml file read from. 15 | .TP 16 | $2 (Req) 17 | The key to get. 18 | .TP 19 | $3 (Opt) 20 | The group to get the key from (root if not provided). 21 | .SH DETAILS 22 | .nf 23 | No additional details captured from --help. 24 | .fi 25 | .SH VERSION 26 | __hhs_toml_get (HomeSetup) 1.9.11 27 | .SH AUTHOR 28 | HomeSetup Team 29 | .SH LICENSE 30 | MIT 31 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_changeback_ndirs.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_changeback_ndirs" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_changeback_ndirs - Change back the current working directory by N directories. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_changeback_ndirs [amount] 8 | .fi 9 | .SH DESCRIPTION 10 | Change back the current working directory by N directories. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Opt) 14 | The amount of directories to change backwards. If not provided, default is one. 15 | .SH DETAILS 16 | .nf 17 | No additional details captured from --help. 18 | .fi 19 | .SH VERSION 20 | __hhs_changeback_ndirs (HomeSetup) 1.9.11 21 | .SH AUTHOR 22 | HomeSetup Team 23 | .SH LICENSE 24 | MIT 25 | -------------------------------------------------------------------------------- /tests/stubs/gpg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | fail_mode="${HHS_GPG_FAIL_MODE:-}" 3 | has_encrypt=0 4 | for arg in "$@"; do 5 | if [[ "$arg" == "-c" ]]; then 6 | has_encrypt=1 7 | break 8 | fi 9 | done 10 | if [[ "$fail_mode" == "all" ]]; then 11 | exit 1 12 | elif [[ "$fail_mode" == "encrypt" && "$has_encrypt" -eq 1 ]]; then 13 | exit 1 14 | elif [[ "$fail_mode" == "decrypt" && "$has_encrypt" -eq 0 ]]; then 15 | exit 1 16 | fi 17 | file="${@: -1}" 18 | if [[ "$has_encrypt" -eq 1 ]]; then 19 | # Simulate gpg symmetric encryption by creating the .gpg artifact. 20 | [[ -f "$file" ]] && cp "$file" "${file}.gpg" || : 21 | else 22 | # Simulate decryption by restoring the original file name. 23 | out="${file%.gpg}" 24 | [[ -f "$file" ]] && cp "$file" "$out" || : 25 | fi 26 | exit 0 27 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_repeat.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_repeat" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_repeat - Repeat the last N commands from history, executing one-by-one, stop on failure. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_repeat [N] 8 | .fi 9 | .SH DESCRIPTION 10 | Repeat the last N commands from history, executing one-by-one, stop on failure. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Opt) 14 | Number of commands to repeat; defaults to 1. 15 | .SH DETAILS 16 | .nf 17 | 18 | Arguments: 19 | : A positive number of last commands from history to repeat. 20 | .fi 21 | .SH VERSION 22 | __hhs_repeat (HomeSetup) 1.9.11 23 | .SH AUTHOR 24 | HomeSetup Team 25 | .SH LICENSE 26 | MIT 27 | -------------------------------------------------------------------------------- /bin/apps/bash/hhs-app/plugins/hspm/recipes/Darwin/default.recipe: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # shellcheck disable=SC2068 3 | 4 | function _about_() { 5 | echo "This is the default recipe and will be used when no recipe is found the specified package" 6 | return 0 7 | } 8 | 9 | function _which_() { 10 | 11 | if command -v ${@} &>/dev/null || "${HHS_MY_OS_PACKMAN}" info ${@} &>/dev/null; then 12 | return 0 13 | fi 14 | 15 | return 1 16 | } 17 | 18 | function _depends_() { 19 | 20 | return 0 21 | } 22 | 23 | function _install_() { 24 | 25 | if "${HHS_MY_OS_PACKMAN}" install ${@}; then 26 | return 0 27 | fi 28 | 29 | return 1 30 | } 31 | 32 | function _uninstall_() { 33 | 34 | if "${HHS_MY_OS_PACKMAN}" uninstall ${@}; then 35 | return 0 36 | fi 37 | 38 | return 1 39 | } 40 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_search_file.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_search_file" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_search_file - Search for files and links to files recursively. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_search_file [file_globs...] 8 | .fi 9 | .SH DESCRIPTION 10 | Search for files and links to files recursively. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The base search path. 15 | .TP 16 | $2 (Req) 17 | The search glob expressions. 18 | .SH DETAILS 19 | .nf 20 | 21 | Notes: 22 | - : Comma separated globs. E.g: "*.txt,*.md,*.rtf" 23 | .fi 24 | .SH VERSION 25 | __hhs_search_file (HomeSetup) 1.9.11 26 | .SH AUTHOR 27 | HomeSetup Team 28 | .SH LICENSE 29 | MIT 30 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_toml_set.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_toml_set" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_toml_set - Set the key's value from a toml file. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_toml_set [group] 8 | .fi 9 | .SH DESCRIPTION 10 | Set the key's value from a toml file. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The toml file read from.. 15 | .TP 16 | $2 (Req) 17 | The key to set on the form: key=value 18 | .TP 19 | $3 (Opt) 20 | The group to set the key from (root if not provided). 21 | .SH DETAILS 22 | .nf 23 | No additional details captured from --help. 24 | .fi 25 | .SH VERSION 26 | __hhs_toml_set (HomeSetup) 1.9.11 27 | .SH AUTHOR 28 | HomeSetup Team 29 | .SH LICENSE 30 | MIT 31 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_encrypt_file.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_encrypt_file" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_encrypt_file - Encrypt file using GPG. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_encrypt_file [--keep] 8 | .fi 9 | .SH DESCRIPTION 10 | Encrypt file using GPG. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The file to encrypt. 15 | .TP 16 | $2 (Req) 17 | The passphrase used to encrypt the file. 18 | .TP 19 | $3 (Opt) 20 | If provided, keeps the decrypted file, delete it otherwise. 21 | .SH DETAILS 22 | .nf 23 | No additional details captured from --help. 24 | .fi 25 | .SH VERSION 26 | __hhs_encrypt_file (HomeSetup) 1.9.11 27 | .SH AUTHOR 28 | HomeSetup Team 29 | .SH LICENSE 30 | MIT 31 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_decrypt_file.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_decrypt_file" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_decrypt_file - Decrypt a GPG encrypted file. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_decrypt_file [--keep] 8 | .fi 9 | .SH DESCRIPTION 10 | Decrypt a GPG encrypted file. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The file to decrypt. 15 | .TP 16 | $2 (Req) 17 | The passphrase used to decrypt the file. 18 | .TP 19 | $3 (Opt) 20 | If provided, keeps the encrypted file, delete it otherwise. 21 | .SH DETAILS 22 | .nf 23 | No additional details captured from --help. 24 | .fi 25 | .SH VERSION 26 | __hhs_decrypt_file (HomeSetup) 1.9.11 27 | .SH AUTHOR 28 | HomeSetup Team 29 | .SH LICENSE 30 | MIT 31 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_mkcd.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_mkcd" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_mkcd - Create all folders using a slash or dot notation path and immediately change into it. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_mkcd 8 | .fi 9 | .SH DESCRIPTION 10 | Create all folders using a slash or dot notation path and immediately change into it. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The directory tree to create, using slash (/) or dot (.) notation path. 15 | .SH DETAILS 16 | .nf 17 | 18 | E.g:. __hhs_mkcd dir1/dir2/dir3 (dirtree) 19 | E.g:. __hhs_mkcd dir1.dir2.dir3 (FQDN) 20 | .fi 21 | .SH VERSION 22 | __hhs_mkcd (HomeSetup) 1.9.11 23 | .SH AUTHOR 24 | HomeSetup Team 25 | .SH LICENSE 26 | MIT 27 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_search_dir.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_search_dir" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_search_dir - Search for directories and links to directories recursively. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_search_dir [dir_globs...] 8 | .fi 9 | .SH DESCRIPTION 10 | Search for directories and links to directories recursively. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The base search path. 15 | .TP 16 | $2 (Opt) 17 | The search glob expressions. 18 | .SH DETAILS 19 | .nf 20 | 21 | Notes: 22 | - : Comma separated directories. E.g:. "dir1,dir2,dir2" 23 | .fi 24 | .SH VERSION 25 | __hhs_search_dir (HomeSetup) 1.9.11 26 | .SH AUTHOR 27 | HomeSetup Team 28 | .SH LICENSE 29 | MIT 30 | -------------------------------------------------------------------------------- /bin/apps/bash/hhs-app/plugins/hspm/recipes/Linux/ollama.recipe: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # shellcheck disable=SC2068 3 | 4 | function _which_() { 5 | if command -v ollama &>/dev/null; then 6 | return 0 7 | fi 8 | return 1 9 | } 10 | 11 | function _install_() { 12 | local pkg_url 13 | local install_script="/tmp/ollama-install.sh" 14 | 15 | pkg_url="https://ollama.com/download/OllamaInstall.sh" 16 | 17 | if curl -fsSL "$pkg_url" -o "$install_script"; then 18 | chmod +x "$install_script" 19 | if bash "$install_script"; then 20 | rm -f "$install_script" 21 | return 0 22 | fi 23 | fi 24 | 25 | rm -f "$install_script" 26 | 27 | return 1 28 | } 29 | 30 | function _uninstall_() { 31 | if command -v ollama &>/dev/null; then 32 | ollama uninstall 33 | return 0 34 | fi 35 | 36 | return 1 37 | } 38 | -------------------------------------------------------------------------------- /assets/hhs-tailor-settings.csv: -------------------------------------------------------------------------------- 1 | uuid,name,value,settings type,modified 2 | 17227c35c11a46e58cc721465831fbbc,hhs.tailor.date.fmt.color,violet,environment,2023-07-26 20:59:38 3 | 67f057cbfb144708b119519dc7d91faf,hhs.tailor.fqdn.color,cyan,environment,2023-07-26 20:59:19 4 | 4e6ebcffc269413387edb7d52e6802de,hhs.tailor.level.debug.color,white,environment,2023-07-26 20:58:11 5 | 70a2232043b648ab9a21adda91872754,hhs.tailor.level.error.color,red,environment,2023-07-26 20:58:40 6 | f869b91ac3214247b874b1b97cb55c10,hhs.tailor.level.info.color,green,environment,2023-07-26 20:57:49 7 | c8e84a4182fd46ffbf288138219d8155,hhs.tailor.level.warn.color,yellow,environment,2023-07-26 20:58:24 8 | d5e6c65884ed4e11b9d93e8eca563868,hhs.tailor.thread.name.color,purple,environment,2023-07-26 20:58:57 9 | 35d10e6063224057a154f7592c3050b9,hhs.tailor.uri.color,blue,environment,2023-07-26 20:59:53 10 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_venv.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_venv" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_venv - Activate/Deactivate the HomeSetup python venv. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_venv [-a|-d|-t] 8 | .fi 9 | .SH DESCRIPTION 10 | Activate/Deactivate the HomeSetup python venv. 11 | .SH ARGUMENTS 12 | None. 13 | .SH DETAILS 14 | .nf 15 | 16 | Options: 17 | -a | --activate : Makes the venv active. 18 | -d | --deactivate : Makes the venv inactive. 19 | -t | --toggle : Toggles the venv between active/inactive. 20 | 21 | Notes: 22 | - if no option is specified, it will check whether it is active/inactive. 23 | .fi 24 | .SH VERSION 25 | __hhs_venv (HomeSetup) 1.9.11 26 | .SH AUTHOR 27 | HomeSetup Team 28 | .SH LICENSE 29 | MIT 30 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_du.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_du" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_du - Display 'du' output formatted as a horizontal bar chart (auto unit scaling). 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_du [path] [top_N] [width] 8 | .fi 9 | .SH DESCRIPTION 10 | Display 'du' output formatted as a horizontal bar chart (auto unit scaling). 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Opt) 14 | Directory path (default: current directory) 15 | .TP 16 | $2 (Opt) 17 | Number of top entries to display (default: 10) 18 | .TP 19 | $3 (Opt) 20 | Chart bar width scaling factor (default: 30) 21 | .SH DETAILS 22 | .nf 23 | No additional details captured from --help. 24 | .fi 25 | .SH VERSION 26 | __hhs_du (HomeSetup) 1.9.11 27 | .SH AUTHOR 28 | HomeSetup Team 29 | .SH LICENSE 30 | MIT 31 | -------------------------------------------------------------------------------- /docs/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## [Bug/Feature] description 2 | 3 | Describe the problem or the feature concisely. 4 | 5 | ## Solution description 6 | 7 | Describe your code changes in details for the reviewers. 8 | Explain the technical solution you have provided. 9 | If is a BUGFIX, how it fixes the issue. 10 | If it is a feature, explain how it achieves the goal. 11 | 12 | ## Please mark what kind of HHS changes you provided 13 | 14 | [ ] Dotfiles 15 | [ ] Functions 16 | [ ] Aliases 17 | [ ] Applications 18 | [ ] Other 19 | 20 | ## Please mark what kind of tests you provided 21 | 22 | [ ] Python unit tests 23 | [ ] Bash tests using bats 24 | 25 | ## Did you test you code on 26 | 27 | [ ] MacOS 28 | [ ] Ubuntu 29 | [ ] CentOS 30 | [ ] Fedora 31 | 32 | ## Did you modify the installation/uninstallation scripts ? 33 | 34 | [ ] Installation 35 | [ ] Uninstallation 36 | [ ] None of them 37 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_envs.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_envs" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_envs - Display all environment variables using filters. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_envs [options] [regex_filters] 8 | .fi 9 | .SH DESCRIPTION 10 | Display all environment variables using filters. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Opt) 14 | If -e is present, edit the env file. 15 | .TP 16 | $* (Opt) 17 | Filter string(s). Use -r to reveal secret values. 18 | .SH DETAILS 19 | .nf 20 | 21 | Options: 22 | -e Edit current HHS_ENV_FILE. 23 | -r, --reveal Show secret values (not masked). 24 | -h, --help Show this help message. 25 | .fi 26 | .SH VERSION 27 | __hhs_envs (HomeSetup) 1.9.11 28 | .SH AUTHOR 29 | HomeSetup Team 30 | .SH LICENSE 31 | MIT 32 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_save_dir.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_save_dir" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_save_dir - Save one directory path for future __hhs_load. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_save_dir -e | [-r] | 8 | .fi 9 | .SH DESCRIPTION 10 | Save one directory path for future __hhs_load. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Con) 14 | The directory path to save or the alias to be removed. 15 | .TP 16 | $2 (Con) 17 | The alias to name the saved path. 18 | .SH DETAILS 19 | .nf 20 | 21 | Options: 22 | -e : Edit the saved dirs file. 23 | -r : Remove saved dir. 24 | -c : Cleanup directory paths that does not exist. 25 | .fi 26 | .SH VERSION 27 | __hhs_save_dir (HomeSetup) 1.9.11 28 | .SH AUTHOR 29 | HomeSetup Team 30 | .SH LICENSE 31 | MIT 32 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report. 3 | about: Create a report to help us improve. 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Call function/application '....' 17 | 3. Loading dotfiles ... 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Shell script (please complete the following information):** 27 | - OS: [e.g. macOS, Ubuntu, Fedora, CentOS, Alpine] 28 | - Version [e.g. 22] 29 | 30 | **Python (please complete the following information):** 31 | - Version [e.g. 2.7+, 3.0+] 32 | 33 | **Additional context** 34 | Add any other context about the problem here. 35 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_load_dir.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_load_dir" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_load_dir - Change the current working directory to pre-saved entry from __hhs_save. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_load_dir [-l] | [dir_alias] 8 | .fi 9 | .SH DESCRIPTION 10 | Change the current working directory to pre-saved entry from __hhs_save. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Opt) 14 | The alias to access the directory saved. 15 | .SH DETAILS 16 | .nf 17 | 18 | Options: 19 | [dir_alias] : The alias to load the path from. 20 | -l : If provided, list all saved dirs instead. 21 | 22 | Notes: 23 | MSelect default : If no arguments is provided, a menu with options will be displayed. 24 | .fi 25 | .SH VERSION 26 | __hhs_load_dir (HomeSetup) 1.9.11 27 | .SH AUTHOR 28 | HomeSetup Team 29 | .SH LICENSE 30 | MIT 31 | -------------------------------------------------------------------------------- /assets/colorls/hhs-preset/light_colors.yaml: -------------------------------------------------------------------------------- 1 | # Main Colors 2 | unrecognized_file: darkred 3 | recognized_file: darkgreen 4 | executable_file: green 5 | dir: navyblue 6 | 7 | # Link 8 | dead_link: red 9 | link: cyan 10 | 11 | # special files 12 | socket: darkgray 13 | blockdev: darkgray 14 | chardev: darkgray 15 | 16 | # Access Modes 17 | write: red 18 | read: sienna 19 | exec: navyblue 20 | no_access: black 21 | 22 | # Age 23 | day_old: darkred 24 | hour_old: saddlebrown 25 | no_modifier: black 26 | 27 | # File Size 28 | file_large: darkred 29 | file_medium: saddlebrown 30 | file_small: black 31 | 32 | # Random 33 | report: black 34 | user: darkblue 35 | tree: cyan 36 | empty: yellow 37 | error: red 38 | normal: black 39 | inode: black 40 | 41 | # Git 42 | addition: chartreuse 43 | modification: darkkhaki 44 | deletion: darkred 45 | untracked: darkorange 46 | unchanged: darkgreen 47 | -------------------------------------------------------------------------------- /assets/colorls/orig-preset/light_colors.yaml: -------------------------------------------------------------------------------- 1 | # Main Colors 2 | unrecognized_file: darkred 3 | recognized_file: darkgreen 4 | executable_file: green 5 | dir: navyblue 6 | 7 | # Link 8 | dead_link: red 9 | link: cyan 10 | 11 | # special files 12 | socket: darkgray 13 | blockdev: darkgray 14 | chardev: darkgray 15 | 16 | # Access Modes 17 | write: red 18 | read: sienna 19 | exec: navyblue 20 | no_access: black 21 | 22 | # Age 23 | day_old: darkred 24 | hour_old: saddlebrown 25 | no_modifier: black 26 | 27 | # File Size 28 | file_large: darkred 29 | file_medium: saddlebrown 30 | file_small: black 31 | 32 | # Random 33 | report: black 34 | user: darkblue 35 | tree: cyan 36 | empty: yellow 37 | error: red 38 | normal: black 39 | inode: black 40 | 41 | # Git 42 | addition: chartreuse 43 | modification: darkkhaki 44 | deletion: darkred 45 | untracked: darkorange 46 | unchanged: darkgreen 47 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_port_check.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_port_check" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_port_check - Check the state of local port(s). 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_port_check [port_state] [protocol] 8 | .fi 9 | .SH DESCRIPTION 10 | Check the state of local port(s). 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The port number regex. 15 | .TP 16 | $2 (Opt) 17 | The port state to match. 18 | .SH DETAILS 19 | .nf 20 | 21 | Notes: 22 | - Protocol: One of [tcp udp] 23 | - States: One of [CLOSED|LISTEN|SYN_SENT|SYN_RCVD|ESTABLISHED|CLOSE_WAIT|LAST_ACK|FIN_WAIT_1|FIN_WAIT_2|CLOSING|TIME_WAIT] 24 | - Wildcards: Use dots (.) as a wildcard. E.g: 80.. will match 80[0-9][0-9] 25 | .fi 26 | .SH VERSION 27 | __hhs_port_check (HomeSetup) 1.9.11 28 | .SH AUTHOR 29 | HomeSetup Team 30 | .SH LICENSE 31 | MIT 32 | -------------------------------------------------------------------------------- /assets/colorls/hhs-preset/dark_colors.yaml: -------------------------------------------------------------------------------- 1 | # Main Colors 2 | unrecognized_file: white 3 | recognized_file: white 4 | executable_file: limegreen 5 | dir: royalblue 6 | 7 | # Link 8 | dead_link: orange 9 | link: cyan 10 | 11 | # special files 12 | socket: lightseagreen 13 | blockdev: lightseagreen 14 | chardev: lightseagreen 15 | 16 | # Access Modes 17 | write: white 18 | read: white 19 | exec: white 20 | no_access: white 21 | 22 | # Age 23 | day_old: white 24 | hour_old: white 25 | no_modifier: white 26 | 27 | # File Size 28 | file_large: white 29 | file_medium: white 30 | file_small: white 31 | 32 | # Random 33 | report: white 34 | user: white 35 | size: white 36 | tree: white 37 | empty: white 38 | error: white 39 | normal: white 40 | inode: white 41 | 42 | # Git 43 | addition: purple 44 | modification: orange 45 | deletion: darkred 46 | untracked: purple 47 | unchanged: limegreen 48 | -------------------------------------------------------------------------------- /assets/colorls/orig-preset/dark_colors.yaml: -------------------------------------------------------------------------------- 1 | # Main Colors 2 | unrecognized_file: gold 3 | recognized_file: yellow 4 | executable_file: lime 5 | dir: dodgerblue 6 | 7 | # Link 8 | dead_link: red 9 | link: cyan 10 | 11 | # special files 12 | socket: green 13 | blockdev: green 14 | chardev: green 15 | 16 | # Access Modes 17 | write: darkkhaki 18 | read: limegreen 19 | exec: red 20 | no_access: indianred 21 | 22 | # Age 23 | day_old: mediumspringgreen 24 | hour_old: lime 25 | no_modifier: seagreen 26 | 27 | # File Size 28 | file_large: orange 29 | file_medium: gold 30 | file_small: peachpuff 31 | 32 | # Random 33 | report: white 34 | user: moccasin 35 | tree: cyan 36 | empty: yellow 37 | error: red 38 | normal: darkkhaki 39 | inode: moccasin 40 | 41 | # Git 42 | addition: chartreuse 43 | modification: darkkhaki 44 | deletion: darkred 45 | untracked: darkorange 46 | unchanged: forestgreen 47 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_del_tree.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_del_tree" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_del_tree - Move files recursively to the Trash. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_del_tree [-n|-f|-i] 8 | .fi 9 | .SH DESCRIPTION 10 | Move files recursively to the Trash. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The GLOB expression of the file/directory search. 15 | .SH DETAILS 16 | .nf 17 | 18 | Options: 19 | -n | --dry-run : Just show what would be deleted instead of removing it. 20 | -f | --force : Actually delete all files/directories it finds. 21 | -i | --interactive : Interactive deleting files/directories. 22 | Notes: 23 | - If no option is specified, dry-run is default. 24 | .fi 25 | .SH VERSION 26 | __hhs_del_tree (HomeSetup) 1.9.11 27 | .SH AUTHOR 28 | HomeSetup Team 29 | .SH LICENSE 30 | MIT 31 | -------------------------------------------------------------------------------- /docker/fedora/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM fedora:latest 2 | 3 | LABEL maintainer="Hugo Saporetti Junior " 4 | 5 | USER root 6 | 7 | ENV SHELL=/bin/bash 8 | ENV HOME=/root 9 | 10 | # Update and install base system 11 | RUN dnf -y upgrade && \ 12 | dnf -y install \ 13 | sudo redhat-rpm-config curl vim git findutils procps-ng hostname uptimed glibc-langpack-en \ 14 | gcc postgresql-devel rsync file cmake ruby ruby-devel xclip net-tools \ 15 | bat fd-find fzf gawk \ 16 | python3.11 python3.11-devel portaudio-devel ffmpeg && \ 17 | dnf clean all 18 | 19 | # Ruby gem install 20 | RUN gem install colorls 21 | 22 | # Pip installer 23 | RUN curl -sS https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ 24 | python3.11 get-pip.py && \ 25 | rm -f get-pip.py 26 | 27 | WORKDIR /root 28 | 29 | # HomeSetup installation 30 | RUN curl -fsSL https://raw.githubusercontent.com/yorevs/homesetup/master/install.bash | bash 31 | 32 | CMD ["bash", "--login"] 33 | -------------------------------------------------------------------------------- /bin/apps/bash/hhs-app/plugins/hspm/recipes/Darwin/nvm.recipe: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # shellcheck disable=SC1090 4 | [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" 5 | 6 | function _install_() { 7 | 8 | local ret 9 | 10 | unset nvm 11 | unset NVM_DIR 12 | 13 | if curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash; then 14 | ret=$? 15 | export NVM_DIR="${HOME}/.nvm" 16 | [ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh" 17 | [ -s "$NVM_DIR/nvm.sh" ] && "$NVM_DIR/nvm.sh" install N/A 18 | return 0 19 | fi 20 | 21 | return 1 22 | } 23 | 24 | function _uninstall_() { 25 | 26 | local ret 27 | 28 | [ -d "$NVM_DIR" ] && rm -rf "${NVM_DIR?}" &> /dev/null 29 | ret=$? 30 | unset nvm 31 | unset NVM_DIR 32 | 33 | [ -d "${HOME}/.nvm" ] && rm -rf "${HOME?}/.nvm" &> /dev/null 34 | [ -d "${HOME}/.npm" ] && rm -rf "${HOME?}/.npm" &> /dev/null 35 | [ -d "${HOME}/.bower" ] && rm -rf "${HOME?}/.bower" &> /dev/null 36 | 37 | return $ret 38 | } 39 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_change_dir.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_change_dir" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_change_dir - Change the current working directory to a specific Folder. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_change_dir [-L|-P] [dirname] 8 | .fi 9 | .SH DESCRIPTION 10 | Change the current working directory to a specific Folder. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Opt) 14 | [-L|-P] whether to follow (-L) or not (-P) symbolic links. 15 | .TP 16 | $2 (Opt) 17 | The directory to change. If not provided, default DIR is the value of the HOME variable. 18 | .SH DETAILS 19 | .nf 20 | 21 | Options: 22 | -L : Follow symbolic links. 23 | -P : Don't follow symbolic links. 24 | 25 | Notes: 26 | - dirname: The directory to change. If not provided, default is the user's home directory 27 | .fi 28 | .SH VERSION 29 | __hhs_change_dir (HomeSetup) 1.9.11 30 | .SH AUTHOR 31 | HomeSetup Team 32 | .SH LICENSE 33 | MIT 34 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_ip.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_ip" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_ip - Display the associated machine IP of the given kind. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_ip [kind] 8 | .fi 9 | .SH DESCRIPTION 10 | Display the associated machine IP of the given kind. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Opt) 14 | The kind of IP to get. 15 | .SH DETAILS 16 | .nf 17 | 18 | Arguments: 19 | type : The kind of IP to get. One of [all|local|external|gateway|vpn] 20 | 21 | Types: 22 | all : Get all network IPv4 23 | local : Get your local network IPv4 24 | external : Get your external network IPv4 25 | gateway : Get the gateway IPv4 26 | vpn : Get your IPv4 assigned by your VPN server 27 | 28 | Notes: 29 | - If no kind is specified, all assigned IPv4s will be retrieved 30 | .fi 31 | .SH VERSION 32 | __hhs_ip (HomeSetup) 1.9.11 33 | .SH AUTHOR 34 | HomeSetup Team 35 | .SH LICENSE 36 | MIT 37 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_aliases.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_aliases" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_aliases - Manipulate custom aliases (add/remove/edit/list). 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_aliases 8 | .fi 9 | .SH DESCRIPTION 10 | Manipulate custom aliases (add/remove/edit/list). 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The alias name. 15 | .TP 16 | $2 (Opt) 17 | The alias expression. 18 | .SH DETAILS 19 | .nf 20 | 21 | Options: 22 | -l | --list : List all custom aliases. 23 | -e | --edit : Open the aliases file for editing. 24 | -r | --remove : Remove an alias. 25 | 26 | Notes: 27 | - List all aliases : When [alias_expr] is NOT provided. If [alias] is provided, filter results using it. 28 | - Add/Set an alias : When both [alias] and [alias_expr] are provided. 29 | .fi 30 | .SH VERSION 31 | __hhs_aliases (HomeSetup) 1.9.11 32 | .SH AUTHOR 33 | HomeSetup Team 34 | .SH LICENSE 35 | MIT 36 | -------------------------------------------------------------------------------- /gradle/idea.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | Gradle IDEA extension 3 | 4 | Created: 18th April, 2023 5 | License: MIT - Please refer to 6 | Copyright (c) 2025, HomeSetup team 7 | */ 8 | 9 | /* Export Run Configurations */ 10 | task exportRunConfigurations(type: Copy) { 11 | group = 'Idea' 12 | description = "Export run configurations" 13 | from("${rootDir}/.idea/runConfigurations") { 14 | include '*.xml' 15 | } 16 | into "${rootDir}/run-configs/idea" 17 | } 18 | 19 | /* Import Run Configurations */ 20 | task importRunConfigurations(type: Copy) { 21 | group = 'Idea' 22 | description = "Import run configurations" 23 | from("${rootDir}/run-configs/idea") { 24 | include '*.xml' 25 | } 26 | into "${rootDir}/.idea/runConfigurations" 27 | } 28 | 29 | /* Clear Run Configurations */ 30 | task clearRunConfigurations(type: Delete) { 31 | group = 'Idea' 32 | description = "Delete all run configurations" 33 | delete fileTree("${rootDir}/.idea/runConfigurations") { 34 | include "**/*.xml" 35 | } 36 | followSymlinks = true 37 | } 38 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_process_list.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_process_list" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_process_list - Display a process list matching the process name/expression. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_process_list [options] 8 | .fi 9 | .SH DESCRIPTION 10 | Display a process list matching the process name/expression. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The process name to check. 15 | .TP 16 | $2 (Opt) 17 | Whether to kill all found processes. 18 | .SH DETAILS 19 | .nf 20 | 21 | Options: 22 | -k, --kill : When specified, attempts to kill the processes it finds 23 | -i, --ignore-case : Make case insensitive search 24 | -w, --words : Match full words only 25 | -f, --force : Do not prompt when killing processes 26 | -q, --quiet : Make the operation less talkative 27 | .fi 28 | .SH VERSION 29 | __hhs_process_list (HomeSetup) 1.9.11 30 | .SH AUTHOR 31 | HomeSetup Team 32 | .SH LICENSE 33 | MIT 34 | -------------------------------------------------------------------------------- /bin/dev-tools/bash/hhs-gradle-tools.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Script: hhs-gradle-tools.bash 4 | # Created: Oct 6, 2019 5 | # Author: Hugo Saporetti Junior 6 | # Mailto: taius.hhs@gmail.com 7 | # Site: https://github.com/yorevs/homesetup 8 | # License: Please refer to 9 | # 10 | # Copyright (c) 2025, HomeSetup team 11 | 12 | # !NOTICE: Do not change this file. To customize your functions edit the file ~/.functions 13 | 14 | if __hhs_has "gradle"; then 15 | 16 | # @function: Prefer using the wrapper instead of the installed command itself. 17 | # @param $1..$N [Req] : The gradle arguments to call. 18 | function __hhs_gradle() { 19 | if [[ '-h' == "$1" || '--help' == "$1" ]]; then 20 | echo "usage: ${FUNCNAME[0]} [gradle_args]" 21 | return 1 22 | elif [[ -f "./gradlew" ]]; then 23 | echo "./gradlew ${*}" 24 | ./gradlew "$@" 25 | else 26 | echo "gradle ${*}" 27 | \gradle "$@" 28 | fi 29 | 30 | return $? 31 | } 32 | else 33 | __hhs_log WARN "Gradle is not installed on your system." 34 | fi 35 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2025, HomeSetup team 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_command.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_command" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_command - Add/Remove/List/Execute saved bash commands. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_command [options [cmd_alias] ] | [cmd_index] 8 | .fi 9 | .SH DESCRIPTION 10 | Add/Remove/List/Execute saved bash commands. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Opt) 14 | The command index or alias. 15 | .TP 16 | $2..$N (Con) 17 | The command expression. This is required when alias is provided. 18 | .SH DETAILS 19 | .nf 20 | 21 | Options: 22 | [cmd_index] : Execute the command specified by the command index. 23 | -e | --edit : Edit the commands file. 24 | -a | --add : Store a command. 25 | -r | --remove : Remove a command. 26 | -l | --list : List all saved commands. 27 | 28 | Notes: 29 | MSelect default : When no arguments is provided, a menu with options will be displayed. 30 | .fi 31 | .SH VERSION 32 | __hhs_command (HomeSetup) 1.9.11 33 | .SH AUTHOR 34 | HomeSetup Team 35 | .SH LICENSE 36 | MIT 37 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_dirs.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_dirs" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_dirs - Display the list of currently remembered directories or select one to switch into. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_dirs [OPTION] 8 | .fi 9 | .SH DESCRIPTION 10 | Display the list of currently remembered directories or select one to switch into. 11 | .SH ARGUMENTS 12 | .TP 13 | $1..$N (Opt) 14 | Optional flags or arguments passed to the builtin 'dirs' command. 15 | .SH DETAILS 16 | .nf 17 | 18 | Options: 19 | -c : Clear the directory stack 20 | -s : List the directory stack (space separated and absolute paths) 21 | -l : List all remembered directories (stack + dirs file) (decorated absolute paths) 22 | -p : Print each directory on a new line 23 | -v : Print the directory stack with variable index notation 24 | +N / -N : Display or rotate to the Nth entry in the directory stack 25 | .fi 26 | .SH VERSION 27 | __hhs_dirs (HomeSetup) 1.9.11 28 | .SH AUTHOR 29 | HomeSetup Team 30 | .SH LICENSE 31 | MIT 32 | -------------------------------------------------------------------------------- /docs/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing with HomeSetup 2 | 3 | > Thank you for your interest using HomeSetup. 4 | 5 | ## Guidelines 6 | 7 | > You are welcome to contribute with the project by following the guidelines below: 8 | 9 | 1. Format your code accordingly, using the [.editorconfig](../.editorconfig) file provided. 10 | 2. If you write [bats tests](../tests) for your code, it will be approved faster. 11 | 3. Use [ShellCheck](https://www.shellcheck.net) to make sure your code has a "good smell". 12 | 4. Refrain from disabling ShellCheck rules (a few exceptions may apply). 13 | 5. Provide a meaningful help using the [Help template](../templates/txt/help.txt). 14 | 6. Commits to the repository must follow the [commit-templates](../templates/git/commits). 15 | 7. Create a fork with an adequate name. 16 | 8. Provide/Update the [User Handbook](handbook/handbook.md) for your changes if applicable. 17 | 9. Follow the [Pull Request Template](PULL_REQUEST_TEMPLATE.md) 18 | 19 | You can contribute in many ways: 20 | 21 | - Adding a feature request. 22 | - Reporting bugs and issues. 23 | - Supporting with donations. 24 | - Providing **CONSTRUCTIVE** feedback. 25 | 26 | 27 | Best Regards. 28 | HomeSetup team. 29 | -------------------------------------------------------------------------------- /assets/hhs-icons.csv: -------------------------------------------------------------------------------- 1 | Icon,Hex,Oct,Name,Bash 2 | ,F46E,\xef\x91\xae,Alert,Yes 3 | ,F061,\xef\x81\xa1,Alias,Yes 4 | ,F058,\xef\x81\x98,Check,Yes 5 | ,F057,\xef\x81\x97,Cross,Yes 6 | …,2026,\xe2\x80\xa6,Ellipsis,Yes 7 | ✘,2718,\xe2\x9c\x98,Error,Yes 8 | ,F467,\xef\x91\xa7,Fail,Yes 9 | ,F121,\xef\x84\xa1,Function,Yes 10 | ,F25B,\xef\x89\x9b,Hand Peace,Yes 11 | ,F059,\xef\x81\x99,Help,Yes 12 | ,F204,\xef\x88\x84,Off Switch,Yes 13 | ,F205,\xef\x88\x85,On Switch,Yes 14 | ,F62C,\xef\x98\xac,Pass,Yes 15 | ,F12E,\xef\x84\xae,Plug-In,Yes 16 | ,F432,\xef\x90\xb2,Pointer Right,Yes 17 | ,F468,\xef\x91\xa8,Skip,Yes 18 | ,F005,\xef\x80\x85,Star,Yes 19 | ,F62B,\xef\x98\xab,Success,Yes 20 | ,F400,\xef\x90\x80,Tip,Yes 21 | ,F0AC,\xef\x82\xac,Globe,Yes 22 | ,F630,\xef\x98\xb0,Unmarked,Yes 23 | ,F634,\xef\x98\xb4,Marked,Yes 24 | ,F418,\xef\x90\x98,Git Branch,No 25 | ,F07B,\xef\x81\xbb,Folder Closed,No 26 | ,F1FA,\xef\x87\xba,At,No 27 | ,F415,\xef\x90\x95,User,No 28 | ,F071,\xef\x81\xb1,Warning,No 29 | ,F114,\xef\x84\x94,Folder-o,No 30 | ,F482,\xef\x92\x82,Link,No 31 | ,F482,\xef\x92\x82,Folder-Link,No 32 | ,F29C,\xef\x8a\x9c,Unknown,No 33 | ,F176,\xef\x85\xb6,Status-Up,No 34 | ,F175,\xef\x85\xb5,Status-Down,No 35 | -------------------------------------------------------------------------------- /docker/ubuntu/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:latest 2 | 3 | LABEL maintainer="Hugo Saporetti Junior " 4 | 5 | USER root 6 | 7 | ENV SHELL=/bin/bash 8 | ENV HOME=/root 9 | ENV DEBIAN_FRONTEND=noninteractive 10 | ENV LANG=en_US.UTF-8 11 | ENV LC_ALL=en_US.UTF-8 12 | 13 | # System update and core setup 14 | RUN apt update -y && \ 15 | apt install -y --no-install-recommends \ 16 | software-properties-common locales curl sudo build-essential procps file vim git rsync cmake ruby ruby-dev \ 17 | bsdmainutils bat fd-find fzf gawk libpq-dev libnl-3-dev portaudio19-dev ffmpeg && \ 18 | add-apt-repository ppa:deadsnakes/ppa -y && \ 19 | apt update -y && \ 20 | apt install -y python3.11 python3.11-dev && \ 21 | locale-gen "en_US.UTF-8" && \ 22 | gem install colorls && \ 23 | curl -sS https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ 24 | python3.11 get-pip.py && \ 25 | python3.11 -m pip install --upgrade pip setuptools wheel && \ 26 | rm -f get-pip.py && \ 27 | apt clean && rm -rf /var/lib/apt/lists/* 28 | 29 | WORKDIR /root 30 | 31 | # HomeSetup installation 32 | RUN curl -fsSL https://raw.githubusercontent.com/yorevs/homesetup/master/install.bash | bash 33 | 34 | CMD ["bash", "--login"] 35 | -------------------------------------------------------------------------------- /dotfiles/bash/bash_profile.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Script: bash_profile.bash 4 | # Purpose: This is user specific file that gets loaded each time user creates a new non-login 5 | # shell. It simply loads the required HomeSetup dotfiles and set some required paths. Some OSs 6 | # use bash_profile instead of bashrc, so just keep this a copy of bashrc. 7 | # Created: Aug 26, 2018 8 | # Author: Hugo Saporetti Junior 9 | # Mailto: taius.hhs@gmail.com 10 | # Site: https://github.com/yorevs/homesetup 11 | # License: Please refer to 12 | # 13 | # Copyright (c) 2025, HomeSetup team 14 | 15 | # !NOTICE: Do not change this file. To customize your shell create/change the following files: 16 | # ~/.colors : To customize your colors 17 | # ~/.env : To customize your environment variables 18 | # ~/.aliases : To customize your aliases 19 | # ~/.aliasdef : To customize your aliases definitions 20 | # ~/.prompt : To customize your prompt 21 | # ~/.functions : To customize your functions 22 | # ~/.profile : To customize your profile 23 | # ~/.path : To customize your paths 24 | 25 | # Do not source this file multiple times 26 | source "${HOME}/.bashrc" 27 | -------------------------------------------------------------------------------- /bin/dev-tools/bash/hhs-vscode-tools.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Script: hhs-vscode-tools.bash 4 | # Created: Oct 6, 2019 5 | # Author: Hugo Saporetti Junior 6 | # Mailto: taius.hhs@gmail.com 7 | # Site: https://github.com/yorevs/homesetup 8 | # License: Please refer to 9 | # 10 | # Copyright (c) 2025, HomeSetup team 11 | 12 | # !NOTICE: Do not change this file. To customize your functions edit the file ~/.functions 13 | 14 | if __hhs_has "code"; then 15 | 16 | # @function: Prefer using the workspace file instead of the bare folder. 17 | # @param $1..$N [Req] : The code arguments to call. 18 | function __hhs_code() { 19 | 20 | local workspace_file 21 | 22 | if [[ '-h' == "$1" || '--help' == "$1" ]]; then 23 | echo "usage: ${FUNCNAME[0]} [vscode_args]" 24 | return 1 25 | fi 26 | 27 | workspace_file=$(find . -iname "*.code-workspace" | head -n 1) 28 | 29 | if [[ -n "${workspace_file}" && -s "${workspace_file}" ]]; then 30 | echo "code ${workspace_file} ${*}" 31 | code "${workspace_file}" "$@" 32 | else 33 | echo "code ${*}" 34 | \code "$@" 35 | fi 36 | 37 | return $? 38 | } 39 | else 40 | __hhs_log WARN "VSCode is not installed on your system." 41 | fi 42 | -------------------------------------------------------------------------------- /templates/git/gitignore: -------------------------------------------------------------------------------- 1 | ### Build ### 2 | target/ 3 | build/ 4 | bin/ 5 | dist/ 6 | db/ 7 | !.mvn/wrapper/maven-wrapper.jar 8 | 9 | ### Gradle ### 10 | .gradle/ 11 | 12 | ## VSCode ## 13 | .vscode 14 | 15 | ### Eclipse ### 16 | .apt_generated 17 | .classpath 18 | .factorypath 19 | .project 20 | .settings 21 | .springBeans 22 | 23 | ### IntelliJ IDEA ### 24 | .idea 25 | *.iws 26 | *.iml 27 | *.ipr 28 | 29 | ### NetBeans ### 30 | nbproject/private/ 31 | nbbuild/ 32 | nbdist/ 33 | .nb-gradle/ 34 | 35 | # Node and Vue 36 | node_modules 37 | /dist 38 | *.suo 39 | *.ntvs* 40 | *.njsproj 41 | *.sln 42 | *.sw* 43 | 44 | # local env files 45 | .env.local 46 | .env.*.local 47 | 48 | # Compiled source # 49 | ################### 50 | *.com 51 | *.class 52 | *.dll 53 | *.exe 54 | *.o 55 | *.so 56 | *.pyc 57 | *.pid 58 | 59 | # Packages # 60 | ############ 61 | # it's better to unpack these files and commit the raw source 62 | # git has its own built in compression methods 63 | *.7z 64 | *.dmg 65 | *.gz 66 | *.iso 67 | *.jar 68 | *.rar 69 | *.tar 70 | *.zip 71 | 72 | # Logs and databases # 73 | ###################### 74 | *.log 75 | log/ 76 | 77 | # OS generated files # 78 | ###################### 79 | .DS_Store 80 | .DS_Store? 81 | Icon[ ] 82 | ._* 83 | .Spotlight-V100 84 | .Trashes 85 | ehthumbs.db 86 | Thumbs.db 87 | Desktop.ini 88 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_classic_mselect.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_classic_mselect" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_classic_mselect - Select an option from a list using a navigable menu. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_classic_mselect <items...> 8 | .fi 9 | .SH DESCRIPTION 10 | Select an option from a list using a navigable menu. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The response file. 15 | .TP 16 | $3 (Req) 17 | The array of items. 18 | .SH DETAILS 19 | .nf 20 | 21 | Arguments: 22 | output_file : The output file where the result will be stored. 23 | title : The text to be displayed before rendering the items. 24 | items : The items to be displayed for selecting. 25 | 26 | Examples: 27 | Select a number from 1 to 100: 28 | => __hhs_classic_mselect /tmp/out.txt {1..100} && cat /tmp/out.txt 29 | 30 | Notes: 31 | - If only one option is available, mselect will select it and return. 32 | - A temporary file is suggested to used with this command: $ mktemp. 33 | - The outfile must not exist or it be an empty file. 34 | .fi 35 | .SH VERSION 36 | __hhs_classic_mselect (HomeSetup) 1.9.11 37 | .SH AUTHOR 38 | HomeSetup Team 39 | .SH LICENSE 40 | MIT <https://opensource.org/licenses/MIT> 41 | -------------------------------------------------------------------------------- /docs/misc/cheatsheets/bash-dotfiles.md: -------------------------------------------------------------------------------- 1 | # Bash dotfiles 2 | 3 | ## Bash/Zsh load order 4 | 5 | _Executes A, then B, then C, etc._ 6 | _B1, B2, B3 means it executes only the first of those files found_ 7 | 8 | | File | Interactive login | Interactive non-login | Script | 9 | |------------------|-------------------|-----------------------|--------| 10 | | /etc/profile | A | | | 11 | | /etc/bash.bashrc | | A | | 12 | | ~/.bashrc | | B | | 13 | | ~/.bash_profile | B1 | | | 14 | | ~/.bash_login | B2 | | | 15 | | ~/.profile | B3 | | | 16 | | BASH_ENV | | | A | 17 | | ~/.bash_logout | C | | | 18 | 19 | ## Login Shell 20 | 21 | When you login into the computer or change user (su <user>) 22 | 23 | `/etc/profile` → `~/.bash_profile` → `~/.profile` → `~/.bash_login` 24 | 25 | 26 | ## Non-Login Shell 27 | 28 | `/etc/bash.bashrc` → `~/.bashrc` 29 | 30 | ## References: 31 | 32 | * https://shreevatsa.wordpress.com/2008/03/30/zshbash-startup-files-loading-order-bashrc-zshrc-etc/ 33 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_mselect.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_mselect" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_mselect - Select an option from a list using a navigable menu. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_mselect <output_file> <title> <items...> 8 | .fi 9 | .SH DESCRIPTION 10 | Select an option from a list using a navigable menu. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The response file. 15 | .TP 16 | $2 (Req) 17 | The render title. 18 | .TP 19 | $3 (Req) 20 | The array of items. 21 | .SH DETAILS 22 | .nf 23 | 24 | Arguments: 25 | output_file : The output file where the result will be stored. 26 | title : The text to be displayed before rendering the items. 27 | items : The items to be displayed for selecting. 28 | 29 | Examples: 30 | Select a number from 1 to 100: 31 | => __hhs_mselect /tmp/out.txt 'Please select one option' {1..100} && cat /tmp/out.txt 32 | 33 | Notes: 34 | - If only one option is available, mselect will select it and return. 35 | - A temporary file is suggested to used with this command: $ mktemp. 36 | - The outfile must not exist or it be an empty file. 37 | .fi 38 | .SH VERSION 39 | __hhs_mselect (HomeSetup) 1.9.11 40 | .SH AUTHOR 41 | HomeSetup Team 42 | .SH LICENSE 43 | MIT <https://opensource.org/licenses/MIT> 44 | -------------------------------------------------------------------------------- /bin/apps/bash/hhs-app/plugins/hspm/recipes/Linux/default.recipe: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # shellcheck disable=SC2068 3 | 4 | function _about_() { 5 | 6 | echo "This is the default recipe and will be used when no recipe is found the specified package" 7 | 8 | return 0 9 | } 10 | 11 | function _which_() { 12 | 13 | if command -v ${@} &>/dev/null; then 14 | return 0 15 | fi 16 | 17 | return 1 18 | } 19 | 20 | function _depends_() { 21 | 22 | return 0 23 | } 24 | 25 | function _install_() { 26 | 27 | command -v sudo &> /dev/null && SUDO=sudo 28 | 29 | if [[ ${HHS_MY_OS_PACKMAN} == 'apk' ]]; then 30 | if ${SUDO} "${HHS_MY_OS_PACKMAN}" add --no-cache ${@}; then 31 | return 0 32 | fi 33 | else 34 | if ${SUDO} "${HHS_MY_OS_PACKMAN}" -y install ${@}; then 35 | return 0 36 | fi 37 | fi 38 | 39 | return 1 40 | } 41 | 42 | function _uninstall_() { 43 | 44 | command -v sudo &> /dev/null && SUDO=sudo 45 | 46 | if [[ ${HHS_MY_OS_PACKMAN} == 'apk' ]]; then 47 | if ${SUDO} "${HHS_MY_OS_PACKMAN}" del ${@}; then 48 | return 0 49 | fi 50 | elif [[ ${HHS_MY_OS_PACKMAN} == 'dnf' ]]; then 51 | if ${SUDO} "${HHS_MY_OS_PACKMAN}" remove ${@}; then 52 | return 0 53 | fi 54 | else 55 | if ${SUDO} "${HHS_MY_OS_PACKMAN}" uninstall ${@}; then 56 | return 0 57 | fi 58 | fi 59 | 60 | return 1 61 | } 62 | -------------------------------------------------------------------------------- /assets/devel/wezterm.actions.txt: -------------------------------------------------------------------------------- 1 | - ActivateCopyMode 2 | - ActivateKeyTable 3 | - ActivatePaneDirection 4 | - ActivateTab 5 | - ActivateTabRelative 6 | - AdjustPaneSize 7 | - Call 8 | - ClearKeyTableStack 9 | - ClearScrollback 10 | - CloseCurrentPane 11 | - CloseCurrentTab 12 | - CompleteSelection 13 | - CopyMode 14 | - CopyTo 15 | - DisableDefaultAssignment 16 | - EmitEvent 17 | - ExtendSelectionToMouseCursor 18 | - IncrementScrollbackForParser 19 | - InputSelector 20 | - Lazy 21 | - Multiple 22 | - Nop 23 | - OpenLinkAtMouseCursor 24 | - OverwriteAction 25 | - PasteFrom 26 | - PasteFromClipboard 27 | - PasteFromPrimarySelection 28 | - PopKeyTable 29 | - QuickSelect 30 | - QuickSelectArgs 31 | - ReloadConfiguration 32 | - RenameTab 33 | - ResetFontAndWindowSize 34 | - ResetTerminal 35 | - RotatePanes 36 | - SaveTextPaneAsBitmap 37 | - ScrollByLine 38 | - ScrollByPage 39 | - ScrollToBottom 40 | - ScrollToPrompt 41 | - ScrollToTop 42 | - Search 43 | - SearchN 44 | - SearchNext 45 | - SearchPrevious 46 | - SelectTextAtMouseCursor 47 | - SendKey 48 | - SendMouseEvent 49 | - SendString 50 | - SetClipboard 51 | - ShowDebugOverlay 52 | - ShowLauncher 53 | - ShowLauncherArgs 54 | - ShowTabNavigator 55 | - SortPaneTree 56 | - SplitHorizontal 57 | - SplitPane 58 | - SplitVertical 59 | - SwitchToWorkspace 60 | - SwitchWorkspaceRelative 61 | - ToggleFullScreen 62 | - ToggleKeyTable 63 | - TriggerKeyTable 64 | - MoveTab 65 | - MoveTabRelative 66 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ### Build ### 2 | /target/ 3 | /build/ 4 | /dist/ 5 | /db/ 6 | 7 | ### Maven ### 8 | !.mvn/wrapper/maven-wrapper.jar 9 | 10 | ### Gradle ### 11 | .gradle/ 12 | 13 | ### Node ### 14 | node_modules/ 15 | *.suo 16 | *.ntvs* 17 | *.njsproj 18 | *.sln 19 | 20 | ### Eclipse ### 21 | .apt_generated 22 | .classpath 23 | .factorypath 24 | .project 25 | .cproject 26 | .settings 27 | .springBeans 28 | 29 | ### IntelliJ IDEA ### 30 | .idea 31 | *.iws 32 | *.iml 33 | *.ipr 34 | 35 | ### NetBeans ### 36 | nbproject/private/ 37 | nbbuild/ 38 | nbdist/ 39 | .nb-gradle/ 40 | 41 | # Compiled source # 42 | ################### 43 | *.com 44 | *.class 45 | *.dll 46 | *.exe 47 | *.o 48 | *.a 49 | *.so 50 | *.pyc 51 | *.dSYM/ 52 | 53 | # Packages # 54 | ############ 55 | # it's better to unpack these files and commit the raw source 56 | # git has its own built in compression methods 57 | *.7z 58 | *.dmg 59 | *.gz 60 | *.iso 61 | *.rar 62 | *.tar 63 | *.zip 64 | 65 | # Logs and databases # 66 | ###################### 67 | *.log 68 | /log/ 69 | /lib/ 70 | 71 | # OS generated files # 72 | ###################### 73 | .DS_Store 74 | .DS_Store? 75 | Icon[ 76 | ] 77 | ._* 78 | .Spotlight-V100 79 | .Trashes 80 | ehthumbs.db 81 | Thumbs.db 82 | Desktop.ini 83 | 84 | ### Project specific ### 85 | .gitconfig 86 | .gitignore 87 | .viminfo 88 | 89 | # Ignore Gradle build output directory 90 | build 91 | master-unlock 92 | gradlew.bat 93 | check-badge.svg 94 | -------------------------------------------------------------------------------- /bin/apps/bash/hhs-app/plugins/ask/install-ollama.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Script: ask.bash 4 | # Purpose: Offline ollama-AI agent installation for HomeSetup. 5 | # Created: Nov 13, 2025 6 | # Author: <B>H</B>ugo <B>S</B>aporetti <B>J</B>unior 7 | # Mailto: taius.hhs@gmail.com 8 | # Site: https://github.com/yorevs#homesetup 9 | # License: Please refer to <https://opensource.org/licenses/MIT> 10 | # 11 | # Copyright (c) 2025, HomeSetup team 12 | 13 | [[ -s "${HHS_DIR}/bin/app-commons.bash" ]] && source "${HHS_DIR}/bin/app-commons.bash" 14 | 15 | # Install Ollama-AI 16 | install_ollama() { 17 | if [[ "$(uname -s)" == "Darwin" ]]; then 18 | brew install ollama || return 2 19 | else 20 | curl -fsSL https://ollama.com/install.sh | bash || return 2 21 | fi 22 | 23 | return 0 24 | } 25 | 26 | # Pull the HomeSetup model 27 | pull_model() { 28 | ollama pull "${HHS_OLLAMA_MODEL}" 29 | 30 | return $? 31 | } 32 | 33 | # Main function: Install Ollama-AI and pull the selected HHS model 34 | main() { 35 | if __hhs_has ollama; then 36 | echo -e "${GREEN}Ollama-AI is already installed.${NC}" 37 | elif install_ollama &>"${HHS_LOG_FILE} "; then 38 | if ollama list | grep -q "^${HHS_OLLAMA_MODEL}" || pull_model &>"${HHS_LOG_FILE}"; then 39 | __hhs_toml_set "${HHS_SETUP_FILE}" "hhs_use_offline_ai=true" 40 | fi 41 | else 42 | quit 2 "Failed to install Ollama-AI or pull the model." 43 | fi 44 | } 45 | 46 | main "$@" 47 | quit 0 48 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_where_am_i.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_where_am_i" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_where_am_i - Display the current dir (pwd) and remote repo url, if it applies. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_where_am_i --help 8 | .fi 9 | .SH DESCRIPTION 10 | Display the current dir (pwd) and remote repo url, if it applies. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The command to get help. 15 | .SH DETAILS 16 | .nf 17 | -=- You are here -=- 18 | 19 | Current directory: /Users/hjunior/HomeSetup/docs/man/man.1 20 | git: warning: confstr() failed with code 5: couldn't get path of DARWIN_USER_TEMP_DIR; using /tmp instead 21 | Remote repository: git@github.com:HS-Teams/homesetup.git 22 | git: warning: confstr() failed with code 5: couldn't get path of DARWIN_USER_TEMP_DIR; using /tmp instead 23 | git: warning: confstr() failed with code 5: couldn't get path of DARWIN_USER_TEMP_DIR; using /tmp instead 24 | Last commit sha: 49909351 Update icons and visuals. Add new hs function link to link into HHS_DIR/bin folder 25 | Branch:  mastergit: warning: confstr() failed with code 5: couldn't get path of DARWIN_USER_TEMP_DIR; using /tmp instead 26 | => 7 files changed, 7 insertions(+), 19 deletions(-) 27 | .fi 28 | .SH VERSION 29 | __hhs_where_am_i (HomeSetup) 1.9.11 30 | .SH AUTHOR 31 | HomeSetup Team 32 | .SH LICENSE 33 | MIT <https://opensource.org/licenses/MIT> 34 | -------------------------------------------------------------------------------- /bin/apps/bash/hhs-app/plugins/starship/hhs-presets/hhs-p10k.toml: -------------------------------------------------------------------------------- 1 | # ~/.config/starship.toml 2 | # Credits to: https://github.com/theRubberDuckiee/dev-environment-files/blob/main/starship.toml 3 | 4 | format = """\ 5 | [](bg:#030B16 fg:#7DF9AA)\ 6 | [󰀵 ](bg:#7DF9AA fg:#090c0c)\ 7 | [](fg:#7DF9AA bg:#1C3A5E)\ 8 | $time\ 9 | [](fg:#1C3A5E bg:#3B76F0)\ 10 | $directory\ 11 | [](fg:#3B76F0 bg:#FCF392)\ 12 | $git_branch\ 13 | $git_status\ 14 | $git_metrics\ 15 | [](fg:#FCF392 bg:#030B16)\ 16 | $character\ 17 | """ 18 | 19 | [directory] 20 | format = "[ ﱮ $path ]($style)" 21 | style = "fg:#E4E4E4 bg:#3B76F0" 22 | 23 | [git_branch] 24 | format = '[ $symbol$branch(:$remote_branch) ]($style)' 25 | symbol = "  " 26 | style = "fg:#1C3A5E bg:#FCF392" 27 | 28 | [git_status] 29 | format = '[$all_status]($style)' 30 | style = "fg:#1C3A5E bg:#FCF392" 31 | 32 | [git_metrics] 33 | format = "([+$added]($added_style))[]($added_style)" 34 | added_style = "fg:#1C3A5E bg:#FCF392" 35 | deleted_style = "fg:bright-red bg:235" 36 | disabled = false 37 | 38 | [hg_branch] 39 | format = "[ $symbol$branch ]($style)" 40 | symbol = " " 41 | 42 | [cmd_duration] 43 | format = "[  $duration ]($style)" 44 | style = "fg:bright-white bg:18" 45 | 46 | [character] 47 | success_symbol = '[ ➜](bold green) ' 48 | error_symbol = '[ ✗](#E84D44) ' 49 | 50 | [time] 51 | disabled = false 52 | time_format = "%R" # Hour:Minute Format 53 | style = "bg:#1d2230" 54 | format = '[[ 󱑍 $time ](bg:#1C3A5E fg:#8DFBD2)]($style)' 55 | -------------------------------------------------------------------------------- /assets/contrib/gpt/tests/test_temperature_converter.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | # test_temperature_converter.bats 4 | # Purpose: Tests for temperature converter script 5 | 6 | # Load helper functions 7 | load "${HHS_HOME}/tests/bats/bats-support/load" 8 | load "${HHS_HOME}/tests/bats/bats-assert/load" 9 | 10 | setup() { 11 | SCRIPT="${HHS_HOME}/assets/devel/scripts/gpt/src/temperature-converter.bash" 12 | } 13 | 14 | @test "Convert 100°C to °F" { 15 | result="$(${SCRIPT} -t 100 -f C -o F)" 16 | [ "$result" == "212.00" ] 17 | } 18 | 19 | @test "Convert 0°C to °F" { 20 | result="$(${SCRIPT} -t 0 -f C -o F)" 21 | [ "$result" == "32.00" ] 22 | } 23 | 24 | @test "Convert 212°F to K" { 25 | result="$(${SCRIPT} -t 212 -f F -o K)" 26 | [ "$result" == "373.15" ] 27 | } 28 | 29 | @test "Convert 0°F to °C" { 30 | result="$(${SCRIPT} -t 0 -f F -o C)" 31 | [ "$result" == "-17.78" ] || [ "$result" == "-17.77" ] # Adjust according to the actual output 32 | } 33 | 34 | @test "Convert 300K to °C" { 35 | result="$(${SCRIPT} -t 300 -f K -o C)" 36 | [ "$result" == "26.85" ] 37 | } 38 | 39 | @test "Convert 273.15K to °F" { 40 | result="$(${SCRIPT} -t 273.15 -f K -o F)" 41 | [ "$result" == "32.00" ] 42 | } 43 | 44 | @test "Invalid scale conversion request" { 45 | run ${SCRIPT} -t 100 -f C -o X 46 | assert_failure 47 | [[ "$output" == *"ERROR"* ]] 48 | } 49 | 50 | @test "Missing arguments" { 51 | run ${SCRIPT} -t 100 -f C 52 | assert_failure 53 | [[ "$output" == *"ERROR"* ]] 54 | } 55 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_shopt.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_shopt" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_shopt - Display/Set/unset current Shell Options. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_shopt [on|off] | [-pqsu] [-o] [optname ...] 8 | .fi 9 | .SH DESCRIPTION 10 | Display/Set/unset current Shell Options. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | Same as shopt, ref: https://ss64.com/bash/shopt.html 15 | .SH DETAILS 16 | .nf 17 | 18 | Options: 19 | off : Display all unset options. 20 | on : Display all set options. 21 | -s : Enable (set) each optname. 22 | -u : Disable (unset) each optname. 23 | -p : Display a list of all settable options, with an indication of whether or not each is set. 24 | The output is displayed in a form that can be reused as input. (-p is the default action). 25 | -q : Suppresses normal output; the return status indicates whether the optname is set or unset. 26 | If multiple optname arguments are given with '-q', the return status is zero if all optnames 27 | are enabled; non-zero otherwise. 28 | -o : Restricts the values of optname to be those defined for the '-o' option to the set builtin. 29 | 30 | Notes: 31 | If no option is provided, then, display all set & unset options. 32 | .fi 33 | .SH VERSION 34 | __hhs_shopt (HomeSetup) 1.9.11 35 | .SH AUTHOR 36 | HomeSetup Team 37 | .SH LICENSE 38 | MIT <https://opensource.org/licenses/MIT> 39 | -------------------------------------------------------------------------------- /tests/hhs-aliases.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | # Script: hhs-aliases.bats 4 | # Purpose: hhs-aliases tests. 5 | # Created: Mar 02, 2020 6 | # Author: <B>H</B>ugo <B>S</B>aporetti <B>J</B>unior 7 | # Mailto: taius.hhs@gmail.com 8 | # Site: https://github.com/yorevs/homesetup 9 | # License: Please refer to <https://opensource.org/licenses/MIT> 10 | # 11 | # Copyright (c) 2025, HomeSetup team 12 | 13 | load test_helper 14 | load "${HHS_FUNCTIONS_DIR}/hhs-text.bash" 15 | load "${HHS_FUNCTIONS_DIR}/hhs-aliases.bash" 16 | load_bats_libs 17 | 18 | # TC - 1 19 | @test "when-invoking-with-help-option-then-should-print-usage-message" { 20 | run __hhs_aliases -h 21 | assert_failure 22 | assert_output --partial "usage: __hhs_aliases <alias> <alias_expr>" 23 | } 24 | 25 | # TC - 2 26 | @test "when-adding-non-existent-valid-alias-then-should-add-it" { 27 | run __hhs_aliases 'hhs-bats' ls -la 28 | assert_success 29 | assert_output --partial "Alias set: \"hhs-bats\" is 'ls -la'" 30 | ised "/^alias hhs-bats=.*$/d" "${HHS_ALIASES_FILE}" 31 | } 32 | 33 | # TC - 3 34 | @test "when-removing-an-invalid-alias-then-should-raise-an-error" { 35 | run __hhs_aliases -r 'hhs-bats' 36 | assert_failure 37 | assert_output --partial "Alias not found: \"hhs-bats\"" 38 | } 39 | 40 | # TC - 4 41 | @test "when-removing-an-existing-alias-then-should-remove-it" { 42 | __hhs_aliases 'hhs-bats' 'ls -la' 43 | run __hhs_aliases -r 'hhs-bats' 44 | assert_success 45 | assert_output --partial "Alias removed: \"hhs-bats\"" 46 | } 47 | -------------------------------------------------------------------------------- /gradle/docker.gradle: -------------------------------------------------------------------------------- 1 | /* Build a docker image with HomeSetup installed */ 2 | task dockerBuild(type: Task) { 3 | group = 'Docker' 4 | description = "Build a docker image with HomeSetup installed" 5 | doLast { 6 | def images = (project.findProperty('images') ?: 'ubuntu,fedora,centos,alpine').tokenize(',') 7 | def osOutput = "uname -s".execute().text.trim() 8 | def archOutput = "uname -m".execute().text.trim() 9 | def versionOutput = "python3 -V".execute().text.trim() 10 | def matcher = versionOutput =~ /Python (\d+)\.(\d+)\.(\d+)/ 11 | if (!matcher.matches()) { 12 | throw new GradleException("Unable to parse python version: '${versionOutput}'") 13 | } 14 | 15 | def major = matcher[0][1].toInteger() 16 | def minor = matcher[0][2].toInteger() 17 | def pythonVersion = matcher ? "${major}.${minor}" : '3.11' 18 | 19 | def PYTHON3 = System.getenv('PYTHON3') ?: "${pythonVersion}" 20 | def PIP3 = System.getenv('PIP3') ?: "python3 -m pip -V".execute().text.trim() 21 | 22 | if (!(major == 3 && minor >= 10 && minor <= 12)) { 23 | throw new GradleException("Python version must be >= 3.10 and <= 3.12, found: ${versionString}") 24 | } 25 | 26 | println("Building docker images: ${images.flatten().toString()} ...") 27 | println("OS: ${osOutput}") 28 | println("Arch: ${archOutput}") 29 | println("Python: ${PYTHON3} ${PIP3}") 30 | 31 | exec { 32 | commandLine "${project.rootDir}/bin/apps/bash/docker-build.bash", *images 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /dotfiles/tmux.conf: -------------------------------------------------------------------------------- 1 | set -g default-terminal "tmux-256color" 2 | set -ag terminal-overrides ",xterm-256color:RGB" 3 | 4 | set -g prefix C-a 5 | unbind C-b 6 | bind-key C-a send-prefix 7 | 8 | unbind % 9 | bind | split-window -h 10 | 11 | unbind '"' 12 | bind - split-window -v 13 | 14 | unbind r 15 | bind r source-file ~/.tmux.conf 16 | 17 | bind j resize-pane -D 5 18 | bind k resize-pane -U 5 19 | bind l resize-pane -R 5 20 | bind h resize-pane -L 5 21 | 22 | bind -r m resize-pane -Z 23 | 24 | set -g mouse on 25 | 26 | set-window-option -g mode-keys vi 27 | 28 | bind-key -T copy-mode-vi 'v' send -X begin-selection # start selecting text with "v" 29 | bind-key -T copy-mode-vi 'y' send -X copy-selection # copy text with "y" 30 | 31 | unbind -T copy-mode-vi MouseDragEnd1Pane # don't exit copy mode when dragging with mouse 32 | 33 | # remove delay for exiting insert mode with ESC in Neovim 34 | set -sg escape-time 10 35 | 36 | # tpm plugin 37 | set -g @plugin 'tmux-plugins/tpm' 38 | 39 | # list of tmux plugins 40 | set -g @plugin 'christoomey/vim-tmux-navigator' 41 | set -g @plugin 'tmux-plugins/tmux-resurrect' # persist tmux sessions after computer restart 42 | set -g @plugin 'tmux-plugins/tmux-continuum' # automatically saves sessions for you every 15 minutes 43 | set -g @plugin 'fabioluciano/tmux-tokyo-night' 44 | 45 | 46 | set -g @resurrect-capture-pane-contents 'on' 47 | set -g @continuum-restore 'on' 48 | 49 | # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) 50 | run '~/.tmux/plugins/tpm/tpm' 51 | -------------------------------------------------------------------------------- /docs/COLOR_LS_SETUP.md: -------------------------------------------------------------------------------- 1 | <img src="https://iili.io/HvtxC1S.png" width="64" height="64" align="right" /> 2 | 3 | # HomeSetup ColorLS 4 | > 5 | > The ultimate Terminal experience 6 | 7 | ## Setup 8 | 9 | ### macOS Users 10 | 11 | If you are a **macOS** user you may have problems installing colorls using the default gem application. If that's the 12 | case you can follow the instructions below to install it: 13 | 14 | > Assuming HomeSetup is installed 15 | 16 | ```bash 17 | brew install ruby 18 | ``` 19 | 20 | Identify lines resembling the examples below: 21 | 22 | If you need to have ruby first in your PATH, run: 23 | echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> /Users/<your_user>/.bash_profile 24 | 25 | Now add the path to you **PATH** using the command below. **_Please do not touch the .bash_profile file_**, 26 | 27 | ```bash 28 | paths -a /usr/local/opt/ruby/bin 29 | ``` 30 | 31 | ### Linux Users 32 | 33 | If you are a Linux user, you can install ColorLS following the instructions [here](https://github.com/athityakumar/colorls?tab=readme-ov-file#installation) 34 | 35 | ## Final result 36 | 37 | After properly installed, your new ls will look like this: 38 | 39 | <img src="https://user-images.githubusercontent.com/19269206/234581461-1e1fdd90-a362-4cea-ab82-5ca360746be8.png" /> 40 | 41 | If you wish to use HomeSetup's ls configuration files you can run: 42 | 43 | ```bash 44 | rm -rf $(dirname $(gem which colorls))/yaml 45 | reload 46 | ``` 47 | 48 | The HomeSetup ls should look like this: 49 | 50 | <img src="https://iili.io/JAgg3RR.png" /> 51 | -------------------------------------------------------------------------------- /tests/test_helper.bash: -------------------------------------------------------------------------------- 1 | # Script: test_helper.bash 2 | # Purpose: HomeSetup test helper. 3 | # Created: Mar 02, 2020 4 | # Author: <B>H</B>ugo <B>S</B>aporetti <B>J</B>unior 5 | # Mailto: taius.hhs@gmail.com 6 | # Site: https://github.com/yorevs/homesetup 7 | # License: Please refer to <https://opensource.org/licenses/MIT> 8 | # 9 | # Copyright (c) 2025, HomeSetup team 10 | 11 | # Bats help can be found at: https://bats-core.readthedocs.io/en/stable/ 12 | 13 | export DOTFILES_DIR="${HHS_HOME}/dotfiles" 14 | export HHS_FUNCTIONS_DIR="${HHS_HOME}/bin/hhs-functions/bash" 15 | export HHS_APPS_DIR="${HHS_HOME}/bin/apps/bash" 16 | export BATS_DIR="${HHS_HOME}/tests/bats" 17 | 18 | export BATS_SUPPORT="${BATS_DIR}/bats-support/load" 19 | export BATS_ASSERT="${BATS_DIR}/bats-assert/load" 20 | 21 | load "${HHS_HOME}/dotfiles/bash/bash_commons.bash" 22 | 23 | # @purpose: Load all bats libraries 24 | load_bats_libs() { 25 | load "${BATS_SUPPORT}" 26 | load "${BATS_ASSERT}" 27 | } 28 | 29 | # @purpose: Unset all bash colors to avoid failing tests due to escape codes. 30 | unset_colors() { 31 | unset HHS_HIGHLIGHT_COLOR NC BLACK RED GREEN ORANGE BLUE PURPLE CYAN GRAY WHITE YELLOW VIOLET 32 | } 33 | 34 | # @purpose: Ensure either jq or json_pp is installed, otherwise skip the test. 35 | ensure_json_print() { 36 | if ! __hhs_has jq && ! __hhs_has json_pp; then 37 | skip "Neither 'jq' and 'json_pp' are installed" 38 | else 39 | skip "json_print tests are disabled temporarily" 40 | fi 41 | } 42 | 43 | unset_colors 44 | 45 | bats_require_minimum_version 1.5.0 46 | -------------------------------------------------------------------------------- /assets/colorls/orig-preset/files.yaml: -------------------------------------------------------------------------------- 1 | ai: "" 2 | android: "" 3 | apple: "" 4 | audio: "" 5 | avro: "" 6 | c: "" 7 | clj: "" 8 | coffee: "" 9 | conf: "" 10 | cpp: "" 11 | css: "" 12 | d: "" 13 | dart: "" 14 | db: "" 15 | diff: "" 16 | doc: "" 17 | docker: "" 18 | ebook: "" 19 | env: "" 20 | epub: "" 21 | erl: "" 22 | file: "" 23 | font: "" 24 | gform: "" 25 | git: "" 26 | go: "" 27 | gruntfile.js: "" 28 | hs: "" 29 | html: "" 30 | image: "" 31 | iml: "" 32 | java: "" 33 | js: "" 34 | json: "" 35 | jsx: "" 36 | less: "" 37 | log: "" 38 | lua: "" 39 | md: "" 40 | mustache: "" 41 | npmignore: "" 42 | pdf: "" 43 | php: "" 44 | pl: "" 45 | ppt: "" 46 | psd: "" 47 | py: "" 48 | r: "" 49 | rb: "" 50 | rdb: "" 51 | rss: "" 52 | rubydoc: "" 53 | sass: "" 54 | scala: "" 55 | shell: "" 56 | sqlite3: "" 57 | styl: "" 58 | tex: "" 59 | ts: "" 60 | twig: "" 61 | txt: "" 62 | video: "" 63 | vim: "" 64 | windows: "" 65 | xls: "" 66 | xml: "" 67 | yarn.lock: "" 68 | yml: "" 69 | zip: "" 70 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_classic_mchoose.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_classic_mchoose" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_classic_mchoose - Choose options from a list using a navigable menu. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_classic_mchoose <output_file> <title> <items...> 8 | .fi 9 | .SH DESCRIPTION 10 | Choose options from a list using a navigable menu. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The response file. 15 | .TP 16 | $2 (Req) 17 | The render title. 18 | .TP 19 | $3 (Req) 20 | The array of items. 21 | .SH DETAILS 22 | .nf 23 | 24 | Options: 25 | -c : All options are initially checked instead of unchecked. 26 | 27 | Arguments: 28 | output_file : The output file where the result will be stored. 29 | title : The text to be displayed before rendering the items. 30 | items : The items to be displayed for selecting. 31 | 32 | Examples: 33 | Choose numbers from 1 to 20 (start with all options checked): 34 | => __hhs_classic_mchoose /tmp/out.txt {1..20} && cat /tmp/out.txt 35 | Choose numbers from 1 to 20 (start with all options unchecked): 36 | => __hhs_classic_mchoose -c /tmp/out.txt {1..20} && cat /tmp/out.txt 37 | 38 | Notes: 39 | - A temporary file is suggested to used with this command: $ mktemp. 40 | - The outfile must not exist or it be an empty file. 41 | .fi 42 | .SH VERSION 43 | __hhs_classic_mchoose (HomeSetup) 1.9.11 44 | .SH AUTHOR 45 | HomeSetup Team 46 | .SH LICENSE 47 | MIT <https://opensource.org/licenses/MIT> 48 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_search_string.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_search_string" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_search_string - Search in files for strings matching the specified criteria recursively. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_search_string <search_path> [options] <regex/string> [file_globs] 8 | .fi 9 | .SH DESCRIPTION 10 | Search in files for strings matching the specified criteria recursively. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | Search options. 15 | .TP 16 | $2 (Req) 17 | The base search path. 18 | .TP 19 | $3 (Req) 20 | The searching string. 21 | .TP 22 | $4 (Req) 23 | The GLOB expression of the file search. 24 | .TP 25 | $5 (Opt) 26 | Whether to replace the findings. 27 | .TP 28 | $6 (Con) 29 | Required if $4 is provided. This is the replacement string. 30 | .SH DETAILS 31 | .nf 32 | 33 | Options: 34 | -i | --ignore-case : Makes the search case INSENSITIVE. 35 | -w | --words : Makes the search to use the STRING words instead of a REGEX. 36 | -r | --replace <replacement> : Makes the search to REPLACE all occurrences by the replacement string. 37 | -b | --binary : Includes BINARY files in the search. 38 | 39 | Notes: 40 | - <file_globs...>: Comma separated file globs. E.g: "*.txt,*.md,*.rtf" 41 | - If <file_globs> is not specified, it will assume "*.*" 42 | .fi 43 | .SH VERSION 44 | __hhs_search_string (HomeSetup) 1.9.11 45 | .SH AUTHOR 46 | HomeSetup Team 47 | .SH LICENSE 48 | MIT <https://opensource.org/licenses/MIT> 49 | -------------------------------------------------------------------------------- /docker/alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:latest 2 | 3 | LABEL maintainer="Hugo Saporetti Junior <taius.hhs@gmail.com>" 4 | 5 | USER root 6 | 7 | ENV SHELL=/bin/bash 8 | ENV HOME=/root 9 | ENV LANG=en_US.UTF-8 10 | ENV LC_ALL=en_US.UTF-8 11 | 12 | # Base system update 13 | RUN apk update && apk upgrade 14 | 15 | # Core tools and build dependencies 16 | RUN apk add --no-cache \ 17 | bash bash-completion sudo curl vim wget git cmake build-base \ 18 | libffi-dev openssl-dev bzip2-dev sqlite-dev \ 19 | alsa-lib-dev ffmpeg-dev portaudio-dev linux-headers \ 20 | py3-pip py3-setuptools py3-wheel python3 21 | 22 | # Python setup 23 | RUN ln -sf "$(command -v python3)" /usr/local/bin/python 24 | RUN ln -sf "$(command -v python3)" /usr/local/bin/python3 && \ 25 | python -m pip install --break-system-packages --no-cache-dir --upgrade pip setuptools wheel 26 | 27 | # Optional utilities (quality of life) 28 | RUN apk add --no-cache less grep coreutils util-linux jq rsync 29 | 30 | # Bash login environment 31 | RUN echo "export LANG=en_US.UTF-8" >> /etc/profile && \ 32 | echo "export LC_ALL=en_US.UTF-8" >> /etc/profile && \ 33 | echo "[[ -f /etc/profile ]] && source /etc/profile" >> /root/.bashrc && \ 34 | echo 'PS1="[\u@\h \W]\\$ "' >> /root/.bashrc && \ 35 | echo "cd ~" >> /root/.bash_profile 36 | 37 | WORKDIR /root 38 | 39 | # Cleanup to keep image lean 40 | RUN rm -rf /var/cache/apk/* 41 | 42 | # HomeSetup installation 43 | RUN curl -fsSL https://raw.githubusercontent.com/yorevs/homesetup/master/install.bash | bash 44 | 45 | # Default shell 46 | CMD ["bash", "--login"] 47 | -------------------------------------------------------------------------------- /templates/txt/man.1: -------------------------------------------------------------------------------- 1 | .TH ${SCRIPT_NAME} 1 "2025-04-01" "${SCRIPT_NAME} 0.9.0" "User Commands" 2 | .SH NAME 3 | ${SCRIPT_NAME} \- script template to start any good shell script. 4 | .SH SYNOPSIS 5 | .B ${SCRIPT_NAME} 6 | .RI "[-hv] [-o" file "] [--timelog] [--ignorelock] args ..." 7 | .SH DESCRIPTION 8 | This manual page documents a reusable shell script template. Update the 9 | placeholders (such as ${SCRIPT_NAME}) to fit the target script before 10 | shipping. 11 | .SH OPTIONS 12 | .TP 13 | .B -o [file], --output=[file] 14 | Set log file (default = /dev/null). Use the DEFAULT keyword to autoname the 15 | file. The default value is /dev/null. 16 | .TP 17 | .B -t, --timelog 18 | Add timestamp to the log in the format "+%y/%m/%d@%H:%M:%S". 19 | .TP 20 | .B -x, --ignorelock 21 | Ignore the presence of a lock file. 22 | .TP 23 | .B -h, --help 24 | Print this help and exit. 25 | .TP 26 | .B -v, --version 27 | Print script information. 28 | .SH EXAMPLES 29 | ${SCRIPT_NAME} -o DEFAULT arg1 arg2 30 | .SH IMPLEMENTATION 31 | .TP 32 | .B version 33 | ${SCRIPT_NAME} (www.example.com) 0.9.0 34 | .TP 35 | .B author 36 | Hugo Saporetti Junior 37 | .TP 38 | .B copyright 39 | Copyright (c) Hugo Saporetti Junior 40 | .TP 41 | .B license 42 | MIT <https://opensource.org/licenses/MIT> 43 | .SH HISTORY 44 | .TP 45 | .B 2025/03/01 46 | username: Script creation 47 | .TP 48 | .B 2025/04/01 49 | username: Add long options and improvements 50 | .SH DEBUGGING 51 | Uncomment one of the following lines to debug: 52 | .IP \[bu] 2 53 | set -n \fR# Check syntax without execution. 54 | .IP \[bu] 2 55 | set -x \fR# Trace execution for debugging. 56 | -------------------------------------------------------------------------------- /assets/colorls/hhs-preset/files.yaml: -------------------------------------------------------------------------------- 1 | ai: "" 2 | android: "" 3 | apple: "" 4 | audio: "" 5 | avro: "" 6 | c: "" 7 | clj: "" 8 | coffee: "" 9 | conf: "" 10 | cpp: "" 11 | css: "" 12 | d: "" 13 | dart: "" 14 | db: "" 15 | diff: "" 16 | doc: "" 17 | docker: "" 18 | ebook: "" 19 | env: "" 20 | epub: "" 21 | erl: "" 22 | file: "" 23 | font: "" 24 | gform: "" 25 | git: "" 26 | go: "" 27 | gruntfile.js: "" 28 | hs: "" 29 | html: "" 30 | image: "" 31 | iml: "" 32 | java: "" 33 | js: "" 34 | json: "" 35 | jsx: "" 36 | less: "" 37 | log: "" 38 | lua: "" 39 | md: "" 40 | media: "" 41 | mustache: "" 42 | npmignore: "" 43 | pdf: "" 44 | php: "" 45 | photo: "" 46 | pl: "" 47 | ppt: "" 48 | psd: "" 49 | py: "" 50 | r: "" 51 | rb: "" 52 | rdb: "" 53 | rss: "" 54 | rubydoc: "" 55 | sass: "" 56 | scala: "" 57 | settings: "" 58 | shell: "" 59 | sqlite3: "" 60 | styl: "" 61 | tex: "" 62 | ts: "" 63 | twig: "" 64 | txt: "" 65 | video: "" 66 | vim: "" 67 | windows: "" 68 | xls: "" 69 | xml: "" 70 | yarn.lock: "" 71 | zip: "" 72 | -------------------------------------------------------------------------------- /docs/handbook/pages/applications.md: -------------------------------------------------------------------------------- 1 | <img src="https://iili.io/HvtxC1S.png" width="64" height="64" align="right" /> 2 | 3 | # HomeSetup Developer Handbook 4 | > 5 | > Applications handbook 6 | 7 | ## Table of contents 8 | 9 | <!-- toc --> 10 | 11 | - [Bash Applications](#bash-applications) 12 | - [Check-IP](applications/bash/check-ip.md#check-ip) 13 | - [Fetch](applications/bash/fetch.md#fetch) 14 | - [HHS-App](applications/bash/hhs-app.md#homesetup-application) 15 | - [Functions](applications/bash/hhs-app.md#functions) 16 | - [Built-Ins](applications/bash/hhs-app/functions/built-ins.md) 17 | - [Misc](applications/bash/hhs-app/functions/misc.md) 18 | - [Tests](applications/bash/hhs-app/functions/tests.md) 19 | - [Web](applications/bash/hhs-app/functions/web.md) 20 | - [Plugins](applications/bash/hhs-app.md#plug-ins) 21 | - [Ask](applications/bash/hhs-app/plugins/ask.md) 22 | - [Firebase](applications/bash/hhs-app/plugins/firebase.md) 23 | - [HSPM](applications/bash/hhs-app/plugins/hspm.md) 24 | - [Settings](applications/bash/hhs-app/plugins/settings.md) 25 | - [Setup](applications/bash/hhs-app/plugins/setup.md) 26 | - [Starship](applications/bash/hhs-app/plugins/starship.md) 27 | - [Updater](applications/bash/hhs-app/plugins/updater.md) 28 | 29 | <!-- tocstop --> 30 | 31 | ## Bash Applications 32 | 33 | HomeSetup comes with a bundled set of Bash applications and functions. 34 | 35 | A list of available bash applications can be found on the **README.md** 36 | section [Bash Apps](../../USAGE.md#applications). 37 | 38 | [Back to User Handbook](../handbook.md) 39 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_mchoose.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_mchoose" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_mchoose - Choose options from a list using a navigable menu. 5 | .SH SYNOPSIS 6 | .nf 7 | usage: __hhs_mchoose [options] <output_file> <title> <items...> 8 | .fi 9 | .SH DESCRIPTION 10 | Choose options from a list using a navigable menu. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Req) 14 | The response file. 15 | .TP 16 | $2 (Req) 17 | The render title. 18 | .TP 19 | $3 (Req) 20 | The array of items. 21 | .SH DETAILS 22 | .nf 23 | 24 | Options: 25 | -c : All options are initially checked instead of unchecked. 26 | 27 | Arguments: 28 | output_file : The output file where the result will be stored. 29 | title : The text to be displayed before rendering the items. 30 | items : The items to be displayed for selecting. 31 | 32 | Examples: 33 | Choose numbers from 1 to 20 (start with all options checked): 34 | => __hhs_mchoose /tmp/out.txt 'Mark the desired options' {1..20} && cat /tmp/out.txt 35 | Choose numbers from 1 to 20 (start with all options unchecked): 36 | => __hhs_mchoose -c /tmp/out.txt 'Mark the desired options' {1..20} && cat /tmp/out.txt 37 | 38 | Notes: 39 | - A temporary file is suggested to used with this command: $ mktemp. 40 | - The outfile must not exist or it be an empty file. 41 | - To initialize items individually, provide items on form: name=[True|False]. 42 | .fi 43 | .SH VERSION 44 | __hhs_mchoose (HomeSetup) 1.9.11 45 | .SH AUTHOR 46 | HomeSetup Team 47 | .SH LICENSE 48 | MIT <https://opensource.org/licenses/MIT> 49 | -------------------------------------------------------------------------------- /tests/venv-tests.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | # Script: venv-tests.bats 4 | # Purpose: HomeSetup Python venv installation tests. 5 | # Created: Mar 06, 2025 6 | # Author: <B>H</B>ugo <B>S</B>aporetti <B>J</B>unior 7 | # Mailto: taius.hhs@gmail.com 8 | # Site: https://github.com/yorevs/homesetup 9 | # License: Please refer to <https://opensource.org/licenses/MIT> 10 | # 11 | # Copyright (c) 2025, HomeSetup team 12 | 13 | load test_helper 14 | load "${HHS_FUNCTIONS_DIR}/hhs-built-ins.bash" 15 | load "${HHS_FUNCTIONS_DIR}/hhs-toml.bash" 16 | load_bats_libs 17 | 18 | setup() { 19 | PYTHON3="$(command -v python3)" || fail "Python3 is not installed on this system!" 20 | [[ -x "${PYTHON3}" ]] || fail "Python3 binary not executable!" 21 | 22 | if ! "${PYTHON3}" -m pip --version &>/dev/null; then 23 | fail "pip for Python3 is not installed or not working!" 24 | fi 25 | PIP3="${PYTHON3} -m pip" 26 | } 27 | 28 | # TC - 1 29 | @test "venv-should-be-active" { 30 | run __hhs_venv 31 | assert_success 32 | assert_output --partial "Virtual environment is Active" 33 | } 34 | 35 | # TC - 2 36 | @test "after-installation-homesetup-venv-should-be-properly-activate" { 37 | run test -n "${VIRTUAL_ENV}" 38 | assert_success 39 | [[ "${VIRTUAL_ENV}" =~ ${HHS_VENV_PATH} ]] 40 | } 41 | 42 | # TC - 3 43 | @test "after-installation-hspylib-modules-should-report-their-versions" { 44 | declare -a modules=( 45 | 'hspylib' 46 | 'hspylib-datasource' 47 | 'hspylib-clitt' 48 | 'hspylib-setman' 49 | 'hspylib-vault' 50 | 'hspylib-firebase' 51 | ) 52 | 53 | for next in "${modules[@]}"; do 54 | run ${PIP3} show "${next}" 55 | assert_success 56 | done 57 | } 58 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_md_viewer.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_md_viewer" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_md_viewer - View markdown files with syntax highlighting. 5 | .SH SYNOPSIS 6 | .nf 7 | Usage: 8 | .fi 9 | .SH DESCRIPTION 10 | View markdown files with syntax highlighting. 11 | .SH ARGUMENTS 12 | .TP 13 | $1..$N (Req) 14 | The markdown file(s) to view 15 | .SH DETAILS 16 | .nf 17 | Render markdown on the CLI, with pizzazz! 18 | 19 | glow [SOURCE|DIR] [flags] 20 | glow [command] 21 | 22 | Available Commands: 23 | completion Generate the autocompletion script for the specified shell 24 | config Edit the glow config file 25 | help Help about any command 26 | 27 | Flags: 28 | -a, --all show system files and directories (TUI-mode only) 29 | --config string config file (default /Users/hjunior/HomeSetup/docs/man/man.1/.hhs_tmp_home/Library/Preferences/glow/glow.yml) 30 | -h, --help help for glow 31 | -l, --line-numbers show line numbers (TUI-mode only) 32 | -p, --pager display with pager 33 | -n, --preserve-new-lines preserve newlines in the output 34 | -s, --style string style name or JSON path (default "auto") 35 | -t, --tui display with tui 36 | -v, --version version for glow 37 | -w, --width uint word-wrap at width (set to 0 to disable) 38 | 39 | Use "glow [command] --help" for more information about a command. 40 | .fi 41 | .SH VERSION 42 | __hhs_md_viewer (HomeSetup) 1.9.11 43 | .SH AUTHOR 44 | HomeSetup Team 45 | .SH LICENSE 46 | MIT <https://opensource.org/licenses/MIT> 47 | -------------------------------------------------------------------------------- /bin/apps/bash/hhs-app/plugins/starship/hhs-presets/hhs-andrews.toml: -------------------------------------------------------------------------------- 1 | # ~/.config/starship.toml 2 | # Credits to: https://gist.github.com/ryo-ARAKI/48a11585299f9032fa4bda60c9bba593 3 | 4 | format = """ 5 | $username\ 6 | $hostname\ 7 | $directory\ 8 | $git_branch\ 9 | $git_state\ 10 | $git_status\ 11 | $git_metrics\ 12 | $fill\ 13 | $nodejs\ 14 | $cmd_duration $jobs $time\ 15 | $line_break\ 16 | $character""" 17 | 18 | [nodejs] 19 | format = "[$symbol($version )]($style)" 20 | 21 | [fill] 22 | symbol = " " 23 | 24 | [directory] 25 | style = "blue" 26 | read_only = " " 27 | truncation_length = 4 28 | truncate_to_repo = false 29 | 30 | [character] 31 | success_symbol = "[❯](purple)" 32 | error_symbol = "[❯](red)" 33 | vicmd_symbol = "[❮](green)" 34 | 35 | [git_branch] 36 | symbol = " " 37 | format = "[$symbol$branch]($style) " 38 | style = "bright-black" 39 | 40 | [jobs] 41 | symbol = "" 42 | style = "bold red" 43 | number_threshold = 1 44 | format = "[$symbol]($style)" 45 | 46 | [git_status] 47 | format = '([\[$all_status$ahead_behind\]]($style) )' 48 | style = "cyan" 49 | 50 | [git_state] 51 | format = '\([$state( $progress_current/$progress_total)]($style)\) ' 52 | style = "bright-black" 53 | 54 | [git_metrics] 55 | disabled = false 56 | 57 | [cmd_duration] 58 | format = "[$duration]($style)" 59 | style = "yellow" 60 | 61 | [memory_usage] 62 | symbol = " " 63 | 64 | [rust] 65 | symbol = " " 66 | 67 | [time] 68 | disabled = false 69 | style = "bold white" 70 | format = "[$time]($style)" 71 | 72 | [custom.stunnel] 73 | when = "ps aux | grep stunnel | grep -v grep" 74 | command = "ps -o etime= -p $(ps aux | grep stunnel | grep -v grep | awk '{print $2}')" 75 | style = "red" 76 | format = "[TUNNEL OPEN for $output]($style)" 77 | -------------------------------------------------------------------------------- /assets/contrib/gpt/tests/test_iso_to_cron.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | # test_iso_to_cron.bats 4 | # Purpose: Tests for ISO to Cron converter script 5 | 6 | # Load helper functions 7 | load "${HHS_HOME}/tests/bats/bats-support/load" 8 | load "${HHS_HOME}/tests/bats/bats-assert/load" 9 | 10 | setup() { 11 | SCRIPT="${HHS_HOME}/assets/devel/scripts/gpt/src/iso-to-cron.bash" 12 | } 13 | 14 | @test "Version output" { 15 | run bash "$SCRIPT" -v 16 | assert_success 17 | [[ "$output" =~ ^iso-to-cron.bash\ version\ [0-9]+\.[0-9]+\.[0-9]+$ ]] 18 | } 19 | 20 | @test "Help output" { 21 | run bash "$SCRIPT" -h 22 | assert_failure 23 | [[ "$output" =~ usage:.* ]] 24 | } 25 | 26 | @test "Convert ISO to cron" { 27 | run bash "$SCRIPT" -i "2024-08-23T15:30:00Z" 28 | assert_success 29 | [ "$output" = "30 15 23 08 *" ] 30 | } 31 | 32 | @test "Convert cron to ISO" { 33 | run bash "$SCRIPT" -c "30 15 23 8 *" 34 | assert_success 35 | assert_output "2024-08-23T15:30:00" 36 | } 37 | 38 | @test "iso_to_cron handles invalid date expression" { 39 | run bash "$SCRIPT" -c "invalid date" 40 | assert_failure 41 | assert_output --partial "ERROR" 42 | } 43 | 44 | @test "cron_to_iso handles invalid cron expression" { 45 | run bash "$SCRIPT" -c "invalid cron" 46 | assert_failure 47 | assert_output --partial "ERROR" 48 | } 49 | 50 | @test "cron_to_iso <-> iso_to_cron should succeed" { 51 | run bash "$SCRIPT" -c "30 15 23 8 *" 52 | assert_success 53 | run bash "$SCRIPT" -i "$output" 54 | assert_success 55 | assert_output --partial "30 15 23 08 *" 56 | } 57 | 58 | @test "Invalid option" { 59 | run bash "$SCRIPT" -x 60 | assert_failure 61 | [[ "$output" =~ ^ERROR:\ Invalid\ option\ .+$ ]] 62 | } 63 | -------------------------------------------------------------------------------- /templates/txt/help.txt: -------------------------------------------------------------------------------- 1 | Help template 2 | ------------------------------------------------------------------------------- 3 | ``` 4 | _____ _ _ _ ____ 5 | | ___(_) __ _| | ___| |_ | _ \ ___ ___ ___ 6 | | |_ | |/ _` | |/ _ \ __| | | | |/ _ \/ __|/ __| 7 | | _| | | (_| | | __/ |_ | |_| | __/\__ \ (__ 8 | |_| |_|\__, |_|\___|\__| |____/ \___||___/\___| 9 | |___/ 10 | 11 | usage: ${APP_NAME} <arg_name> [options] 12 | # Optional: App. SYNOPSIS. 13 | # Optional: App. DESCRIPTION. 14 | 15 | options: 16 | -A | --A_long : TODO: Description about the option -A 17 | -B | --B_long <ARG_1> : TODO: Description about the option -B 18 | 19 | arguments: 20 | ARG_1 : TODO: Description about the argument 21 | 22 | examples: 23 | Example description: 24 | => example 25 | 26 | exit status: 27 | (0) Success 28 | (1) Failure due to missing/wrong client input or similar issues 29 | (2) Failure due to program execution failures 30 | 31 | Notes: 32 | - Optional: App. NOTES 33 | ``` 34 | 35 | Notes 36 | ------------------------------------------------------------------------------- 37 | 1. Uses [options] to indicate where the options go. 38 | 2. arg_name for a required, singular arg. 39 | 3. [arg_name] for an optional, singular arg. 40 | 4. arg_name... for a required arg of which there can be many. 41 | 5. [arg_name...] for an arg for which any number can be supplied. 42 | 6. {arg_name} for a set of required items; choose one. 43 | 7. {arg1_name|arg2_name} for mutually exclusive items; choose one. 44 | 8. @@ arg_name should be a descriptive, short name, in lower, snake case. 45 | 9. Figlet description is optional (use the default font). 46 | 10. Feel free to include your name/email in the end of the help. 47 | -------------------------------------------------------------------------------- /Formula/homesetup.rb: -------------------------------------------------------------------------------- 1 | class Homesetup < Formula 2 | desc "HomeSetup - The ultimate Terminal experience" 3 | homepage "https://github.com/HS-Teams/homebrew-homesetup" 4 | url "https://github.com/HS-Teams/homebrew-homesetup.git", 5 | tag: "v1.9.11" 6 | license "MIT" 7 | 8 | depends_on xcode: ["12.0", :build] 9 | depends_on :macos 10 | 11 | depends_on "bash" 12 | depends_on "git" 13 | depends_on "rsync" 14 | depends_on "vim" 15 | depends_on "make" 16 | depends_on "gcc" 17 | depends_on "tree" 18 | depends_on "pcre2" 19 | depends_on "gpg" 20 | depends_on "base64" 21 | depends_on "ruby" 22 | depends_on "gawk" 23 | depends_on "python@3.11" 24 | depends_on "jq" 25 | depends_on "hunspell" 26 | depends_on "ffmpeg" 27 | depends_on "portaudio" 28 | 29 | uses_from_macos "ruby" 30 | uses_from_macos "curl" 31 | uses_from_macos "perl" 32 | uses_from_macos "libmagic" 33 | uses_from_macos "sqlite3" 34 | 35 | def python3 36 | "python3.11" 37 | end 38 | 39 | def install 40 | py3ver = Language::Python.major_minor_version python3 41 | ENV["PYTHONPATH"] = site_packages = prefix/Language::Python.site_packages(python3) 42 | ENV["PYTHON"] = python3 43 | prefix.install Dir["*"] 44 | prefix.install Dir[".*"].reject { |f| [".", ".."].include?(File.basename(f)) } 45 | end 46 | 47 | def caveats 48 | <<~EOS 49 | Welcome to HomeSetup - The ultimate Terminal experience !" 50 | 51 | To enable HomeSetup for your user, type: 52 | $ #{prefix}/install.bash -r -b -p #{prefix} 53 | To uninstall, type: 54 | $ #{prefix}/uninstall.bash 55 | EOS 56 | end 57 | 58 | test do 59 | output = shell_output("#{prefix}/bin/apps/bash/hhs-app/hhs.bash --version") 60 | assert_match "hhs v1.1.0 built on HomeSetup v1.9.11", output 61 | end 62 | end 63 | -------------------------------------------------------------------------------- /assets/devel/nginx/nginx.conf.orig: -------------------------------------------------------------------------------- 1 | user www-data; 2 | worker_processes auto; 3 | pid /run/nginx.pid; 4 | include /etc/nginx/modules-enabled/*.conf; 5 | 6 | events { 7 | worker_connections 768; 8 | # multi_accept on; 9 | } 10 | 11 | http { 12 | 13 | ## 14 | # Basic Settings 15 | ## 16 | 17 | sendfile on; 18 | tcp_nopush on; 19 | types_hash_max_size 2048; 20 | # server_tokens off; 21 | 22 | # server_names_hash_bucket_size 64; 23 | # server_name_in_redirect off; 24 | 25 | include /etc/nginx/mime.types; 26 | default_type application/octet-stream; 27 | 28 | ## 29 | # SSL Settings 30 | ## 31 | 32 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE 33 | ssl_prefer_server_ciphers on; 34 | 35 | ## 36 | # Logging Settings 37 | ## 38 | 39 | access_log /var/log/nginx/access.log; 40 | error_log /var/log/nginx/error.log; 41 | 42 | ## 43 | # Gzip Settings 44 | ## 45 | 46 | gzip on; 47 | 48 | # gzip_vary on; 49 | # gzip_proxied any; 50 | # gzip_comp_level 6; 51 | # gzip_buffers 16 8k; 52 | # gzip_http_version 1.1; 53 | # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; 54 | 55 | ## 56 | # Virtual Host Configs 57 | ## 58 | 59 | include /etc/nginx/conf.d/*.conf; 60 | include /etc/nginx/sites-enabled/*; 61 | } 62 | 63 | 64 | #mail { 65 | # # See sample authentication script at: 66 | # # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript 67 | # 68 | # # auth_http localhost/auth.php; 69 | # # pop3_capabilities "TOP" "USER"; 70 | # # imap_capabilities "IMAP4rev1" "UIDPLUS"; 71 | # 72 | # server { 73 | # listen localhost:110; 74 | # protocol pop3; 75 | # proxy on; 76 | # } 77 | # 78 | # server { 79 | # listen localhost:143; 80 | # protocol imap; 81 | # proxy on; 82 | # } 83 | #} -------------------------------------------------------------------------------- /dotfiles/bash/bash_icons.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # shellcheck disable=SC1090,SC2034 3 | 4 | # Script: bash_icons.bash 5 | # Purpose: This file is used to hold all terminal icon definitions 6 | # Created: Nov 28, 2023 7 | # Author: <B>H</B>ugo <B>S</B>aporetti <B>J</B>unior 8 | # Mailto: taius.hhs@gmail.com 9 | # Site: https://github.com/yorevs/homesetup 10 | # License: Please refer to <https://opensource.org/licenses/MIT> 11 | # 12 | # Copyright (c) 2025, HomeSetup team 13 | 14 | # !NOTICE: Do not change this file. To customize your icons edit the file ~/.env 15 | 16 | # Do not source this file multiple times 17 | if list_contains "${HHS_ACTIVE_DOTFILES}" "bash_icons"; then 18 | __hhs_log "DEBUG" "$0 was already loaded!" 19 | else 20 | 21 | export HHS_ACTIVE_DOTFILES="${HHS_ACTIVE_DOTFILES} bash_icons" 22 | 23 | # Droid Icons 24 | ALERT_ICN="\xef\x91\xae" #  25 | ALIAS_ICN="\xef\x81\xa1" #  26 | CHECK_ICN="\xef\x81\x98" #  27 | CROSS_ICN="\xef\x81\x97" #  28 | ELLIPSIS_ICN="\xe2\x80\xa6" # … 29 | ERROR_ICN="\xe2\x9c\x98" # ✘ 30 | FAIL_ICN="\xef\x91\xa7" #  31 | FUNC_ICN="\xef\x84\xa1" #  32 | GLOBE_ICN="\xef\x82\xac" #  33 | HAND_PEACE_ICN='\xef\x89\x9b' #  34 | HELP_ICN="\xef\x81\x99" #  35 | OFF_SWITCH_ICN="\xef\x88\x84" #  36 | ON_SWITCH_ICN="\xef\x88\x85" #  37 | UNMARKED_ICN="\xef\x98\xb0" #  38 | MARKED_ICN="\xef\x98\xb4" #  39 | PASS_ICN="\xef\x98\xac" #  40 | PLUG_IN_ICN="\xef\x84\xae" #  41 | POINTER_ICN='\xef\x90\xb2' #  42 | SKIP_ICN="\xef\x91\xa8" #  43 | STAR_ICN="\xef\x80\x85" #  44 | SUCCESS_ICN="\xef\x98\xab" #  45 | TIP_ICON="\xef\x90\x80" #  46 | WARN_ICON="\xef\x81\xb1" #  47 | FOLDER_ICON="\xef\x84\x94" #  48 | UNKNOWN_ICON="\xef\x8a\x9c" #  49 | LINK_ICON="\xef\x92\x82" #  50 | FOLDER_LINK_ICON="\xef\x92\x82" #  51 | fi 52 | -------------------------------------------------------------------------------- /assets/nvim/init.vim: -------------------------------------------------------------------------------- 1 | syntax on " Enable syntax highlighting 2 | 3 | " Set netrw listing style: 4 | " 0: tree view, 1: thin tree view, 2: long listing, 3: thin long listing 5 | let g:netrw_liststyle = 3 " Use thin long listing style 6 | 7 | " Enable relative and absolute line numbers: 8 | set number " Show absolute line number for current line 9 | 10 | " Tabs & indentation settings: 11 | set tabstop=2 " Set tab width to 2 spaces 12 | set shiftwidth=2 " Set indentation level to 2 spaces 13 | set expandtab " Convert tabs to spaces 14 | set autoindent " Enable auto-indentation 15 | 16 | " Disable line wrapping: 17 | set nowrap " Disable line wrapping 18 | 19 | " Search settings: 20 | set ignorecase " Ignore case in search 21 | set smartcase " Enable case-sensitive search if uppercase is used 22 | 23 | " Highlight the current cursor line: 24 | set cursorline " Highlight the current line 25 | 26 | " Enable true color support: 27 | set termguicolors " Enable 24-bit RGB colors 28 | set background=dark " Use dark background for colorschemes 29 | set signcolumn=yes " Always show the sign column 30 | 31 | " Configure backspace behavior: 32 | set backspace=indent,eol,start " Allow backspace over indent, end-of-line, and insertion start 33 | 34 | " Clipboard integration: 35 | set clipboard+=unnamedplus " Use system clipboard for default register 36 | 37 | " Split window settings: 38 | set splitright " Open vertical splits to the right 39 | set splitbelow " Open horizontal splits below 40 | 41 | " Disable swap file creation: 42 | set noswapfile " Do not create swap files 43 | -------------------------------------------------------------------------------- /bin/apps/bash/hhs-app/functions/web.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Script: web.bash 4 | # Purpose: Contains HHS-App web based functions. 5 | # Created: Nov 29, 2023 6 | # Author: <B>H</B>ugo <B>S</B>aporetti <B>J</B>unior 7 | # Mailto: taius.hhs@gmail.com 8 | # Site: https://github.com/yorevs#homesetup 9 | # License: Please refer to <https://opensource.org/licenses/MIT> 10 | # 11 | # Copyright (c) 2025, HomeSetup team 12 | 13 | 14 | # @purpose: Open the HomeSetup GitHub page. 15 | function github() { 16 | 17 | local page_url="${HHS_GITHUB_URL}" 18 | 19 | echo -e "${BLUE}${GLOBE_ICN} Opening HomeSetup github page from: ${page_url}${ELLIPSIS_ICN}${NC}" 20 | __hhs_open "${page_url}" && sleep 2 && quit 0 21 | 22 | quit 1 "Failed to open url: \"${page_url}\" !" 23 | } 24 | 25 | # @purpose: Open the HomeSetup GitHub project board. 26 | function board() { 27 | 28 | local page_url="${HHS_GITHUB_URL}/projects/1" 29 | 30 | echo -e "${BLUE}${GLOBE_ICN} Opening HomeSetup board from: ${page_url}${ELLIPSIS_ICN}${NC}" 31 | __hhs_open "${page_url}" && sleep 2 && quit 0 32 | 33 | quit 1 "Failed to open url: \"${page_url}\" !" 34 | } 35 | 36 | # @purpose: Open the HomeSetup GitHub sponsors page. 37 | function sponsor() { 38 | 39 | local page_url="https://github.com/sponsors/yorevs" 40 | 41 | echo -e "${BLUE}${GLOBE_ICN} Opening HomeSetup sponsors page from: ${page_url}${ELLIPSIS_ICN}${NC}" 42 | __hhs_open "${page_url}" && sleep 2 && quit 0 43 | 44 | quit 1 "Failed to open url: \"${page_url}\" !" 45 | } 46 | 47 | # @purpose: Open GitHub docs of the HomeSetup. 48 | function docs() { 49 | 50 | local page_url='https://hs-teams.github.io/homesetup/' 51 | 52 | echo -e "${BLUE}${GLOBE_ICN} Opening HomeSetup docs from: ${page_url}${ELLIPSIS_ICN}${NC}" 53 | __hhs_open "${page_url}" && sleep 2 && quit 0 54 | 55 | quit 1 "Failed to open url: \"${page_url}\" !" 56 | } 57 | -------------------------------------------------------------------------------- /tests/check-ip.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | load test_helper 4 | load_bats_libs 5 | 6 | # Define the app path from environment 7 | setup() { 8 | APP="${HHS_APPS_DIR}/check-ip.bash" 9 | } 10 | 11 | # TC - 1 12 | @test "valid private class C address reports expected metadata" { 13 | run "${APP}" 192.168.0.10 14 | 15 | assert_success 16 | assert_output --partial 'Valid IP: 192.168.0.10' 17 | assert_output --partial 'Class: C' 18 | assert_output --partial 'Scope: Private' 19 | } 20 | 21 | # TC - 2 22 | @test "invalid address exits with failure and logs error" { 23 | run "${APP}" 999.10.0.1 24 | 25 | assert_failure 26 | assert_output --partial 'Invalid IP: 999.10.0.1' 27 | } 28 | 29 | # TC - 3 30 | @test "172.15.x.x is public while 172.16.x.x is private" { 31 | run "${APP}" 172.15.1.1 32 | 33 | assert_success 34 | assert_output --partial 'Scope: Public' 35 | 36 | run "${APP}" 172.16.1.1 37 | 38 | assert_success 39 | assert_output --partial 'Scope: Private' 40 | } 41 | 42 | # TC - 4 43 | @test "reserved range keeps limited broadcast distinct" { 44 | run "${APP}" 240.0.0.1 45 | 46 | assert_success 47 | assert_output --partial 'Scope: Reserved' 48 | 49 | run "${APP}" 255.255.255.255 50 | 51 | assert_success 52 | assert_output --partial 'Scope: Limited Broadcast' 53 | } 54 | 55 | # TC - 5 56 | @test "--info triggers info lookup output" { 57 | ensure_json_print 58 | run "${APP}" --info 8.8.8.8 59 | 60 | RESP=' 61 | { 62 | "status": "success", 63 | "country": "United States", 64 | "countryCode": "US", 65 | "region": "VA", 66 | "regionName": "Virginia", 67 | "city": "Ashburn", 68 | "zip": "20149", 69 | "lat": 39.03, 70 | "lon": -77.5, 71 | "timezone": "America/New_York", 72 | "isp": "Google LLC", 73 | "org": "Google Public DNS", 74 | "as": "AS15169 Google LLC", 75 | "query": "8.8.8.8" 76 | }' 77 | assert_success 78 | assert_output --partial "${RESP}" 79 | } 80 | -------------------------------------------------------------------------------- /dotfiles/inputrc: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Script: inputrc.bash 4 | # Purpose: This file is a configuration file for GNU Readline library 5 | # Created: May 04, 2018 6 | # Author: <B>H</B>ugo <B>S</B>aporetti <B>J</B>unior 7 | # Mailto: taius.hhs@gmail.com 8 | # Site: https://github.com/yorevs/homesetup 9 | # License: Please refer to <https://opensource.org/licenses/MIT> 10 | # 11 | # Copyright (c) 2025, HomeSetup team 12 | 13 | # inspiRED by: https://www.shell-tips.com/bash/shortcuts/#gsc.tab=0 14 | 15 | # Preserve system wide settings. 16 | $include /etc/inputrc 17 | 18 | # Preferences ----------------------------------------------------------- 19 | 20 | # Ensure all binding keeps the default Emacs behavior. 21 | # Most common in a Bash shell environment, even for vi users. 22 | set editing-mode emacs 23 | 24 | # Ignore case when doing auto-completion. 25 | set completion-ignore-case on 26 | 27 | # Enable completion coloring. 28 | set colored-stats on 29 | set colored-completion-prefix on 30 | 31 | # Do not bell on tab-completion (use the visible bell). 32 | set bell-style visible 33 | 34 | # Complete Options ------------------------------------------------------- 35 | 36 | # Treat hypen and underscores as equivalent. 37 | set completion-map-case on 38 | 39 | # The number of completions to display without prompt; when exceeded a 40 | # prompt-to-display will appear. 41 | set completion-query-items 200 42 | 43 | # Display the common prefix choices on the first completion then cycle the 44 | # available choices on the next completion. 45 | set menu-complete-display-prefix on 46 | 47 | # Turn off the completions pager. 48 | set page-completions off 49 | 50 | # Display the list of matches when no further completion is possible. 51 | set show-all-if-unmodified on 52 | 53 | # Immediately display completion matches. 54 | set show-all-if-ambiguous on 55 | 56 | # Smartly complete items when the cursor is not at the end of the line. 57 | set skip-completed-text on 58 | -------------------------------------------------------------------------------- /docs/handbook/pages/applications/bash/hhs-app/functions/web.md: -------------------------------------------------------------------------------- 1 | <img src="https://iili.io/HvtxC1S.png" width="64" height="64" align="right" /> 2 | 3 | # HomeSetup Developer Handbook 4 | > 5 | > Applications handbook 6 | 7 | ## Table of contents 8 | 9 | <!-- toc --> 10 | 11 | - [Bash Applications](../../../../applications.md) 12 | - [Check-IP](../../check-ip.md#check-ip) 13 | - [Fetch](../../fetch.md#fetch) 14 | - [HHS-App](../../hhs-app.md#homesetup-application) 15 | - [Functions](../../hhs-app.md#functions) 16 | - [Built-Ins](built-ins.md) 17 | - [Misc](misc.md) 18 | - [Tests](tests.md) 19 | - [Web](web.md) 20 | - [Plugins](../../hhs-app.md#plug-ins) 21 | - [Ask](../plugins/ask.md) 22 | - [Firebase](../plugins/firebase.md) 23 | - [HSPM](../plugins/hspm.md) 24 | - [Settings](../plugins/settings.md) 25 | - [Setup](../plugins/setup.md) 26 | - [Starship](../plugins/starship.md) 27 | - [Updater](../plugins/updater.md) 28 | 29 | <!-- tocstop --> 30 | 31 | ### "docsify" 32 | 33 | ```bash 34 | usage: __hhs docsify 35 | ``` 36 | 37 | #### **Purpose** 38 | 39 | Open a docsify version of the HomeSetup README. 40 | 41 | #### **Returns** 42 | 43 | **0** if the command was successfully executed; **non-zero** otherwise. 44 | 45 | #### **Examples** 46 | 47 | `__hhs docsify` 48 | 49 | **Output** 50 | 51 | ```bash 52 | Opening HomeSetup docsify README from: https://docsify-this.net/?basePath=https://raw.githubusercontent.com/yorevs/homesetup/master&sidebar=true 53 | ``` 54 | 55 | ------ 56 | 57 | ## Web 58 | 59 | ### "board" 60 | 61 | ```bash 62 | usage: __hhs board 63 | ``` 64 | 65 | #### **Purpose** 66 | 67 | Open the HomeSetup GitHub project board. 68 | 69 | #### **Returns** 70 | 71 | **0** if the command was successfully executed; **non-zero** otherwise. 72 | 73 | #### **Examples** 74 | 75 | `__hhs board` 76 | 77 | **Output** 78 | 79 | ```bash 80 | Opening HomeSetup board from: https://github.com/yorevs/homesetup/projects/1 81 | ``` 82 | -------------------------------------------------------------------------------- /docs/man/man.1/__hhs_ls_sorted.1: -------------------------------------------------------------------------------- 1 | ." Auto-generated man page. Do not edit manually. 2 | .TH "__hhs_ls_sorted" "1" "2025-11-20" "HomeSetup" "User Commands" 3 | .SH NAME 4 | __hhs_ls_sorted - List files sorted by the specified column. 5 | .SH SYNOPSIS 6 | .nf 7 | __hhs_ls_sorted --help 8 | .fi 9 | .SH DESCRIPTION 10 | List files sorted by the specified column. 11 | .SH ARGUMENTS 12 | .TP 13 | $1 (Opt) 14 | The column to sort; 9 (filename) by default 15 | .SH DETAILS 16 | .nf 17 | /opt/homebrew/Cellar/ruby/3.4.7/lib/ruby/3.4.0/rubygems/specification.rb:1421:in 'block in Gem::Specification#activate_dependencies': Could not find 'addressable' (~> 2.7) among 88 total gem(s) (Gem::MissingSpecError) 18 | Checked in 'GEM_PATH=/Users/hjunior/HomeSetup/docs/man/man.1/.hhs_tmp_home/.local/share/gem/ruby/3.4.0:/opt/homebrew/lib/ruby/gems/3.4.0:/opt/homebrew/Cellar/ruby/3.4.7/lib/ruby/gems/3.4.0' at: /opt/homebrew/lib/ruby/gems/3.4.0/specifications/colorls-1.5.0.gemspec, execute `gem env` for more information 19 | from /opt/homebrew/Cellar/ruby/3.4.7/lib/ruby/3.4.0/rubygems/specification.rb:1407:in 'Array#each' 20 | from /opt/homebrew/Cellar/ruby/3.4.7/lib/ruby/3.4.0/rubygems/specification.rb:1407:in 'Gem::Specification#activate_dependencies' 21 | from /opt/homebrew/Cellar/ruby/3.4.7/lib/ruby/3.4.0/rubygems/specification.rb:1389:in 'Gem::Specification#activate' 22 | from /opt/homebrew/Cellar/ruby/3.4.7/lib/ruby/3.4.0/rubygems.rb:255:in 'block in Gem.find_and_activate_spec_for_exe' 23 | from /opt/homebrew/Cellar/ruby/3.4.7/lib/ruby/3.4.0/rubygems.rb:254:in 'Thread::Mutex#synchronize' 24 | from /opt/homebrew/Cellar/ruby/3.4.7/lib/ruby/3.4.0/rubygems.rb:254:in 'Gem.find_and_activate_spec_for_exe' 25 | from /opt/homebrew/Cellar/ruby/3.4.7/lib/ruby/3.4.0/rubygems.rb:334:in 'Gem.activate_bin_path' 26 | from /Users/hjunior/.local/share/gem/ruby/3.4.0/bin/colorls:25:in '<main>' 27 | .fi 28 | .SH VERSION 29 | __hhs_ls_sorted (HomeSetup) 1.9.11 30 | .SH AUTHOR 31 | HomeSetup Team 32 | .SH LICENSE 33 | MIT <https://opensource.org/licenses/MIT> 34 | -------------------------------------------------------------------------------- /docs/misc/linux-releases.md: -------------------------------------------------------------------------------- 1 | # CENTOS ['centos-release','os-release','redhat-release','system-release'] 2 | 3 | ## File: os-release 4 | 5 | ```bash 6 | NAME="CentOS Linux" 7 | VERSION="8" 8 | ID="centos" 9 | ID_LIKE="rhel fedora" 10 | VERSION_ID="8" 11 | PLATFORM_ID="platform:el8" 12 | PRETTY_NAME="CentOS Linux 8" 13 | ANSI_COLOR="0;31" 14 | CPE_NAME="cpe:/o:centos:centos:8" 15 | HOME_URL="https://centos.org/" 16 | BUG_REPORT_URL="https://bugs.centos.org/" 17 | CENTOS_MANTISBT_PROJECT="CentOS-8" 18 | CENTOS_MANTISBT_PROJECT_VERSION="8" 19 | ``` 20 | 21 | # FEDORA ['fedora-release','os-release','redhat-release','system-release'] 22 | 23 | ## File: os-release 24 | 25 | ```bash 26 | NAME="Fedora Linux" 27 | VERSION="38 (Container Image)" 28 | ID=fedora 29 | VERSION_ID=38 30 | VERSION_CODENAME="" 31 | PLATFORM_ID="platform:f38" 32 | PRETTY_NAME="Fedora Linux 38 (Container Image)" 33 | ANSI_COLOR="0;38;2;60;110;180" 34 | LOGO=fedora-logo-icon 35 | CPE_NAME="cpe:/o:fedoraproject:fedora:38" 36 | DEFAULT_HOSTNAME="fedora" 37 | HOME_URL="https://fedoraproject.org/" 38 | DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f38/system-administrators-guide/" 39 | SUPPORT_URL="https://ask.fedoraproject.org/" 40 | BUG_REPORT_URL="https://bugzilla.redhat.com/" 41 | REDHAT_BUGZILLA_PRODUCT="Fedora" 42 | REDHAT_BUGZILLA_PRODUCT_VERSION=38 43 | REDHAT_SUPPORT_PRODUCT="Fedora" 44 | REDHAT_SUPPORT_PRODUCT_VERSION=38 45 | SUPPORT_END=2024-05-14 46 | VARIANT="Container Image" 47 | VARIANT_ID=container 48 | ``` 49 | 50 | # UBUNTU ['lsb-release', 'os-release'] 51 | 52 | ## File: os-release 53 | 54 | ```bash 55 | PRETTY_NAME="Ubuntu 22.04.2 LTS" 56 | NAME="Ubuntu" 57 | VERSION_ID="22.04" 58 | VERSION="22.04.2 LTS (Jammy Jellyfish)" 59 | VERSION_CODENAME=jammy 60 | ID=ubuntu 61 | ID_LIKE=debian 62 | HOME_URL="https://www.ubuntu.com/" 63 | SUPPORT_URL="https://help.ubuntu.com/" 64 | BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" 65 | PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" 66 | UBUNTU_CODENAME=jammy 67 | ``` 68 | -------------------------------------------------------------------------------- /tests/hhs-taylor.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | # Script: hhs-taylor.bats 4 | # Purpose: hhs-taylor tests. 5 | # Created: Feb 14, 2025 6 | # Author: <B>H</B>ugo <B>S</B>aporetti <B>J</B>unior 7 | # Mailto: taius.hhs@gmail.com 8 | # Site: https://github.com/yorevs/homesetup 9 | # License: Please refer to <https://opensource.org/licenses/MIT> 10 | # 11 | # Copyright (c) 2025, HomeSetup team 12 | 13 | load test_helper 14 | load "${HHS_FUNCTIONS_DIR}/hhs-taylor.bash" 15 | load_bats_libs 16 | 17 | setup() { 18 | export GREEN='<INFO>' 19 | export WHITE='<DEBUG>' 20 | export YELLOW='<WARN>' 21 | export RED='<ERROR>' 22 | export PURPLE='<THREAD>' 23 | export CYAN='<FQDN>' 24 | export VIOLET='<DATE>' 25 | export BLUE='<URI>' 26 | export NC='<NC>' 27 | 28 | log_line="[worker-1] 2024-04-21T12:00:00 INFO connecting to host example.local http://example.local/path" 29 | } 30 | 31 | # TC - 1 32 | @test "when-invoking-with-help-option-then-should-print-usage-message" { 33 | run __hhs_tailor -h 34 | assert_failure 35 | assert_output --partial "usage: __hhs_tailor [-F | -f | -r] [-q] [-b # | -c # | -n #] <file>" 36 | } 37 | 38 | # TC - 2 39 | @test "when-streaming-from-stdin-then-should-highlight-log-patterns" { 40 | run __hhs_tailor <<<"${log_line}" 41 | assert_success 42 | assert_output --partial "<THREAD>worker-1<NC>" 43 | assert_output --partial "<DATE>2024-04-21T12:00:00<NC>" 44 | assert_output --partial "<INFO>INFO<NC>" 45 | assert_output --partial "<FQDN> example.local <NC>" 46 | assert_output --partial "<URI>http://example.local/path<NC>" 47 | } 48 | 49 | # TC - 3 50 | @test "when-tailoring-a-file-with-options-then-should-forward-tail-arguments" { 51 | local log_file 52 | log_file="$(mktemp)" 53 | trap '[[ -f "${log_file}" ]] && rm -f "${log_file}"' RETURN 54 | 55 | { 56 | echo "ignored line" 57 | echo "${log_line}" 58 | } >"${log_file}" 59 | 60 | run __hhs_tailor -n 1 "${log_file}" 61 | assert_success 62 | assert_output --partial "<INFO>INFO<NC>" 63 | assert_equal "1" "$(wc -l <<<"${output}" | tr -d ' ')" 64 | } 65 | -------------------------------------------------------------------------------- /dotfiles/homesetup.toml: -------------------------------------------------------------------------------- 1 | # HomeSetup initialization settings file. 2 | # Script: homesetup.toml 3 | # Purpose: This file contains all HomeSetup configurations 4 | # Created: Nov 26, 2023 5 | # Author: <B>H</B>ugo <B>S</B>aporetti <B>J</B>unior 6 | # Mailto: taius.hhs@gmail.com 7 | # Site: https://github.com/yorevs/homesetup 8 | # License: Please refer to <https://opensource.org/licenses/MIT> 9 | # 10 | # Copyright (c) 2025, HomeSetup team 11 | 12 | # Notice: Please do not edit this file, instead use: $ hhs setup. 13 | # @version: v1.0.13 14 | 15 | # Dev notes: 16 | # .hspm -> homesetup.toml 17 | # .last_dirs -> homesetup.toml 18 | # .last_update -> homesetup.toml 19 | 20 | # Initialization setup settings 21 | [setup] 22 | 23 | # Set to allow exporting terminal language and locale on startup. 24 | hhs_set_locales = true 25 | # Set to allow exporting all Setman settings on startup. 26 | hhs_export_settings = true 27 | # Set to allow restoring the last used dir in terminal. 28 | hhs_restore_last_dir = true 29 | # Set to enable loading shell options. 30 | hhs_load_shell_options = true 31 | # Set to disable HomeBrew updates. 32 | homebrew_no_auto_update = true 33 | # Set to disable HomeSetup updates. 34 | hhs_no_auto_update = false 35 | # Set to enable auto-completions. 36 | hhs_load_completions = true 37 | # Set to enable key-bindings. 38 | hhs_load_key_bindings = true 39 | # Set to enable auto-activate HomeSetup python venv. 40 | hhs_python_venv_enabled = true 41 | # Set to enable starship prompt. 42 | hhs_use_starship = true 43 | # Set to enable blesh plug-in. 44 | hhs_use_blesh = false 45 | # Set to enable atuin plug-in. 46 | hhs_use_atuin = false 47 | # Set to display debug logs. 48 | hhs_verbose_logs = false 49 | # Set to enable ollama-AI auto-start. 50 | hhs_ollama_ai_autostart = false 51 | 52 | # Preferences 53 | 54 | # Ollama 55 | [ollama] 56 | 57 | # Models: bin/apps/bash/hhs-app/plugins/ask/models.md 58 | # Current ollama model to be used with Ask plugin. 59 | hhs_ollama_model = "phi4-mini:latest" 60 | # Current ollama markdown viewer to be used with Ask plugin. 61 | hhs_ollama_md_viewer = "__hhs_md_viewer" 62 | -------------------------------------------------------------------------------- /assets/contrib/hhs/java-switch.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Script: java-switch.bash 4 | # Purpose: Seamless switch between installed JDK versions. 5 | # Created: Mar 29, 2022 6 | # Author: <B>H</B>ugo <B>S</B>aporetti <B>J</B>unior 7 | # Mailto: taius.hhs@gmail.com 8 | # Site: https://github.com/yorevs#homesetup 9 | # License: Please refer to <https://opensource.org/licenses/MIT> 10 | # 11 | # Copyright (c) 2025, HomeSetup team 12 | 13 | JDK_SEARCH_DIR=${JDK_SEARCH_DIR:-"/Library/Java/JavaVirtualMachines"} 14 | 15 | USAGE="usage: sudo java-switch <jdk_ver>" 16 | 17 | RED="\033[31m" 18 | GREEN="\033[32m" 19 | BLUE="\033[34m" 20 | NC="\033[m" 21 | 22 | if [[ ! -d "${JDK_SEARCH_DIR}" && ! -L "${JDK_SEARCH_DIR}" ]]; then 23 | echo -e "${RED}Unable to find the JDK search dir: '${JDK_SEARCH_DIR}'${NC}" && exit 1 24 | fi 25 | 26 | if [[ $# -ne 1 ]]; then 27 | echo "${USAGE}" && exit 1 28 | fi 29 | 30 | if [ "${EUID}" -ne 0 ]; then 31 | echo -e "${RED}Please execute as root (sudo)${NC}" 32 | exit 127 33 | fi 34 | 35 | echo -e "${BLUE}[JDK] Checking for installed JDK versions at: '\033[34m${JDK_SEARCH_DIR}${NC}'..." 36 | for jdk_ver in "${JDK_SEARCH_DIR}"/**.jdk; do 37 | 38 | jdk="$(basename "${jdk_ver}")" 39 | jdk_ver="${jdk%%\.*}" 40 | jdk_ver="${jdk_ver#*\-}" 41 | 42 | [[ "$jdk_ver" -eq "$1" ]] && TO_JDK="${jdk}" 43 | 44 | if [[ -n "${TO_JDK}" ]]; then 45 | echo -e "${BLUE}[JDK] Switching to JDK: '${GREEN}${TO_JDK}${NC}'" 46 | [[ -L "${JDK_SEARCH_DIR}/Current" ]] && sudo rm -f "${JDK_SEARCH_DIR}/Current" 47 | if [[ -d "${JDK_SEARCH_DIR}/${TO_JDK}" || -L "${JDK_SEARCH_DIR}/${TO_JDK}" ]]; then 48 | echo -n "${BLUE}[JDK] " 49 | sudo ln -sfv "${JDK_SEARCH_DIR}/${TO_JDK}" "${JDK_SEARCH_DIR}/Current" 50 | [[ -d "${JDK_SEARCH_DIR}/Current" || -L "${JDK_SEARCH_DIR}/Current" ]] && { echo -e "${NC}"; exit 0; } 51 | else 52 | echo -e "${RED}[JDK] Unable to find required JDK -> ${TO_JDK}${NC}" && exit 1 53 | fi 54 | fi 55 | 56 | done 57 | 58 | echo -e "${RED}[JDK] Unable to find required JDK -> ${1}${NC}" && exit 1 59 | -------------------------------------------------------------------------------- /.github/workflows/create-release.yml: -------------------------------------------------------------------------------- 1 | name: create-release 2 | run-name: Create Release 3 | 4 | on: 5 | push: 6 | tags: 7 | - "v?[0-9]+.[0-9]+.[0-9]+" 8 | - "v?[0-9]+.[0-9]+.[0-9]+a[0-9]+" 9 | - "v?[0-9]+.[0-9]+.[0-9]+b[0-9]+" 10 | - "v?[0-9]+.[0-9]+.[0-9]+rc[0-9]+" 11 | 12 | workflow_dispatch: 13 | inputs: 14 | tag-name: 15 | description: 'Release Tag name (default to latest)' 16 | required: false 17 | type: string 18 | 19 | permissions: 20 | contents: write 21 | 22 | jobs: 23 | details: 24 | runs-on: ubuntu-latest 25 | outputs: 26 | tag_name: ${{ steps.release.outputs.tag_name }} 27 | steps: 28 | - uses: actions/checkout@v5 29 | - name: Extract tag and Details 30 | id: release 31 | run: | 32 | if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then 33 | TAG_NAME="${GITHUB_REF#refs/tags/}" 34 | elif [[ -n "${{ inputs.tag-name }}" ]]; then 35 | TAG_NAME="${{ inputs.tag-name }}" 36 | fi 37 | echo "TAG_NAME: ${TAG_NAME}" >> $GITHUB_STEP_SUMMARY 38 | echo "tag_name=$(echo "${TAG_NAME}")" >> "$GITHUB_OUTPUT" 39 | 40 | github_release: 41 | name: Create GitHub Release 42 | needs: details 43 | runs-on: ubuntu-latest 44 | permissions: 45 | contents: write 46 | steps: 47 | - name: Checkout Code 48 | uses: actions/checkout@v5 49 | with: 50 | fetch-depth: 0 51 | ref: ${{ needs.details.outputs.tag_name }} 52 | - name: Create Changelog 53 | id: change-log 54 | uses: HS-Teams/hspylib/.github/actions/changelog@master 55 | with: 56 | tag-name: ${{ needs.details.outputs.tag_name }} 57 | - name: Create GitHub Release 58 | id: create_release 59 | env: 60 | GH_TOKEN: ${{ github.token }} 61 | run: | 62 | echo "${{ steps.change-log.outputs.changelog }}" > changelog 63 | gh release create "${{ needs.details.outputs.tag_name }}" --title "${{ vars.APP_NAME }}-${{ needs.details.outputs.tag_name }}-rc${{ github.run_number }}" --notes-file changelog "assets/fonts/Droid-Sans-Mono-for-Powerline-Nerd-Font-Complete.otf" 64 | -------------------------------------------------------------------------------- /bin/apps/bash/hhs-app/plugins/starship/hhs-presets/hhs-ryo-arak.toml: -------------------------------------------------------------------------------- 1 | # ~/.config/starship.toml 2 | # Credits to: https://gist.github.com/ryo-ARAKI/48a11585299f9032fa4bda60c9bba593 3 | 4 | [battery] 5 | full_symbol = "🔋" 6 | charging_symbol = "🔌" 7 | discharging_symbol = "⚡" 8 | 9 | [[battery.display]] 10 | threshold = 30 11 | style = "bold red" 12 | 13 | [character] 14 | error_symbol = "[✖](bold red) " 15 | 16 | [cmd_duration] 17 | min_time = 10_000 # Show command duration over 10,000 milliseconds (=10 sec) 18 | format = " took [$duration]($style)" 19 | 20 | [directory] 21 | truncation_length = 5 22 | format = "[$path]($style)[$lock_symbol]($lock_style) " 23 | 24 | [git_branch] 25 | format = " [$symbol$branch]($style) " 26 | symbol = "🍣 " 27 | style = "bold yellow" 28 | 29 | [git_commit] 30 | commit_hash_length = 8 31 | style = "bold white" 32 | 33 | [git_state] 34 | format = '[\($state( $progress_current of $progress_total)\)]($style) ' 35 | 36 | [git_status] 37 | conflicted = "⚔️ " 38 | ahead = "🏎️ 💨 ×${count}" 39 | behind = "🐢 ×${count}" 40 | diverged = "🔱 🏎️ 💨 ×${ahead_count} 🐢 ×${behind_count}" 41 | untracked = "🛤️ ×${count}" 42 | stashed = "📦 " 43 | modified = "📝 ×${count}" 44 | staged = "🗃️ ×${count}" 45 | renamed = "📛 ×${count}" 46 | deleted = "🗑️ ×${count}" 47 | style = "bright-white" 48 | format = "$all_status$ahead_behind" 49 | 50 | [hostname] 51 | ssh_only = false 52 | format = "<[$hostname]($style)>" 53 | trim_at = "-" 54 | style = "bold dimmed white" 55 | disabled = true 56 | 57 | [julia] 58 | format = "[$symbol$version]($style) " 59 | symbol = "ஃ " 60 | style = "bold green" 61 | 62 | [memory_usage] 63 | format = "$symbol[${ram}( | ${swap})]($style) " 64 | threshold = 70 65 | style = "bold dimmed white" 66 | disabled = false 67 | 68 | [package] 69 | disabled = true 70 | 71 | [python] 72 | format = "[$symbol$version]($style) " 73 | style = "bold green" 74 | 75 | [rust] 76 | format = "[$symbol$version]($style) " 77 | style = "bold green" 78 | 79 | [time] 80 | time_format = "%T" 81 | format = "🕙 $time($style) " 82 | style = "bright-white" 83 | disabled = false 84 | 85 | [username] 86 | style_user = "bold dimmed blue" 87 | show_always = false 88 | 89 | [nodejs] 90 | format = "via [🤖 $version](bold green) " 91 | -------------------------------------------------------------------------------- /docs/handbook/pages/applications/bash/hhs-app/plugins/setup.md: -------------------------------------------------------------------------------- 1 | <img src="https://iili.io/HvtxC1S.png" width="64" height="64" align="right" /> 2 | 3 | # HomeSetup Developer Handbook 4 | > 5 | > Applications handbook 6 | 7 | ## Table of contents 8 | 9 | <!-- toc --> 10 | 11 | - [Bash Applications](../../../../applications.md) 12 | - [Check-IP](../../check-ip.md#check-ip) 13 | - [Fetch](../../fetch.md#fetch) 14 | - [HHS-App](../../hhs-app.md#homesetup-application) 15 | - [Functions](../../hhs-app.md#functions) 16 | - [Built-Ins](../functions/built-ins.md) 17 | - [Misc](../functions/misc.md) 18 | - [Tests](../functions/tests.md) 19 | - [Web](../functions/web.md) 20 | - [Plugins](../../hhs-app.md#plug-ins) 21 | - [Ask](ask.md) 22 | - [Firebase](firebase.md) 23 | - [HSPM](hspm.md) 24 | - [Settings](settings.md) 25 | - [Setup](setup.md) 26 | - [Starship](starship.md) 27 | - [Updater](updater.md) 28 | 29 | <!-- tocstop --> 30 | 31 | ## Setup 32 | 33 | ### "help" 34 | 35 | #### **Purpose** 36 | 37 | HomeSetup initialization setup. 38 | 39 | #### **Returns** 40 | 41 | **0** if the command was successfully executed; **non-zero** otherwise. 42 | 43 | #### **Parameters** 44 | 45 | - $1 _Optional_ : If specified, restore HomeSetup defaults. 46 | 47 | #### **Examples** 48 | 49 | `__hhs setup help` 50 | 51 | **Output** 52 | 53 | ```bash 54 | usage: __hhs setup [-restore] 55 | 56 | ____ _ 57 | / ___| ___| |_ _ _ _ __ 58 | \___ \ / _ \ __| | | | '_ \ 59 | ___) | __/ |_| |_| | |_) | 60 | |____/ \___|\__|\__,_| .__/ 61 | |_| 62 | 63 | HomeSetup initialization setup. 64 | 65 | options: 66 | -restore : Restore the HomeSetup defaults. 67 | ``` 68 | 69 | `__hhs setup` 70 | 71 | ```bash 72 | HomeSetup Initialization Settings 73 | Please check the desired startup settings: 74 | 75 | 1   hhs_set_locales 76 | 2  hhs_export_settings 77 | 3  hhs_restore_last_dir 78 | 4  hhs_use_starship 79 | 5  hhs_load_shell_options 80 | 6  homebrew_no_auto_update 81 | 7  hhs_no_auto_update 82 | 8  hhs_load_completions 83 | 84 | [Enter] Accept [↑↓] Navigate [Space] Mark [I] Invert [Esc] Quit [1..8] Goto: 85 | ``` 86 | -------------------------------------------------------------------------------- /docker/centos/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM quay.io/centos/centos:stream8 2 | 3 | LABEL maintainer="Hugo Saporetti Junior <taius.hhs@gmail.com>" 4 | 5 | USER root 6 | 7 | ENV SHELL=/bin/bash 8 | ENV HOME=/root 9 | 10 | # Fix broken mirrors and prepare base repos 11 | RUN sed -i 's|^mirrorlist=|#mirrorlist=|g' /etc/yum.repos.d/*.repo && \ 12 | sed -i 's|^#baseurl=http://mirror.centos.org|baseurl=https://vault.centos.org|g' /etc/yum.repos.d/*.repo && \ 13 | dnf -y install dnf-plugins-core epel-release && \ 14 | dnf config-manager --set-enabled powertools || dnf config-manager --set-enabled crb && \ 15 | dnf -y install \ 16 | https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm && \ 17 | dnf -y update && \ 18 | dnf -y install \ 19 | sudo curl vim wget git procps-ng glibc-common libpq-devel file cmake \ 20 | openssl-devel bzip2-devel libffi-devel rsync sqlite-devel \ 21 | alsa-lib-devel ffmpeg --nobest && \ 22 | dnf -y groupinstall "Development Tools" && \ 23 | dnf clean all && rm -rf /var/cache/dnf /var/cache/yum 24 | 25 | WORKDIR /root 26 | 27 | # Python 3.11 build 28 | RUN dnf -y install \ 29 | gcc make openssl-devel bzip2-devel libffi-devel zlib-devel \ 30 | xz-devel readline-devel sqlite-devel tk-devel gdbm-devel libuuid-devel \ 31 | ncurses-devel && \ 32 | wget https://www.python.org/ftp/python/3.11.11/Python-3.11.11.tgz && \ 33 | tar -xzf Python-3.11.11.tgz && \ 34 | cd Python-3.11.11 && \ 35 | ./configure --enable-optimizations --enable-loadable-sqlite-extensions && \ 36 | make -j"$(nproc)" && make install && \ 37 | cd .. && rm -rf Python-3.11.11 Python-3.11.11.tgz && dnf clean all 38 | 39 | # PortAudio build 40 | RUN dnf -y install \ 41 | alsa-lib-devel jack-audio-connection-kit-devel libsndfile-devel && \ 42 | wget https://files.portaudio.com/archives/pa_stable_v190700_20210406.tgz && \ 43 | tar -xzf pa_stable_v190700_20210406.tgz && \ 44 | cd portaudio && \ 45 | ./configure --with-alsa && \ 46 | make -j"$(nproc)" && make install && \ 47 | cd .. && rm -rf portaudio pa_stable_v190700_20210406.tgz && \ 48 | ldconfig 49 | 50 | # HomeSetup installation 51 | RUN curl -fsSL https://raw.githubusercontent.com/yorevs/homesetup/master/install.bash | bash 52 | 53 | CMD ["bash", "--login"] 54 | -------------------------------------------------------------------------------- /dotfiles/bash/bashrc.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Script: bashrc.bash 4 | # Purpose: This is user specific file that gets loaded each time user creates a new non-login 5 | # shell. It simply loads the required HomeSetup dotfiles and set some required paths. 6 | # Created: Aug 26, 2018 7 | # Author: <B>H</B>ugo <B>S</B>aporetti <B>J</B>unior 8 | # Mailto: taius.hhs@gmail.com 9 | # Site: https://github.com/yorevs/homesetup 10 | # License: Please refer to <https://opensource.org/licenses/MIT> 11 | # 12 | # Copyright (c) 2025, HomeSetup team 13 | 14 | # !NOTICE: Do not change this file. To customize your shell create/change the following files: 15 | # ~/.colors : To customize your colors 16 | # ~/.env : To customize your environment variables 17 | # ~/.aliases : To customize your aliases 18 | # ~/.aliasdef : To customize your aliases definitions 19 | # ~/.prompt : To customize your prompt 20 | # ~/.functions : To customize your functions 21 | # ~/.profile : To customize your profile 22 | # ~/.path : To customize your paths 23 | 24 | # If not running interactively or as a CI build, skip it. 25 | [[ -z "${JOB_NAME}" && -z "${GITHUB_ACTIONS}" && -z "${PS1}" && -z "${PS2}" ]] && return 26 | 27 | # Unset all HomeSetup variables 28 | unset "${!HHS_@}" "${!__hhs@}" 29 | 30 | export HHS_ACTIVE_DOTFILES='bashrc' 31 | 32 | if [[ ${HHS_SET_DEBUG} -eq 1 ]]; then 33 | echo -e "\033[33mStarting HomeSetup in debug mode\033[m" 34 | PS4='+ $(date "+%s.%S")\011 ' 35 | exec 3>&2 2>~/hhsrc.$$.log 36 | set -x 37 | else 38 | echo -e "\033[1;34m[${SHELL##*\/}] HomeSetup is starting...\033[m" 39 | fi 40 | 41 | # Load the dotfiles according to the user's SHELL. 42 | case "${SHELL##*\/}" in 43 | 'bash') 44 | if [[ -s "${HOME}/.hhsrc" ]]; then 45 | source "${HOME}/.hhsrc" 46 | else 47 | echo -e "\033[31mHomeSetup was not loaded because it's resource file was not found:' ${HOME}/.hhsrc' \033[m" 48 | fi 49 | ;; 50 | *) 51 | echo '' 52 | echo "Sorry ! HomeSetup is not compatible with ${SHELL##*\/} for now." 53 | echo 'You can change your default shell by typing: ' 54 | echo "$ sudo chsh -s $(command -v "${SHELL##*\/}")" 55 | echo '' 56 | ;; 57 | esac 58 | 59 | if [[ ${HHS_SET_DEBUG} -eq 1 ]]; then 60 | set +x 61 | exec 2>&3 3>&- 62 | fi 63 | -------------------------------------------------------------------------------- /dotfiles/zsh/zsh_functions.zsh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | # shellcheck disable=SC1090 3 | 4 | # Script: zsh_functions.bash 5 | # Purpose: This file is used to define some shell tools 6 | # Created: Nov 21, 2025 7 | # Author: <B>H</B>ugo <B>S</B>aporetti <B>J</B>unior 8 | # Mailto: taius.hhs@gmail.com 9 | # Site: https://github.com/yorevs/homesetup 10 | # License: Please refer to <https://opensource.org/licenses/MIT> 11 | # 12 | # Copyright (c) 2025, HomeSetup team 13 | 14 | # !NOTICE: Do not change this file. To customize your functions edit the file ~/.functions 15 | 16 | # Do not source this file multiple times. 17 | if list_contains "${HHS_ACTIVE_DOTFILES}" "zsh_functions"; then 18 | __hhs_log "DEBUG" "$0 was already loaded!" 19 | else 20 | 21 | export HHS_ACTIVE_DOTFILES="${HHS_ACTIVE_DOTFILES} bash_functions" 22 | 23 | # Load all dev tools files. 24 | while IFS= read -r line; do all+=("$line"); done < <(find "${HHS_HOME}/bin/dev-tools/bash" -type f -name "*.bash" | sort | uniq) 25 | __hhs_log "DEBUG" "Loading (${#all[@]}) dev-tools files" 26 | for file in "${all[@]}"; do 27 | __hhs_log "DEBUG" "Loading ${file}" 28 | __hhs_source "${file}" || __hhs_log "ERROR" "Unable to source file: ${file}" 29 | done 30 | 31 | # Unalias any hhs found because we need this name to use for HomeSetup 32 | unalias hhs &> /dev/null 33 | __hhs_has 'hhs' && __hhs_log "ERROR" "'hhs' is already defined: $(command -v 'hhs')" 34 | 35 | # @function: Wrapper to either invoke the hhs application or change to HHS_HOME or HHS_DIR. 36 | # @param $* [Opt] : All parameters are passed to hhs.bash. 37 | function __hhs() { 38 | 39 | if [[ -z "${1}" || "${1}" == 'home' ]]; then 40 | \cd "${HHS_HOME}" || return 1 41 | elif [[ "${1}" == 'dir' ]]; then 42 | \cd "${HHS_DIR}" || return 1 43 | else 44 | hhs.bash "${@}" || return 1 45 | fi 46 | 47 | return 0 48 | } 49 | 50 | # @function: View markdown files with syntax highlighting. 51 | # @param $1..$N [Req] : The markdown file(s) to view 52 | function __hhs_md_viewer() { 53 | # Glow 54 | if __hhs_has 'glow'; then 55 | glow -w 120 -s "dark" "${@}" 56 | elif __hhs_has 'mdless'; then 57 | mdless "${@}" 58 | elif __hhs_has 'bat'; then 59 | bat "${@}" 60 | else 61 | cat "${@}" 62 | fi 63 | } 64 | 65 | fi 66 | -------------------------------------------------------------------------------- /assets/contrib/gpt/tests/test_cron_scheduler.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | # Test suite for cron-scheduler.bash 4 | 5 | # Load helper functions 6 | load "${HHS_HOME}/tests/bats/bats-support/load" 7 | load "${HHS_HOME}/tests/bats/bats-assert/load" 8 | 9 | # Path to the script 10 | SCRIPT="${HHS_HOME}/assets/devel/scripts/gpt/src/cron-scheduler.bash" 11 | 12 | # Mock directory 13 | MOCK_DIR="${HHS_HOME}/assets/devel/scripts/gpt/tests/mocks" 14 | 15 | # Path to the iso-to-cron.bash mock script 16 | MOCK_ISO_TO_CRON="${MOCK_DIR}/iso-to-cron.bash" 17 | 18 | # Setup: Create a mock iso-to-cron.bash script 19 | setup() { 20 | # Create a temporary directory for the mock 21 | [[ -d "${MOCK_DIR}" ]] || mkdir -p "${MOCK_DIR}" 22 | # Mock iso-to-cron.bash script to return a fixed cron expression 23 | cat <<'EOF' > "${MOCK_ISO_TO_CRON}" 24 | #!/usr/bin/env bash 25 | if [[ "$1" == "-i" && "$2" == "2024-08-23T15:30:00Z" ]]; then 26 | echo "30 15 23 8 *" 27 | else 28 | echo "Invalid ISO date" >&2 29 | exit 1 30 | fi 31 | EOF 32 | chmod +x "${MOCK_ISO_TO_CRON}" 33 | } 34 | 35 | # Teardown: Remove the mock iso-to-cron.bash script 36 | teardown() { 37 | rm -f "${MOCK_ISO_TO_CRON}" 38 | } 39 | 40 | # Test: Valid ISO date and script path 41 | @test "Valid ISO date and script path" { 42 | run bash "${SCRIPT}" -s "/path/to/script.sh" -i "2024-08-23T15:30:00Z" 43 | [ "$status" -eq 0 ] 44 | [[ "${output}" =~ SUCCESS ]] 45 | } 46 | 47 | # Test: Missing ISO date argument 48 | @test "Missing ISO date argument" { 49 | run bash "${SCRIPT}" -s "/path/to/script.sh" 50 | assert_failure 51 | [[ "${output}" =~ ERROR ]] 52 | } 53 | 54 | # Test: Missing script path argument 55 | @test "Missing script path argument" { 56 | run bash "${SCRIPT}" -i "2024-08-23T15:30:00Z" 57 | assert_failure 58 | [[ "${output}" =~ ERROR ]] 59 | } 60 | 61 | # Test: Invalid ISO date 62 | @test "Invalid ISO date" { 63 | run bash "${SCRIPT}" -s "/path/to/script.sh" -i "2024-08-23T99:99:99Z" 64 | assert_failure 65 | [[ "${output}" =~ ERROR ]] 66 | } 67 | 68 | # Test: Version option 69 | @test "Version option" { 70 | run bash "${SCRIPT}" -v 71 | assert_success 72 | [[ "${output}" =~ [0-9].[0-9].[0-9] ]] 73 | } 74 | 75 | # Test: Help option 76 | @test "Help option" { 77 | run bash "${SCRIPT}" -h 78 | assert_failure 79 | [[ "${output}" =~ usage ]] 80 | } 81 | -------------------------------------------------------------------------------- /tests/hhs-text.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | # Script: hhs-text.bats 4 | # Purpose: hhs-text tests. 5 | # Created: Feb 16, 2025 6 | # Author: Generated by ChatGPT (gpt-5-codex) 7 | # License: Please refer to <https://opensource.org/licenses/MIT> 8 | # 9 | 10 | load test_helper 11 | load "${HHS_FUNCTIONS_DIR}/hhs-text.bash" 12 | load_bats_libs 13 | 14 | # TC - 1 15 | @test "when-highlighting-text-from-file-then-matching-line-is-colored" { 16 | local input_file 17 | input_file="${BATS_TEST_TMPDIR}/highlight.txt" 18 | 19 | cat <<'EOF' >"${input_file}" 20 | alpha 21 | Beta 22 | gamma 23 | EOF 24 | 25 | run __hhs_highlight "beta" "${input_file}" 26 | 27 | assert_success 28 | assert_output --partial $'\e[' 29 | assert_output --partial 'Beta' 30 | refute_output --partial 'alpha' 31 | refute_output --partial 'gamma' 32 | } 33 | 34 | # TC - 2 35 | @test "when-jq-is-available-then-json-print-uses-it" { 36 | ensure_json_print 37 | run command -v jq 38 | assert_success 39 | run __hhs_json_print '{"foo": 1, "bar": 2}' 40 | 41 | assert_success 42 | assert_output --partial '"bar": 2' 43 | assert_output --partial '"foo": 1' 44 | } 45 | 46 | # TC - 3 47 | @test "when-xmllint-is-available-then-xml-print-uses-it" { 48 | # Ensure xmllint is installed 49 | if ! command -v xmllint >/dev/null; then 50 | skip "xmllint is not installed" 51 | fi 52 | run command -v xmllint 53 | assert_success 54 | 55 | # Run the function with unformatted XML 56 | run __hhs_xml_print '<root><child>1</child><child>2</child></root>' 57 | assert_success 58 | 59 | assert_output --partial '<root>' 60 | assert_output --partial '<child>1</child>' 61 | assert_output --partial '<child>2</child>' 62 | } 63 | 64 | # TC - 4 65 | @test "when-converting-string-to-ascii-then-numeric-representations-are-returned" { 66 | run __hhs_ascof 'Hi' 67 | 68 | assert_success 69 | assert_output --partial 'Dec: 072 105' 70 | assert_output --partial 'Hex: 48 69' 71 | assert_output --partial 'Str: Hi' 72 | } 73 | 74 | # TC - 5 75 | @test "when-converting-valid-unicode-then-all-representations-are-printed" { 76 | run __hhs_utoh f123 77 | 78 | assert_success 79 | assert_output --partial "[Unicode:'\\uf123']" 80 | assert_output --partial 'Hex => \xef\x84\xa3' 81 | assert_output --partial 'Icn => ' 82 | assert_output --partial 'Oct => \357\204\243' 83 | } 84 | -------------------------------------------------------------------------------- /dotfiles/bash/bash_functions.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # shellcheck disable=SC1090 3 | 4 | # Script: bash_functions.bash 5 | # Purpose: This file is used to define some shell tools 6 | # Created: Aug 26, 2018 7 | # Author: <B>H</B>ugo <B>S</B>aporetti <B>J</B>unior 8 | # Mailto: taius.hhs@gmail.com 9 | # Site: https://github.com/yorevs/homesetup 10 | # License: Please refer to <https://opensource.org/licenses/MIT> 11 | # 12 | # Copyright (c) 2025, HomeSetup team 13 | 14 | # !NOTICE: Do not change this file. To customize your functions edit the file ~/.functions 15 | 16 | # Do not source this file multiple times. 17 | if list_contains "${HHS_ACTIVE_DOTFILES}" "bash_functions"; then 18 | __hhs_log "DEBUG" "$0 was already loaded!" 19 | else 20 | 21 | export HHS_ACTIVE_DOTFILES="${HHS_ACTIVE_DOTFILES} bash_functions" 22 | 23 | # Load all function files. 24 | all=() 25 | while IFS= read -r line; do all+=("$line"); done < <(find "${HHS_HOME}/bin/hhs-functions/bash" -type f -name "*.bash" | sort | uniq) 26 | __hhs_log "DEBUG" "Loading (${#all[@]}) hhs-function files" 27 | for file in "${all[@]}"; do 28 | __hhs_log "DEBUG" "Loading ${file}" 29 | __hhs_source "${file}" || __hhs_log "ERROR" "Unable to source file: ${file}" 30 | done 31 | 32 | # Load all dev tools files. 33 | all=() 34 | while IFS= read -r line; do all+=("$line"); done < <(find "${HHS_HOME}/bin/dev-tools/bash" -type f -name "*.bash" | sort | uniq) 35 | __hhs_log "DEBUG" "Loading (${#all[@]}) dev-tools files" 36 | for file in "${all[@]}"; do 37 | __hhs_log "DEBUG" "Loading ${file}" 38 | __hhs_source "${file}" || __hhs_log "ERROR" "Unable to source file: ${file}" 39 | done 40 | 41 | # Unalias any hhs found because we need this name to use for HomeSetup 42 | unalias hhs &> /dev/null 43 | __hhs_has 'hhs' && __hhs_log "ERROR" "'hhs' is already defined: $(command -v 'hhs')" 44 | 45 | # @function: Wrapper to either invoke the hhs application or change to HHS_HOME or HHS_DIR. 46 | # @param $* [Opt] : All parameters are passed to hhs.bash. 47 | function __hhs() { 48 | 49 | if [[ -z "${1}" || "${1}" == 'home' ]]; then 50 | __hhs_change_dir "${HHS_HOME}" || return 1 51 | elif [[ "${1}" == 'dir' ]]; then 52 | __hhs_change_dir "${HHS_DIR}" || return 1 53 | else 54 | hhs.bash "${@}" || return 1 55 | fi 56 | 57 | return 0 58 | } 59 | 60 | fi 61 | -------------------------------------------------------------------------------- /bin/apps/bash/hhs-app/plugins/starship/hhs-presets/hhs-eltonminetto.toml: -------------------------------------------------------------------------------- 1 | # ~/.config/starship.toml 2 | # Credits to: https://eltonminetto.dev/en/post/2023-05-16-improving-terminal/ 3 | 4 | [aws] 5 | disabled = true 6 | 7 | [cmake] 8 | disabled = true 9 | 10 | [cmd_duration] 11 | min_time = 500 12 | format = "[$duration]($style) " 13 | 14 | [conda] 15 | disabled = true 16 | 17 | [crystal] 18 | disabled = true 19 | 20 | [dart] 21 | disabled = true 22 | 23 | [docker_context] 24 | disabled = true 25 | 26 | [dotnet] 27 | disabled = true 28 | 29 | [elixir] 30 | disabled = true 31 | 32 | [elm] 33 | disabled = true 34 | 35 | [env_var] 36 | disabled = true 37 | 38 | [erlang] 39 | disabled = true 40 | 41 | [gcloud] 42 | disabled = true 43 | 44 | [golang] 45 | disabled = true 46 | 47 | [helm] 48 | disabled = true 49 | 50 | [java] 51 | disabled = true 52 | 53 | [jobs] 54 | disabled = true 55 | 56 | [julia] 57 | disabled = true 58 | 59 | [kotlin] 60 | disabled = true 61 | 62 | [kubernetes] 63 | format = '[☸ $context \($namespace\)](dimmed green) ' 64 | disabled = false 65 | 66 | [lua] 67 | disabled = true 68 | 69 | [memory_usage] 70 | disabled = true 71 | threshold = -1 72 | symbol = ' ' 73 | style = 'bold dimmed green' 74 | 75 | [nim] 76 | disabled = true 77 | 78 | [nix_shell] 79 | disabled = true 80 | 81 | [nodejs] 82 | disabled = true 83 | 84 | [ocaml] 85 | disabled = true 86 | 87 | [openstack] 88 | disabled = true 89 | 90 | [package] 91 | disabled = true 92 | 93 | [perl] 94 | disabled = true 95 | 96 | [php] 97 | disabled = true 98 | 99 | [purescript] 100 | disabled = true 101 | 102 | [python] 103 | disabled = true 104 | 105 | [ruby] 106 | disabled = true 107 | 108 | [rust] 109 | disabled = true 110 | 111 | [scala] 112 | disabled = true 113 | 114 | [shlvl] 115 | disabled = true 116 | 117 | [singularity] 118 | disabled = true 119 | 120 | [swift] 121 | disabled = true 122 | 123 | [status] 124 | style = 'bg:blue' 125 | symbol = '🔴 ' 126 | success_symbol = '🟢 SUCCESS' 127 | format = '[\[$symbol$common_meaning$signal_name$maybe_int\]]($style) ' 128 | map_symbol = true 129 | disabled = false 130 | 131 | [terraform] 132 | disabled = true 133 | 134 | [vagrant] 135 | disabled = true 136 | 137 | [zig] 138 | disabled = true 139 | 140 | [username] 141 | format = "[$user]($style)@" 142 | -------------------------------------------------------------------------------- /bin/apps/bash/hhs-app/plugins/firebase/firebase.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Script: firebase.bash 4 | # Purpose: Manager for HomeSetup Firebase integration 5 | # Created: Jan 06, 2020 6 | # Author: <B>H</B>ugo <B>S</B>aporetti <B>J</B>unior 7 | # Mailto: taius.hhs@gmail.com 8 | # Site: https://github.com/yorevs#homesetup 9 | # License: Please refer to <https://opensource.org/licenses/MIT> 10 | # 11 | # Copyright (c) 2025, HomeSetup team 12 | 13 | # Current plugin name 14 | PLUGIN_NAME="firebase" 15 | 16 | # Namespace cleanup 17 | UNSETS=( 18 | help version cleanup execute args action db_alias dotfiles 19 | ) 20 | 21 | # @purpose: HHS plugin required function 22 | function help() { 23 | python3 -m ${PLUGIN_NAME} -h 24 | exit $? 25 | } 26 | 27 | # @purpose: HHS plugin required function 28 | function version() { 29 | python3 -m ${PLUGIN_NAME} -v 30 | exit $? 31 | } 32 | 33 | # @purpose: HHS plugin required function 34 | function cleanup() { 35 | unset -f "${UNSETS[@]}" 36 | echo -n '' 37 | } 38 | 39 | # @purpose: HHS plugin required function 40 | function execute() { 41 | 42 | local args action db_alias dotfiles=() 43 | 44 | __hhs_is_venv || quit 1 "Not available when HomeSetup python venv is not active!" 45 | 46 | # shellcheck disable=SC2206 47 | args=(${@}) 48 | action="${args[0]}" 49 | db_alias="${args[1]}" 50 | 51 | # Find all dotfiles 52 | dotfiles=() 53 | IFS='' 54 | while read -r dotfile; do 55 | [[ "$(basename "${dotfile}")" == .last_update ]] && continue 56 | is_text_file=$(file -bL --mime "${dotfile}" | grep -v 'binary') 57 | [[ -s "${dotfile}" && -n ${is_text_file} ]] && dotfiles+=("${dotfile}") 58 | done < <(find "${HHS_DIR}" -maxdepth 1 -type f -name ".*") 59 | IFS="${OLDIFS}" 60 | [[ ${#dotfiles[@]} -eq 0 ]] && quit 2 "Unable to find any dotfile to upload!" 61 | 62 | echo '' 63 | pushd "${HHS_DIR}" &>/dev/null || quit 1 64 | 65 | if [[ 'upload' == "${action}" ]]; then 66 | python3 -m firebase upload dotfiles."${db_alias}" "${dotfiles[@]}" 67 | elif [[ 'download' == "${action}" ]]; then 68 | python3 -m firebase download dotfiles."${db_alias}" 69 | elif [[ 'setup' == "${action}" ]]; then 70 | python3 -m firebase setup 71 | else 72 | python3 -m firebase "${args[@]}" 73 | fi 74 | ret_val=$? 75 | 76 | popd &>/dev/null || quit 1 77 | echo -e "${NC}" 78 | 79 | quit ${ret_val} 80 | } 81 | -------------------------------------------------------------------------------- /assets/contrib/gpt/tests/test_file_archiver.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | # test_file_archiver.bats 4 | # Purpose: Tests for file archiver script 5 | 6 | # Load helper functions 7 | load "${HHS_HOME}/tests/bats/bats-support/load" 8 | load "${HHS_HOME}/tests/bats/bats-assert/load" 9 | 10 | # Test Setup 11 | setup() { 12 | TEST_DIR="test_directory" 13 | SCRIPT="${HHS_HOME}/assets/devel/scripts/gpt/src/file-archiver.bash" 14 | mkdir -p "$TEST_DIR" 15 | touch -t "$(date -v -60d '+%Y%m%d%H%M')" "$TEST_DIR/old_file.txt" # File older than 30 days 16 | touch -t "$(date '+%Y%m%d%H%M')" "$TEST_DIR/new_file.txt" # Recent file 17 | } 18 | 19 | # Test Teardown 20 | teardown() { 21 | rm -rf "$TEST_DIR" 22 | } 23 | 24 | # Test 1: Ensure the script fails without the mandatory directory argument 25 | @test "Fails when no directory is provided" { 26 | run "$SCRIPT" 27 | assert_failure 28 | [[ "$output" =~ "The directory argument (-d) is mandatory." ]] 29 | } 30 | 31 | # Test 2: Ensure it archives files older than the default 30 days 32 | @test "Archives files older than 30 days" { 33 | run "$SCRIPT" -d "$TEST_DIR" 34 | assert_success 35 | [ ! -f "$TEST_DIR/old_file.txt" ] # The old file should be removed 36 | [ -n "$(find "$TEST_DIR" -name 'old_file.txt_*.tar.gz' -print -quit)" ] # The old file should be archived 37 | } 38 | 39 | # Test 3: Ensure it does not archive files that are not old enough 40 | @test "Does not archive files newer than 30 days" { 41 | run "$SCRIPT" -d "$TEST_DIR" 42 | assert_success 43 | [ -f "$TEST_DIR/new_file.txt" ] # The new file should remain untouched 44 | } 45 | 46 | # Test 4: Test custom days argument 47 | @test "Archives files older than a custom number of days" { 48 | touch -t 202406010000 "$TEST_DIR/mid_file.txt" # File older than 60 days but newer than 30 49 | run "$SCRIPT" -d "$TEST_DIR" -n 60 50 | assert_success 51 | [ ! -f "$TEST_DIR/mid_file.txt" ] # The mid file should be archived 52 | [ -n "$(find "$TEST_DIR" -name 'mid_file.txt_*.tar.gz' -print -quit)" ] # The mid file should be archived 53 | } 54 | 55 | # Test 5: Ensure the script does not attempt to archive protected directories 56 | @test "Fails when attempting to archive a protected directory" { 57 | run "$SCRIPT" -d "/etc" 58 | assert_failure 59 | [[ "$output" =~ "Attempting to modify a protected system directory" ]] 60 | } 61 | -------------------------------------------------------------------------------- /docs/handbook/pages/functions.md: -------------------------------------------------------------------------------- 1 | <img src="https://iili.io/HvtxC1S.png" width="64" height="64" align="right" /> 2 | 3 | # HomeSetup Developer Handbook 4 | > 5 | > Functions handbook 6 | 7 | ## Table of contents 8 | 9 | <!-- toc --> 10 | 11 | - [Standard Tools](#standard-tools) 12 | - [Aliases Related](functions/std-tools/aliases-related.md) 13 | - [Built-ins](functions/std-tools/built-ins.md) 14 | - [CLI Terminal Tools](functions/std-tools/clitt.md) 15 | - [Command Tool](functions/std-tools/command-tool.md) 16 | - [Directory Related](functions/std-tools/directory-related.md) 17 | - [File Related](functions/std-tools/file-related.md) 18 | - [Network Related](functions/std-tools/network-related.md) 19 | - [Paths Tool](functions/std-tools/paths-tool.md) 20 | - [Profile Related](functions/std-tools/profile-related.md) 21 | - [Search Related](functions/std-tools/search-related.md) 22 | - [Security Related](functions/std-tools/security-related.md) 23 | - [Shell Utilities](functions/std-tools/shell-utilities.md) 24 | - [System Utilities](functions/std-tools/system-utilities.md) 25 | - [Taylor Tool](functions/std-tools/taylor-tool.md) 26 | - [Text Utilities](functions/std-tools/text-utilities.md) 27 | - [TOML Utilities](functions/std-tools/toml-utilities.md) 28 | - [Tool checks](functions/std-tools/toolchecks.md) 29 | - [Development Tools](#development-tools) 30 | - [Docker](functions/dev-tools/docker-tools.md) 31 | - [Git](functions/dev-tools/git-tools.md) 32 | - [Gradle](functions/dev-tools/gradle-tools.md) 33 | 34 | <!-- tocstop --> 35 | 36 | ## Standard Tools 37 | 38 | This set of tool were designed to help you on daily tasks and improve productivity with the command line. Many 39 | functions to help find files/directories, text and other utilities such as system information and partitions. A 40 | list of available functions can be found on the **README.md** section [Standard Tools](../../USAGE.md#standard-tools) 41 | 42 | ## Development Tools 43 | 44 | This section is dedicated for developers. There are a bunch of functions to make your life easier with some development 45 | tools. This set is new and will be improved in the future. Currently we have support for the following toold: 46 | 47 | - Docker 48 | - Gradle 49 | - Git 50 | 51 | A list of available functions can be found on the **README.md** section [Development Tools](../../USAGE.md#development-tools) 52 | 53 | [Back to User Handbook](../handbook.md) 54 | -------------------------------------------------------------------------------- /assets/contrib/gpt/tests/test_media_converter.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | # test_media_converter.bats 4 | # Purpose: Tests for Media converter script 5 | 6 | # Load helper functions 7 | load "${HHS_HOME}/tests/bats/bats-support/load" 8 | load "${HHS_HOME}/tests/bats/bats-assert/load" 9 | 10 | setup() { 11 | SCRIPT="${HHS_HOME}/assets/devel/scripts/gpt/src/media-converter.bash" 12 | MEDIA_FILES="${HHS_HOME}/assets/devel/scripts/gpt/tests/resources" 13 | } 14 | 15 | # @purpose: Test for conversion of an audio file to another format (mp3 to wav) 16 | @test "Convert audio file from mp3 to wav" { 17 | run "${SCRIPT}" -i "${MEDIA_FILES}/audio-1.mp3" -f wav > /dev/null 18 | [ -f "${MEDIA_FILES}/audio-1.wav" ] 19 | rm -f "${MEDIA_FILES}/audio-1.wav" 20 | } 21 | 22 | # @purpose: Test for conversion of a video file to another format (mov to mp4) 23 | @test "Convert video file from mov to mp4" { 24 | run "${SCRIPT}" -i "${MEDIA_FILES}/video-1.mov" -f mp4 > /dev/null 25 | [ -f "${MEDIA_FILES}/video-1.mp4" ] 26 | rm -f "${MEDIA_FILES}/video-1.mp4" 27 | } 28 | 29 | # @purpose: Test for custom output file name (mp3 to wav) 30 | @test "Convert audio file with a custom output file name" { 31 | run "${SCRIPT}" -i "${MEDIA_FILES}/audio-1.mp3" -o "${MEDIA_FILES}/custom-audio.wav" -f wav > /dev/null 32 | [ -f "${MEDIA_FILES}/custom-audio.wav" ] 33 | rm -f "${MEDIA_FILES}/custom-audio.wav" 34 | } 35 | 36 | # @purpose: Test script fails when no format is provided 37 | @test "Fail when no format is provided" { 38 | run "${SCRIPT}" -i "${MEDIA_FILES}/audio-1.mp3" 39 | assert_failure 40 | # Assert that the cleaned stderr output contains the expected error message 41 | assert_output --partial "Input file and format are required." 42 | } 43 | 44 | # @purpose: Test script fails when no input file is provided 45 | @test "Fail when no input file is provided" { 46 | run "${SCRIPT}" -f mp3 47 | assert_failure 48 | # Assert that the cleaned stderr output contains the expected error message 49 | assert_output --partial "Input file and format are required." 50 | } 51 | 52 | 53 | # @purpose: Test version output 54 | @test "Display version information" { 55 | run "${SCRIPT}" -v 56 | assert_output --partial "media-converter.bash version 0.0.1" 57 | } 58 | 59 | # @purpose: Test help message output 60 | @test "Display help message" { 61 | run "${SCRIPT}" -h 62 | assert_output --partial "usage:" 63 | } 64 | -------------------------------------------------------------------------------- /assets/contrib/hhs/multi-user-install.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Script: multi-user-install.bash 4 | # Purpose: Install HomeSetup for multiple users. 5 | # Created: Apr 2, 2023 6 | # Author: <B>H</B>ugo <B>S</B>aporetti <B>J</B>unior 7 | # Mailto: taius.hhs@gmail.com 8 | # Site: https://github.com/yorevs#homesetup 9 | # License: Please refer to <https://opensource.org/licenses/MIT> 10 | # 11 | # Copyright (c) 2025, HomeSetup team 12 | 13 | RED="\033[31m" 14 | GREEN="\033[32m" 15 | BLUE="\033[34m" 16 | NC="\033[m" 17 | 18 | HHS_GITHUB_URL='https://github.com/yorevs/homesetup' 19 | 20 | HHS_GROUP="${HHS_GROUP:-homesetup}" 21 | 22 | INSTALL_DIR="${1:-/var/lib/homesetup}" 23 | 24 | HHS_USERS=("${@:2}") 25 | 26 | USAGE="usage: multi-user-install <install_dir> <username...>" 27 | 28 | if [[ $# -le 1 || ${#HHS_USERS[@]} -eq 0 ]]; then 29 | echo "${USAGE}" && exit 1 30 | fi 31 | 32 | if [ "${EUID}" -ne 0 ]; then 33 | echo -e "${RED}Please execute as root (sudo)${NC}" 34 | exit 127 35 | fi 36 | 37 | # Add the HomeSetup group 38 | if [[ -z $(getent group "${HHS_GROUP}") ]]; then 39 | echo -e "${BLUE}==> Adding HomeSetup group${NC}" 40 | groupadd "${HHS_GROUP}" 41 | fi 42 | 43 | # Clone/Pull the repository 44 | if [[ -d "${INSTALL_DIR}" ]]; then 45 | pushd "${INSTALL_DIR}" &>/dev/null || exit 1 46 | echo -e "${BLUE}==> Pulling HomeSetup project${NC}" 47 | git pull &>/dev/null 48 | popd &>/dev/null || exit 1 49 | else 50 | echo -e "${BLUE}==> Cloning HomeSetup project${NC}" 51 | git clone "${HHS_GITHUB_URL}.git" "${INSTALL_DIR}" &>/dev/null 52 | fi 53 | 54 | # Change the group of HomeSetup files 55 | echo -e "${BLUE}==> Changing the group of HomeSetup files${NC}" 56 | chgrp -R "${HHS_GROUP}" "${INSTALL_DIR}" 57 | 58 | # Change the group of /temp dir 59 | echo -e "${BLUE}==> Changing the group of /temp dir${NC}" 60 | chgrp -R "${HHS_GROUP}" "${TEMP}" 61 | 62 | # Give read permissions to HomeSetup group 63 | echo -e "${BLUE}==> Giving read permissions to '${HHS_GROUP}' group${NC}" 64 | chmod g+r -R "${INSTALL_DIR}" 65 | 66 | # Give read permissions to HomeSetup group 67 | echo -e "${BLUE}==> Giving read permissions to '${HHS_GROUP}' group${NC}" 68 | chmod g+r -R "${TEMP}" 69 | 70 | # Add users to the HomeSetup group 71 | for usr in "${HHS_USERS[@]}"; do 72 | echo -e "${BLUE}==> Adding '${usr}' to '${HHS_GROUP}' group${NC}" 73 | usermod -a -G "${HHS_GROUP}" "${usr}" 74 | done 75 | 76 | echo -e "${GREEN}Installation succeeded !${NC}" 77 | -------------------------------------------------------------------------------- /templates/git/hooks/prepare-commit-msg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | """@script: prepare-commit-msg 4 | @purpose: Prevents a user to commit on master branch, unless unlocked. 5 | @created: Oct 30, 2019 6 | @author: <B>H</B>ugo <B>S</B>aporetti <B>J</B>unior 7 | @mailto: taius.hhs@gmail.com 8 | @site: https://github.com/yorevs/homesetup 9 | @license: Please refer to <https://opensource.org/licenses/MIT> 10 | 11 | # Git provided parameters: 12 | # $1 - the temporary file for the commit message. 13 | # $2 - the source of the commit message. 14 | # $3 - the commit SHA-1. 15 | """ 16 | import re 17 | import sys 18 | from os import path, remove 19 | from subprocess import check_output 20 | 21 | # App arguments 22 | branch_name = check_output(['git', 'symbolic-ref', '--short', 'HEAD']).strip() 23 | top_level_dir = check_output(['git', 'rev-parse', '--show-toplevel']).strip() 24 | 25 | # Master protection 26 | master_unlock_file = 'master-unlock' 27 | master_unlock_path = '%s/%s' % (top_level_dir, master_unlock_file) 28 | 29 | # This will prevent any commit to master, unless, you are sure of it by creating a master unlock file 30 | default_branch = str(check_output(["git", "symbolic-ref", "refs/remotes/origin/HEAD"])) 31 | if re.search(r'^refs/remotes/origin/(.*)', default_branch): 32 | mat = re.search(r'^refs/remotes/origin/(.*)', default_branch) 33 | if branch_name == mat.group(1): 34 | if not path.exists(master_unlock_path): 35 | print("[ERROR] Can't commit to [MASTER]. Please use the a proper branch instead!") 36 | print("E.g: 'ISSUE-1230'") 37 | print("To create the branch type: ") 38 | print(" => $ git checkout -B ISSUE-1230") 39 | print("If you really want to commit to master create the unlock file: ") 40 | print(" $ touch {}".format(master_unlock_file)) 41 | print("And commit again !") 42 | sys.exit(1) 43 | else: 44 | print('[WARN] Commit to master unlocked ONCE. Create another {} file to commit to master again' 45 | .format(master_unlock_path)) 46 | try: 47 | remove(master_unlock_path) 48 | open(master_unlock_path, 'a').close() 49 | except OSError as error: 50 | print('[ERROR] Unable to remove master unlock file: {}. Commit to master aborted!' 51 | .format(master_unlock_path)) 52 | sys.exit(1) 53 | 54 | sys.exit(0) 55 | --------------------------------------------------------------------------------