]> git.r.bdr.sh - rbdr/r.bdr.sh/blame_incremental - swiftbar_scripts.gmi
Add fediverse creator meta tag
[rbdr/r.bdr.sh] / swiftbar_scripts.gmi
... / ...
CommitLineData
1--- title: swiftbar_scripts.html
2--- description: Assorted SwiftBar scripts and utilities I've built.
3## SwiftBar Scripts
4
5This page holds the SwiftBar[1] scripts I've made, including some utilities to
6extend functionality.
7
8=> https://swiftbar.app/ [1] SwiftBar
9
10### Xbar Compatibility
11
12The scripts aren't built with xbar[2] in mind, so some things will be broken:
13
14- It uses SF Symbols, so instead of icons you'll see things like :circle:. These should be easily replaceable with other characters.
15- Some attributes that are present in swiftbar (eg. tooltip=) will break xbar.
16 They should be safe to remove.
17
18=> https://xbarapp.com/ [2] Xbar
19
20## Sourcehut Builds
21
22View 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.
23
24### Dependencies
25
26You must have jq and curl installed.
27
28### Usage
29
30To 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)
31
32### Focus Checks
33
34This script includes focus checks (See focus checks column at the end of this page on how to use them.)
35
36=> ./swiftbar/sourcehut-builds.1m.sh ⧇ ./swiftbar/sourcehut-builds.1m.sh
37
38## Monitorcito Bar
39
40View 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.
41
42### Dependencies
43
44You must have jq and curl installed.
45
46### Usage
47
48You can control the URL of the monitorcito instance by adjusting VAR_MONITORCITO_URL
49
50### Focus Checks
51
52This script includes focus checks (See focus checks column at the end of this page on how to use them.)
53
54=> https://git.sr.ht/~rbdr/monitorcito [3] Monitorcito
55=> ./swiftbar/monitorcito.1m.sh ⧇ ./swiftbar/monitorcito.1m.sh
56
57## Focus Checks
58
59This is a utility that allows other scripts to conditionally run or halt based on which focus mode is enabled.
60
61### Dependencies
62
63You must have jq installed .
64
65### Usage
66
67To 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:
68
69```
70VAR_RUN_ON_FOCUS="Personal|Do Not Disturb"
71```
72
73And this will halt the script only if the focus is Work
74
75```
76VAR_HALT_ON_FOCUS="Work"
77```
78
79If neither variable is set, then all checks will be disabled.
80
81The script will only appear or disappear when it's next refreshed. If you want this faster, trigger a full refresh of your plugins.
82
83### Setup
84
85Download and copy focus.utils.sh to your SwiftBar directory on the same directory as the scripts that use this functionality.
86
87### Permissions
88
89For 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.
90
91### For Developers
92
93If you want to include this functionality in your script, check the script comments for instructions on how to use it in your scripts.
94
95=> ./swiftbar/focus.utils.sh ⧇ ./swiftbar/focus.utils.sh