/sqt/ - Stupid Questions Thread.
Watermelon edition.
/sqt/ General
I created a Systemd timer to execute a script every minute, the timer works, but it doesn't seem to execute my script. Any idea guys?
[Unit]
Description=Send a notification
[Service]
ExecStart=/usr/local/bin/battery.sh
[Unit]
Description=Runs batterywarn every hour
[Timer]
# Time to wait after booting before we run first time
OnBootSec=2min
# Time between running each consecutive time
OnUnitActiveSec=1min
Unit=batterywarn.service
[Install]
WantedBy=multi-user.target
#! /bin/bash
#Simple script that checks for the battery and sends a notification it also plays a sound, nice.
cv=(24) #Critical Value
hcv=$(("$cv" / 2))
bp=$(cat /sys/class/power_supply/BAT*/capacity |awk '{print $1}')
if [ "$bp" -le "$cv" ]; then
notify-send -u normal -t 10000 "Battery is low" && paplay $HOME/.slow-spring-board.ogg
else
if [ "$bp" = "$hcv" ]; then
notify-send -u critical -t 5000 "Battery is running out"
fi
fi
Posted this in a previous thread but didn't really get any answers.
Ever since a power surge back in March my PC blue screens at the Windows logo if I'm doing a cold boot. Then it restarts itself and goes into Windows no problem. At first it would crash during use as well, but fucking with the SATA cable seems to have fixed it, for some reason.
Any idea what's going on and how I can fix it? It's Windows 7 on an old Kingston SSD.
>nice.
This is a nice script.
Can I lower the "memory level" where chromium/chrome starts discarding tabs?
Right now it seems to be at like 200mb RAM left which is buttfucked retarded since half my shit has already been moved to slow page file at that point.
Try adding Type=oneshot to the service file. If that doesn't work add /bin/bash to the front of ExecStart.
The memory management systems that high level programmers create, do a better job then anything you think you can "optimize".
I need to move 1-2 dozen TB by plane.
I was looking to consolidate it into 6TB+ drives. Is there any downside to the 8 or 10TB ones (apart from cost?)
I wish I had a gf like that.