Inital commit

This commit is contained in:
Patrick Verschuer
2026-02-10 17:45:43 +01:00
parent 5e42471eee
commit 1d77beae73
5 changed files with 43 additions and 0 deletions

4
lib/bash_history Normal file
View File

@@ -0,0 +1,4 @@
export HISTTIMEFORMAT='%Y_%m_%d %H:%M:%S '
export HISTFILESIZE='big'
export HISTSIZE='big'
export HISTFILE=~/.bash_history_patrick

3
lib/general Normal file
View File

@@ -0,0 +1,3 @@
#!/usr/bin/env bash
export PROMPT_COMMAND="history -a"

13
lib/root Normal file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
rsudo () {
. /etc/os-release
RHEL_MAJOR_VERSION=$(echo "$VERSION_ID" | cut -d'.' -f1)
if [ "$RHEL_MAJOR_VERSION" -eq 7 ]; then
sudo -i /bin/bash -c ". ${WHOIAM}; exec bash"
else
sudo machinectl shell root@.host /bin/bash -c ". /etc/profile; . ${WHOIAM}; exec bash"
fi
}

13
lib/source_colors Normal file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
if [[ $- == *i* ]]; then
COLOR_RESET="\\[$(tput sgr0)\\]"
COLOR_BLACK="\\[$(tput setaf 0)\\]"
COLOR_RED="\\[$(tput setaf 1)\\]"
COLOR_GREEN="\\[$(tput setaf 2)\\]"
COLOR_YELLOW="\\[$(tput setaf 3)\\]"
COLOR_BLUE="\\[$(tput setaf 4)\\]"
COLOR_MAGENTA="\\[$(tput setaf 5)\\]"
COLOR_CYAN="\\[$(tput setaf 6)\\]"
COLOR_WHITE="\\[$(tput setaf 7)\\]"
fi