Compare commits
8 Commits
f7869fd453
...
prod
| Author | SHA1 | Date | |
|---|---|---|---|
| 195c315714 | |||
| b91b43b56d | |||
| a64f2253b6 | |||
| 7f21a0fc7b | |||
| 87aca38811 | |||
| 9ce7c641af | |||
| 71cf71e29b | |||
| 58525e2a5c |
@@ -39,7 +39,7 @@ echo "*** Creating backup at '$BACKUP' ***"
|
||||
sudo zip -rv "$BACKUP" \
|
||||
/etc /var/{log,mail,spool} /srv /boot \
|
||||
/usr/local/etc $EXTRA \
|
||||
-x "/srv/backup/*"
|
||||
-x "/srv/backup/*" -x "/srv/sftp/*"
|
||||
status="$?"
|
||||
|
||||
if [[ "$status" != 0 ]]; then
|
||||
|
||||
@@ -145,7 +145,50 @@
|
||||
fi
|
||||
curl "https://wttr.in/${1//\ /+}"
|
||||
}
|
||||
export_PS1: export PS1='[\u@\h \w]\$ '
|
||||
export_PS1: |
|
||||
## Prompts ##
|
||||
|
||||
# Old Trusty
|
||||
#export PS1='[\u@\h \w]\$ '
|
||||
|
||||
# 20251201 - Add time.
|
||||
#export PS1='[\t \u@\h \w]\$ '
|
||||
|
||||
# 20251201 - Add colors.
|
||||
# This helps to determine the color palette numbers:
|
||||
# https://robotmoon.com/bash-prompt-generator/
|
||||
PURPLE=`tput setaf 5`
|
||||
ORANGE=`tput setaf 214`
|
||||
GREEN=`tput setaf 2`
|
||||
|
||||
RED=`tput setaf 9`
|
||||
SCARLET=`tput setaf 1`
|
||||
YELLOW=`tput setaf 226` # 11 does not seem to work
|
||||
|
||||
GRAY=`tput setaf 8`
|
||||
|
||||
RESET=`tput sgr0`
|
||||
BOLD=`tput bold`
|
||||
|
||||
if [[ "$USER" == "root" || $UID == 0 ]]; then
|
||||
CLR_BRACKETS=$BOLD$YELLOW
|
||||
CLR_TIME=$BOLD$ORANGE
|
||||
CLR_USER=$BOLD$SCARLET
|
||||
CLR_DIR=$BOLD$RED
|
||||
CLR_PROMPT=$BOLD$GRAY
|
||||
else
|
||||
CLR_BRACKETS=$RESET
|
||||
CLR_TIME=$BOLD$PURPLE
|
||||
CLR_USER=$BOLD$ORANGE
|
||||
CLR_DIR=$BOLD$GREEN
|
||||
CLR_PROMPT=$RESET
|
||||
fi
|
||||
|
||||
export PS1='\[$CLR_BRACKETS\][\[$CLR_TIME\]\t \[$CLR_USER\]\u@\h \[$CLR_DIR\]\w\[$CLR_BRACKETS\]]\[$CLR_PROMPT\]\$ \[$RESET\]'
|
||||
|
||||
export PS2='\[$CLR_BRACKETS\](\[$CLR_TIME\]>\[$CLR_USER\]^\[$CLR_DIR\].\[$CLR_USER\]^\[$CLR_BRACKETS\])\[$CLR_TIME\]> \[$RESET\]'
|
||||
|
||||
## End Prompts ##
|
||||
alias_remount: |
|
||||
alias remount='
|
||||
sudo umount /mnt/*
|
||||
@@ -957,7 +1000,7 @@
|
||||
|
||||
if [[ "$rcvr" == "main" ]]; then
|
||||
echo "*** ERROR: Are you nuts, fool!? Not main! Do it manually! ***"
|
||||
exit 1
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [[ -z "$base" ]]; then
|
||||
@@ -967,7 +1010,7 @@
|
||||
base="dev"
|
||||
else
|
||||
echo "* Unsure which branch to use for '$rcvr'. Please specify."
|
||||
exit 1
|
||||
return 1
|
||||
fi
|
||||
echo "* Base was not specified, using '$base' for '$rcvr'."
|
||||
else
|
||||
@@ -1063,6 +1106,15 @@
|
||||
status="$?"
|
||||
return "$status"
|
||||
}
|
||||
function_loop: |
|
||||
function loop {
|
||||
cmd="$1"
|
||||
while true; do
|
||||
$cmd
|
||||
done;
|
||||
}
|
||||
alias try="loop "
|
||||
|
||||
|
||||
- name: General | Account Management | Users | Files | Common Variable
|
||||
set_fact:
|
||||
@@ -1146,6 +1198,7 @@
|
||||
{{ alias_docker_other }}
|
||||
{{ alias_flatpak_clean }}
|
||||
{{ alias_commit }}
|
||||
{{ function_loop }}
|
||||
|
||||
- name: General | Account Management | Users | Files | .bashrc
|
||||
blockinfile:
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
- "{{ evolution }}*"
|
||||
- gparted
|
||||
- hugo
|
||||
- wireless-tools
|
||||
state: present
|
||||
|
||||
- name: Workstation | Linux | Software | Packages | GS Connect (KDE Connect, Android Tool)
|
||||
|
||||
Reference in New Issue
Block a user