mirror of
https://github.com/elenapan/dotfiles.git
synced 2025-12-26 23:34:57 +08:00
13 lines
343 B
Bash
Executable file
13 lines
343 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# This script is started by the init script for each eww widget that can accepts
|
|
# input.
|
|
widget=$1 # Widget name e.g. alarms
|
|
sink=$2 # Path to sink script, e.g. input-sink-alarms.sh
|
|
|
|
pipe=/tmp/eww-widget-input-pipe-${widget}
|
|
|
|
[ ! -p $pipe ] && mkfifo $pipe
|
|
|
|
tail -f $pipe | while IFS= read -r cmd; do
|
|
eval "$cmd"
|
|
done
|