npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

stream-deck-obs-buttons

v1.0.0

Published

Dynamic OBS buttons for `streamdeck-linux-gui`

Downloads

26

Readme

Linux Stream Deck Dynamic OBS Recording and Streaming Buttons

This project combines OBS's websocket interface with streamdeck-linux-gui to drive a buttons whose images change with the recording and streaming states & which toggles the appropriate state when pushed.

Stream Deck Demo Video

Use

(This program relies on a new feature in streamdeck-linux-gui, a control system via Unix socket called streamdeckc. At the time of this writing it is not included in the distribution packages & to use it one must install from source.)

To have the program monitor OBS and control states (with logging), run:

npx stream-deck-obs-buttons watch -v

Running it with the --help flag will publish a list of available options:

Commands:
  stream-deck-obs-buttons watch    Watch for changes in status.
  stream-deck-obs-buttons rstart   Start OBS recording.
  stream-deck-obs-buttons rstop    Stop OBS recording.
  stream-deck-obs-buttons rtoggle  Toggle OBS recording.
  stream-deck-obs-buttons sstart   Start OBS streaming.
  stream-deck-obs-buttons sstop    Stop OBS streaming.
  stream-deck-obs-buttons stoggle  Toggle OBS streaming.

Options:
      --version                 Show version number                    [boolean]
  -o, --recording-on-icon       Icon to use when recording.
    [string] [default: "~/tip/program/stream-deck-obs-buttons/recording-on.gif"]
  -f, --recording-off-icon      Icon to use when recording is stopped.
   [string] [default: "~/tip/program/stream-deck-obs-buttons/recording-off.gif"]
  -e, --recording-error-icon    Icon to use when something goes wrong.
      [string] [default: "~/tip/program/stream-deck-obs-buttons/error-icon.gif"]
  -p, --recording-button-page   Which page to put the recording button on.
                                                           [number] [default: 5]
  -i, --recording-button-index  Recording button position. [number] [default: 9]
  -O, --streaming-on-icon       Icon to use when streaming.
    [string] [default: "~/tip/program/stream-deck-obs-buttons/streaming-on.svg"]
  -F, --streaming-off-icon      Icon to use when streaming is stopped.
   [string] [default: "~/tip/program/stream-deck-obs-buttons/streaming-off.svg"]
  -E, --streaming-error-icon    Icon to use when something goes wrong.
      [string] [default: "~/tip/program/stream-deck-obs-buttons/error-icon.gif"]
  -P, --streaming-button-page   Which page to put the streaming button on.
                                                           [number] [default: 5]
  -I, --streaming-button-index  Streaming button position.[number] [default: 10]
  -r, --error-icon              Backup icon to use when something goes wrong.
      [string] [default: "~/tip/program/stream-deck-obs-buttons/error-icon.gif"]
  -c, --config                  Location of a JSON5 config file.
            [string] [default: "~/.config/stream-deck-obs-buttons/config.json5"]
  -v, --verbose                 Print more information.
                                                      [boolean] [default: false]
  -w, --very-verbose            Print even more information.
                                                      [boolean] [default: false]
  -h, --help                    Show help                              [boolean]

(By default, the page where buttons are inserted is whatever page is currently open in the UI.)

Configuration

The program will optionally load a configuration from the path specified by --config or ~/.config/stream-deck-obs-buttons/config.json5. (JSON5 is like JSON, but with looser parsing rules similar to those of JavaScript objects.)

The JSON5 document can contain the flags from the --help section except camel cased rather than dashed. For example:

{
  recordingButtonIndex: 12, // indexed from 1
  recordingButtonPage: 3,
  errorIcon: '~/.config/stream-deck-obs-buttons/error-icon.gif',
}

System Service

To have the program run as a system service, first put the service definition in the correct place:

cp stream-deck-obs-buttons.service ~/.config/systemd/user/

It can then be started with:

systemctl start --user stream-deck-obs-buttons

To have it start automatically, use:

systemctl enable --user stream-deck-obs-buttons