]> git.r.bdr.sh - rbdr/r.bdr.sh/blame - swiftbar_scripts.gmi
Singleline more lines
[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
74c706a6
RBR
13### Dependencies
14
15You must have jq and curl installed.
16
17### Usage
18
4356e493 19To 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 20
74c706a6
RBR
21### Focus Checks
22
9fb7fa10
RBR
23This script includes focus checks (See focus checks column at the end of this page on how to use them.)
24
67da58d3 25=> ./swiftbar/sourcehut-builds.1m.sh ⧇ sourcehut-builds.1m.sh
5564aa18
RBR
26
27## Monitorcito Bar
28
4356e493 29View 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 30
74c706a6
RBR
31### Dependencies
32
33You must have jq and curl installed.
34
35### Usage
36
37You can control the URL of the monitorcito instance by adjusting VAR_MONITORCITO_URL
38
39### Focus Checks
40
9fb7fa10
RBR
41This script includes focus checks (See focus checks column at the end of this page on how to use them.)
42
c2d8b058 43=> https://git.sr.ht/~rbdr/monitorcito [3] Monitorcito
67da58d3 44=> ./swiftbar/monitorcito.1m.sh ⧇ monitorcito.1m.sh
9fb7fa10
RBR
45
46## Focus Checks
47
74c706a6
RBR
48This is a utility that allows other scripts to conditionally run or halt based on which focus mode is enabled.
49
50### Dependencies
51
52You must have jq installed .
53
9fb7fa10
RBR
54### Usage
55
74c706a6 56To enable the focus checks, you need to pass 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:
9fb7fa10
RBR
57
58```
59VAR_RUN_ON_FOCUS="Personal|Do Not Disturb"
60```
61
62And this will halt the script only if the focus is Work
63
64```
65VAR_HALT_ON_FOCUS="Work"
66```
67
68If neither variable is set, then all checks will be disabled.
69
7de2480b 70The script will only appear or disappear when it's next refreshed. If you want this faster, trigger a full refresh of your plugins.
aa2e4e1b 71
9fb7fa10
RBR
72### Setup
73
74Download and copy focus.utils.sh to your SwiftBar directory on the same directory as the scripts that use this functionality.
75
76### Permissions
77
ddcea706 78For the script to correctly get focus data, it requires full disk access. You can do this by going to System Settings > Privacy & Security > Full Disk Access, and adding SwiftBar to the list.
9fb7fa10
RBR
79
80### For Developers
81
ddcea706 82If you want to include this functionality in your script, check the script comments for instructions on how to use it in your scripts.
9fb7fa10 83
67da58d3 84=> ./swiftbar/focus.utils.sh ⧇ focus.utils.sh