Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ful1e5 committed Aug 25, 2021
2 parents b1d5eca + 0ff94f5 commit 53ffa7e
Show file tree
Hide file tree
Showing 66 changed files with 766 additions and 497 deletions.
27 changes: 0 additions & 27 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,14 @@
<!--
Please make sure you are familiar with and follow the instructions in the
contributing guidelines (found in the CONTRIBUTING.md file).
Please fill out the information below to expedite the review and (hopefully)
merge of your pull request!
-->

## What kind of change does this PR introduce?

<!-- Is it a Bug fix, feature, docs update, ... -->

## What is the current behavior?

<!-- You can also link to an open issue here -->

## What is the new behavior?

<!-- if this is a feature change -->

## What steps did you take to test this? This is required before I can merge, make sure to test the flow you've updated.

1. Step A
2. Step B
3. Step C

## Checklist

<!-- Have you done all of these things? -->
<!-- add "N/A" to the end of each line that's irrelevant to your changes -->
<!-- to check an item, place an "x" in the box like so: "- [x] Documentation" -->

- [ ] Documentation
- [ ] Testing <!-- We can only merge the PR if this is checked -->
- [ ] Ready to be merged
<!-- In your opinion, is this ready to be merged as soon as it's reviewed? -->
- [ ] Added myself to contributors table
<!-- this is optional, see the contributing guidelines for instructions -->

<!-- feel free to add additional comments -->
<!-- Thank you for contributing! -->
154 changes: 88 additions & 66 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,71 +1,93 @@
name: build

on:
push:
paths-ignore:
- "**.md"
- "**.bbcode"
- LICENSE
branches: [main, dev]
pull_request:
paths-ignore:
- "**.md"
- "**.bbcode"
- LICENSE
branches: [main]
push:
paths-ignore:
- "**.md"
- "**.bbcode"
- LICENSE
branches: [main, dev]
pull_request:
paths-ignore:
- "**.md"
- "**.bbcode"
- LICENSE
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install build dependencies (apt)
run: sudo apt install -y libx11-dev libxcursor-dev libpng-dev
continue-on-error: false
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Caching yarn packages
uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Set Up NodeJS 12.x
uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Caching pip packages
uses: actions/cache@v2
id: pip-cache # use this to check for `cache-hit` (`steps.pip-cache.outputs.cache-hit != 'true'`)
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Generating `macOSBigSur` Cursor Theme
run: make
continue-on-error: false
- name: Compressing UNIX theme
run: tar -cvzf macOSBigSur.tar.gz themes/macOSBigSur
- name: Uploading `bitmaps` artifact
uses: actions/upload-artifact@v2
with:
name: bitmaps
path: bitmaps/*
- name: Uploading `macOSBigSur` UNIX Theme artifact
uses: actions/upload-artifact@v2
with:
name: macOSBigSur
path: macOSBigSur.tar.gz
- name: Uploading `macOSBigSur` Windows Theme artifact
uses: actions/upload-artifact@v2
with:
name: macOSBigSur_Windows
path: themes/macOSBigSur_Windows/*
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install build dependencies (apt)
run: sudo apt install -y libx11-dev libxcursor-dev libpng-dev
continue-on-error: false
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Caching yarn packages
uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Set Up NodeJS 12.x
uses: actions/setup-node@v1
with:
node-version: "12.x"

- name: Caching pip packages
uses: actions/cache@v2
id: pip-cache # use this to check for `cache-hit` (`steps.pip-cache.outputs.cache-hit != 'true'`)
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: "3.8"

- name: Generating `macOSBigSur` Cursor Theme
run: make
continue-on-error: false

- name: Compressing UNIX theme
run: |
tar -cvzf macOSBigSur.tar.gz themes/macOSBigSur
tar -cvzf macOSBigSur-White.tar.gz themes/macOSBigSur-White
- name: Uploading `bitmaps` artifact
uses: actions/upload-artifact@v2
with:
name: bitmaps
path: bitmaps/*

- name: Uploading `macOSBigSur` UNIX Theme artifact
uses: actions/upload-artifact@v2
with:
name: macOSBigSur
path: macOSBigSur.tar.gz

- name: Uploading `macOSBigSur-White` UNIX Theme artifact
uses: actions/upload-artifact@v2
with:
name: macOSBigSur-White
path: macOSBigSur-White.tar.gz

- name: Uploading `macOSBigSur` Windows Theme artifact
uses: actions/upload-artifact@v2
with:
name: macOSBigSur-Windows
path: themes/macOSBigSur-Windows/*

- name: Uploading `macOSBigSur-White` Windows Theme artifact
uses: actions/upload-artifact@v2
with:
name: macOSBigSur-White-Windows
path: themes/macOSBigSur-White-Windows/*
20 changes: 19 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [unreleased]

## [v1.2.0] - 25 Aug 2021

### Added

- Dark branding
- Multiple config supports inside bitmapper
- `macOSBigSur-White` CI added inside `build.yml`

### Changed

- Drop shadow removed from `plus.svg`
- Key colors added inside `.svg` files
- `builder/src` configured as dynamic comment and theme-name
- `builder/Makefile` updated
- `Makefile` with macOSBigSur-White cursor theme
- `PULL_REQUEST_TEMPLATE.md` template updated

## [v1.1.6] - 13 Aug 2021

### Added
Expand Down Expand Up @@ -212,7 +229,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Logo and badges
- CI/CD Pipelines

[unreleased]: https://github.com/ful1e5/apple_cursor/compare/v1.1.6...main
[unreleased]: https://github.com/ful1e5/apple_cursor/compare/v1.2.0...main
[v1.2.0]: https://github.com/ful1e5/apple_cursor/compare/v1.1.6...v1.2.0
[v1.1.6]: https://github.com/ful1e5/apple_cursor/compare/v1.1.5...v1.1.6
[v1.1.5]: https://github.com/ful1e5/apple_cursor/compare/v1.1.4...v1.1.5
[v1.1.4]: https://github.com/ful1e5/apple_cursor/compare/v1.1.3...v1.1.4
Expand Down
32 changes: 19 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ windows: clean render bitmaps


# Installation
theme := macOSBigSur
src := ./themes/$(theme)
src := ./themes/

local := ~/.icons
local_dest := $(local)/$(theme)
Expand All @@ -31,35 +30,42 @@ root_dest := $(root)/$(theme)
.ONESHELL:
SHELL:=/bin/bash


install: $(src)
@if [[ $EUID -ne 0 ]]; then
@echo "> Installing '$(theme)' cursors inside $(local)/..."
@echo "> Installing 'macOSBigSur' cursors inside $(local)/..."
@mkdir -p $(local)
@cp -r $(src) $(local_dest) && echo "> Installed!"
@cp -r ./themes/macOSBigSur $(local_dest)
@cp -r ./themes/macOSBigSur-White $(local_dest) && echo "> Installed!"
@else
@echo "> Installing '$(theme)' cursors inside $(root)/..."
@echo "> Installing 'macOSBigSur' cursors inside $(root)/..."
@mkdir -p $(root)
@sudo cp -r $(src) $(root_dest) && echo "> Installed!"
@sudo cp -r ./themes/macOSBigSur $(root_dest)
@sudo cp -r ./themes/macOSBigSur-White $(root_dest) && echo "> Installed!"
@fi

uninstall:
@if [[ $EUID -ne 0 ]]; then
@echo "> Removing '$(local_dest)'..."
@rm -rf $(local_dest)
@echo "> Removing 'macOSBigSur' from '$(local)'..."
@rm -rf $(local)/macOSBigSur
@rm -rf $(local)/macOSBigSur-White
@else
@echo "> Removing '$(root_dest)'..."
@sudo rm -rf $(root_dest)
@echo "> Removing 'macOSBigSur' from '$(root)'..."
@rm -rf $(root)/macOSBigSur
@rm -rf $(root)/macOSBigSur-White
@fi

reinstall: uninstall install

# generates binaries
BIN_DIR = ../bin
THEMES = White
prepare: bitmaps themes
# Bitmaps
@rm -rf bin && mkdir bin
@cd bitmaps && zip -r $(BIN_DIR)/bitmaps.zip * && cd ..
# Themes
@cd themes
@tar -czvf $(BIN_DIR)/macOSBigSur.tar.gz macOSBigSur
@zip -r $(BIN_DIR)/macOSBigSur_Windows.zip macOSBigSur_Windows
@zip -r $(BIN_DIR)/macOSBigSur-Windows.zip macOSBigSur-Windows
@$(foreach theme,$(THEMES), tar -czvf $(BIN_DIR)/macOSBigSur-$(theme).tar.gz macOSBigSur-$(theme);)
@$(foreach theme,$(THEMES), zip -r $(BIN_DIR)/macOSBigSur-$(theme)-Windows.zip macOSBigSur-$(theme)-Windows;)
@cd ..
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- Branding -->
<p align="center">
<img src="https://i.imgur.com/GVLFmwF.png" width="120" alt="macOS Big Sur" />
<img src="https://imgur.com/pWbaCpA.png" width="120" alt="macOSBigSur" />
</p>

<p align="center">
Expand Down Expand Up @@ -134,11 +134,16 @@ sudo mv macOSBigSur /usr/share/icons/
<!-- Preview -->

<p align="center">
<img title="macOS Big Sur" src="https://imgur.com/7QYBFiK.png">
<img title="macOSBigSur" src="https://imgur.com/JWdEEmD.png">
</br>
<sub>macOSBigSur Cursors 🍎</sub>
</p>

<p align="center">
<img title="macOSBigSur White" src="https://imgur.com/isFs6UM.png">
</br>
<sub>macOSBigSur White Cursors 🍎</sub>
</p>
<!-- Build Dependencies -->

# Dependencies
Expand Down
2 changes: 1 addition & 1 deletion bitmapper/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apple_cursor_bitmapper",
"version": "1.1.6",
"version": "1.2.0",
"main": "index.js",
"scripts": {
"render": "yarn ts-node src/index.ts"
Expand Down
43 changes: 24 additions & 19 deletions bitmapper/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
import path from "path";
import { readdirSync, existsSync } from "fs";
import { Colors } from "./core/types";

// Directory resolve
const projectRoot = path.resolve(__dirname, "../../");

const outDir = path.resolve(projectRoot, "bitmaps");
const staticSvgDir = path.resolve(projectRoot, "svg", "static");
const animatedSvgDir = path.resolve(projectRoot, "svg", "animated");

// Generate a svg list
if (!existsSync(staticSvgDir) || !existsSync(animatedSvgDir)) {
throw new Error("svg directory not found");
interface Config {
themeName: string;
color: Colors;
}

const staticCursors = readdirSync(staticSvgDir).map((f) =>
path.resolve(staticSvgDir, f)
);
const animatedCursors = readdirSync(animatedSvgDir).map((f) =>
path.resolve(animatedSvgDir, f)
);
const black = "#000000";
const white = "#FFFFFF";

const config: Config[] = [
{
themeName: "macOSBigSur",
color: {
base: black,
outline: white,
},
},
{
themeName: "macOSBigSur-White",
color: {
base: white,
outline: black,
},
},
];

export { staticCursors, animatedCursors, outDir };
export { config };
Loading

0 comments on commit 53ffa7e

Please sign in to comment.