Skip to main content

Overview

BlueDo - Bluetooth proximity automation

Logo

Lock your desktop, mute music or run any other command when leaving your PC. There are dozens of apps like this. This one just aims to make it beautiful, modern and easy.

Not all bluetooth devices works for this. Some devices randomizes the bluetooth address as a privacy feature, some disconnects to save power. If you have trouble using your phone, try a headset, watch, etc.

Only Bluetooth is supported, not Bluetooth Low-Energy (BLE).

Maturity

  • 2 is in beta
  • 1 is deprecated

Installation

From pip

sudo apt install python3-pip gir1.2-appindicator3-0.1
pip3 install --upgrade bluedo

Optional apt packages playerctl (pause music), amixer (for mute/unmute).

From deb

Fetch deb file from https://github.com/ways/BlueDo/releases

From source

sudo apt install python3-dev libbluetooth-dev playerctl libgirepository1.0-dev libcairo2-dev gir1.2-appindicator3-0.1

Then install requirements: pip install -r requirements.txt

Requirements

Use these system commands:

  • bluetoothctl
  • hcitool
  • loginctl
  • gsettings
  • amixer (mute)
  • playerctl (pause music)

Version > 2.0 is only tested on Ubuntu 22.04 with GNOME.

Version < 2.0 is only tested on Ubuntu 20.04-21.04 with GNOME.

Command line options

  • -e / --enable to start service on app start.
  • -m / --minimize to start minimized

Configuration

There are lots more options in the config file. Feel free to tune.

Screenshots

v53 v49 v49_advanced v3_2 v3

System changes

Note that this app will make these changes to your power management:

  • Enable screen lock: org.gnome.desktop.screensaver lock-enabled true
  • Set delay from screen blacking to locking to zero: org.gnome.desktop.screensaver lock-delay 0
  • Set screen saver timeout to 10 seconds when device is away, 5 minutes when device is present: org.gnome.desktop.session idle-delay 600

TODO

  • Check for dependencies on startup
  • Default lock / unlock ON.
  • Keep two instances from running at the same time.
  • Minimize to tray, instead of having both minimize and minimize to tray.
  • Stop device scanning when minimized
  • Change to dynamic widget layout instead of fixed.
  • Change preferences button to proper burger menu.
  • Move media files to some other dir?
  • Unit tests
  • When on xfce:
    • for bluetooth settings, open blueman-manager
    • to lock/unlock change xscreensaver timeout, to match functionality from gnome

Development docs

  • scan for devices: bluetoothctl devices

  • rssi for device: hcitool rssi ff:ff:ff:ff:ff:ff (unstable?)

  • Version below .56 needs Python < 3.9, bluetoothctl ~5.50 or newer.

  • hard locking: lock when no signal

  • soft locking: set screensaver timeout to 10 seconds when no signal

Inspiration

Metadata

Release files for bluedo 2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bluedo 2.5
File Size Uploaded
bluedo-2.5.tar.gz 407.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bluedo 2.5
File Interpreter ABI Platform
bluedo-2.5-py3-none-any.whl Python 3 none any Details

Total release size: 707.9 kB

Release files / bluedo-2.5.tar.gz

Download URL bluedo-2.5.tar.gz
Size 407.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1ed00704c54f7ceeeefe1a4d1cdaf62c24fa0f5f59ef59f7116549144f8987dc
BLAKE2b-256 checksum
How to use checksums
2f3ba2c119f7c32281d76fe3ec887ae63c86d4c0f486f4af0b61b52afceb53de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / bluedo-2.5-py3-none-any.whl

Download URL bluedo-2.5-py3-none-any.whl
Size 300.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
40a494d81d36755a43eccdc7d8d7bb32a8dc3036d9d3848f002e2cca762ddec3
BLAKE2b-256 checksum
How to use checksums
fe1d31dfcfc3f2391f89994090f27b10b0553207f73ff4a00e2f15f2c8e2ccc3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release history Release notifications | RSS feed

This release

2.5 This release

2 release files

2.4

2 release files

2.3

2 release files

2.2

2 release files

2.1

2 release files

2.0

3 release files

0.57

2 release files

0.56

2 release files

0.55

3 release files

0.54

2 release files

0.53

2 release files

0.52

2 release files

0.51

2 release files

0.50

2 release files

0.49

2 release files

0.47

2 release files

0.46

2 release files

0.45

2 release files

0.44

2 release files

0.43

1 release file

0.41

1 release file

0.40

1 release file

0.39

1 release file

0.36

1 release file

0.35

1 release file

0.34

1 release file

0.33

1 release file

0.32

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page