• 0 Posts
  • 305 Comments
Joined 1 year ago
cake
Cake day: June 17th, 2023

help-circle




  • Remove the loop and sleep from the script you created so it just runs and exits.

    Then create a file at /etc/systemd/system/battery-alarm.service with the following:

    [Unit]
    Description="Sound alarm when battery is low"
    
    [Service]
    ExecStart=/usr/local/bin/battery-alarm.sh # point this to your script
    

    Then create a file at /etc/systemd/system/battery-alarm.timer with the following:

    [Unit]
    Description="Run battery-alarm.service every 2 mins"
    
    [Timer]
    OnUnitActiveSec=2m
    Unit=battery-alarm.service
    
    [Install]
    WantedBy=multi-user.target
    

    Then sudo systemctl enable --now helloworld.timer to start and enable the timer on boot.

    This will be a little more robust then your current script. It works without the user needing to log in. And there is nothing to get killed so will always trigger. The current script will just silently stop working if it ever gets killed or crashes.


  • Worth running shell scripts though https://www.shellcheck.net/ (has a cli as well). Finds lots of common issues that can blow up scripts when input is not what you expect. With links to why they make the suggestions they do.

    Line 4:
            battery_level=`cat /sys/class/power_supply/BAT0/capacity`
                          ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
    
    Did you mean: (apply this, apply all SC2006)
            battery_level=$(cat /sys/class/power_supply/BAT0/capacity)
     
    Line 5:
            battery_status=`cat /sys/class/power_supply/BAT0/status`
                           ^-- SC2006 (style): Use $(...) notation instead of legacy backticks `...`.
    
    Did you mean: (apply this, apply all SC2006)
            battery_status=$(cat /sys/class/power_supply/BAT0/status)
     
    Line 6:
            if [ $battery_status = "Discharging" ] && [ $battery_level -lt 21 ];
                 ^-- SC2086 (info): Double quote to prevent globbing and word splitting.
                                                        ^-- SC2086 (info): Double quote to prevent globbing and word splitting.
    
    Did you mean: (apply this, apply all SC2086)
            if [ "$battery_status" = "Discharging" ] && [ "$battery_level" -lt 21 ];
    

  • Probably nothing. This is more steamdeck related stuff since the SteamOS is based on ArchLinux. And even then, it does not mean much for SteamDeck users. They wont notice much at all really. This might help with development a bit on valves end. The big news is really for ArchLinux users and maintainers which will see more effort in the development of that distro.

    There is some wild speculation that maybe this makes arm for Arch Linux more official in the future. Which is based of the other recent news that Valve are creating an ARM emulation layer for running games on ARM devices. Which means maybe they are working on an ARM device and maybe need to start working on getting ARM support for Arch. Though again this is all wild speculation.



  • Arch normally immediately updates to the latest version of every program

    This is not true though. Arch packages new program versions as soon as they can - for popular stuff this happens quickly but not everything updates quickly. And when they do publish a new package it goes to the testing repo for a short time before being promoted to the stable repos. If there is a problem with the package that they notice it will be held back until it can be solved. There is not a huge amount of testing that is done here as that is very time consuming and Arch do not have enough man power for this. But they also do not release much broken things at all. I have seen other distros like ubuntu cause far more havoc with a broken update then Arch ever has.



  • Blender is more of an artistic tool. Not great at creating precise geometry. Tools like freecad make it much easier to create functional parts where the geometry matters. They are also easier to edit and adjust things after the fact as they tend to be parameterized - letting you update a value to update the model.

    But they are terrible at more artistic things like miniatures or figurines or more organic shapes which is where blender shines.

    So it really depends on what you are trying to create. But for a lot of people using 3d printers (which I believe tend to create more functional than atheistic prints - at least from designs they have created themselves) tools like freecad tend to serve them better then tools like blender.


  • Or your example, how would we have processed ore into metal without coal (on any significant scale).

    We have been processing ore into metal with coal for thousands of years. It sounds like you are arguing that the industrial revolution has been happening for thousands of years. Which it has not.

    We also made bread in the industrial revolution which is needed to feed the workers. Without feeding the workforce we could not access certain advancements. Is bread a corner stone technology of the industrial revolution? No it is not. It in no way defines what the industrial revolution was. Just like coal or oil.

    You can run a steam engine off of coal, wood, oil, nuclear, basically anything that creates a lot of heat. Coal is more convenient in a lot of ways but it did not unlock anything special. If not for coal we could use wood or charcoal. That was the steam engine, not the fuel it runs on.

    And if the advancements were because of these fuels that why did it not happen 1000s of years ago when we had access to them?