Skip to content

Commit 14668ef

Browse files
committed
docs: Updated readme with latest build commands
1 parent 4cf31a6 commit 14668ef

File tree

3 files changed

+88
-116
lines changed

3 files changed

+88
-116
lines changed

README.md

+84-112
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,30 @@
1-
<!-- If you're interested, you can learn more about "sponsor-spotlight" on
2-
https://dev.to/ful1e5/lets-give-recognition-to-those-supporting-our-work-on-github-sponsors-b00 -->
3-
4-
![shoutout-sponsors](https://sponsor-spotlight.vercel.app/sponsor?login=ful1e5)
5-
61
# Apple Cursor
72

83
Open source macOS Cursors for `Windows` and `Linux` with _HiDPI Support_ .
94

105
[![Build](https://github.com/ful1e5/apple_cursor/workflows/build/badge.svg)](https://github.com/ful1e5/apple_cursor/actions?query=workflow%3Abuild)
116

12-
## Join the Community as a Sponsor
7+
## Notes
138

14-
Until 2021, my cursor projects were funded through [pling.com](https://www.pling.com).
15-
However, the funding has since decreased and the projects are now dependent on community
16-
support and sponsorships to continue. If you would like to help me maintain Bibata and my
17-
other open source projects, you can consider sponsoring my work on
18-
[GitHub Sponsor](https://github.com/sponsors/ful1e5) or contacting me on
19-
[Twitter](https://twitter.com/ful1e5) if your company is interested in supporting my projects.
20-
I would be happy to discuss it and include your avatar in the project's README.
9+
- All cursor's SVG files are found in [svg](./svg) directory or you can also find them on
10+
[Figma](https://www.figma.com/file/OZw8Ylb9xPFw9h1uZYSMFa/apple_cursor?type=design&node-id=73%3A2&mode=design&t=dLILPgJJrLKeAcTE-1).
2111

22-
I am grateful to all the kind individuals and companies that support and sponsor my work,
23-
which enables me to continue working on open source projects full-time. Thank you.
12+
<!-- If you're interested, you can learn more about "sponsor-spotlight" on
13+
https://dev.to/ful1e5/lets-give-recognition-to-those-supporting-our-work-on-github-sponsors-b00 -->
2414

25-
---
15+
![shoutout-sponsors](https://sponsor-spotlight.vercel.app/sponsor?login=ful1e5)
2616

27-
![macOSMonterey](https://imgur.com/bmS0fRT.png)
28-
![macOSMonterey White](https://imgur.com/s0nqcje.png)
29-
![macOSBigSur](https://imgur.com/Q022eSp.png)
30-
![macOSBigSur White](https://imgur.com/SFVR945.png)
17+
---
3118

32-
> **Note**
33-
> All cursor's `.svg` files are found in [svg](./svg) directory or you can also find them on
34-
> [Figma](https://www.figma.com/file/OZw8Ylb9xPFw9h1uZYSMFa/Mac-Cursor?node-id=0%3A1).
19+
![macOS](https://github.com/ful1e5/apple_cursor/assets/24286590/d97de4d5-83e2-42fc-972c-b95be520ed3b)
20+
![macOS White](https://github.com/ful1e5/apple_cursor/assets/24286590/c2cfad32-2b7d-4f52-a5b2-71f42f0d0432)
3521

3622
## Cursor Sizes
3723

3824
### Xcursor Sizes:
3925

26+
<kbd>16</kbd>
27+
<kbd>20</kbd>
4028
<kbd>22</kbd>
4129
<kbd>24</kbd>
4230
<kbd>28</kbd>
@@ -52,22 +40,22 @@ which enables me to continue working on open source projects full-time. Thank yo
5240

5341
### Windows Cursor Size:
5442

55-
- <kbd>16x16</kbd> - Small
56-
- <kbd>24x24</kbd> - Regular
57-
- <kbd>32x32</kbd> - Large
58-
- <kbd>48x48</kbd> - Extra Large
43+
- <kbd>16x16</kbd> - Small
44+
- <kbd>24x24</kbd> - Regular
45+
- <kbd>32x32</kbd> - Large
46+
- <kbd>48x48</kbd> - Extra Large
5947

6048
## Colors
6149

6250
### Default
6351

64-
- Base Color - `#000000` (Black)
65-
- Outline Color - `#FFFFFF` (White)
52+
- Base Color - `#000000` (Black)
53+
- Outline Color - `#FFFFFF` (White)
6654

6755
### White
6856

69-
- Base Color - `#FFFFFF` (White)
70-
- Outline Color - `#000000` (Black)
57+
- Base Color - `#FFFFFF` (White)
58+
- Outline Color - `#000000` (Black)
7159

7260
## How to get it
7361

@@ -99,16 +87,16 @@ paru -S apple_cursor
9987
**Installation:**
10088

10189
```bash
102-
tar -xvf macOS-Bigsur.tar.gz # extract `.tar.gz`
103-
mv macOS-* ~/.icons/ # Install to local users
104-
sudo mv macOS-* /usr/share/icons/ # Install to all users
90+
tar -xvf macOS.tar.gz # extract `.tar.gz`
91+
mv macOS* ~/.icons/ # Install to local users
92+
sudo mv macOS* /usr/share/icons/ # Install to all users
10593
```
10694

10795
**Uninstallation:**
10896

10997
```bash
110-
rm ~/.icons/macOS-* # Remove from local users
111-
sudo rm /usr/share/icons/macOS-* # Remove from all users
98+
rm ~/.icons/macOS* # Remove from local users
99+
sudo rm /usr/share/icons/macOS* # Remove from all users
112100
```
113101

114102
#### Windows
@@ -138,158 +126,142 @@ Run the `uninstall.bat` script packed with the `.zip` archive
138126

139127
## Build From Source
140128

141-
#### Notes
142-
143-
- Apple Cursor's build configuration and cursor hotspot settings are bundled in the `build.toml` file.
144-
- Check out the scripts section in [package.json](./package.json) to see how we build the cursor theme,
145-
excluding the render scripts. They are useful for converting `.svg` files to `.png` files.
146-
- yarn is optional, For building XCursors and Windows cursors from `.png` files or resizing them
147-
you don't need that. If you want to develop/modify Apple Cursor's colors, and bitmaps, or generate a png
148-
file from a svg, Then you can use yarn because bitmapper is written in TypeScript.
149-
- Since macOS Bigsur and macOS Monterey are designed similarly, they share the same hotspot settings so a
150-
single configuration file `build.toml` is responsible for building all variants. Due to this, you will have
151-
to change the following options in `ctgen` to build the appropriate variant:
152-
- **-d**: bitmaps directory
153-
- **-n**: The name you want to give to the generated theme.
154-
- **-c**: Theme comment.
155-
- See `ctgen --help` for all available options.
156-
157-
### Build prerequisites
129+
### Prerequisites
158130

159-
- Python version 3.7 or higher
160-
- [clickgen](https://github.com/ful1e5/clickgen)>=2.1.2 (`pip install clickgen`)
161-
- [yarn](https://github.com/yarnpkg/yarn)
131+
- Python version 3.7 or higher
132+
- [clickgen](https://github.com/ful1e5/clickgen)>=2.1.8 (`pip install clickgen`)
133+
- [yarn](https://github.com/yarnpkg/yarn)
162134

163135
### Quick start
164136

165-
1. Install [build prerequisites](#build-prerequisites) on your system
137+
1. Install [build prerequisites](#prerequisites) on your system
166138
2. `git clone https://github.com/ful1e5/apple_cursor`
167-
3. `cd apple_cursor && yarn build`
168-
4. See [Installing Apple Cursor](#installing-apple-cursor).
139+
3. `cd apple_cursor`
140+
4. `yarn install`
141+
5. `yarn generate`
142+
6. See [Installing Apple Cursor](#installing-apple-cursor).
169143

170-
### Building
144+
### Getting Started
171145

172-
> **Note**
173-
> Bitmaps are already generated in the `bitmaps` directory and **managed by the maintainer**
174-
> (do not edit them directly).
146+
Once you have the [build prerequisites](#prerequisites) installed, You can personalize colors,
147+
customize sizes, change target platforms, and more. This process involves using external tools,
148+
as this repository only contains SVG files and configuration for these tools:
175149

176-
First make sure you installed the [build prerequisites](#build-prerequisites).
177-
Now that you have the dependencies, you can try build individual themes from bitmaps and
178-
customize sizes, target platform, and etc. with the `ctgen` CLI (packed with `clickgen`).
150+
- [cbmp](https://github.com/ful1e5/cbmp): Used for customizing colors and generating PNG files.
151+
- [ctgen](https://github.com/ful1e5/clickgen): Used for customizing sizes and building XCursor and Windows Cursors.
179152

180-
#### `yarn build` aberration
153+
You can refer to the README of each tool for more information on their command-line options.
181154

182-
Here are the default commands we used to build the macOS variants and packed them into `yarn build`:
155+
#### Crafting Your Apple Cursor
183156

184-
```bash
185-
npx cbmp -d 'svg/bigsur' -n 'macOS-BigSur' -bc '#000000' -oc '#FFFFFF'
186-
npx cbmp -d 'svg/bigsur' -n 'macOS-BigSur-White' -bc '#FFFFFF' -oc '#000000'
157+
The process of creating custom cursor themes involves two main steps:
158+
159+
1. Rendering SVG files to PNG files.
160+
2. Building cursor themes from PNG files.
161+
162+
#### Customize Colors
163+
164+
`cbmp` provides three options for changing colors:
165+
166+
1. `-bc`: Base color, which replaces the `#00FF00` color in the SVG.
167+
2. `-oc`: Outlined color, which replaces the `#0000FF` color in the SVG.
168+
3. `-wc` (optional): Watch Background color, which replaces the `#FF0000` color in the SVG.
187169

188-
npx cbmp -d 'svg/monterey' -n 'macOS-Monterey' -bc '#000000' -oc '#FFFFFF'
189-
npx cbmp -d 'svg/monterey' -n 'macOS-Monterey-White' -bc '#FFFFFF' -oc '#000000'
170+
```bash
171+
npx cbmp [...] -bc '<hex>' -oc '<hex>' -wc '<hex>'
190172
```
191173

192-
Afterwards, the themes can be found in the `themes` directory.
174+
Alternatively, you can provide a JSON configuration file to render SVG files, which contains a sequence of `cbmp` commands:
193175

194-
#### Customize Sizes
176+
```bash
177+
npx cbmp render.json
178+
```
195179

196-
> **Note**
197-
> You can change the cursor size up to 200 because pngs are rendered with 200x200.
198-
> If the cursor is resized by more than rendered png size, the final cursor will be blurred.
180+
#### Customize Sizes
199181

200182
##### Customize Windows Cursor size
201183

202184
To build Windows cursor with size `16`:
203185

204-
> **Warning**
205-
> Windows cursor supports only one size, if multiple sizes are given with `-s` the first size will
206-
> be considered in build.
207-
208186
```bash
209-
ctgen build.toml -s 16 -p windows -d 'bitmaps/macOS-BigSur' -n 'macOS-BigSur' -c 'macOS Big Sur Windows Cursors with size 16'
187+
ctgen build.toml -s 16 -p windows -d 'bitmaps/macOS' -n 'macOS' -c 'macOS Cursors with size 16'
210188
```
211189

212190
You can also customize output directory with `-o` option:
213191

214192
```bash
215-
ctgen build.toml -s 16 -p windows -d 'bitmaps/macOS-BigSur' -o 'out' -n 'macOS-BigSur' -c 'macOS Big Sur Windows Cursors with size 16'
193+
ctgen build.toml -s 16 -p windows -d 'bitmaps/macOS' -o 'out' -n 'macOS' -c 'macOS Cursors with size 16'
216194
```
217195

218196
##### Customize XCursor size
219197

220198
To build XCursor with size `16`:
221199

222200
```bash
223-
ctgen build.toml -s 16 -p x11 -d 'bitmaps/macOS-BigSur' -n 'macOS-BigSur' -c 'macOS Big Sur XCursors with size 16'
201+
ctgen build.toml -s 16 -p x11 -d 'bitmaps/macOS' -n 'macOS' -c 'macOS XCursors with size 16'
224202
```
225203

226204
You can also assign multiple sizes to `ctgen` for XCursors build:
227205

228206
```bash
229-
ctgen build.toml -s 16 24 32 -p x11 -d 'bitmaps/macOS-BigSur' -n 'macOS-BigSur' -c 'Custom Sizes macOS Big Sur XCursors'
230-
```
231-
232-
#### Customize Colors
233-
234-
To customize cursors color you have to install node dependencies with `yarn install` command.
235-
After installing dependencies you can customize the colors via `npx cbmp` Node CLI App which packed with
236-
[cbmp](https://github.com/ful1e5/cbmp) node package.
237-
238-
##### `yarn render` aberration
239-
240-
Here are the default commands we used for generating the macOS bitmaps and packed them into `yarn render`:
241-
242-
```bash
243-
npx cbmp -d 'svg/bigsur' -n 'macOS-BigSur' -bc '#000000' -oc '#FFFFFF'
244-
npx cbmp -d 'svg/bigsur' -n 'macOS-BigSur-White' -bc '#FFFFFF' -oc '#000000'
245-
npx cbmp -d 'svg/monterey' -n 'macOS-Monterey' -bc '#000000' -oc '#FFFFFF'
246-
npx cbmp -d 'svg/monterey' -n 'macOS-Monterey-White' -bc '#FFFFFF' -oc '#000000'
207+
ctgen build.toml -s 16 24 32 -p x11 -d 'bitmaps/macOS' -n 'macOS' -c 'Custom Sizes macOS XCursors'
247208
```
248209

249210
#### Examples
250211

251-
Lets generate Big Sur cursor with green base color and black outline:
212+
Lets generate macOS cursor with green and black colors:
252213

253214
```bash
254-
npx cbmp -d 'svg/bigsur' -n 'macOS-BigSur-Hacker' -bc '#00FE00' -oc '#000000'
215+
npx cbmp -d 'svg' -o 'bitmaps/macOS-Hacker' -bc '#00FE00' -oc '#000000'
255216
```
256217

257218
After rendering custom color you have to build cursor through `ctgen`:
258219

259220
```bash
260-
ctgen build.toml -d 'bitmaps/macOS-BigSur-Hacker' -n 'macOS-BigSur-Hacker' -c 'Green and black macOS Big Sur cursors.'
221+
ctgen build.toml -d 'bitmaps/macOS-Hacker' -n 'macOS-Hacker' -c 'Green and Black macOS cursors.'
261222
```
262223

263224
Afterwards, Generated theme can be found in the `themes` directory.
264225

265226
###### macOS Gruvbox
266227

267228
```bash
268-
npx cbmp -d 'svg/monterey' -n 'macOS-Gruvbox' -bc '#282828' -oc '#EBDBB2'
229+
npx cbmp -d 'svg' -o 'bitmaps/macOS-Gruvbox' -bc '#282828' -oc '#EBDBB2' -wc '#000000'
269230
ctgen build.toml -d 'bitmaps/macOS-Gruvbox' -n 'macOS-Gruvbox' -c 'Groovy macOS cursors.'
270231
```
271232

272233
###### macOS Solarized Dark
273234

274235
```bash
275-
npx cbmp -d 'svg/monterey' -n 'macOS-Solarized-Dark' -bc '#002b36' -oc '#839496'
236+
npx cbmp -d 'svg' -o 'bitmaps/macOS-Solarized-Dark' -bc '#002b36' -oc '#839496' -wc '#000000'
276237
ctgen build.toml -d 'bitmaps/macOS-Solarized-Dark' -n 'macOS-Solarized-Dark' -c 'Solarized Dark macOS cursors.'
277238
```
278239

279240
###### macOS Solarized Light
280241

281242
```bash
282-
npx cbmp -d 'svg/bigsur' -n 'macOS-Solarized-Light' -bc '#839496' -oc '#002b36'
243+
npx cbmp -d 'svg' -o 'bitmaps/macOS-Solarized-Light' -bc '#839496' -oc '#002b36'
283244
ctgen build.toml -d 'bitmaps/macOS-Solarized-Light' -n 'macOS-Solarized-Light' -c 'Solarized Light macOS cursors.'
284245
```
285246

286247
###### macOS Dracula
287248

288249
```bash
289-
npx cbmp -d 'svg/bigsur' -n 'macOS-Dracula' -bc '#282a36' -oc '#f8f8f2'
250+
npx cbmp -d 'svg' -o 'bitmaas/macOS-Dracula' -bc '#282a36' -oc '#f8f8f2'
290251
ctgen build.toml -d 'bitmaps/macOS-Dracula' -n 'macOS-Dracula' -c 'Dracula macOS cursors.'
291252
```
292253

293-
# Contributing
254+
## Testing Cursor
255+
256+
There are several websites that allow you to test your cursor states by hovering over buttons. This can be very useful when developing or verifying the behavior of a cursor. The following websites cover many of the most commonly used cursors, although they may not include all available options.
257+
258+
- [Cursor-Test](https://vibhorjaiswal.github.io/Cursor-Test/)
259+
- [Mozilla CSS Cursor](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor)
260+
261+
For a blueprint for creating XCursors, you may also want to refer to [Cursor-demo](https://wiki.tcl-lang.org/page/Cursor+demo).
262+
263+
## Credit
294264

295-
Check [CONTRIBUTING.md](CONTRIBUTING.md), any suggestions for features and contributions to the continuing code masterelopment can be made via the issue tracker or code contributions via a `Fork` & `Pull requests`.
265+
[Adwaita](https://github.com/GNOME/adwaita-icon-theme) ·
266+
[Dmz](https://github.com/GalliumOS/dmz-cursor-theme) ·
267+
[Yaru](https://github.com/ubuntu/yaru)

build.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ for key in "${!names[@]}"; do
4646
wait $PID
4747
done
4848

49-
# Building Bibata Windows binaries
49+
# Building macOS Windows binaries
5050
for key in "${!names[@]}"; do
5151
comment="${names[$key]}"
5252
cfg=$(get_config_file key)
@@ -69,13 +69,13 @@ for key in "${!names[@]}"; do
6969
wait $PID
7070
done
7171

72-
# Compressing Bibata.tar.xz
72+
# Compressing macOS.tar.xz
7373
cp ../LICENSE .
7474
tar -cJvf "../bin/macOS.tar.xz" --exclude="*-Windows" . &
7575
PID=$!
7676
wait $PID
7777

78-
# Compressing Bibata-*-Windows
78+
# Compressing macOS-*-Windows
7979
for key in "${!names[@]}"; do
8080
zip -rv "../bin/${key}-Windows.zip" "${key}-Small-Windows" "${key}-Regular-Windows" "${key}-Large-Windows" "${key}-Extra-Large-Windows" &
8181
PID=$!

build.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[theme]
22
name = 'Apple Cursor'
3-
comment = 'Opensource macOS Cursors.'
3+
comment = 'Open source macOS Cursors.'
44
website = 'https://github.com/ful1e5/apple_cursor'
55

66
[config]

0 commit comments

Comments
 (0)