]> git.r.bdr.sh - rbdr/r.bdr.sh/blame - swiftbar_scripts.gmi
Add refresh information
[rbdr/r.bdr.sh] / swiftbar_scripts.gmi
CommitLineData
a141dd00
RBR
1## SwiftBar Scripts
2
3This page holds the SwiftBar[1] / xbar scripts I've made. Since I use the first
4one, I'm not sure whether they work with xbar[2], but should probably be OK.
5
6=> https://swiftbar.app/ [1] SwiftBar
7=> https://xbarapp.com/ [2] Xbar
8
c3ab1ed4 9## Sourcehut Builds
a141dd00 10
4356e493 11View the status of your last few builds in sourcehut. You can open the URL by clicking on the menu items. The count of failed, pending and successful runs of the last 15m are shown next to the icon.
a141dd00 12
4356e493 13To use the plugin you'll need to set your sourcehut token in the VAR_SOURCEHUT_API_TOKEN variable (See the 'ADD YOUR TOKEN HERE' string). You can also control how many builds to show by changing the VAR_BUILD_COUNT variable (defaults to 5)
a141dd00 14
9fb7fa10
RBR
15This script includes focus checks (See focus checks column at the end of this page on how to use them.)
16
a141dd00 17=> ./swiftbar/sourcehut-builds.1m.sh ⧇ source
5564aa18
RBR
18
19## Monitorcito Bar
20
4356e493 21View your monitorcito[3] tracked services at a glance. ○ is shown if everything is OK, and ╳ if at least one service is failing. Clicking on an item refreshes the status.
5564aa18 22
9fb7fa10
RBR
23This script includes focus checks (See focus checks column at the end of this page on how to use them.)
24
c2d8b058 25=> https://git.sr.ht/~rbdr/monitorcito [3] Monitorcito
5564aa18 26=> ./swiftbar/monitorcito.1m.sh ⧇ source
9fb7fa10
RBR
27
28## Focus Checks
29
30### Usage
31
32You can ask a script to only continue if it matches a focus mode, or to halt if it encounters it. You can do this by passing pipe separated strings to VAR_RUN_ON_FOCUS or VAR_HALT_ON_FOCUS. For example, this will only run the script if "Personal" or "Do Not Disturb" are active:
33
34```
35VAR_RUN_ON_FOCUS="Personal|Do Not Disturb"
36```
37
38And this will halt the script only if the focus is Work
39
40```
41VAR_HALT_ON_FOCUS="Work"
42```
43
44If neither variable is set, then all checks will be disabled.
45
aa2e4e1b
RBR
46The script will only appear or disappear when it's next refreshed. If you
47want this faster, trigger a full refresh of your plugins.
48
9fb7fa10
RBR
49### Setup
50
51Download and copy focus.utils.sh to your SwiftBar directory on the same directory as the scripts that use this functionality.
52
53### Permissions
54
55For the script to correctly get focus data, it requires full disk access. You
56can do this by going to System Settings > Privacy & Security > Full Disk Access,
57and adding SwiftBar to the list.
58
59### For Developers
60
61If you want to include this functionality in your script, check the script
62comments for instructions on how to use it in your scripts.
63
64=> ./swiftbar/focus.utils.sh ⧇ source