Go to file
2024-03-30 14:44:17 -05:00
scripts add track_anything.sh and use it for volume and mute 2024-03-30 14:44:17 -05:00
eww.scss initial import 2024-03-30 09:30:52 -05:00
eww.yuck add comment to systray line. 2024-03-30 12:06:06 -05:00
LICENSE initial import 2024-03-30 09:30:52 -05:00
README.md add track_anything.sh and use it for volume and mute 2024-03-30 14:44:17 -05:00

eww.yuck and friends

My personal eww config.

Install by linking or cloning to ~/.config/eww

track_anything.sh

This config includes a helper bash source which may be used to setup trackers of values. It requires an on_event emitter to already exist and should have one of the three output formats: integer, boolean, and string.

When specifying a string output, you may include a custom regex which will not be searched (it will be wrapped in ^...$).

poll

In addition to the configuration, you must provide a poll function.

Your provided poll function must return a valid output as its first line and may provide log data on subsequent lines which will be emitted at the info level (stderr, single -v).

A simple example is the pulseaudio mute state poller:

poll() {
  pamixer --get-mute
}

Configuration

Options:

  • rate_limit

    • seconds to wait between running poll (default: 1)
  • poll_interval

    • seconds to wait for an update before forcing a poll (default: 60)
    • NOTE: must satisfy poll_interval >= rate_limit
  • filter: an arbitrary command to filter the total output of the poller in a loop (default: uniq)

    • NOTE: all arguments are collected and executed with eval.
    • Example: cat will allow duplicates. uniq will filter them.

Event Emitters:

  • on_volume

    • emits on changes to pulseaudio sinks
  • on_sway

    • emits on changes to sway windows or workspaces
  • on

    • uses your own function to trigger an event which should be passed as the only argument to on
    • NOTE: the function in question must emit events as newlines with no text. multiple events may be emitted in general safety if rate_limit is > 0

Outputs:

  • output_integer

    • output a decimal integer
  • output_boolean

    • output a boolean (true, false)
  • output_string

    • output an arbitrary string, validated by a regex
    • args:
      • a validation regex string as the first argument (default: .*)
  • output_json

    • output an arbitrary json value, validated by jq
    • args:
      • a validation jq query which must not fail or return null (default: .)