feat(waybar): improve screen recorder module
This commit is contained in:
15
.config/waybar/scripts/check-screen-recorder.sh
Normal file
15
.config/waybar/scripts/check-screen-recorder.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
main() {
|
||||
local data=""
|
||||
|
||||
if pgrep -x wf-recorder > /dev/null 2>&1; then
|
||||
data='{"text": "", "tooltip": "Stop recording", "class": "active"}'
|
||||
else
|
||||
data='{"text": "", "tooltip": "Start recording", "class": "idle"}'
|
||||
fi
|
||||
|
||||
echo $data | jq --unbuffered --compact-output
|
||||
}
|
||||
|
||||
main $@
|
Reference in New Issue
Block a user