commit first, test laster, lol

This commit is contained in:
David Neumaier 2026-04-01 16:06:40 +02:00
parent 1073e803f7
commit 1f75254004
6 changed files with 49 additions and 24 deletions

View File

@ -2,11 +2,38 @@
read -p "Do you want to install Qash? This will move your old .bashrc and replace it with Qash. y/N "
if [[ $REPLY -eq 'y' ]]; then
mv ~/.bashrc ~/.bashrc.old
dir=./library/getdir.sh
echo "#!/bin/bash" >> ~/.bashrc
echo "$dir/load.sh" >> ~/.bashrc
~/.bashrc
echo "Qash $QASH_VERSION successfully installed!"
if [[ $REPLY == 'y' ]]; then
dir=~/qash/
if [[ $# -gt 1 ]]; then
dir=$1
fi
echo "Installing Qash in $dir..."
echo "Copying files..."
if [[ -d $dir ]]; then
read -p "$dir already exists. Proceed to remove it including all of its contents? y/N "
if [[ $REPLY == 'y' ]]; then
rm -rf $dir
else
echo "Installation cancelled."
exit 1
fi
fi
mkdir -p "$dir/hooks"
cp -r ./library/* $dir
cp -r ./library/hooks/* $dir/hooks/
echo "Backing up old .bashrc..."
mv ~/.bashrc ~/.bashrc.old
source ./library/load.sh
echo "#!/bin/bash" >> ~/.bashrc
echo "# Qash $QASH_VERSION" >> ~/.bashrc
echo "# Installed on $(date -u +'%02d.%02m.%Y %02H:%02M:%02S')" >> ~/.bashrc
echo "" >> ~/.bashrc
echo "source $QASH_LIBRARY_DIR/load.sh" >> ~/.bashrc
printf "\e[35mQash $QASH_VERSION successfully installed!\e[0m"
exit 1
fi
echo "Installation cancelled."
exit 1

View File

@ -13,7 +13,7 @@ fi
isroot() {
if [[ "$EUID" -eq 0 ]]; then
echo 1
elif
else
echo 0
fi
}

View File

@ -1,2 +1,2 @@
#!/bin/bash
export PROMPT_COMMAND="$QASH_LIBRARY_DIR/check_deadline; $PROMPT_COMMAND"
export PROMPT_COMMAND="$QASH_LIBRARY_DIR/deadline.check.sh; $PROMPT_COMMAND"

View File

@ -1,3 +0,0 @@
#!/bin/bash
dir=$(cd "$(dirname "${BASH_SOURCE}")" && pwd)
echo "$dir"

View File

@ -1,5 +1,5 @@
#!/bin/bash
LIBRARY_DIR=$(./getdir.sh)
LIBRARY_DIR=$(cd "$(dirname "${BASH_SOURCE}")" && pwd)
export QASH_VERSION='v0.2.1'
export QASH_ENABLE_DEADLINE_CHECK=1
@ -9,14 +9,14 @@ export QASH_LIBRARY_DIR="$LIBRARY_DIR"
source "$LIBRARY_DIR/aliases.sh"
source "$LIBRARY_DIR/qash.sh"
if [[ $QASH_ENABLE_DEADLINE_CHECK ]]; then
$LIBRARY_DIR/check_deadline.sh
if [[ $QASH_ENABLE_DEADLINE_CHECK == 1 ]]; then
$LIBRARY_DIR/deadline.listen.sh
echo "Enabled deadline check."
fi
if [[ -f "~/.bashrc.local" ]]; then
if [[ -f ~/.bashrc.local ]]; then
source ~/.bashrc.local
fi
echo "\e[22mUptime: $(uptime)"
echo "\e[16mQrakhen's QASH $QASH_VERSION loaded.\e[0m"
printf "\e[34mUptime: $(uptime)\n"
printf "\e[32mQrakhen's QASH %s loaded.\e[0m\n" $QASH_VERSION

View File

@ -1,11 +1,11 @@
#!/bin/bash
__cleanup_terminal() {
resetmods() {
printf '\e[?5l'
printf '\e[0m'
return -1
}
trap "__cleanup_terminal; return 1" INT
trap "resetmods; return 1" INT
text=${1:-"PANIC IS ADVISED"}
color=${2:-33}
delay=${3:-.48}
@ -17,5 +17,6 @@ do
printf '\e[?5l';
read -s -n1 -t1 && break;
done;
__cleanup_terminal
resetmods