For the Macbook Pro, how would you create a script in which an alarm goes off when the power cord is disconnected?

This page summarizes the projects mentioned and recommended in the original post on /r/pythontips

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • ChargeMon

    Simple macOS StatusBar app to remind you to unplug your laptop when sufficiently charged

  • I've got a Mac OS status bar app written in Python here that could easily be modified to do this. It uses rumps to create the status bar app and psutil to monitor the plugged/unplugged state and charge status. I use it to remind me to plug in the charger when charge gets below a certain level and unplug the charger when charge gets above a certain level. Here's how to get the plugged in status (which you could check periodically on a loop)

  • rumps

    Ridiculously Uncomplicated macOS Python Statusbar apps

  • I've got a Mac OS status bar app written in Python here that could easily be modified to do this. It uses rumps to create the status bar app and psutil to monitor the plugged/unplugged state and charge status. I use it to remind me to plug in the charger when charge gets below a certain level and unplug the charger when charge gets above a certain level. Here's how to get the plugged in status (which you could check periodically on a loop)

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • osascript.py

    :apple: :snake: osascript (AppleScript) python implementation

  • And to change the volume, you could use osascript

  • py-applescript

    An easy-to-use Python wrapper for NSAppleScript, allowing Python scripts to communicate with AppleScripts and AppleScriptable applications.

  • or py-applescript

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Tell HN: macOS Bartender disables features, forcing users to buy license again

    2 projects | news.ycombinator.com | 26 Sep 2023
  • Menu Icons Hidden Behind M1 Pro 16" Notch

    1 project | /r/macbookpro | 29 Dec 2022
  • Bartender Discount Code/Sale?

    1 project | /r/macapps | 19 Oct 2022
  • Just switched from windows to the macbook air

    3 projects | /r/macbook | 9 Sep 2022
  • Bartender 4

    1 project | /r/mac | 10 Jul 2022