Matheus Oliveira 35b10394b6 record: fix wf-recorder audio flag and proc error handling (#48)
* fix(recording): Fix wf-recorder audio flag and improve process monitoring

- Fix incorrect audio flag format for wf-recorder(Invalid whitespace)
  Changed from `-a <device>` to `--audio=<device>` as per wf-recorder docs:
  "Specify device like this: -a<device> or --audio=<device>"

- Add fallback to IDLE audio sources
  Audio sources are typically in IDLE state when no media is playing.
  Now falls back to IDLE sources if no RUNNING sources are found,
  ensuring audio capture works when recording starts during silence
  but media plays later.

- Improve process startup monitoring
  The 0.1s sleep was insufficient for reliable process detection on NVIDIA systems.
  Process would start and immediately die ~90% of the time when triggered via keybinds.
  Now shows immediate UI feedback then monitors for 3 seconds to ensure
  stable process startup while maintaining responsive user experience.

* check returncode + timeout 3s -> 1s + format

---------

Co-authored-by: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
2025-08-30 21:59:26 +10:00
2025-08-19 15:42:32 +10:00
2025-07-15 17:53:20 +10:00
2025-07-15 17:16:53 +10:00
2025-08-15 15:53:39 +10:00
2025-08-30 01:47:27 +00:00
2025-08-09 12:59:36 +10:00
2025-07-11 15:21:25 +10:00
2025-08-19 15:42:32 +10:00
2025-06-14 23:06:22 +10:00

caelestia-cli

The main control script for the Caelestia dotfiles.

External dependencies

Installation

The cli is available from the AUR as caelestia-cli-git. To install it you can use an AUR helper like yay, or manually download the PKGBUILD and run makepkg -si.

e.g. using yay

yay -S caelestia-cli-git

Manual installation

Install all dependencies, then install python-build, python-installer, python-hatch and python-hatch-vcs.

e.g. via an AUR helper (yay)

yay -S libnotify swappy grim dart-sass app2unit wl-clipboard slurp wl-screenrec wf-recorder glib2 libpulse cliphist fuzzel python-build python-installer python-hatch python-hatch-vcs

Now, clone the repo, cd into it, build the wheel via python -m build --wheel and install it via python -m installer dist/*.whl. Then, to install the fish completions, copy the completions/caelestia.fish file to /usr/share/fish/vendor_completions.d/caelestia.fish.

git clone https://github.com/caelestia-dots/cli.git
cd cli
python -m build --wheel
sudo python -m installer dist/*.whl
sudo cp completions/caelestia.fish /usr/share/fish/vendor_completions.d/caelestia.fish

Usage

All subcommands/options can be explored via the help flag.

$ caelestia -h
usage: caelestia [-h] [-v] COMMAND ...

Main control script for the Caelestia dotfiles

options:
  -h, --help     show this help message and exit
  -v, --version  print the current version

subcommands:
  valid subcommands

  COMMAND        the subcommand to run
    shell        start or message the shell
    toggle       toggle a special workspace
    scheme       manage the colour scheme
    screenshot   take a screenshot
    record       start a screen recording
    clipboard    open clipboard history
    emoji        emoji/glyph utilities
    wallpaper    manage the wallpaper
    resizer      window resizer daemon

Configuring

All configuration options are in ~/.config/caelestia/cli.json.

Example configuration
{
    "theme": {
        "enableTerm": true,
        "enableHypr": true,
        "enableDiscord": true,
        "enableSpicetify": true,
        "enableFuzzel": true,
        "enableBtop": true,
        "enableGtk": true,
        "enableQt": true
    },
    "toggles": {
        "communication": {
            "discord": {
                "enable": true,
                "match": [{ "class": "discord" }],
                "command": ["discord"],
                "move": true
            },
            "whatsapp": {
                "enable": true,
                "match": [{ "class": "whatsapp" }],
                "move": true
            }
        },
        "music": {
            "spotify": {
                "enable": true,
                "match": [{ "class": "Spotify" }, { "initialTitle": "Spotify" }, { "initialTitle": "Spotify Free" }],
                "command": ["spicetify", "watch", "-s"],
                "move": true
            },
            "feishin": {
                "enable": true,
                "match": [{ "class": "feishin" }],
                "move": true
            }
        },
        "sysmon": {
            "btop": {
                "enable": true,
                "match": [{ "class": "btop", "title": "btop", "workspace": { "name": "special:sysmon" } }],
                "command": ["foot", "-a", "btop", "-T", "btop", "fish", "-C", "exec btop"]
            }
        },
        "todo": {
            "todoist": {
                "enable": true,
                "match": [{ "class": "Todoist" }],
                "command": ["todoist"],
                "move": true
            }
        }
    }
}
S
Description
The main control script for the Caelestia dotfiles
Readme GPL-3.0 782 KiB
Languages
Python 75.6%
SCSS 10.6%
Shell 8.9%
Nix 3.9%
CSS 1%