]> git.r.bdr.sh - rbdr/r.bdr.sh/blame - swiftbar_scripts.gmi
Add fediverse creator meta tag
[rbdr/r.bdr.sh] / swiftbar_scripts.gmi
CommitLineData
aecb2ec8
RBR
1--- title: swiftbar_scripts.html
2--- description: Assorted SwiftBar scripts and utilities I've built.
a141dd00
RBR
3## SwiftBar Scripts
4
5888c671
RBR
5This page holds the SwiftBar[1] scripts I've made, including some utilities to
6extend functionality.
a141dd00
RBR
7
8=> https://swiftbar.app/ [1] SwiftBar
5888c671
RBR
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
a141dd00
RBR
18=> https://xbarapp.com/ [2] Xbar
19
c3ab1ed4 20## Sourcehut Builds
a141dd00 21
4356e493 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.
a141dd00 23
74c706a6
RBR
24### Dependencies
25
26You must have jq and curl installed.
27
28### Usage
29
4356e493 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)
a141dd00 31
74c706a6
RBR
32### Focus Checks
33
9fb7fa10
RBR
34This script includes focus checks (See focus checks column at the end of this page on how to use them.)
35
3c99b126 36=> ./swiftbar/sourcehut-builds.1m.sh ⧇ ./swiftbar/sourcehut-builds.1m.sh
5564aa18
RBR
37
38## Monitorcito Bar
39
4356e493 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.
5564aa18 41
74c706a6
RBR
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
9fb7fa10
RBR
52This script includes focus checks (See focus checks column at the end of this page on how to use them.)
53
c2d8b058 54=> https://git.sr.ht/~rbdr/monitorcito [3] Monitorcito
3c99b126 55=> ./swiftbar/monitorcito.1m.sh ⧇ ./swiftbar/monitorcito.1m.sh
9fb7fa10
RBR
56
57## Focus Checks
58
74c706a6
RBR
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
9fb7fa10
RBR
65### Usage
66
74c706a6 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:
9fb7fa10
RBR
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
7de2480b 81The script will only appear or disappear when it's next refreshed. If you want this faster, trigger a full refresh of your plugins.
aa2e4e1b 82
9fb7fa10
RBR
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
ddcea706 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.
9fb7fa10
RBR
90
91### For Developers
92
ddcea706 93If you want to include this functionality in your script, check the script comments for instructions on how to use it in your scripts.
9fb7fa10 94
3c99b126 95=> ./swiftbar/focus.utils.sh ⧇ ./swiftbar/focus.utils.sh