matryer / matryer/xbar-plugins
Xbar result and terminal output differs
Open
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 2.6k
- Forks
- 1.1k
- Avg merge
- 9d 15h
- Merged PRs (30d)
- 1
Description
I have a small script
#!/bin/bash
if echo "$(wget --spider -t 1 -T 1 https://www.google.com 2>&1)" | grep -q "OK"; then
echo "✦| dropdown=false"
echo "---"
echo "You're online"
else
echo "✧|color=#f23400 dropdown=false"
echo "---"
echo "You're offline"
fi
If a run it from terminal I get right output. But xbar output is always you're offline.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the inline Bash script and run it both in a terminal and through xbar, comparing the output from the wget check and grep condition. Investigate why the xbar execution reports offline despite the terminal succeeding; done means the plugin displays the online result when connectivity is available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash, shell
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100