initial commit
This commit is contained in:
135
beem.bash
Executable file
135
beem.bash
Executable file
@ -0,0 +1,135 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
setwp='exec /home/xbl/scripts/setwp.sh'
|
||||
if [ -z $1 ]
|
||||
then
|
||||
xrandr \
|
||||
--output HDMI-0 \
|
||||
--mode 1280x800 \
|
||||
--scale 1 \
|
||||
--rate 60 \
|
||||
--pos 2160x0 \
|
||||
--rotate normal \
|
||||
--output HDMI-1 \
|
||||
--off \
|
||||
--output DP-0 \
|
||||
--off \
|
||||
--output DP-1 \
|
||||
--off \
|
||||
--output DP-2 \
|
||||
--off \
|
||||
--output DP-3 \
|
||||
--off \
|
||||
--output DP-4 \
|
||||
--off \
|
||||
--output DP-5 \
|
||||
--off
|
||||
echo -e "\\033[38;5;255m[ \\033[38;5;82mOK \\033[38;5;255m] \\033[38;5;255mBeemer allei."
|
||||
$setwp
|
||||
exit 0
|
||||
elif [ $1 = sep ]
|
||||
then
|
||||
xrandr \
|
||||
--output HDMI-0 \
|
||||
--mode 1280x800 \
|
||||
--scale 1 \
|
||||
--rate 60 \
|
||||
--pos 2160x0 \
|
||||
--rotate normal \
|
||||
--output HDMI-1 \
|
||||
--off \
|
||||
--output DP-0 \
|
||||
--mode 3840x2160 \
|
||||
--rate 60 \
|
||||
--pos 0x0 \
|
||||
--rotate right \
|
||||
--rotate normal \
|
||||
--output DP-1 \
|
||||
--off \
|
||||
--output DP-2 \
|
||||
--mode 2560x1440 \
|
||||
--rate 60 \
|
||||
--pos 2160x800 \
|
||||
--rotate normal \
|
||||
--output DP-3 \
|
||||
--off \
|
||||
--output DP-4 \
|
||||
--primary \
|
||||
--mode 2560x1440 \
|
||||
--rate 240 \
|
||||
--pos 2160x2240 \
|
||||
--output DP-5 \
|
||||
--off
|
||||
echo -e "\\033[38;5;255m[ \\033[38;5;82mOK \\033[38;5;255m] \\033[38;5;255mBeemer separiaert."
|
||||
$setwp
|
||||
exit 0
|
||||
elif [ $1 = sin ]
|
||||
then
|
||||
xrandr \
|
||||
--output HDMI-0 \
|
||||
--off \
|
||||
--output HDMI-1 \
|
||||
--off \
|
||||
--output DP-0 \
|
||||
--off \
|
||||
--rotate normal \
|
||||
--output DP-1 \
|
||||
--off \
|
||||
--output DP-2 \
|
||||
--off \
|
||||
--output DP-3 \
|
||||
--off \
|
||||
--output DP-4 \
|
||||
--primary \
|
||||
--mode 2560x1440 \
|
||||
--rate 240 \
|
||||
--pos 2160x2240 \
|
||||
--output DP-5 \
|
||||
--off
|
||||
echo -e "\\033[38;5;255m[ \\033[38;5;82mOK \\033[38;5;255m] \\033[38;5;255mSingle"
|
||||
$setwp
|
||||
exit 0
|
||||
elif [ $1 = over ]
|
||||
then
|
||||
xrandr \
|
||||
--output HDMI-0 \
|
||||
--mode 1280x800 \
|
||||
--scale 1.75\
|
||||
--rate 60 \
|
||||
--pos 2160x2240 \
|
||||
--output HDMI-1 \
|
||||
--off \
|
||||
--output DP-0 \
|
||||
--mode 3840x2160 \
|
||||
--rate 60 \
|
||||
--pos 0x0 \
|
||||
--rotate right \
|
||||
--output DP-1 \
|
||||
--off \
|
||||
--output DP-2 \
|
||||
--mode 2560x1440 \
|
||||
--rate 60 \
|
||||
--pos 2160x800 \
|
||||
--output DP-3 \
|
||||
--off \
|
||||
--output DP-4 \
|
||||
--primary \
|
||||
--mode 2560x1440 \
|
||||
--rate 240 \
|
||||
--pos 2160x2240 \
|
||||
--output DP-5 \
|
||||
--off
|
||||
echo -e "\\033[38;5;255m[ \\033[38;5;82mOK \\033[38;5;255m] \\033[38;5;255mBeemer druebergleit."
|
||||
$setwp
|
||||
exit 0
|
||||
elif [ $1 = off ]
|
||||
then
|
||||
/home/xbl/scripts/screenlayout.sh
|
||||
echo -e "\\033[38;5;255m[ \\033[38;5;82mOK \\033[38;5;255m] \\033[38;5;255mBeemer apgschtellt."
|
||||
$setwp
|
||||
exit 0
|
||||
else
|
||||
echo -e "\\033[38;5;255m[ \\033[38;5;196mFEHLER \\033[38;5;255m] \\033[38;5;247mBenutzig: ' ' | sep | sin | off | over"
|
||||
exit 1
|
||||
fi
|
||||
# EOF
|
160
melvorcalc.bash
Executable file
160
melvorcalc.bash
Executable file
@ -0,0 +1,160 @@
|
||||
#!/usr/bin/env -S bash
|
||||
#
|
||||
hheellpp="echo -e \\033[38;5;255m[ \\033[38;5;6mNOTICE \\033[38;5;255m] \\033[38;5;248m Usage: melvorcalc [food|pot|prod] | [--help]"
|
||||
noremind="echo -e \\033[38;5;255m[ \\033[38;5;82mOK \\033[38;5;255m] \\033[38;5;248m No reminder set."
|
||||
yeremind="echo -e \\033[38;5;255m[ \\033[38;5;82mOK \\033[38;5;255m] \\033[38;5;248m Reminder set."
|
||||
askremnd="echo -e \\033[38;5;255m[ \\033[38;5;6mNOTICE \\033[38;5;255m] \\033[38;5;248m Would you like to set a reminder? (y/n)"
|
||||
okaaaaay="echo -e \\033[38;5;255m[ \\033[38;5;82mOK \\033[38;5;255m] \\033[38;5;248m"
|
||||
#
|
||||
if [ -z $1 ] || [ $1 == --help ] || [ $# -ne 1 ]
|
||||
then
|
||||
$hheellpp
|
||||
exit 1
|
||||
elif [ $1 == food ]
|
||||
then
|
||||
echo -e "\\033[38;5;255m[ \\033[38;5;6mNOTICE \\033[38;5;255m] \\033[38;5;248m Food Time Calculation"
|
||||
echo Amount of Food:
|
||||
read amount
|
||||
echo Used per Minute:
|
||||
read used
|
||||
min=$(echo "scale=0; $amount/$used" | bc)
|
||||
if [ $min -gt 600 ]
|
||||
then
|
||||
hour=$(echo "scale=0; $min/60" | bc)
|
||||
echo -e "\\033[38;5;255m[ \\033[38;5;6mNOTICE \\033[38;5;255m] \\033[38;5;248m Food lasts for: ~$hour hours"
|
||||
exit 0
|
||||
else
|
||||
echo -e "\\033[38;5;255m[ \\033[38;5;6mNOTICE \\033[38;5;255m] \\033[38;5;248m Food lasts for: ~$min minutes"
|
||||
$askremnd
|
||||
read remind
|
||||
if [ $remind = y ]
|
||||
then
|
||||
$yeremind
|
||||
exit 0
|
||||
else
|
||||
$noremind
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
elif [ $1 == pool ]
|
||||
then
|
||||
echo -e "\\033[38;5;255m[ \\033[38;5;6mNOTICE \\033[38;5;255m] \\033[38;5;248m XP Pool Calculation"
|
||||
echo "Pool needed:"
|
||||
read pool
|
||||
echo "XP per Cycle:"
|
||||
read xp
|
||||
echo "Seconds per Cycle:"
|
||||
read time
|
||||
min=$(echo "scale=0; $pool/$xp*$time/60" | bc)
|
||||
if [ $min -gt 600 ]
|
||||
then
|
||||
hour=$(echo "scale=0; $min/60" | bc)
|
||||
echo -e "\\033[38;5;255m[ \\033[38;5;6mNOTICE \\033[38;5;255m] \\033[38;5;248m Pool full in: ~$hour hours"
|
||||
exit 0
|
||||
else
|
||||
echo -e "\\033[38;5;255m[ \\033[38;5;6mNOTICE \\033[38;5;255m] \\033[38;5;248m Pool full in: ~$min minutes"
|
||||
$askremnd
|
||||
read remind
|
||||
if [ $remind = y ]
|
||||
then
|
||||
echo "dunstify --raw_icon=/home/xbl/.icons/melvor.png 'Melvor Idle' 'Pool is filling up.'; beep -f 5000 -r 7 -l 250" | at now + $min minutes
|
||||
$yeremind
|
||||
exit 0
|
||||
else
|
||||
$noremind
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
elif [ $1 == pool295 ]
|
||||
then
|
||||
echo -e "\\033[38;5;255m[ \\033[38;5;6mNOTICE \\033[38;5;255m] \\033[38;5;248m Pool95% Calculation"
|
||||
echo "Pool size:"
|
||||
read size
|
||||
echo "XP per Cycle:"
|
||||
read xp
|
||||
echo "Seconds per Cycle:"
|
||||
read time
|
||||
95p=$(( $size*95/100 ))
|
||||
min=$(echo "scale=0; $pool/$xp*$time/60" | bc)
|
||||
if [ $min -gt 600 ]
|
||||
then
|
||||
hour=$(echo "scale=0; $min/60" | bc)
|
||||
echo -e "\\033[38;5;255m[ \\033[38;5;6mNOTICE \\033[38;5;255m] \\033[38;5;248m Pool full in: ~$hour hours"
|
||||
exit 0
|
||||
else
|
||||
echo -e "\\033[38;5;255m[ \\033[38;5;6mNOTICE \\033[38;5;255m] \\033[38;5;248m Pool full in: ~$min minutes"
|
||||
$askremnd
|
||||
read remind
|
||||
if [ $remind = y ]
|
||||
then
|
||||
echo "dunstify --raw_icon=/home/xbl/.icons/melvor.png 'Melvor Idle' 'Pool is filling up.'; beep -f 5000 -r 7 -l 250" | at now + $min minutes
|
||||
$yeremind
|
||||
exit 0
|
||||
else
|
||||
$noremind
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
elif [ $1 == pot ]
|
||||
then
|
||||
echo -e "\\033[38;5;255m[ \\033[38;5;6mNOTICE \\033[38;5;255m] \\033[38;5;248m Potion Time Calculation"
|
||||
echo "Potions:"
|
||||
read potion
|
||||
echo "Charges per Potion:"
|
||||
read charge
|
||||
echo "Seconds per Cycle:"
|
||||
read time
|
||||
min=$(echo "scale=0; $potion*$charge*1.05*$time/60" | bc)
|
||||
if [ $min -gt 600 ]
|
||||
then
|
||||
hour=$(echo "scale=0; $min/60" | bc)
|
||||
echo -e "\\033[38;5;255m[ \\033[38;5;6mNOTICE \\033[38;5;255m] \\033[38;5;248m Potion lasts for: ~$hour hours"
|
||||
exit 0
|
||||
else
|
||||
echo -e "\\033[38;5;255m[ \\033[38;5;6mNOTICE \\033[38;5;255m] \\033[38;5;248m Potion lasts for: ~$min minutes"
|
||||
$askremnd
|
||||
read remind
|
||||
if [ $remind = y ]
|
||||
then
|
||||
echo "dunstify --raw_icon=/home/xbl/.icons/melvor.png 'Melvor Idle' 'Potion running out.'; beep -f 5000 -r 7 -l 250" | at now + $min minutes
|
||||
$yeremind
|
||||
exit 0
|
||||
else
|
||||
$noremind
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
elif [ $1 == prod ]
|
||||
then
|
||||
echo -e "\\033[38;5;255m[ \\033[38;5;6mNOTICE \\033[38;5;255m] \\033[38;5;248m Production Time Calculation"
|
||||
echo "Cycles:"
|
||||
read cycles
|
||||
echo "Seconds per Cycle:"
|
||||
read time
|
||||
echo "Dupe/Preserve:"
|
||||
read dp
|
||||
min=$(echo "scale=0; $cycles*1.$dp*$time/60" | bc)
|
||||
if [ $min -gt 600 ]
|
||||
then
|
||||
hour=$(echo "scale=0; $min/60" | bc)
|
||||
echo -e "\\033[38;5;255m[ \\033[38;5;6mNOTICE \\033[38;5;255m] \\033[38;5;248m Production lasts for: ~$hour hours"
|
||||
exit 0
|
||||
else
|
||||
echo -e "\\033[38;5;255m[ \\033[38;5;6mNOTICE \\033[38;5;255m] \\033[38;5;248m Production Time: ~$min minutes"
|
||||
$askremnd
|
||||
read remind
|
||||
if [ $remind = y ]
|
||||
then
|
||||
echo "dunstify --raw_icon=/home/xbl/.icons/melvor.png 'Melvor Idle' 'Production finishing.'; beep -f 5000 -r 7 -l 250" | at now + $min minutes
|
||||
$yeremind
|
||||
exit 0
|
||||
else
|
||||
$noremind
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
else
|
||||
$hheellpp
|
||||
exit 2
|
||||
fi
|
||||
# EOF
|
29
screenlayout.sh
Executable file
29
screenlayout.sh
Executable file
@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
xrandr \
|
||||
--output HDMI-0 \
|
||||
--off \
|
||||
--output HDMI-1 \
|
||||
--off \
|
||||
--output DP-0 \
|
||||
--mode 3840x2160 \
|
||||
--rate 60 \
|
||||
--pos 0x0 \
|
||||
--rotate right \
|
||||
--output DP-1 \
|
||||
--off \
|
||||
--output DP-2 \
|
||||
--mode 2560x1440 \
|
||||
--rate 60 \
|
||||
--pos 2160x800 \
|
||||
--rotate normal \
|
||||
--output DP-3 \
|
||||
--off \
|
||||
--output DP-4 \
|
||||
--primary \
|
||||
--mode 2560x1440 \
|
||||
--rate 240 \
|
||||
--pos 2160x2240 \
|
||||
--rotate normal \
|
||||
--output DP-5 \
|
||||
--off
|
||||
# EOF
|
17
xsetroot
Executable file
17
xsetroot
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
# dwm status bar
|
||||
|
||||
ipl=$(ip addr show dev enp7s0 | grep -F 'inet ' | cut -f1 -d/ | awk '{print $2}')
|
||||
ipw=$(curl -s ipinfo.io/ip)
|
||||
while true
|
||||
do
|
||||
vol=$(volctl)
|
||||
cpu=$(mpstat | grep -F all | awk '{print $13}')
|
||||
tmp=$(sensors | grep Tctl | awk '{print $2}' | sed 's/+//')
|
||||
dsk=$(df -h / | awk '{print $4}' | grep -E '[0-9]')
|
||||
ram=$(free -h | grep -F Mem: | awk '{print $7}')
|
||||
gpu=$(nvidia-smi | head -n 10 | tail -n 1 | grep W | awk '{print $5}')
|
||||
xsetroot -name " 📢 $vol | 🔌 $gpu | 🛠 $cpu | 🌡$tmp | 🧠 $ram | 💾 $dsk | 🏡 $ipl | 🌎 $ipw | 🗓 $(date '+%A, %d %B %Y - %H:%M:%S %Z ' ) "
|
||||
sleep 0.1
|
||||
done
|
||||
# EOF
|
Reference in New Issue
Block a user