Everything is lightning fast and works out of the box.
--------
-### instantOS is still in early beta, contributions always welcome
+## instantOS is still in early beta, contributions always welcome
esac
fi
- cat /usr/share/instantwidgets/tooltips.txt | shuf | head -1 >~/.cache/tooltip
+ shuf /usr/share/instantwidgets/tooltips.txt | head -1 >~/.cache/tooltip
conky -c /usr/share/instantwidgets/tooltips.conf &
else
# installs dependencies for instantOS
-LINK="https://raw.githubusercontent.com/instantos/instantos/master"
+export LINK="https://raw.githubusercontent.com/instantos/instantos/master"
# install on arch based system
pacinstall() {
RAW="https://raw.githubusercontent.com"
-if cat /etc/os-release | grep -Eiq 'name.*(arch|manjaro)'; then
+if grep -Eiq 'name.*(arch|manjaro)' /etc/os-release; then
curl -s "$RAW/instantOS/instantLOGO/master/ascii.txt"
echo ""
else
curl -s "$1" >/tmp/instantinstall.sh
chmod 777 /tmp/instantinstall.sh
- if [ -n "$2" ] && getent passwd $2 && [ -e /home/$2 ]; then
+ if [ -n "$2" ] && getent passwd "$2" && [ -e /home/"$2" ]; then
echo "single user installation for $1"
sudo su "$2" -c /tmp/instantinstall.sh
else
cd ~/instantos/monitor
xrandr | grep '[^s]connected' | grep -o '[0-9]*x[0-9]*+[0-9]*' | grep -o '[0-9]*$' >positions.txt
-AMOUNT=$(cat positions.txt | wc -l)
+AMOUNT=$(wc -l <positions.txt)
# get monitor with highest resolution
RESOLUTIONS=$(xrandr | grep '[^s]connected' | grep -Eo '[0-9]{1,}x[0-9]{1,}\+[0-9]{1,}\+[0-9]{1,}' |
echo "Resolution change detected"
fi
-if [ $(cat resolutions.txt | sort -u | wc -l) = "1" ]; then
+if [ $(sort -u resolutions.txt | wc -l) = "1" ]; then
echo "resolutions identical"
head -1 resolutions.txt >max.txt
else
- let PIXELS1="$(head -1 resolutions.txt | grep -o '^[0-9]*') * $(cat resolutions.txt | head -1 | grep -o '[0-9]*$')"
- let PIXELS2="$(tail -1 resolutions.txt | grep -o '^[0-9]*') * $(cat resolutions.txt | head -1 | grep -o '[0-9]*$')"
+ let PIXELS1="$(head -1 resolutions.txt | grep -o '^[0-9]*') * $(head -1 resolutions.txt | grep -o '[0-9]*$')"
+ let PIXELS2="$(tail -1 resolutions.txt | grep -o '^[0-9]*') * $(head -1 resolutions.txt | grep -o '[0-9]*$')"
if [ "$PIXELS1" -gt "$PIXELS2" ]; then
head -1 resolutions.txt >max.txt
else
groupadd "$1" &>/dev/null
for USER in $(ls /home/ | grep -v '+'); do
if ! sudo su "$USER" -c groups | grep -Eq " $1|$1 "; then
- sudo gpasswd -a $USER $1
+ sudo gpasswd -a "$USER" "$1"
fi
done
}
else
BATTERY="B"$(egrep -o '[0-9]*%' <<<"$TMPBAT")
# make indicator red on low battery
- if [ $(grep '[0-9]*' <<<$BATTERY) -lt 10 ]; then
+ if [ $(grep '[0-9]*' <<<"$BATTERY") -lt 10 ]; then
BATTERY="^c#ff0000^$BATTERY^d^"
fi
fi