Compare commits
No commits in common. "367b3ca5bb0798dcda57560806322fb3e33c3cbf" and "3294f8f6b2fb44569fb360f38a295a60f7c8e276" have entirely different histories.
367b3ca5bb
...
3294f8f6b2
7 changed files with 26 additions and 39 deletions
|
@ -1,3 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
[[ "${CONFIG_AUTOSAVE_HISTORY}" == "1" ]] && export "PROMPT_COMMAND=history -a"
|
|
|
@ -1,6 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
if [ "${CONFIG_BETTER_COMPLETION}" == "1" ]; then
|
|
||||||
bind 'set show-all-if-ambiguous on'
|
|
||||||
bind 'TAB:menu-complete'
|
|
||||||
fi
|
|
|
@ -1,7 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
if [[ "${CONFIG_CUSTOM_PROMPT}" == "1" ]]; then
|
|
||||||
export "PS1=\[\033[38;5;33m\][\[$(tput sgr0)\]\[\033[38;5;38m\]\u\[$(tput sgr0)\]\[\033[38;5;33m\]@\[$(tput sgr0)\]\[\033[38;5;38m\]\H\[$(tput sgr0)\]\[\033[38;5;33m\]:\[$(tput sgr0)\]\[\033[38;5;38m\]\W\[$(tput sgr0)\] \[$(tput sgr0)\]\[\033[38;5;214m\]\$?\[$(tput sgr0)\]\[\033[38;5;33m\]]\\$\[$(tput sgr0)\] "
|
|
||||||
export "PS2=\[\033[38;5;196m\][incomplete]: \033[0;10m"
|
|
||||||
export "PS4=\${0}:\${LINENO}+ "
|
|
||||||
fi
|
|
|
@ -1,3 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
export "EDITOR=${CONFIG_EDITOR}"
|
|
|
@ -1,4 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
[[ "${CONFIG_FLOW_CONTROl}" == "0" ]] && stty -ixon
|
|
||||||
[[ "${CONFIG_FLOW_CONTROL}" == "1" ]] && stty ixon
|
|
|
@ -1,6 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
if [ -n "${CONFIG_REPLACE_PKGMGR_ORIGINAL}" ] && [ -n "${CONFIG_REPLACE_PKGMGR_REPLACEMENT}" ]; then
|
|
||||||
# shellcheck disable=SC2139
|
|
||||||
alias "${CONFIG_REPLACE_PKGMGR_ORIGINAL}=${CONFIG_REPLACE_PKGMGR_REPLACEMENT}"
|
|
||||||
fi
|
|
36
startup.sh
36
startup.sh
|
@ -32,20 +32,17 @@ cd "${BASHRCD_HOMEDIR}" || (
|
||||||
[[ -f "init.d/aliases.sh" ]] && source "init.d/aliases.sh"
|
[[ -f "init.d/aliases.sh" ]] && source "init.d/aliases.sh"
|
||||||
[[ -f "init.d/functions.sh" ]] && source "init.d/functions.sh"
|
[[ -f "init.d/functions.sh" ]] && source "init.d/functions.sh"
|
||||||
|
|
||||||
# Create default configuration file
|
# Create new configuration file
|
||||||
if [ ! -f "config.sh" ]; then
|
if [ ! -f "config.sh" ]; then
|
||||||
if [ -n "${BASHRCD_SYSTEM}" ] && [ "${UID}" != "0" ]; then
|
if [ -n "${BASHRCD_SYSTEM}" ] && [ "${UID}" != "0" ]; then
|
||||||
echo ":: Warning: Can't create system-wide configuration file as normal user."
|
echo ":: Warning: Can't create system-wide configuration file as normal user."
|
||||||
else
|
else
|
||||||
$(which cat) << EOF >> config.sh
|
$(which cat) << EOF >> config.sh
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Example configuration
|
CONFIG_FLOW_CONTROL=0
|
||||||
|
|
||||||
CONFIG_AUTOSAVE_HISTORY=1
|
CONFIG_AUTOSAVE_HISTORY=1
|
||||||
CONFIG_BETTER_COMPLETION=1
|
|
||||||
CONFIG_CUSTOM_PROMPT=1
|
CONFIG_CUSTOM_PROMPT=1
|
||||||
CONFIG_EDITOR=nano
|
CONFIG_EDITOR=nano
|
||||||
CONFIG_FLOW_CONTROL=0
|
|
||||||
CONFIG_REPLACE_PKGMGR_ORIGINAL=pacman
|
CONFIG_REPLACE_PKGMGR_ORIGINAL=pacman
|
||||||
CONFIG_REPLACE_PKGMGR_REPLACEMENT=paru
|
CONFIG_REPLACE_PKGMGR_REPLACEMENT=paru
|
||||||
EOF
|
EOF
|
||||||
|
@ -55,11 +52,30 @@ fi
|
||||||
# Load configuration file
|
# Load configuration file
|
||||||
[[ -f "config.sh" ]] && source "config.sh"
|
[[ -f "config.sh" ]] && source "config.sh"
|
||||||
|
|
||||||
# Run settings scripts
|
# Process configuration changes
|
||||||
for file in settings.d/*; do
|
# -> Flow control
|
||||||
# shellcheck disable=SC1090
|
[[ "${CONFIG_FLOW_CONTROl}" == "0" ]] && stty -ixon
|
||||||
source "${file}"
|
[[ "${CONFIG_FLOW_CONTROL}" == "1" ]] && stty ixon
|
||||||
done
|
|
||||||
|
# -> Autosave history
|
||||||
|
[[ "${CONFIG_AUTOSAVE_HISTORY}" == "1" ]] && export "PROMPT_COMMAND=history -a"
|
||||||
|
|
||||||
|
# -> Custom prompt
|
||||||
|
if [[ "${CONFIG_CUSTOM_PROMPT}" == "1" ]]; then
|
||||||
|
export "PS1=\[\033[38;5;33m\][\[$(tput sgr0)\]\[\033[38;5;38m\]\u\[$(tput sgr0)\]\[\033[38;5;33m\]@\[$(tput sgr0)\]\[\033[38;5;38m\]\H\[$(tput sgr0)\]\[\033[38;5;33m\]:\[$(tput sgr0)\]\[\033[38;5;38m\]\W\[$(tput sgr0)\] \[$(tput sgr0)\]\[\033[38;5;214m\]\$?\[$(tput sgr0)\]\[\033[38;5;33m\]]\\$\[$(tput sgr0)\] "
|
||||||
|
export "PS2=\[\033[38;5;196m\][incomplete]: \033[0;10m"
|
||||||
|
export "PS4=\${0}:\${LINENO}+ "
|
||||||
|
fi
|
||||||
|
|
||||||
|
# -> Editor
|
||||||
|
export "EDITOR=${CONFIG_EDITOR}"
|
||||||
|
|
||||||
|
# -> Package manager replacement
|
||||||
|
if [ -n "${CONFIG_REPLACE_PKGMGR_ORIGINAL}" ] && [ -n "${CONFIG_REPLACE_PKGMGR_REPLACEMENT}" ]; then
|
||||||
|
# shellcheck disable=SC2139
|
||||||
|
alias "${CONFIG_REPLACE_PKGMGR_ORIGINAL}=${CONFIG_REPLACE_PKGMGR_REPLACEMENT}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Initialize shell programs
|
# Initialize shell programs
|
||||||
for file in programs.d/*; do
|
for file in programs.d/*; do
|
||||||
|
|
Loading…
Reference in a new issue