Skip to main content

A small utility to remind you to go to sleep.

Project description

Quack Sleep Doc

Not an actual doctor or a serious sleep helper! If you need that consult a real doctor!

A tool that reminds you to go to bed at a time you configured.

Setup

Then, you create a config file in ~/.config/quack-sleep/config.json.

{
    "language": "de",
    "time_gentle_reminder": "22:30",
    "time_strict_reminder": "23:00",
    "gentle_spacing_minutes": 5,
    "strict_spacing_minutes": 1,
    "countdown_initial": 15,
    "countdown_reduction": 5,
    "countdown_minimum": 1
}

Optionally, you can configure your own messages that remind you to go to sleep in ~/.config/quack-sleep/messages.txt. Where each line is a message. Here is an example file in german.

Morgen wirst du froh sein, dass du jetzt schlafen gehst.
Schlaf ist wie ein kostenloses Upgrade.
Dein Gehirn ruft an: Es möchte ins Bett.
Produktivität beginnt mit Erholung.
Selbst KI gönnt sich Ruhezyklen – du solltest das auch.

Finally, once you have everything configured, you should add the script to the autostart to make sure it always runs.

Linux: Assuming you have screen (apt install screen) you can add the following to the bottom of your ~/.profile file.

protected_screen() {
    local name="$1"
    shift

    if [ -z "$name" ]; then
        echo "Usage: protected_screen <session-name> <command> [args...]"
        return 1
    fi

    # Check if the screen session already exists
    if screen -ls | grep -q "[.]${name}[[:space:]]"; then
        echo "Screen session '$name' already exists. Skipping."
        return 0
    fi

    if [ $# -eq 0 ]; then
        echo "No command provided. Starting empty screen session '$name'."
        screen -dmS "$name"
    else
        echo "Starting screen session '$name' with command: $*"
        screen -dmS "$name" "$@"
    fi
}

protected_screen quack-sleep uvx run quack-sleep-doctor

Windows: Here we will use the ps1 script provided in the repository to launch the app. First clone the repository, then run uv sync to install it. Lastly, add the start.ps1 to your autostart folder.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quack_sleep_doctor-0.1.0.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quack_sleep_doctor-0.1.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file quack_sleep_doctor-0.1.0.tar.gz.

File metadata

  • Download URL: quack_sleep_doctor-0.1.0.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for quack_sleep_doctor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6a57262685a1bfe3cc2b9b63b8cec8b8c31fc29002a8f98728d86f506af3a906
MD5 139b559b3d024de3f76ab066674e58f7
BLAKE2b-256 6c3ad181e6adde8a83cbbe88176f1da3442514701288f90ce384e95b8f82a607

See more details on using hashes here.

Provenance

The following attestation bundles were made for quack_sleep_doctor-0.1.0.tar.gz:

Publisher: python-publish.yml on penguinmenac3/quack-sleep-doctor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file quack_sleep_doctor-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for quack_sleep_doctor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c913cda998186a9285e82c30eb3bcf0aec21f6299e3636b8233b8262dfbd0056
MD5 8ae1db58c5c77332b282cf18cb2061b7
BLAKE2b-256 c78d92e9f232a36a00db6b9a3639b6361ae61b067192c47ee08ee1a069e7b4e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for quack_sleep_doctor-0.1.0-py3-none-any.whl:

Publisher: python-publish.yml on penguinmenac3/quack-sleep-doctor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page