fairyglade / ly

display manager with console UI
Do What The F*ck You Want To Public License
5.3k stars 306 forks source link

[Bug] Error message of brightness commands displaying at current cursor position #695

Open moritz-reinel opened 5 hours ago

moritz-reinel commented 5 hours ago

Pre-requisites

Ly version

1.1.0-dev.98+022d146

Observed behavior

When executable for the brightness_down_cmd or brightness_up_cmd doesn't exist, the stderr output of the subprocess is displayed at the current cursor position

Expected behavior

Either fail "silently" or add the error to the status bar.

I already noticed the (currently unused) lang item err_brightness_change which could be used in the status bar for implementation.

Steps to reproduce

Set the config option brightness_down_cmd to any non-existent executable

Relevant logs

                   ┌───────────────────────────────────────────────┐
                   │                                               │
                   │  <        failed to access console         >  │
                   │                                               │
                   │  x11      < Plasma (X11)                   >  │
                   │                                               │
                   │  login    /bin/sh: 1: /usr/bin/brightnessctl: not found
                   │                                               │
                   │  password                                     │
                   │                                               │
                   └───────────────────────────────────────────────┘
moritz-reinel commented 5 hours ago

I have already looked into solving the problem and could open a PR, if appreciated :)