Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bird

A CLI tool that watches over a bash process and sends a notification via KDE Connect (to a connected device) when it blocks waiting for input.

Useful for long-running commands like dnf, make, or custom servers where you want to walk away and be notified when the process needs you.

Dependencies

  • libsystemd (for D-Bus communication)
  • kdeconnect-cli (KDE Connect must be installed and running with a paired device)
  • strace

On Fedora:

sudo dnf install kdeconnect strace systemd-devel

Building

make
sudo make install

This installs the bird binary to /usr/local/bin.

Usage

bird --help
bird --watch [command] [arguments]
sudo bird --watch [command] [arguments]

Examples

bird --watch make
bird --watch ./server
sudo bird --watch dnf install foo

When run, bird will prompt you to select a paired KDE Connect device to send notifications to.

Running with sudo

Commands that require root (e.g. dnf, mount) can be run with sudo bird. When bird detects it is running as root, it temporarily lowers its privileges to access the user session bus for KDE Connect, then restores them to run your command.

How it works

bird forks the target command as a child process and attaches strace to it. It monitors the strace output for read(0, ...) syscalls — which indicate the process is blocked waiting for stdin — and fires a KDE Connect ping notification when one is detected.

Testing

Dummy processes for testing are in src/dummy_processes/. Build and run them to simulate a process that blocks on input:

gcc src/dummy_processes/dproc1.c -o dproc1
bird --watch ./dproc1

Uninstalling

sudo make uninstall

About

A CLI tool that watches over a bash process and sends a notification via KDE Connect (to a connected device) when it blocks waiting for input.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages