macOSMonterey cursors added 🎊 fixed #66

This commit is contained in:
ful1e5 2021-11-22 16:37:10 +05:30
parent eff6e95bd0
commit 281bc18402
10 changed files with 187 additions and 32 deletions

View file

@ -57,41 +57,67 @@ jobs:
run: cd svg && python link.py && cd .. run: cd svg && python link.py && cd ..
continue-on-error: false continue-on-error: false
- name: Generating `macOSBigSur` Cursor Theme - name: Generating `macOS` Cursor Theme
run: make bigsur run: make
continue-on-error: false continue-on-error: false
- name: Compressing UNIX theme - name: Compressing `macOS` UNIX themes
run: | run: |
tar -cvzf macOSBigSur.tar.gz themes/macOSBigSur tar -cvzf macOSBigSur.tar.gz themes/macOSBigSur
tar -cvzf macOSBigSur-White.tar.gz themes/macOSBigSur-White tar -cvzf macOSBigSur-White.tar.gz themes/macOSBigSur-White
tar -cvzf macOSMonterey.tar.gz themes/macOSMonterey
tar -cvzf macOSMonterey-White.tar.gz themes/macOSMonterey-White
- name: Uploading `bitmaps` artifact - name: Uploading `macOSBigSur` bitmaps
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: bitmaps name: bitmaps
path: bitmaps/* path: bitmaps/*
- name: Uploading `macOSBigSur` UNIX Theme artifact - name: Uploading `macOSBigSur` UNIX Theme
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: macOSBigSur name: macOSBigSur
path: macOSBigSur.tar.gz path: macOSBigSur.tar.gz
- name: Uploading `macOSBigSur-White` UNIX Theme artifact - name: Uploading `macOSMonterey` UNIX Theme
uses: actions/upload-artifact@v2
with:
name: macOSMonterey
path: macOSMonterey.tar.gz
- name: Uploading `macOSBigSur-White` UNIX Theme
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: macOSBigSur-White name: macOSBigSur-White
path: macOSBigSur-White.tar.gz path: macOSBigSur-White.tar.gz
- name: Uploading `macOSBigSur` Windows Theme artifact - name: Uploading `macOSMonterey-White` UNIX Theme
uses: actions/upload-artifact@v2
with:
name: macOSMonterey-White
path: macOSMonterey-White.tar.gz
- name: Uploading `macOSBigSur` Windows Theme
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: macOSBigSur-Windows name: macOSBigSur-Windows
path: themes/macOSBigSur-Windows/* path: themes/macOSBigSur-Windows/*
- name: Uploading `macOSBigSur-White` Windows Theme artifact - name: Uploading `macOSMonterey` Windows Theme
uses: actions/upload-artifact@v2
with:
name: macOSMonterey-Windows
path: themes/macOSMonterey-Windows/*
- name: Uploading `macOSBigSur-White` Windows Theme
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: macOSBigSur-White-Windows name: macOSBigSur-White-Windows
path: themes/macOSBigSur-White-Windows/* path: themes/macOSBigSur-White-Windows/*
- name: Uploading `macOSMonterey-White` Windows Theme
uses: actions/upload-artifact@v2
with:
name: macOSMonterey-White-Windows
path: themes/macOSMonterey-White-Windows/*

View file

@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added ### Added
- macOSMonterey cursors added 🎊 fixed #66
- Generate master `bitmaps.zip` inside `bin` directory - Generate master `bitmaps.zip` inside `bin` directory
- `Makefile` binaries targets with variable - `Makefile` binaries targets with variable
- pling docs: size and support info updated - pling docs: size and support info updated

View file

@ -7,7 +7,7 @@ clean:
@rm -rf bitmaps themes @rm -rf bitmaps themes
render: bitmapper svg render: bitmapper svg
@cd bitmapper && make install render_bigsur @cd bitmapper && make install render_bigsur render_monterey
build: bitmaps build: bitmaps
@cd builder && make setup build @cd builder && make setup build
@ -29,11 +29,19 @@ render_bigsur: bitmapper svg
build_bigsur: bitmaps build_bigsur: bitmaps
@cd builder && make setup build_bigsur @cd builder && make setup build_bigsur
# macOS Monterey
monterey: clean render_monterey build_monterey
render_monterey: bitmapper svg
@cd bitmapper && make install render_monterey
build_monterey: bitmaps
@cd builder && make setup build_monterey
# Installation # Installation
.ONESHELL: .ONESHELL:
SHELL:=/bin/bash SHELL:=/bin/bash
THEME_PREFIX = macOSBigSur THEME_PREFIX = macOS
src := ./themes/ src := ./themes/
@ -48,24 +56,32 @@ install: $(src)
@if [[ $EUID -ne 0 ]]; then @if [[ $EUID -ne 0 ]]; then
@echo "> Installing '$(THEME_PREFIX)' cursors inside $(local)/..." @echo "> Installing '$(THEME_PREFIX)' cursors inside $(local)/..."
@mkdir -p $(local) @mkdir -p $(local)
@cp -r ./themes/$(THEME_PREFIX) $(local_dest) @cp -r ./themes/$(THEME_PREFIX)BigSur $(local_dest)
@cp -r ./themes/$(THEME_PREFIX)-White $(local_dest) && echo "> Installed!" @cp -r ./themes/$(THEME_PREFIX)BigSur -White $(local_dest) && echo "> Installed!"
@cp -r ./themes/$(THEME_PREFIX)Monterey $(local_dest)
@cp -r ./themes/$(THEME_PREFIX)Monterey -White $(local_dest) && echo "> Installed!"
@else @else
@echo "> Installing '$(THEME_PREFIX)' cursors inside $(root)/..." @echo "> Installing '$(THEME_PREFIX)' cursors inside $(root)/..."
@mkdir -p $(root) @mkdir -p $(root)
@sudo cp -r ./themes/$(THEME_PREFIX) $(root_dest) @sudo cp -r ./themes/$(THEME_PREFIX)BigSur $(root_dest)
@sudo cp -r ./themes/$(THEME_PREFIX)-White $(root_dest) && echo "> Installed!" @sudo cp -r ./themes/$(THEME_PREFIX)BigSur-White $(root_dest) && echo "> Installed!"
@sudo cp -r ./themes/$(THEME_PREFIX)Monterey $(root_dest)
@sudo cp -r ./themes/$(THEME_PREFIX)Monterey-White $(root_dest) && echo "> Installed!"
@fi @fi
uninstall: uninstall:
@if [[ $EUID -ne 0 ]]; then @if [[ $EUID -ne 0 ]]; then
@echo "> Removing '$(THEME_PREFIX)' from '$(local)'..." @echo "> Removing '$(THEME_PREFIX)' from '$(local)'..."
@rm -rf $(local)/$(THEME_PREFIX) @rm -rf $(local)/$(THEME_PREFIX)BigSur
@rm -rf $(local)/$(THEME_PREFIX)-White @rm -rf $(local)/$(THEME_PREFIX)BigSur-White
@rm -rf $(local)/$(THEME_PREFIX)Monterey
@rm -rf $(local)/$(THEME_PREFIX)Monterey-White
@else @else
@echo "> Removing '$(THEME_PREFIX)' from '$(root)'..." @echo "> Removing '$(THEME_PREFIX)' from '$(root)'..."
@rm -rf $(root)/$(THEME_PREFIX) @rm -rf $(root)/$(THEME_PREFIX)BigSur
@rm -rf $(root)/$(THEME_PREFIX)-White @rm -rf $(root)/$(THEME_PREFIX)BigSur-White
@rm -rf $(root)/$(THEME_PREFIX)Monterey
@rm -rf $(root)/$(THEME_PREFIX)Monterey-White
@fi @fi
reinstall: uninstall install reinstall: uninstall install
@ -76,16 +92,24 @@ BIN_DIR = ../bin
THEMES = White THEMES = White
prepare: bitmaps themes prepare: bitmaps themes
@rm -rf bin @rm -rf bin
@mkdir -p bin/$(THEME_PREFIX) @mkdir -p bin/$(THEME_PREFIX)BigSur
@$(foreach theme,$(THEMES), mkdir -p bin/$(THEME_PREFIX)-$(theme);) @$(foreach theme,$(THEMES), mkdir -p bin/$(THEME_PREFIX)BigSur-$(theme);)
@mkdir -p bin/$(THEME_PREFIX)Monterey
@$(foreach theme,$(THEMES), mkdir -p bin/$(THEME_PREFIX)Monterey-$(theme);)
@cd bitmaps @cd bitmaps
@zip -r $(BIN_DIR)/$(THEME_PREFIX)/bitmaps.zip $(THEME_PREFIX) @zip -r $(BIN_DIR)/$(THEME_PREFIX)BigSur/bitmaps.zip $(THEME_PREFIX)BigSur
@$(foreach theme,$(THEMES), zip -r $(BIN_DIR)/$(THEME_PREFIX)-$(theme)/bitmaps.zip $(THEME_PREFIX)-$(theme);) @$(foreach theme,$(THEMES), zip -r $(BIN_DIR)/$(THEME_PREFIX)BigSur-$(theme)/bitmaps.zip $(THEME_PREFIX)BigSur-$(theme);)
@zip -r $(BIN_DIR)/$(THEME_PREFIX)Monterey/bitmaps.zip $(THEME_PREFIX)Monterey
@$(foreach theme,$(THEMES), zip -r $(BIN_DIR)/$(THEME_PREFIX)Monterey-$(theme)/bitmaps.zip $(THEME_PREFIX)Monterey-$(theme);)
@zip -r $(BIN_DIR)/bitmaps.zip * @zip -r $(BIN_DIR)/bitmaps.zip *
@cd .. @cd ..
@cd themes @cd themes
@tar -czvf $(BIN_DIR)/$(THEME_PREFIX)/$(THEME_PREFIX).tar.gz $(THEME_PREFIX) @tar -czvf $(BIN_DIR)/$(THEME_PREFIX)BigSur/$(THEME_PREFIX)BigSur.tar.gz $(THEME_PREFIX)BigSur
@zip -r $(BIN_DIR)/$(THEME_PREFIX)/$(THEME_PREFIX)-Windows.zip $(THEME_PREFIX)-Windows @zip -r $(BIN_DIR)/$(THEME_PREFIX)BigSur/$(THEME_PREFIX)BigSur-Windows.zip $(THEME_PREFIX)BigSur-Windows
@$(foreach theme,$(THEMES), tar -czvf $(BIN_DIR)/$(THEME_PREFIX)-$(theme)/$(THEME_PREFIX)-$(theme).tar.gz $(THEME_PREFIX)-$(theme);) @tar -czvf $(BIN_DIR)/$(THEME_PREFIX)Monterey/$(THEME_PREFIX)Monterey.tar.gz $(THEME_PREFIX)Monterey
@$(foreach theme,$(THEMES), zip -r $(BIN_DIR)/$(THEME_PREFIX)-$(theme)/$(THEME_PREFIX)-$(theme)-Windows.zip $(THEME_PREFIX)-$(theme)-Windows;) @zip -r $(BIN_DIR)/$(THEME_PREFIX)Monterey/$(THEME_PREFIX)Monterey-Windows.zip $(THEME_PREFIX)Monterey-Windows
@$(foreach theme,$(THEMES), tar -czvf $(BIN_DIR)/$(THEME_PREFIX)BigSur-$(theme)/$(THEME_PREFIX)BigSur-$(theme).tar.gz $(THEME_PREFIX)BigSur-$(theme);)
@$(foreach theme,$(THEMES), zip -r $(BIN_DIR)/$(THEME_PREFIX)BigSur-$(theme)/$(THEME_PREFIX)BigSur-$(theme)-Windows.zip $(THEME_PREFIX)BigSur-$(theme)-Windows;)
@$(foreach theme,$(THEMES), tar -czvf $(BIN_DIR)/$(THEME_PREFIX)Monterey-$(theme)/$(THEME_PREFIX)Monterey-$(theme).tar.gz $(THEME_PREFIX)Monterey-$(theme);)
@$(foreach theme,$(THEMES), zip -r $(BIN_DIR)/$(THEME_PREFIX)Monterey-$(theme)/$(THEME_PREFIX)Monterey-$(theme)-Windows.zip $(THEME_PREFIX)Monterey-$(theme)-Windows;)
@cd .. @cd ..

View file

@ -15,4 +15,7 @@ install: node_modules package.json
render_bigsur: render_bigsur:
@yarn render:bigsur @yarn render:bigsur
render: render_bigsur render_monterey:
@yarn render:monterey
render: render_bigsur render_monterey

View file

@ -7,7 +7,8 @@
"license": "GPL-3.0", "license": "GPL-3.0",
"private": true, "private": true,
"scripts": { "scripts": {
"render:bigsur": "yarn workspace bigsur render" "render:bigsur": "yarn workspace bigsur render",
"render:monterey": "yarn workspace monterey render"
}, },
"workspaces": [ "workspaces": [
"packages/*" "packages/*"

View file

@ -0,0 +1,17 @@
{
"name": "monterey",
"version": "1.2.2",
"description": "macOS Monterey cursors",
"main": "dist/index.js",
"scripts": {
"build": "npx tsc --build",
"render": "yarn build && node dist/index.js"
},
"author": "Kaiz Khatri",
"license": "GPL-3.0",
"private": true,
"devDependencies": {
"ts-node": "^9.1.1",
"typescript": "^4.1.5"
}
}

View file

@ -0,0 +1,28 @@
import { Colors } from "core/src/types";
interface Config {
themeName: string;
color: Colors;
}
const black = "#000000";
const white = "#FFFFFF";
const config: Config[] = [
{
themeName: "macOSMonterey",
color: {
base: black,
outline: white,
},
},
{
themeName: "macOSMonterey-White",
color: {
base: white,
outline: black,
},
},
];
export { config };

View file

@ -0,0 +1,37 @@
import path from "path";
import { BitmapsGenerator, SVGHandler } from "core";
import { config } from "./config";
const root = path.resolve(__dirname, "../../../../");
const svgDir = path.resolve(root, "svg", "monterey");
const main = async () => {
for (const { themeName, color } of config) {
console.log("=>", themeName);
const bitmapsDir = path.resolve(root, "bitmaps", themeName);
const svg = new SVGHandler.SvgDirectoryParser(svgDir);
const png = new BitmapsGenerator(bitmapsDir);
const browser = await png.getBrowser();
for (let { key, content } of svg.getStatic()) {
console.log(" -> Saving", key, "...");
content = SVGHandler.colorSvg(content, color);
await png.generateStatic(browser, content, key);
}
for (let { key, content } of svg.getAnimated()) {
console.log(" -> Saving", key, "...");
content = SVGHandler.colorSvg(content, color);
await png.generateAnimated(browser, content, key);
}
await browser.close();
}
};
main();

View file

@ -0,0 +1,10 @@
{
"references": [{ "path": "../core" }],
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist"
},
"include": ["src"]
}

View file

@ -15,19 +15,27 @@ THEMES = White
setup: setup:
@python3 -m pip install clickgen --user @python3 -m pip install clickgen --user
build: build_bigsur build: build_bigsur build_monterey
build_bigsur: build.py build_bigsur: build.py
@python3 build.py -p "$(bitmaps_dir)/macOSBigSur" --xsizes $(X_SIZES) --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE) @python3 build.py -p "$(bitmaps_dir)/macOSBigSur" --xsizes $(X_SIZES) --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE)
@$(foreach theme,$(THEMES), python3 build.py -p "$(bitmaps_dir)/macOSBigSur-$(theme)" --xsizes $(X_SIZES) --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE);) @$(foreach theme,$(THEMES), python3 build.py -p "$(bitmaps_dir)/macOSBigSur-$(theme)" --xsizes $(X_SIZES) --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE);)
build_monterey: build.py
@python3 build.py -p "$(bitmaps_dir)/macOSMonterey" --xsizes $(X_SIZES) --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE)
@$(foreach theme,$(THEMES), python3 build.py -p "$(bitmaps_dir)/macOSMonterey-$(theme)" --xsizes $(X_SIZES) --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE);)
build_unix: build_bigsur_unix build_monterey_unix
build_unix: build_bigsur_unix
build_bigsur_unix: build.py build_bigsur_unix: build.py
@python3 build.py unix -p "$(bitmaps_dir)/macOSBigSur" --xsizes $(X_SIZES) @python3 build.py unix -p "$(bitmaps_dir)/macOSBigSur" --xsizes $(X_SIZES)
@$(foreach theme,$(THEMES), python3 build.py unix -p "$(bitmaps_dir)/macOSBigSur-$(theme)" --xsizes $(X_SIZES);) @$(foreach theme,$(THEMES), python3 build.py unix -p "$(bitmaps_dir)/macOSBigSur-$(theme)" --xsizes $(X_SIZES);)
build_monterey_unix: build.py
@python3 build.py unix -p "$(bitmaps_dir)/macOSMonterey" --xsizes $(X_SIZES)
@$(foreach theme,$(THEMES), python3 build.py unix -p "$(bitmaps_dir)/macOSMonterey-$(theme)" --xsizes $(X_SIZES);)
build_windows: build_bigsur_windows build_windows: build_bigsur_windows build_monterey_windows
build_bigsur_windows: build.py build_bigsur_windows: build.py
@python3 build.py windows -p "$(bitmaps_dir)/macOSBigSur" --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE) @python3 build.py windows -p "$(bitmaps_dir)/macOSBigSur" --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE)
@$(foreach theme,$(THEMES), python3 build.py windows -p "$(bitmaps_dir)/macOSBigSur-$(theme)" --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE);) @$(foreach theme,$(THEMES), python3 build.py windows -p "$(bitmaps_dir)/macOSBigSur-$(theme)" --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE);)
build_monterey_windows: build.py
@python3 build.py windows -p "$(bitmaps_dir)/macOSMonterey" --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE)
@$(foreach theme,$(THEMES), python3 build.py windows -p "$(bitmaps_dir)/macOSMonterey-$(theme)" --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE);)