Skip to content

bigfnj/conflicted-computing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

193 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conflicted-Computing

Current version: 1.1.0

Conflicted-Computing is a modular Bash prompt package. The core prompt installs to ~/.ps1, then Bash loads it through managed startup blocks in ~/.bashrc and, when needed, ~/.bash_profile.

The dynamic prompt keeps the original two-line shape:

PWD
SMILEY USER@HOST $

It updates through a managed PROMPT_COMMAND hook, so the prompt can recolor itself as the shell state changes while preserving pre-existing prompt hooks. The core prompt includes:

  • disk_color: colors the working directory by disk/write state.
  • job_color: colors the prompt suffix when jobs are running or suspended.
  • exit-code smiley: green for success, red for failure.
  • user/host coloring: root, sudo-user, local, SSH, and unsecured remote hints.

Install

Clone the repo and run the installer:

git clone https://github.com/bigfnj/conflicted-computing.git
cd conflicted-computing
./install.sh

The core prompt is mandatory. Every dependency-backed module is optional and the installer asks before enabling it.

Preview the install without changing files:

./install.sh --dry-run

Remove managed files and startup blocks:

./install.sh --uninstall

Optional Modules

Module What It Enables Dependency Handling
bat Enables ccat as a compatibility alias to detected bat/batcat; can optionally alias cat to the same command for the modern bat look Prompts before installing distro package bat; can check apt metadata for updates when bat is already installed
net-tools Enables ports='netstat -tulanp' Prompts before installing net-tools
nftables Enables nftfw, nftlist, nftlistin, nftlistfw, nftlistout, firewall Prompts before installing nftables
motd Installs the login MOTD script to /etc/profile.d/conflicted-computing-motd.sh Prompts before installing figlet
tmux Installs curated ~/.tmux.conf Prompts before installing tmux
screen Installs curated ~/.screenrc Prompts before installing screen
vim Installs curated ~/.vimrc Prompts before installing vim
wget Installs curated ~/.wgetrc Prompts before installing wget
dev-tools Installs shell development tools Prompts before installing shellcheck, shfmt, and bats

Declined modules are not installed and are not sourced. For example, declining nftables means no firewall helpers are active; declining net-tools means no ports alias is active; declining bat means no ccat or cat alias is active.

What Gets Installed

Core files are installed under ~/.ps1:

~/.ps1/
  loader.sh
  env.sh
  colors.sh
  aliases.sh
  functions.sh
  linux_release.sh
  prompt_dynamic.sh
  prompt_standard.sh
  ascii.txt
  enabled-modules.sh
  install-state

Optional shell modules install under ~/.ps1/modules/<module>/ and are sourced only from the generated enabled-modules.sh.

The installer backs up existing target files before modifying or replacing them. Backups use this suffix:

.conflicted-computing.YYYYMMDDHHMMSS.bak

Repo Layout

profile/              Core Bash prompt package files
modules/              Optional dependency-backed aliases and scripts
configs/templates/    Curated terminal config templates
install/              Installer helper library and module manifest
legacy/               Historical examples and old reference material
docs/                 Project notes, color tools, Windows terminal references

Development Checks

Run the full smoke test:

./tools/smoke-test.sh

Manual checks that need sudo, a real terminal, or live OS integration are listed in smoke-test.md.

Run syntax checks on shell files directly:

bash -n install.sh install/lib.sh install/manifest.sh
bash -n profile/bash_profile.sh profile/ps1/*.sh modules/*/*.sh

Run ShellCheck:

shellcheck install.sh install/lib.sh install/manifest.sh \
  profile/bash_profile.sh profile/ps1/*.sh modules/*/*.sh

About

Bash Profile Enhancements & Other Linux Quality of Life Improvements

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors