abelsromero / bash-extensions

:computer: Custom Bash extensions
GNU Lesser General Public License v3.0
1 stars 0 forks source link

= Custom Bash extensions ifndef::env-github[:icons: font] ifdef::env-github[] :badges: :tag: main :!toc-title: :tip-caption: :bulb: :note-caption: :paperclip: :important-caption: :heavy_exclamation_mark: :caution-caption: :fire: :warning-caption: :warning: endif::[] :repo-url: https://github.com/abelsromero/bash-extensions :main-branch-url: blob/main :modules-dir: modules

This repo contains several bash customizations for my personal use.

WARNING: While I try to keep it general and modular, some tools are specific to my daily use and will not work. For example, {repo-url}/{main-branch-url}/scripts/xrandr_setup.sh[screen setup] depends on connection used.

== Motivation(s)

. Make my installation of shells quicker . Play a bit with Bash . Avoid bloat

== Installation

. Place the shell in the user home directory (type cd).

. Clone the repo with

git clone https://github.com/abelsromero/bash-extensions.git ".${USER}_ext"

. (ONLY for https://github.com/polybar/polybar[polybar]) Add 'scripts' folder to path in .profile or .zprofile (depending on your configuration).

export PATH=$PATH:~/."$USER"_ext/scripts

. Add the following lines to .zshrc. Make use no other shell configurations are enabled, depending on distro, you may need to totally remove the files content.

source ~/.${USER}_ext/bootstrap.sh

. Copy files in home folder to your home.

WARNING: Do NOT copy '.config' folder if you are not interested apps configuration. For example, when running in macos.

. Correct path to .gitignore_global in .gitconfig.

. Set up your Git username and email.

git config --global user.name "my.user@email.com" git config --global user.email "Name Surname(s)"

. Set emails in git_config_email.sh.

. Setup GPG Git signature (signingKey). // Import https://linuxhint.com/export-import-keys-with-gpg/ // List gpg --list-keys and copy id to .gitconfig

. Close and re-open the shell.

If all is fine, you should see the new promp layout with '>>>'.

== Modules

A {modules-dir} is any "Bash compatible" script locating inside the {modules-dir} directory inside the installation. By default, any file with '.sh' extension in the folder will be automatically sourced.

== Tips & tricks

=== Hidden files

Files & folders can be named to avoid accidental commit. Anything with prefix '_' will be ignored.