Skip to content

Commit 5d3aaee

Browse files
committed
refactor(web): migrate npm workflow to bun and modernize tooling
1 parent 9f8bd82 commit 5d3aaee

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2213
-30780
lines changed

.github/workflows/web.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,15 @@ jobs:
2525
uses: actions/setup-node@v5
2626
with:
2727
node-version: 18
28-
cache: npm
29-
cache-dependency-path: '**/package-lock.json'
30-
- run: npm ci
28+
- name: Use Bun
29+
uses: oven-sh/setup-bun@v2
30+
with:
31+
bun-version: 1.3.10
32+
- run: bun install --frozen-lockfile
3133
working-directory: web
32-
- run: npm run lint
34+
- run: bun run lint
3335
working-directory: web
34-
- run: npm run build --if-present
36+
- run: bun run build
3537
working-directory: web
36-
- run: npm run e2e:headless
38+
- run: bun run e2e:headless
3739
working-directory: web

doc/README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
# Conky docs
22

3-
There are 3 YAML files which contain the documentation:
3+
There are three YAML files that contain the documentation:
44

5-
* [`variables.yaml`](variables.yaml): Documents each object/variable
6-
* [`config_settings.yaml`](config_settings.yaml): Documents global configuration settings
7-
* [`lua.yaml`](lua.yaml): Documents Conky's Lua API
5+
- [`variables.yaml`](variables.yaml): Documents each object or variable
6+
- [`config_settings.yaml`](config_settings.yaml): Documents global configuration settings
7+
- [`lua.yaml`](lua.yaml): Documents Conky's Lua API
88

9-
The `desc` field within the docs can be formatted with markdown, however _do
10-
not_ include headings within the `desc` fields, as it will mess up the man page
11-
output. In markdown, headings begin with `#`.
9+
The `desc` field within the docs can be formatted with Markdown; however, _do
10+
not_ include headings within `desc` fields, as that will break the man page
11+
output. In Markdown, headings begin with `#`.
1212

1313
The supported documentation fields are:
1414

15-
* `name`: the name of the thing
16-
* `desc`: a markdown-formatted description of the thing
17-
* `args`: optional list of arguments
18-
* `default`: an optional default value, if applicable
15+
- `name`: the name of the thing
16+
- `desc`: a markdown-formatted description of the thing
17+
- `args`: optional list of arguments
18+
- `default`: an optional default value, if applicable
1919

2020
## Updating docs
2121

22-
The man page is based on [`man.md.j2`](man.md.j2) which is a Jinja2 template.
22+
The man page is based on [`man.md.j2`](man.md.j2), which is a Jinja2 template.
2323
The generated markdown is used to generate a final man page using
24-
[`pandoc`](https://pandoc.org/). Generating the final man page is a 2 step
24+
[`pandoc`](https://pandoc.org/). Generating the final man page is a two-step
2525
process:
2626

2727
1. Run `render.py` to process `man.md.j2`:

doc/config_settings.yaml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,33 @@
1111
# * `default`: an optional default value, if applicable
1212
---
1313
desc: |-
14-
This is a listing of global configuration options for Conky. These are placed
15-
in the `conky.config` section of your configuration file, before `conky.text`.
14+
This is a list of Conky's global configuration options. These belong in the
15+
`conky.config` section of your configuration file, before `conky.text`.
1616
1717
The default configuration file location is `~/.config/conky/conky.conf` or
1818
`${sysconfdir}/conky/conky.conf`. On most systems, `$sysconfdir` is `/etc`,
1919
and you can find the sample config file there in
2020
`/etc/conky/conky.conf`.
2121
22-
You might want to copy the default config to `~/.config/conky/conky.conf` and
23-
then start modifying it. User configs can be found at
22+
You may want to copy the default config to `~/.config/conky/conky.conf` and
23+
modify it there. User configs can be found at
2424
https://github.com/brndnmtthws/conky/wiki/Configs.
2525
26-
Optional arguments are generally denoted with paretheses (i.e., `(optional)`).
26+
Optional arguments are generally denoted with parentheses, for example
27+
`(optional)`.
2728
values:
2829
- name: alignment
2930
desc: |-
30-
Aligned position on screen, may be `none` or one of:
31+
Screen alignment. May be `none` or one of:
3132
3233
| | | |
3334
|:----------------------|:-----------------------:|-----------------------:|
3435
|`top_left` (or `tl`) | `top_middle` (or `tm`) | `top_right` (or `tr`)|
3536
|`middle_left` (or `ml`)|`middle_middle` (or `mm`)|`middle_right` (or `mr`)|
3637
|`bottom_left` (or `bl`)|`bottom_middle` (or `bm`)|`bottom_right` (or `br`)|
3738
38-
In case of `panel` and `dock` [windows](#own_window_type), it might make more sense to use one
39-
of the following aliases:
39+
For `panel` and `dock` [windows](#own_window_type), it may be more useful
40+
to use one of the following aliases:
4041
4142
| Alias | Value |
4243
|:------:|:-------------:|
@@ -48,10 +49,10 @@ values:
4849
4950
See also [`gap_x`](#gap_x) and [`gap_y`](#gap_y) settings.
5051
- name: append_file
51-
desc: Append the file given as argument.
52+
desc: Append the file given as an argument.
5253
- name: background
5354
desc: |-
54-
Boolean value, if true, Conky will be forked to background
55+
Boolean value. If true, Conky will fork into the background
5556
when started.
5657
- name: border_inner_margin
5758
desc: |-
@@ -65,9 +66,9 @@ values:
6566
desc: Border width in pixels.
6667
- name: colorN
6768
desc: |-
68-
Predefine a color for use inside conky.text segments.
69-
Substitute N by a digit between 0 and 9, inclusively. When specifying
70-
the color value in hex, omit the leading hash (#).
69+
Predefine a color for use inside `conky.text` segments.
70+
Replace `N` with a digit between 0 and 9, inclusive. When specifying
71+
the color value in hex, omit the leading `#`.
7172
- name: console_bar_fill
7273
desc: 'A character to fill the console bars.'
7374
default: '#'
@@ -76,10 +77,10 @@ values:
7677
default: '.'
7778
- name: console_graph_ticks
7879
desc: |-
79-
A comma-separated list of strings to use as the bars of a
80-
graph output to console/shell. The first list item is used for the
81-
minimum bar height and the last item is used for the maximum, e.g. \"
82-
,_,=,#\".
80+
A comma-separated list of strings to use as the bars in a graph rendered
81+
to the console or shell. The first list item is used for the minimum bar
82+
height and the last item is used for the maximum, for example
83+
`",_,=,#"`.
8384
- name: cpu_avg_samples
8485
desc: The number of samples to average for CPU monitoring.
8586
- name: default_bar_height
@@ -94,7 +95,7 @@ values:
9495
will be 10 for the text version of the bar.
9596
default: 0
9697
- name: default_color
97-
desc: Default color and border color.
98+
desc: Default text color and border color.
9899
- name: default_gauge_height
99100
desc: |-
100101
Specify a default height for gauges.

doc/lua.yaml

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@
1111
# * `default`: an optional default value, if applicable
1212
---
1313
desc: |-
14-
Conky features a Lua Programming API, and also ships with Lua bindings
14+
Conky features a Lua programming API and also ships with Lua bindings
1515
for some useful libraries. Note that the bindings require tolua++.
1616
17-
To use Lua Conky, you first need to make sure you have a version of
17+
To use Lua with Conky, first make sure you have a version of
1818
Conky with Lua support enabled (`conky -v` will report this).
19-
Conky defines certain global functions and variables which can be
20-
accessed from Lua code running in Conky. Scripts must first be loaded
21-
using the lua_load configuration option. You then call functions in Lua
22-
via Conky's $lua, $lua_read, and Lua hooks.
19+
Conky defines certain global functions and variables that can be
20+
accessed from Lua code running inside Conky. Scripts must first be loaded
21+
using the `lua_load` configuration option. You can then call Lua functions
22+
through Conky's `$lua`, `$lua_read`, and Lua hooks.
2323
24-
Be careful when creating threaded objects through the Lua API. You could
25-
wind up with a whole bunch of threads running if a thread is created
24+
Be careful when creating threaded objects through the Lua API. You could end
25+
up with a large number of threads running if a thread is created
2626
with each iteration.
2727
28-
NOTE: In order to accommodate certain features in the cairo library's
28+
Note: to accommodate certain features in the Cairo library's
2929
API, Conky will export a few additional functions for the creation of
3030
certain structures. These are documented below.
3131
values:
@@ -140,12 +140,11 @@ values:
140140
`tolua.takeownership(cte)`
141141
- name: conky_build_arch
142142
desc: |-
143-
A string containing the build architecture for this
144-
particular instance of Conky.
143+
A string containing the build architecture for this Conky instance.
145144
- name: conky_build_info
146145
desc: |-
147-
A string containing the build info for this particular
148-
instance of Conky, including the version, build date, and
146+
A string containing build information for this Conky instance, including
147+
the version, build date, and
149148
architecture.
150149
- name: conky_config
151150
desc: |-
@@ -170,8 +169,7 @@ values:
170169
'number'.
171170
- name: conky_version
172171
desc: |-
173-
A string containing the version of the current instance of
174-
Conky.
172+
A string containing the version of the current Conky instance.
175173
- name: conky_window
176174
desc: |-
177175
This table contains some information about Conky's window.
@@ -210,8 +208,8 @@ values:
210208
211209
- name: cairo_text_hp_show(cr, x, y, text, font, font_size, alignment, language, script, direction)
212210
desc: |-
213-
Renders text to a cairo_t using harfbuzz and freetype, this provides significantly
214-
better text rendering then using cairo's inbuilt functions.
211+
Renders text to a `cairo_t` using HarfBuzz and FreeType. This provides
212+
significantly better text rendering than Cairo's built-in functions.
215213
216214
| Argument | Description |
217215
|---------------------|--------------------------------------------------------------------------------------|

doc/variables.yaml

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,30 @@
1212
---
1313
desc: |-
1414
To configure what Conky displays, you must supply some variables in the
15-
`conky.text` section of your configuration. In this secton you'll find a
15+
`conky.text` section of your configuration. In this section you will find a
1616
listing of the available variables. Some of them may require build options to
1717
be enabled at compile time for them to work.
1818
19-
Colours are parsed using `XParseColor()`, there might be a list of them:
20-
`/usr/share/X11/rgb.txt`. Colour can be also in `#rrggbb` format (hex).
19+
Colors are parsed using `XParseColor()`. A list of named colors may be
20+
available in `/usr/share/X11/rgb.txt`. Colors may also be specified in
21+
`#rrggbb` hexadecimal format.
2122
2223
Some objects may create threads, and sometimes these threads will not be
2324
destroyed until Conky terminates. There is no way to destroy or clean up
2425
threads while Conky is running. For example, if you use an MPD variable,
25-
the MPD thread will keep running until Conky dies. Some threaded objects
26-
will use one of the parameters as a `key`, so that you only have 1
26+
the MPD thread will keep running until Conky exits. Some threaded objects
27+
will use one of the parameters as a `key`, so that you only have one
2728
relevant thread running (for example, the $curl, and $rss
2829
objects launch one thread per URI).
2930
30-
Optional arguments are generally denoted with paretheses (i.e., `(optional)`).
31+
Optional arguments are generally denoted with parentheses, for example
32+
`(optional)`.
3133
values:
3234
- name: acpiacadapter
3335
desc: |-
34-
ACPI AC adapter state. On linux, the adapter option
36+
ACPI AC adapter state. On Linux, the adapter option
3537
specifies the subfolder of `/sys/class/power_supply` containing the state
36-
information (tries `AC` and `ADP1` if there is no argument given).
38+
information. Tries `AC` and `ADP1` if no argument is given.
3739
Non-linux systems ignore it.
3840
args:
3941
- (adapter)
@@ -58,7 +60,7 @@ values:
5860
- name: adt746xfan
5961
desc: Fan speed from therm_adt746x.
6062
- name: alignc
61-
desc: Align text to centre.
63+
desc: Align text to the center.
6264
args:
6365
- (num)
6466
- name: alignr
@@ -119,7 +121,7 @@ values:
119121
- name: apm_battery_time
120122
desc: |-
121123
Display remaining APM battery life in hh:mm:ss or "unknown"
122-
if AC adapterstatus is on-line or charging. FreeBSD, OpenBSD only.
124+
if AC adapter status is online or charging. FreeBSD and OpenBSD only.
123125
- name: audacious_bar
124126
desc: Progress bar.
125127
args:
@@ -137,7 +139,7 @@ values:
137139
- name: audacious_length_seconds
138140
desc: Total length of current tune in seconds.
139141
- name: audacious_main_volume
140-
desc: The current volume fetched from Audacious.
142+
desc: The current volume reported by Audacious.
141143
- name: audacious_playlist_length
142144
desc: Number of tunes in playlist.
143145
- name: audacious_playlist_position
@@ -157,7 +159,7 @@ values:
157159
- name: battery
158160
desc: |-
159161
Battery status and remaining percentage capacity of ACPI or
160-
APM battery. ACPI battery number can be given as argument.
162+
APM battery. An ACPI battery number may be given as an argument.
161163
default: BAT0
162164
args:
163165
- (num)
@@ -187,23 +189,23 @@ values:
187189
- name: battery_short
188190
desc: |-
189191
Battery status and remaining percentage capacity of ACPI or APM battery.
190-
ACPI battery number can be given as argument. This mode display a short
191-
status, which means that C is displayed instead of charging, D for
192-
discharging, F for full, N for not present, E for empty and U for unknown.
192+
An ACPI battery number may be given as an argument. This mode displays a
193+
short status: `C` for charging, `D` for discharging, `F` for full, `N`
194+
for not present, `E` for empty, and `U` for unknown.
193195
default: BAT0
194196
args:
195197
- (num)
196198
- name: battery_status
197199
desc: |-
198-
Battery status for ACPI battery. ACPI battery number can be
199-
given as arguments.
200+
Battery status for an ACPI battery. An ACPI battery number may be given
201+
as an argument.
200202
default: BAT0
201203
args:
202204
- (num)
203205
- name: battery_time
204206
desc: |-
205207
Battery charge/discharge time remaining of ACPI battery.
206-
ACPI battery number can be given as argument.
208+
An ACPI battery number may be given as an argument.
207209
default: BAT0
208210
args:
209211
- (num)
@@ -217,23 +219,23 @@ values:
217219
desc: Amount of memory cached.
218220
- name: cat
219221
desc: |-
220-
Reads a file and displays the contents in conky. This is
222+
Reads a file and displays its contents in Conky. This is
221223
useful if you have an independent process generating output that you
222-
want to include in conky.
224+
want to include in Conky.
223225
args:
224226
- file
225227
- name: catp
226228
desc: |-
227-
Reads a file and displays the contents in conky. This is
229+
Reads a file and displays its contents in Conky. This is
228230
useful if you have an independent process generating output that you
229-
want to include in conky. This differs from $cat in that it parses the
231+
want to include in Conky. This differs from `$cat` in that it parses the
230232
contents of the file, so you can insert things like
231233
`${color red}hi!${color}` in your file and have it correctly parsed by
232234
Conky.
233235
args:
234236
- file
235237
- name: cmdline_to_pid
236-
desc: PID of the first process that has string in its commandline.
238+
desc: PID of the first process whose command line contains the given string.
237239
args:
238240
- string
239241
- name: cmus_aaa

web/.eslintrc.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)