From 2aec4505b804b41a2d7baba5c42794e94f981e63 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Mon, 9 Nov 2020 12:37:13 +0530 Subject: [PATCH 01/63] =?UTF-8?q?=F0=9F=93=A6=20Rename=20Windows=20cursors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.py | 24 +++++++++++------------ scripts/windows.inf | 48 ++++++++++++++++++++++----------------------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/config.py b/config.py index 513c0cc..86ab951 100644 --- a/config.py +++ b/config.py @@ -21,21 +21,21 @@ with open("./package.json") as f: # Windows Cursors Config windows_cursors = { - "left_ptr_watch.ani": "AppStarting.ani", - "left_ptr.cur": "Arrow.cur", + "right_ptr.cur": "Alternate.cur", + "wait.ani": "Busy.ani", "crosshair.cur": "Cross.cur", - "hand2.cur": "Hand.cur", + "left_ptr.cur": "Default.cur", + "bd_double_arrow.cur": "Diagonal_1.cur", + "fd_double_arrow.cur": "Diagonal_2.cur", "pencil.cur": "Handwriting.cur", "dnd-ask.cur": "Help.cur", - "xterm.cur": "IBeam.cur", - "circle.cur": "NO.cur", - "all-scroll.cur": "SizeAll.cur", - "bd_double_arrow.cur": "SizeNWSE.cur", - "sb_v_double_arrow.cur": "SizeNS.cur", - "fd_double_arrow.cur": "SizeNESW.cur", - "sb_h_double_arrow.cur": "SizeWE.cur", - "sb_up_arrow.cur": "UpArrow.cur", - "wait.ani": "Wait.ani", + "sb_h_double_arrow.cur": "Horizontal.cur", + "hand2.cur": "Link.cur", + "hand1.cur": "Move.cur", + "xterm.cur": "Text.cur", + "circle.cur": "Unavailiable.cur", + "sb_v_double_arrow.cur": "Vertical.cur", + "left_ptr_watch.ani": "Work.ani", } # Windows install.inf file content diff --git a/scripts/windows.inf b/scripts/windows.inf index 0586241..eed64a2 100644 --- a/scripts/windows.inf +++ b/scripts/windows.inf @@ -16,37 +16,37 @@ HKCU,"Control Panel\Cursors\Schemes","%SCHEME_NAME%",,"%10%\%CUR_DIR%\%pointer%, ; -- Installed files [Scheme.Cur] -"Arrow.cur" +"Default.cur" "Help.cur" -"AppStarting.ani" -"Wait.ani" +"Work.ani" +"Busy.ani" "Cross.cur" -"IBeam.cur" +"Text.cur" "Handwriting.cur" -"NO.cur" -"SizeNS.cur" -"SizeWE.cur" -"SizeNWSE.cur" -"SizeNESW.cur" -"SizeAll.cur" -"UpArrow.cur" -"Hand.cur" +"Unavailiable.cur" +"Vertical.cur" +"Horizontal.cur" +"Diagonal_1.cur" +"Diagonal_2.cur" +"Move.cur" +"Alternate.cur" +"Link.cur" [Strings] CUR_DIR = "Cursors\" SCHEME_NAME = "" -pointer = "Arrow.cur" +pointer = "Default.cur" help = "Help.cur" -work = "AppStarting.ani" -busy = "Wait.ani" +work = "Work.ani" +busy = "Busy.ani" cross = "Cross.cur" -text = "IBeam.cur" +text = "Text.cur" hand = "Handwriting.cur" -unavailiable = "NO.cur" -vert = "SizeNS.cur" -horz = "SizeWE.cur" -dgn1 = "SizeNWSE.cur" -dgn2 = "SizeNESW.cur" -move = "SizeAll.cur" -alternate = "UpArrow.cur" -link = "Hand.cur" \ No newline at end of file +unavailiable = "Unavailiable.cur" +vert = "Vertical.cur" +horz = "Horizontal.cur" +dgn1 = "Diagonal_1.cur" +dgn2 = "Diagonal_2.cur" +move = "Move.cur" +alternate = "Alternate.cur" +link = "Link.cur" \ No newline at end of file From a7afd7d81f62b9ad970664b4a10ce18f47f6997d Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Mon, 9 Nov 2020 12:38:25 +0530 Subject: [PATCH 02/63] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Logs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0afe697..a79b67d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [unreleased] +### Changed + +- Repack Windows cursors + ## [1.0.6] - 1 Nov 2020 ### Added From ef427a2d743d5b42552ead199aab71abb00f4bab Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Mon, 25 Jan 2021 17:21:29 +0530 Subject: [PATCH 03/63] =?UTF-8?q?=E2=9A=A1=20Build=20script=20&=20docs=20u?= =?UTF-8?q?pdated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 101 +++++++++----------- package.json | 7 +- yarn.lock | 255 ++++++++++++++++++++++----------------------------- 3 files changed, 156 insertions(+), 207 deletions(-) diff --git a/README.md b/README.md index a480918..29ca4a2 100644 --- a/README.md +++ b/README.md @@ -74,35 +74,37 @@ Enjoy upcoming **[macOS BigSur](https://www.apple.com/macos/big-sur-preview/)**
Table of Contents (click to expand) -- [Apple Cursor](#apple-cursor) - [Cursor Sizes](#cursor-sizes) - [Colors](#colors) - [Quick install](#quick-install) - - [Manual Install](#manual-install) - - [Linux/X11](#linuxx11) - - [Windows](#windows) - - [Preview:](#preview) -- [Dependencies](#dependencies) - - [Runtime Dependencies](#runtime-dependencies) - - [Install Runtime Dependencies](#install-runtime-dependencies) - - [macOS](#macos) - - [Debain/ubuntu](#debainubuntu) - - [ArchLinux/Manjaro](#archlinuxmanjaro) - - [Fedora/Fedora Silverblue/CentOS/RHEL](#fedorafedora-silverbluecentosrhel) - - [Build Dependencies](#build-dependencies) - - [Node Packages](#node-packages) - - [PyPi Packages](#pypi-packages) - - [Build From Scratch](#build-from-scratch) - - [⚡ Auto Build (using GitHub Actions)](#-auto-build-using-github-actions) - - [Manual Build](#manual-build) - - [Setup python environment](#setup-python-environment) - - [Compile From Source](#compile-from-source) - - [Using yarn](#using-yarn) - - [Using npm](#using-npm) - - [Install Build Theme](#install-build-theme) - - [Linux](#linux) - - [Windows](#windows-1) -- [Bugs](#bugs) -- [Getting Help](#getting-help) -- [Contributing](#contributing) - - [Support](#support) + - [Apple Cursor](#apple-cursor) + - [Cursor Sizes](#cursor-sizes) + - [Colors](#colors) + - [Quick install](#quick-install) + - [Manual Install](#manual-install) + - [Linux/X11](#linuxx11) + - [Windows](#windows) + - [Preview:](#preview) + - [Dependencies](#dependencies) + - [External Libraries](#external-libraries) + - [Install External Libraries](#install-external-libraries) + - [macOS](#macos) + - [Debain/ubuntu](#debainubuntu) + - [ArchLinux/Manjaro](#archlinuxmanjaro) + - [Fedora/Fedora Silverblue/CentOS/RHEL](#fedorafedora-silverbluecentosrhel) + - [Build Dependencies](#build-dependencies) + - [Node Packages](#node-packages) + - [PyPi Packages](#pypi-packages) + - [Build From Scratch](#build-from-scratch) + - [⚡ Auto Build (using GitHub Actions)](#-auto-build-using-github-actions) + - [Manual Build](#manual-build) + - [Setup python environment](#setup-python-environment) + - [Compile From Source](#compile-from-source) + - [Using yarn](#using-yarn) + - [Install Build Theme](#install-build-theme) + - [Linux](#linux) + - [Windows](#windows-1) + - [Bugs](#bugs) + - [Getting Help](#getting-help) + - [Contributing](#contributing) + - [Support](#support)
@@ -144,11 +146,6 @@ Enjoy upcoming **[macOS BigSur](https://www.apple.com/macos/big-sur-preview/)** #### Linux/X11 - - - ```bash # extract `macOSBigSur.tar.gz` tar -xvf macOSBigSur.tar.gz @@ -184,18 +181,19 @@ sudo mv macOSBigSur /usr/share/icons/ # Dependencies -## Runtime Dependencies +## External Libraries -- libxcursor-dev -- libx11-dev -- libpng-dev (<=1.6) +- libxcursor +- libx11 +- libpng (<=1.6) -#### Install Runtime Dependencies +#### Install External Libraries ##### macOS ```bash -brew cask install xquartz libpng +brew install --cask xquartz +brew install libpng gcc ``` ##### Debain/ubuntu @@ -219,7 +217,7 @@ sudo dnf install libx11-devel libxcursor-devel libpng-devel ## Build Dependencies - [nodejs](https://nodejs.org/en/) (<=12.x.x) -- [yarn](https://classic.yarnpkg.com/en/docs/install/) / [npm](https://docs.npmjs.com/cli/install.html) +- [yarn](https://classic.yarnpkg.com/en/docs/install/) - [python](https://www.python.org/downloads/) (<=3.6) - [pip3](https://pip.pypa.io/en/stable/installing/) @@ -232,7 +230,6 @@ sudo dnf install libx11-devel libxcursor-devel libpng-devel ### PyPi Packages - [clickgen](https://pypi.org/project/clickgen/s) -- [Pillow](https://pypi.org/project/Pillow/) ## Build From Scratch @@ -246,12 +243,10 @@ GitHub Actions is automatically runs on every `push`(on **main** and **dev** bra ```bash python3 -m pip install --upgrade pip # Update pip to latest -python3 -m pip3 install virtualenv # Install python virtual environment -virtualenv venv # Create new virtualenv named `venv` +python3 -m venv venv # Create new virtualenv named `venv` source venv/bin/activate # Activate virtualenv -# For Deactivate virtualenv -deactivate +deactivate # For Deactivate virtualenv ``` #### Compile From Source @@ -266,25 +261,17 @@ yarn py_install # Install all PyPi Packages yarn compile # Compile the cursor theme ``` -##### Using npm - -```bash -npm install # Install all Node Packages -npm py_install # Install all PyPi Packages -npm compile # Compile the cursor theme -``` - -After build `bitmaps` and `themes` directory are generated at project **root**. +After build, `bitmaps` and `themes` directory are generated at project **root**. ### Install Build Theme -All builded cursor themes are available inside `themes` directory. +Built cursor themes are available inside `themes` directory. #### Linux ```bash cd ./themes -rm -rf ~/.icons/macOSBigSur && cp macOSBigSur ~/.icons/ # installing Theme to local user(recommend) +rm -rf ~/.icons/macOSBigSur && cp macOSBigSur ~/.icons/ # installing Theme to local user(recommended) ``` #### Windows diff --git a/package.json b/package.json index 74ec4af..d5db88a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "apple_cursor", "version": "1.0.6", - "description": "Enjoy upcoming `macOS Big Sur` Cursor Theme 🥳", + "description": "🍎 macOS Cursor Theme", "main": "index.js", "scripts": { "clean": "rm -rf bitmaps themes", @@ -10,7 +10,7 @@ "py_install": "pip install -r requirements.txt", "render": "npx ts-node src/index.ts", "build": "python build.py", - "compile": "yon clean && yon render && yon build" + "compile": "yarn clean && yarn render && yarn build" }, "repository": "git@github.com:ful1e5/apple_cursor.git", "author": "Kaiz Khatri", @@ -21,8 +21,7 @@ "nodemon": "^2.0.4", "ts-node": "^8.10.2", "tslint": "^6.1.2", - "typescript": "^3.9.7", - "yarn-or-npm": "^3.0.1" + "typescript": "^3.9.7" }, "dependencies": { "@types/pixelmatch": "^5.2.1", diff --git a/yarn.lock b/yarn.lock index 5d2fc66..f87d64a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3,16 +3,16 @@ "@babel/code-frame@^7.0.0": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a" - integrity sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg== + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" + integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== dependencies: "@babel/highlight" "^7.10.4" "@babel/helper-validator-identifier@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" - integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed" + integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw== "@babel/highlight@^7.10.4": version "7.10.4" @@ -36,9 +36,9 @@ defer-to-connect "^1.0.1" "@types/node@*": - version "14.14.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.2.tgz#d25295f9e4ca5989a2c610754dc02a9721235eeb" - integrity sha512-jeYJU2kl7hL9U5xuI/BhKPZ4vqGM/OmK6whiFAXVhlstzZhVamWhDSmHyGLIp+RVyuF9/d0dqr2P85aFj4BvJg== + version "14.14.22" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.22.tgz#0d29f382472c4ccf3bd96ff0ce47daf5b7b84b18" + integrity sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw== "@types/pixelmatch@^5.2.1": version "5.2.2" @@ -55,9 +55,9 @@ "@types/node" "*" "@types/puppeteer@^3.0.1": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@types/puppeteer/-/puppeteer-3.0.2.tgz#20085220593b560c7332b6d46aecaf81ae263540" - integrity sha512-JRuHPSbHZBadOxxFwpyZPeRlpPTTeMbQneMdpFd8LXdyNfFSiX950CGewdm69g/ipzEAXAmMyFF1WOWJOL/nKw== + version "3.0.5" + resolved "https://registry.yarnpkg.com/@types/puppeteer/-/puppeteer-3.0.5.tgz#5ef5d023f45c0dfcc82e97548891b11b6ce868fb" + integrity sha512-NkphUMkpbr/us6hp1AqUh/UxX5Tf2UJU94MvaF8OOgIUPBipYodql+yRjcysJKqwnDkchp+cD/8jntI/C9StzA== dependencies: "@types/node" "*" @@ -134,15 +134,15 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= -base64-js@^1.0.2: - version "1.3.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" - integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== binary-extensions@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.1.0.tgz#30fa40c9e7fe07dbc895678cd287024dea241dd9" - integrity sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ== + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== bl@^4.0.3: version "4.0.3" @@ -193,12 +193,12 @@ buffer-from@^1.0.0: integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== buffer@^5.2.1, buffer@^5.5.0: - version "5.6.0" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.6.0.tgz#a31749dc7d81d84db08abf937b6b8c4033f62786" - integrity sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw== + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" + base64-js "^1.3.1" + ieee754 "^1.1.13" builtin-modules@^1.1.1: version "1.1.1" @@ -241,9 +241,9 @@ chalk@^3.0.0: supports-color "^7.1.0" chokidar@^3.2.2: - version "3.4.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.3.tgz#c1df38231448e45ca4ac588e6c79573ba6a57d5b" - integrity sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ== + version "3.5.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a" + integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw== dependencies: anymatch "~3.1.1" braces "~3.0.2" @@ -253,7 +253,7 @@ chokidar@^3.2.2: normalize-path "~3.0.0" readdirp "~3.5.0" optionalDependencies: - fsevents "~2.1.2" + fsevents "~2.3.1" chownr@^1.1.1: version "1.1.4" @@ -323,26 +323,15 @@ configstore@^5.0.1: write-file-atomic "^3.0.0" xdg-basedir "^4.0.0" -cross-spawn@^6.0.5: - version "6.0.5" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" - integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== - dependencies: - nice-try "^1.0.4" - path-key "^2.0.1" - semver "^5.5.0" - shebang-command "^1.2.0" - which "^1.2.9" - crypto-random-string@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== debug@4, debug@^4.1.0, debug@^4.1.1: - version "4.2.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.2.0.tgz#7f150f93920e94c58f5574c2fd01a3110effe7f1" - integrity sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg== + version "4.3.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" + integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== dependencies: ms "2.1.2" @@ -354,9 +343,9 @@ debug@^2.2.0: ms "2.0.0" debug@^3.2.6: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== dependencies: ms "^2.1.1" @@ -377,10 +366,10 @@ defer-to-connect@^1.0.1: resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591" integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== -devtools-protocol@0.0.799653: - version "0.0.799653" - resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.799653.tgz#86fc95ce5bf4fdf4b77a58047ba9d2301078f119" - integrity sha512-t1CcaZbvm8pOlikqrsIM9GOa7Ipp07+4h/q9u0JXBWjPCjHdBl9KkddX87Vv9vBHoBGtwV79sYQNGnQM6iS5gg== +devtools-protocol@0.0.818844: + version "0.0.818844" + resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.818844.tgz#d1947278ec85b53e4c8ca598f607a28fa785ba9e" + integrity sha512-AD1hi7iVJ8OD0aMLQU5VK0XH9LDlA1+BcPIgrAxPfaibx2DbWucuyOhc4oyQCbnvDDO68nN6/LcKfqTP343Jjg== diff@^4.0.1: version "4.0.2" @@ -474,10 +463,10 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -fsevents@~2.1.2: - version "2.1.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" - integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== +fsevents@~2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.1.tgz#b209ab14c61012636c8863507edf7fb68cc54e9f" + integrity sha512-YR47Eg4hChJGAB1O3yEAOkGO+rlzutoICGqGo9EZ4lKWokzZRSyIW1QmTzqjtw8MJdj9srP869CuWw/hyzSiBw== function-bind@^1.1.1: version "1.1.1" @@ -518,11 +507,11 @@ glob@^7.1.1, glob@^7.1.3: path-is-absolute "^1.0.0" global-dirs@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-2.0.1.tgz#acdf3bb6685bcd55cb35e8a052266569e9469201" - integrity sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A== + version "2.1.0" + resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-2.1.0.tgz#e9046a49c806ff04d6c1825e196c8f0091e8df4d" + integrity sha512-MG6kdOUh/xBnyo9cJFeIKkLEc1AyFq42QTU4XiX51i2NEdxLxLWXIjEjmqKeSuKR7pAZjTqUVoT2b2huxVLgYQ== dependencies: - ini "^1.3.5" + ini "1.3.7" got@^9.6.0: version "9.6.0" @@ -581,10 +570,10 @@ https-proxy-agent@^4.0.0: agent-base "5" debug "4" -ieee754@^1.1.4: - version "1.1.13" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" - integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== +ieee754@^1.1.13: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== ignore-by-default@^1.0.1: version "1.0.1" @@ -614,10 +603,15 @@ inherits@2, inherits@^2.0.3, inherits@^2.0.4: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -ini@^1.3.5, ini@~1.3.0: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== +ini@1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.7.tgz#a09363e1911972ea16d7a8851005d84cf09a9a84" + integrity sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ== + +ini@~1.3.0: + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== is-binary-path@~2.1.0: version "2.1.0" @@ -633,10 +627,10 @@ is-ci@^2.0.0: dependencies: ci-info "^2.0.0" -is-core-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.0.0.tgz#58531b70aed1db7c0e8d4eb1a0a2d1ddd64bd12d" - integrity sha512-jq1AH6C8MuteOoBPwkxHafmByhL9j5q4OaPGdbuD+ZtQJVzH+i6E3BJDQcBA09k57i2Hh2yQbEG8yObZ0jdlWw== +is-core-module@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" + integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== dependencies: has "^1.0.3" @@ -700,20 +694,15 @@ is-yarn-global@^0.3.0: resolved "https://registry.yarnpkg.com/is-yarn-global/-/is-yarn-global-0.3.0.tgz#d502d3382590ea3004893746754c89139973e232" integrity sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw== -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== js-yaml@^3.13.1: - version "3.14.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" - integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== dependencies: argparse "^1.0.7" esprima "^4.0.0" @@ -800,20 +789,25 @@ ms@2.0.0: resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= -ms@2.1.2, ms@^2.1.1: +ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -nice-try@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" - integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== +ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +node-fetch@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" + integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== nodemon@^2.0.4: - version "2.0.6" - resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-2.0.6.tgz#1abe1937b463aaf62f0d52e2b7eaadf28cc2240d" - integrity sha512-4I3YDSKXg6ltYpcnZeHompqac4E6JeAMpGm8tJnB9Y3T0ehasLa4139dJOcCrB93HHrUMsCrKtoAlXTqT5n4AQ== + version "2.0.7" + resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-2.0.7.tgz#6f030a0a0ebe3ea1ba2a38f71bf9bab4841ced32" + integrity sha512-XHzK69Awgnec9UzHr1kc8EomQh4sjTQ8oRf8TsGrSmHDx9/UmiGG9E/mM3BuTfNeFwdNBvrqQq/RHL0xIeyFOA== dependencies: chokidar "^3.2.2" debug "^3.2.6" @@ -894,11 +888,6 @@ path-is-absolute@^1.0.0: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -path-key@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= - path-parse@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" @@ -967,21 +956,22 @@ pump@^3.0.0: once "^1.3.1" pupa@^2.0.1: - version "2.1.0" - resolved "https://registry.yarnpkg.com/pupa/-/pupa-2.1.0.tgz#9e4ec587952b5e4f2c06fe577b0e7db97e8ef721" - integrity sha512-Pj8EhJzFiPwnf4dEXpuUWwH8M/Yl4vpl4cN2RX1i3R77DWvbY5ZPKni7CCKkOYxz+XKt2fieemsV+WTZbIlYzg== + version "2.1.1" + resolved "https://registry.yarnpkg.com/pupa/-/pupa-2.1.1.tgz#f5e8fd4afc2c5d97828faa523549ed8744a20d62" + integrity sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A== dependencies: escape-goat "^2.0.0" puppeteer@^5.2.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-5.3.1.tgz#324e190d89f25ac33dba539f57b82a18553f8646" - integrity sha512-YTM1RaBeYrj6n7IlRXRYLqJHF+GM7tasbvrNFx6w1S16G76NrPq7oYFKLDO+BQsXNtS8kW2GxWCXjIMPvfDyaQ== + version "5.5.0" + resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-5.5.0.tgz#331a7edd212ca06b4a556156435f58cbae08af00" + integrity sha512-OM8ZvTXAhfgFA7wBIIGlPQzvyEETzDjeRa4mZRCRHxYL+GNH5WAuYUQdja3rpWZvkX/JKqmuVgbsxDNsDFjMEg== dependencies: debug "^4.1.0" - devtools-protocol "0.0.799653" + devtools-protocol "0.0.818844" extract-zip "^2.0.0" https-proxy-agent "^4.0.0" + node-fetch "^2.6.1" pkg-dir "^4.2.0" progress "^2.0.1" proxy-from-env "^1.0.0" @@ -1017,9 +1007,9 @@ readdirp@~3.5.0: picomatch "^2.2.1" registry-auth-token@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-4.2.0.tgz#1d37dffda72bbecd0f581e4715540213a65eb7da" - integrity sha512-P+lWzPrsgfN+UEpDS3U8AQKg/UjZX6mQSJueZj3EK+vNESoqBSpBUD3gmu4sF9lOsjXWjF11dQKUqemf3veq1w== + version "4.2.1" + resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-4.2.1.tgz#6d7b4006441918972ccd5fedcd41dc322c79b250" + integrity sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw== dependencies: rc "^1.2.8" @@ -1031,11 +1021,11 @@ registry-url@^5.0.0: rc "^1.2.8" resolve@^1.3.2: - version "1.18.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.18.1.tgz#018fcb2c5b207d2a6424aee361c5a266da8f4130" - integrity sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA== + version "1.19.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" + integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== dependencies: - is-core-module "^2.0.0" + is-core-module "^2.1.0" path-parse "^1.0.6" responselike@^1.0.2: @@ -1064,7 +1054,7 @@ semver-diff@^3.1.1: dependencies: semver "^6.3.0" -semver@^5.3.0, semver@^5.5.0, semver@^5.7.1: +semver@^5.3.0, semver@^5.7.1: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -1074,18 +1064,6 @@ semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= - dependencies: - shebang-regex "^1.0.0" - -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= - signal-exit@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" @@ -1168,19 +1146,19 @@ supports-color@^7.1.0: has-flag "^4.0.0" tar-fs@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.0.tgz#d1cdd121ab465ee0eb9ccde2d35049d3f3daf0d5" - integrity sha512-9uW5iDvrIMCVpvasdFHW0wJPez0K4JnMZtsuIeDI7HyMGJNxmDZDOCQROr7lXyS+iL/QMpj07qcjGYTSdRFXUg== + version "2.1.1" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784" + integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng== dependencies: chownr "^1.1.1" mkdirp-classic "^0.5.2" pump "^3.0.0" - tar-stream "^2.0.0" + tar-stream "^2.1.4" -tar-stream@^2.0.0: - version "2.1.4" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.1.4.tgz#c4fb1a11eb0da29b893a5b25476397ba2d053bfa" - integrity sha512-o3pS2zlG4gxr67GmFYBLlq+dM8gyRGUOvsrHclSkvtVtQbjV0s/+ZE8OpICbaj8clrX3tjeHngYGP7rweaBnuw== +tar-stream@^2.1.4: + version "2.2.0" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" + integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== dependencies: bl "^4.0.3" end-of-stream "^1.4.1" @@ -1189,9 +1167,9 @@ tar-stream@^2.0.0: readable-stream "^3.1.1" term-size@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/term-size/-/term-size-2.2.0.tgz#1f16adedfe9bdc18800e1776821734086fcc6753" - integrity sha512-a6sumDlzyHVJWb8+YofY4TW112G6p2FCPEAFk+59gIYHv3XHRhm9ltVQ9kli4hNWeQBwSpe8cRN25x0ROunMOw== + version "2.2.1" + resolved "https://registry.yarnpkg.com/term-size/-/term-size-2.2.1.tgz#2a6a54840432c2fb6320fea0f415531e90189f54" + integrity sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg== through@^2.3.8: version "2.3.8" @@ -1329,13 +1307,6 @@ util-deprecate@^1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= -which@^1.2.9: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - widest-line@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-3.1.0.tgz#8292333bbf66cb45ff0de1603b136b7ae1496eca" @@ -1359,23 +1330,15 @@ write-file-atomic@^3.0.0: typedarray-to-buffer "^3.1.5" ws@^7.2.3: - version "7.3.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.3.1.tgz#d0547bf67f7ce4f12a72dfe31262c68d7dc551c8" - integrity sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA== + version "7.4.2" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.2.tgz#782100048e54eb36fe9843363ab1c68672b261dd" + integrity sha512-T4tewALS3+qsrpGI/8dqNMLIVdq/g/85U98HPMa6F0m6xTbvhXU6RCQLqPH3+SlomNV/LdY6RXEbBpMH6EOJnA== xdg-basedir@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-4.0.0.tgz#4bc8d9984403696225ef83a1573cbbcb4e79db13" integrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q== -yarn-or-npm@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/yarn-or-npm/-/yarn-or-npm-3.0.1.tgz#6336eea4dff7e23e226acc98c1a8ada17a1b8666" - integrity sha512-fTiQP6WbDAh5QZAVdbMQkecZoahnbOjClTQhzv74WX5h2Uaidj1isf9FDes11TKtsZ0/ZVfZsqZ+O3x6aLERHQ== - dependencies: - cross-spawn "^6.0.5" - pkg-dir "^4.2.0" - yauzl@^2.10.0: version "2.10.0" resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" From 98708cc68c0d924d521d3f422373624aaa871064 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Mon, 25 Jan 2021 17:21:34 +0530 Subject: [PATCH 04/63] =?UTF-8?q?=F0=9F=94=A7=20StrictNullCheck?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/tsconfig.json b/tsconfig.json index a26a563..dc5662d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,6 +6,7 @@ "outDir": "dist", "typeRoots": ["node_modules/@types"], "strict": true, + "strictNullChecks": true, "noUnusedLocals": true, "noUnusedParameters": true, "noImplicitReturns": true, From 9a24f9b178a0c08a6aa74c9b7234aef50aec8d3e Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Mon, 25 Jan 2021 17:45:32 +0530 Subject: [PATCH 05/63] =?UTF-8?q?=F0=9F=97=92=EF=B8=8F=20log=20removed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 6 ------ log.py | 6 ------ 2 files changed, 12 deletions(-) delete mode 100644 log.py diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c1d54cc..2011ff0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -76,12 +76,6 @@ jobs: tar -cvzf bitmaps.tar.gz bitmaps tar -cvzf macOSBigSur.tar.gz themes - - name: Uploading `macOSBigSur` Build Log artifact - uses: actions/upload-artifact@v2 - with: - name: logs - path: logs.tar.gz - - name: Uploading `bitmaps` artifact uses: actions/upload-artifact@v2 with: diff --git a/log.py b/log.py deleted file mode 100644 index e59183c..0000000 --- a/log.py +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python - -import logging - -logging.basicConfig(filename='build.log', filemode='w', - format='%(name)s - %(levelname)s - %(message)s', level=logging.DEBUG) From 57da63e13f1019857d06d1355be95a1335860ffc Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Mon, 25 Jan 2021 19:36:52 +0530 Subject: [PATCH 06/63] =?UTF-8?q?=F0=9F=93=9D=20Work=20logs=20added?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a79b67d..a746048 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- `build.log` removed feature in **clickgen v1.1.8** - Repack Windows cursors +- Removed npm scripts & documentation (`yon` package removed) +- npm dependencies got upgraded (**dependabot** 🤖 security warning) ## [1.0.6] - 1 Nov 2020 From 9fff98b5f6167c446930d9e01c054e0ccac81ecd Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Mon, 25 Jan 2021 19:46:43 +0530 Subject: [PATCH 07/63] =?UTF-8?q?=F0=9F=9A=80=20Removed=20unuseful=20helpe?= =?UTF-8?q?rs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config.ts | 9 +-------- src/index.ts | 15 ++++----------- src/utils/htmlTemplate.ts | 4 ++-- 3 files changed, 7 insertions(+), 21 deletions(-) diff --git a/src/config.ts b/src/config.ts index 843b7b5..a69a14e 100644 --- a/src/config.ts +++ b/src/config.ts @@ -21,11 +21,4 @@ const animatedCursors = readdirSync(animatedCursorsDir).map((f) => resolve(animatedCursorsDir, f) ); -// Animated Config -const animatedClip = { - x: 4, - y: 4, - width: 200, - height: 200, -}; -export { staticCursors, animatedCursors, bitmapsDir, animatedClip }; +export { staticCursors, animatedCursors, bitmapsDir }; diff --git a/src/index.ts b/src/index.ts index 5007114..e0a20ab 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,13 +2,8 @@ import fs from "fs"; import path from "path"; import puppeteer from "puppeteer"; -import { generateRenderTemplate } from "./utils/htmlTemplate"; -import { - staticCursors, - bitmapsDir, - animatedCursors, - animatedClip, -} from "./config"; +import { htmlTemplate } from "./utils/htmlTemplate"; +import { staticCursors, bitmapsDir, animatedCursors } from "./config"; import { matchImages } from "./utils/matchImages"; import { saveFrames, Frames } from "./utils/saveFrames"; import { getFrameName } from "./utils/getFrameName"; @@ -32,7 +27,7 @@ const main = async () => { // Generating HTML Template const data = buffer.toString(); - const template = generateRenderTemplate(data); + const template = htmlTemplate(data); // config const bitmapName = `${path.basename(svgPath, ".svg")}.png`; @@ -58,7 +53,7 @@ const main = async () => { // Generating HTML Template const data = buffer.toString(); - const template = generateRenderTemplate(data); + const template = htmlTemplate(data); const page = await browser.newPage(); await page.setContent(template, { waitUntil: "networkidle2" }); @@ -80,7 +75,6 @@ const main = async () => { frames[firstKey] = { buffer: await svgElement.screenshot({ omitBackground: true, - clip: animatedClip, encoding: "binary", }), }; @@ -90,7 +84,6 @@ const main = async () => { while (!breakRendering) { const newFrame = await svgElement.screenshot({ omitBackground: true, - clip: animatedClip, encoding: "binary", }); const key = getFrameName(index, svgPath); diff --git a/src/utils/htmlTemplate.ts b/src/utils/htmlTemplate.ts index 05ea0cb..4224c27 100644 --- a/src/utils/htmlTemplate.ts +++ b/src/utils/htmlTemplate.ts @@ -4,7 +4,7 @@ export const template = ` - Eggy Render Template + Render Template @@ -15,5 +15,5 @@ export const template = ` `; -export const generateRenderTemplate = (svg: string) => +export const htmlTemplate = (svg: string) => template.replace("", svg); From 2213fa761aa50701a8ed9a58893d9a7f2a00a2ac Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Tue, 26 Jan 2021 12:56:33 +0530 Subject: [PATCH 08/63] =?UTF-8?q?=E2=9A=A1=20Utils=20renamed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/matchImages.ts | 19 ------------------- src/utils/saveFrames.ts | 16 ---------------- src/utils/{htmlTemplate.ts => toHTML.ts} | 4 ++-- 3 files changed, 2 insertions(+), 37 deletions(-) delete mode 100644 src/utils/matchImages.ts delete mode 100644 src/utils/saveFrames.ts rename src/utils/{htmlTemplate.ts => toHTML.ts} (77%) diff --git a/src/utils/matchImages.ts b/src/utils/matchImages.ts deleted file mode 100644 index 3c584a1..0000000 --- a/src/utils/matchImages.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { PNG } from "pngjs"; -import pixelmatch from "pixelmatch"; - -interface MatchImagesArgs { - img1Buff: Buffer; - img2Buff: Buffer; -} - -export const matchImages = ({ img1Buff, img2Buff }: MatchImagesArgs) => { - const img1 = PNG.sync.read(img1Buff); - const img2 = PNG.sync.read(img2Buff); - const { width, height } = img1; - - const diff = new PNG({ width, height }); - - return pixelmatch(img1.data, img2.data, diff.data, width, height, { - threshold: 0.1, - }); -}; diff --git a/src/utils/saveFrames.ts b/src/utils/saveFrames.ts deleted file mode 100644 index f3be527..0000000 --- a/src/utils/saveFrames.ts +++ /dev/null @@ -1,16 +0,0 @@ -import fs from "fs"; -import path from "path"; -import { bitmapsDir } from "../config"; - -export interface Frames { - [fileName: string]: { - buffer: Buffer; - }; -} - -export const saveFrames = (frames: Frames) => { - for (let [fileName, { buffer }] of Object.entries(frames)) { - const out_path = path.resolve(bitmapsDir, fileName); - fs.writeFileSync(out_path, buffer, { encoding: "binary" }); - } -}; diff --git a/src/utils/htmlTemplate.ts b/src/utils/toHTML.ts similarity index 77% rename from src/utils/htmlTemplate.ts rename to src/utils/toHTML.ts index 4224c27..e64ef19 100644 --- a/src/utils/htmlTemplate.ts +++ b/src/utils/toHTML.ts @@ -15,5 +15,5 @@ export const template = ` `; -export const htmlTemplate = (svg: string) => - template.replace("", svg); +export const toHTML = (svgData: string): string => + template.replace("", svgData); From 17d3bcf31a4bc68825c95ea62ea06a4fb60699e4 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Tue, 26 Jan 2021 12:57:11 +0530 Subject: [PATCH 09/63] =?UTF-8?q?=F0=9F=93=9D=204=20Space=20prettier=20con?= =?UTF-8?q?fig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .prettierrc | 4 ++ hotspots.json | 118 +++++++++++++++++++++++++------------------------- nodemon.json | 22 +++++----- package.json | 62 +++++++++++++------------- 4 files changed, 105 insertions(+), 101 deletions(-) create mode 100644 .prettierrc diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..55ea2b2 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,4 @@ +{ + "tabWidth": 4, + "useTabs": false +} diff --git a/hotspots.json b/hotspots.json index adbba3b..40bde3d 100644 --- a/hotspots.json +++ b/hotspots.json @@ -1,102 +1,102 @@ { - "all_scroll": { "xhot": 100, "yhot": 100 }, + "all_scroll": { "xhot": 100, "yhot": 100 }, - "bottom_left_corner": { "xhot": 100, "yhot": 100 }, - "fd_double_arrow": { "xhot": 100, "yhot": 100 }, - "top_right_corner": { "xhot": 100, "yhot": 100 }, + "bottom_left_corner": { "xhot": 100, "yhot": 100 }, + "fd_double_arrow": { "xhot": 100, "yhot": 100 }, + "top_right_corner": { "xhot": 100, "yhot": 100 }, - "bottom_right_corner": { "xhot": 100, "yhot": 100 }, - "bd_double_arrow": { "xhot": 100, "yhot": 100 }, - "top_left_corner": { "xhot": 100, "yhot": 100 }, + "bottom_right_corner": { "xhot": 100, "yhot": 100 }, + "bd_double_arrow": { "xhot": 100, "yhot": 100 }, + "top_left_corner": { "xhot": 100, "yhot": 100 }, - "bottom_tee": { "xhot": 141, "yhot": 99 }, + "bottom_tee": { "xhot": 141, "yhot": 99 }, - "center_ptr": { "xhot": 61, "yhot": 100 }, + "center_ptr": { "xhot": 61, "yhot": 100 }, - "circle": { "xhot": 47, "yhot": 39 }, - "crossed_circle": { "xhot": 47, "yhot": 39 }, - "dnd_no_drop": { "xhot": 47, "yhot": 39 }, + "circle": { "xhot": 47, "yhot": 39 }, + "crossed_circle": { "xhot": 47, "yhot": 39 }, + "dnd_no_drop": { "xhot": 47, "yhot": 39 }, - "context_menu": { "xhot": 61, "yhot": 58 }, + "context_menu": { "xhot": 61, "yhot": 58 }, - "copy": { "xhot": 47, "yhot": 39 }, - "dnd_copy": { "xhot": 47, "yhot": 39 }, + "copy": { "xhot": 47, "yhot": 39 }, + "dnd_copy": { "xhot": 47, "yhot": 39 }, - "cross": { "xhot": 100, "yhot": 100 }, - "tcross": { "xhot": 100, "yhot": 100 }, + "cross": { "xhot": 100, "yhot": 100 }, + "tcross": { "xhot": 100, "yhot": 100 }, - "crosshair": { "xhot": 100, "yhot": 100 }, + "crosshair": { "xhot": 100, "yhot": 100 }, - "dotbox": { "xhot": 100, "yhot": 100 }, + "dotbox": { "xhot": 100, "yhot": 100 }, - "hand1": { "xhot": 94, "yhot": 105 }, + "hand1": { "xhot": 94, "yhot": 105 }, - "hand2": { "xhot": 66, "yhot": 34 }, + "hand2": { "xhot": 66, "yhot": 34 }, - "left_ptr": { "xhot": 68, "yhot": 41 }, + "left_ptr": { "xhot": 68, "yhot": 41 }, - "left_side": { "xhot": 100, "yhot": 100 }, - "right_side": { "xhot": 100, "yhot": 100 }, + "left_side": { "xhot": 100, "yhot": 100 }, + "right_side": { "xhot": 100, "yhot": 100 }, - "left_tee": { "xhot": 100, "yhot": 58 }, + "left_tee": { "xhot": 100, "yhot": 58 }, - "link": { "xhot": 61, "yhot": 105 }, - "dnd_link": { "xhot": 61, "yhot": 105 }, + "link": { "xhot": 61, "yhot": 105 }, + "dnd_link": { "xhot": 61, "yhot": 105 }, - "ll_angle": { "xhot": 141, "yhot": 58 }, + "ll_angle": { "xhot": 141, "yhot": 58 }, - "lr_angle": { "xhot": 141, "yhot": 138 }, + "lr_angle": { "xhot": 141, "yhot": 138 }, - "move": { "xhot": 80, "yhot": 106 }, - "dnd_move": { "xhot": 80, "yhot": 106 }, - "dnd_none": { "xhot": 80, "yhot": 106 }, - "grabbing": { "xhot": 80, "yhot": 106 }, - "pointer_move": { "xhot": 80, "yhot": 106 }, + "move": { "xhot": 80, "yhot": 106 }, + "dnd_move": { "xhot": 80, "yhot": 106 }, + "dnd_none": { "xhot": 80, "yhot": 106 }, + "grabbing": { "xhot": 80, "yhot": 106 }, + "pointer_move": { "xhot": 80, "yhot": 106 }, - "pencil": { "xhot": 141, "yhot": 58 }, + "pencil": { "xhot": 141, "yhot": 58 }, - "plus": { "xhot": 100, "yhot": 100 }, + "plus": { "xhot": 100, "yhot": 100 }, - "question_arrow": { "xhot": 105, "yhot": 105 }, - "dnd_ask": { "xhot": 105, "yhot": 105 }, + "question_arrow": { "xhot": 105, "yhot": 105 }, + "dnd_ask": { "xhot": 105, "yhot": 105 }, - "right_ptr": { "xhot": 61, "yhot": 138 }, + "right_ptr": { "xhot": 61, "yhot": 138 }, - "right_tee": { "xhot": 100, "yhot": 138 }, + "right_tee": { "xhot": 100, "yhot": 138 }, - "sb_down_arrow": { "xhot": 133, "yhot": 99 }, + "sb_down_arrow": { "xhot": 133, "yhot": 99 }, - "sb_h_double_arrow": { "xhot": 100, "yhot": 100 }, + "sb_h_double_arrow": { "xhot": 100, "yhot": 100 }, - "sb_left_arrow": { "xhot": 100, "yhot": 68 }, + "sb_left_arrow": { "xhot": 100, "yhot": 68 }, - "sb_right_arrow": { "xhot": 100, "yhot": 138 }, + "sb_right_arrow": { "xhot": 100, "yhot": 138 }, - "sb_up_arrow": { "xhot": 68, "yhot": 99 }, + "sb_up_arrow": { "xhot": 68, "yhot": 99 }, - "sb_v_double_arrow": { "xhot": 100, "yhot": 100 }, + "sb_v_double_arrow": { "xhot": 100, "yhot": 100 }, - "top_side": { "xhot": 100, "yhot": 100 }, - "bottom_side": { "xhot": 100, "yhot": 100 }, + "top_side": { "xhot": 100, "yhot": 100 }, + "bottom_side": { "xhot": 100, "yhot": 100 }, - "top_tee": { "xhot": 61, "yhot": 99 }, + "top_tee": { "xhot": 61, "yhot": 99 }, - "ul_angle": { "xhot": 61, "yhot": 65 }, + "ul_angle": { "xhot": 61, "yhot": 65 }, - "ur_angle": { "xhot": 61, "yhot": 138 }, + "ur_angle": { "xhot": 61, "yhot": 138 }, - "vertical_text": { "xhot": 100, "yhot": 102 }, + "vertical_text": { "xhot": 100, "yhot": 102 }, - "wait": { "xhot": 104, "yhot": 105 }, - "left_ptr_watch": { "xhot": 104, "yhot": 105 }, + "wait": { "xhot": 104, "yhot": 105 }, + "left_ptr_watch": { "xhot": 104, "yhot": 105 }, - "wayland_cursor": { "xhot": 100, "yhot": 100 }, + "wayland_cursor": { "xhot": 100, "yhot": 100 }, - "x_cursor": { "xhot": 100, "yhot": 100 }, + "x_cursor": { "xhot": 100, "yhot": 100 }, - "xterm": { "xhot": 97, "yhot": 97 }, + "xterm": { "xhot": 97, "yhot": 97 }, - "zoom_in": { "xhot": 76, "yhot": 78 }, + "zoom_in": { "xhot": 76, "yhot": 78 }, - "zoom_out": { "xhot": 76, "yhot": 78 } + "zoom_out": { "xhot": 76, "yhot": 78 } } diff --git a/nodemon.json b/nodemon.json index cde9605..add0447 100644 --- a/nodemon.json +++ b/nodemon.json @@ -1,13 +1,13 @@ { - "restartable": "rs", - "ignore": [".git", "node_modules/**/node_modules"], - "verbose": true, - "execMap": { - "ts": "node --require ts-node/register" - }, - "watch": ["src/"], - "env": { - "NODE_ENV": "development" - }, - "ext": "js,json,ts" + "restartable": "rs", + "ignore": [".git", "node_modules/**/node_modules"], + "verbose": true, + "execMap": { + "ts": "node --require ts-node/register" + }, + "watch": ["src/"], + "env": { + "NODE_ENV": "development" + }, + "ext": "js,json,ts" } diff --git a/package.json b/package.json index d5db88a..6f82618 100644 --- a/package.json +++ b/package.json @@ -1,33 +1,33 @@ { - "name": "apple_cursor", - "version": "1.0.6", - "description": "🍎 macOS Cursor Theme", - "main": "index.js", - "scripts": { - "clean": "rm -rf bitmaps themes", - "dev": "nodemon src/index.ts", - "watch": "nodemon --inspect src/index.ts", - "py_install": "pip install -r requirements.txt", - "render": "npx ts-node src/index.ts", - "build": "python build.py", - "compile": "yarn clean && yarn render && yarn build" - }, - "repository": "git@github.com:ful1e5/apple_cursor.git", - "author": "Kaiz Khatri", - "license": "GPL-3.0", - "private": true, - "devDependencies": { - "@types/puppeteer": "^3.0.1", - "nodemon": "^2.0.4", - "ts-node": "^8.10.2", - "tslint": "^6.1.2", - "typescript": "^3.9.7" - }, - "dependencies": { - "@types/pixelmatch": "^5.2.1", - "@types/pngjs": "^3.4.2", - "pixelmatch": "^5.2.1", - "pngjs": "^5.0.0", - "puppeteer": "^5.2.1" - } + "name": "apple_cursor", + "version": "1.0.6", + "description": "🍎 macOS Cursor Theme", + "main": "index.js", + "scripts": { + "clean": "rm -rf bitmaps themes", + "dev": "nodemon src/index.ts", + "watch": "nodemon --inspect src/index.ts", + "py_install": "pip install -r requirements.txt", + "render": "yarn ts-node src/index.ts", + "build": "python build.py", + "compile": "yarn clean && yarn render && yarn build" + }, + "repository": "git@github.com:ful1e5/apple_cursor.git", + "author": "Kaiz Khatri", + "license": "GPL-3.0", + "private": true, + "devDependencies": { + "@types/pixelmatch": "^5.2.2", + "@types/pngjs": "^3.4.2", + "@types/puppeteer": "^3.0.1", + "nodemon": "^2.0.4", + "ts-node": "^8.10.2", + "tslint": "^6.1.2", + "typescript": "^3.9.7" + }, + "dependencies": { + "pixelmatch": "^5.2.1", + "pngjs": "^6.0.0", + "puppeteer": "^5.2.1" + } } From 75bba67132336e92d92856e023e8456c167ed826 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Tue, 26 Jan 2021 12:57:50 +0530 Subject: [PATCH 10/63] =?UTF-8?q?=F0=9F=9A=80=20upgrade?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yarn.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/yarn.lock b/yarn.lock index f87d64a..08595e3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -40,7 +40,7 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.22.tgz#0d29f382472c4ccf3bd96ff0ce47daf5b7b84b18" integrity sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw== -"@types/pixelmatch@^5.2.1": +"@types/pixelmatch@^5.2.2": version "5.2.2" resolved "https://registry.yarnpkg.com/@types/pixelmatch/-/pixelmatch-5.2.2.tgz#3403238d4b920bf2255fb6cbf9a098bef796ce62" integrity sha512-ndpfW/H8+SAiI3wt+f8DlHGgB7OeBdgFgBJ6v/1l3SpJ0MCn9wtXFb4mUccMujN5S4DMmAh7MVy1O3WcXrHUKw== @@ -922,10 +922,10 @@ pngjs@^4.0.1: resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-4.0.1.tgz#f803869bb2fc1bfe1bf99aa4ec21c108117cfdbe" integrity sha512-rf5+2/ioHeQxR6IxuYNYGFytUyG3lma/WW1nsmjeHlWwtb2aByla6dkVc8pmJ9nplzkTA0q2xx7mMWrOTqT4Gg== -pngjs@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-5.0.0.tgz#e79dd2b215767fd9c04561c01236df960bce7fbb" - integrity sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw== +pngjs@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-6.0.0.tgz#ca9e5d2aa48db0228a52c419c3308e87720da821" + integrity sha512-TRzzuFRRmEoSW/p1KVAmiOgPco2Irlah+bGFCeNfJXxxYGwSw7YwAOAcd7X28K/m5bjBWKsC29KyoMfHbypayg== prepend-http@^2.0.0: version "2.0.0" From 0fe8b2f1d380449ce1dbdbae5f7dd449957e6bc7 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Tue, 26 Jan 2021 19:52:54 +0530 Subject: [PATCH 11/63] =?UTF-8?q?=F0=9F=92=9D=20Performance=20tweak=20&=20?= =?UTF-8?q?prettier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .prettierrc | 4 +- hotspots.json | 118 ++++++++++++++-------------- nodemon.json | 22 +++--- package.json | 62 +++++++-------- src/config.ts | 11 ++- src/index.ts | 182 +++++++++++++++++++++----------------------- src/utils/toHTML.ts | 2 +- 7 files changed, 197 insertions(+), 204 deletions(-) diff --git a/.prettierrc b/.prettierrc index 55ea2b2..222861c 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,4 +1,4 @@ { - "tabWidth": 4, - "useTabs": false + "tabWidth": 2, + "useTabs": false } diff --git a/hotspots.json b/hotspots.json index 40bde3d..adbba3b 100644 --- a/hotspots.json +++ b/hotspots.json @@ -1,102 +1,102 @@ { - "all_scroll": { "xhot": 100, "yhot": 100 }, + "all_scroll": { "xhot": 100, "yhot": 100 }, - "bottom_left_corner": { "xhot": 100, "yhot": 100 }, - "fd_double_arrow": { "xhot": 100, "yhot": 100 }, - "top_right_corner": { "xhot": 100, "yhot": 100 }, + "bottom_left_corner": { "xhot": 100, "yhot": 100 }, + "fd_double_arrow": { "xhot": 100, "yhot": 100 }, + "top_right_corner": { "xhot": 100, "yhot": 100 }, - "bottom_right_corner": { "xhot": 100, "yhot": 100 }, - "bd_double_arrow": { "xhot": 100, "yhot": 100 }, - "top_left_corner": { "xhot": 100, "yhot": 100 }, + "bottom_right_corner": { "xhot": 100, "yhot": 100 }, + "bd_double_arrow": { "xhot": 100, "yhot": 100 }, + "top_left_corner": { "xhot": 100, "yhot": 100 }, - "bottom_tee": { "xhot": 141, "yhot": 99 }, + "bottom_tee": { "xhot": 141, "yhot": 99 }, - "center_ptr": { "xhot": 61, "yhot": 100 }, + "center_ptr": { "xhot": 61, "yhot": 100 }, - "circle": { "xhot": 47, "yhot": 39 }, - "crossed_circle": { "xhot": 47, "yhot": 39 }, - "dnd_no_drop": { "xhot": 47, "yhot": 39 }, + "circle": { "xhot": 47, "yhot": 39 }, + "crossed_circle": { "xhot": 47, "yhot": 39 }, + "dnd_no_drop": { "xhot": 47, "yhot": 39 }, - "context_menu": { "xhot": 61, "yhot": 58 }, + "context_menu": { "xhot": 61, "yhot": 58 }, - "copy": { "xhot": 47, "yhot": 39 }, - "dnd_copy": { "xhot": 47, "yhot": 39 }, + "copy": { "xhot": 47, "yhot": 39 }, + "dnd_copy": { "xhot": 47, "yhot": 39 }, - "cross": { "xhot": 100, "yhot": 100 }, - "tcross": { "xhot": 100, "yhot": 100 }, + "cross": { "xhot": 100, "yhot": 100 }, + "tcross": { "xhot": 100, "yhot": 100 }, - "crosshair": { "xhot": 100, "yhot": 100 }, + "crosshair": { "xhot": 100, "yhot": 100 }, - "dotbox": { "xhot": 100, "yhot": 100 }, + "dotbox": { "xhot": 100, "yhot": 100 }, - "hand1": { "xhot": 94, "yhot": 105 }, + "hand1": { "xhot": 94, "yhot": 105 }, - "hand2": { "xhot": 66, "yhot": 34 }, + "hand2": { "xhot": 66, "yhot": 34 }, - "left_ptr": { "xhot": 68, "yhot": 41 }, + "left_ptr": { "xhot": 68, "yhot": 41 }, - "left_side": { "xhot": 100, "yhot": 100 }, - "right_side": { "xhot": 100, "yhot": 100 }, + "left_side": { "xhot": 100, "yhot": 100 }, + "right_side": { "xhot": 100, "yhot": 100 }, - "left_tee": { "xhot": 100, "yhot": 58 }, + "left_tee": { "xhot": 100, "yhot": 58 }, - "link": { "xhot": 61, "yhot": 105 }, - "dnd_link": { "xhot": 61, "yhot": 105 }, + "link": { "xhot": 61, "yhot": 105 }, + "dnd_link": { "xhot": 61, "yhot": 105 }, - "ll_angle": { "xhot": 141, "yhot": 58 }, + "ll_angle": { "xhot": 141, "yhot": 58 }, - "lr_angle": { "xhot": 141, "yhot": 138 }, + "lr_angle": { "xhot": 141, "yhot": 138 }, - "move": { "xhot": 80, "yhot": 106 }, - "dnd_move": { "xhot": 80, "yhot": 106 }, - "dnd_none": { "xhot": 80, "yhot": 106 }, - "grabbing": { "xhot": 80, "yhot": 106 }, - "pointer_move": { "xhot": 80, "yhot": 106 }, + "move": { "xhot": 80, "yhot": 106 }, + "dnd_move": { "xhot": 80, "yhot": 106 }, + "dnd_none": { "xhot": 80, "yhot": 106 }, + "grabbing": { "xhot": 80, "yhot": 106 }, + "pointer_move": { "xhot": 80, "yhot": 106 }, - "pencil": { "xhot": 141, "yhot": 58 }, + "pencil": { "xhot": 141, "yhot": 58 }, - "plus": { "xhot": 100, "yhot": 100 }, + "plus": { "xhot": 100, "yhot": 100 }, - "question_arrow": { "xhot": 105, "yhot": 105 }, - "dnd_ask": { "xhot": 105, "yhot": 105 }, + "question_arrow": { "xhot": 105, "yhot": 105 }, + "dnd_ask": { "xhot": 105, "yhot": 105 }, - "right_ptr": { "xhot": 61, "yhot": 138 }, + "right_ptr": { "xhot": 61, "yhot": 138 }, - "right_tee": { "xhot": 100, "yhot": 138 }, + "right_tee": { "xhot": 100, "yhot": 138 }, - "sb_down_arrow": { "xhot": 133, "yhot": 99 }, + "sb_down_arrow": { "xhot": 133, "yhot": 99 }, - "sb_h_double_arrow": { "xhot": 100, "yhot": 100 }, + "sb_h_double_arrow": { "xhot": 100, "yhot": 100 }, - "sb_left_arrow": { "xhot": 100, "yhot": 68 }, + "sb_left_arrow": { "xhot": 100, "yhot": 68 }, - "sb_right_arrow": { "xhot": 100, "yhot": 138 }, + "sb_right_arrow": { "xhot": 100, "yhot": 138 }, - "sb_up_arrow": { "xhot": 68, "yhot": 99 }, + "sb_up_arrow": { "xhot": 68, "yhot": 99 }, - "sb_v_double_arrow": { "xhot": 100, "yhot": 100 }, + "sb_v_double_arrow": { "xhot": 100, "yhot": 100 }, - "top_side": { "xhot": 100, "yhot": 100 }, - "bottom_side": { "xhot": 100, "yhot": 100 }, + "top_side": { "xhot": 100, "yhot": 100 }, + "bottom_side": { "xhot": 100, "yhot": 100 }, - "top_tee": { "xhot": 61, "yhot": 99 }, + "top_tee": { "xhot": 61, "yhot": 99 }, - "ul_angle": { "xhot": 61, "yhot": 65 }, + "ul_angle": { "xhot": 61, "yhot": 65 }, - "ur_angle": { "xhot": 61, "yhot": 138 }, + "ur_angle": { "xhot": 61, "yhot": 138 }, - "vertical_text": { "xhot": 100, "yhot": 102 }, + "vertical_text": { "xhot": 100, "yhot": 102 }, - "wait": { "xhot": 104, "yhot": 105 }, - "left_ptr_watch": { "xhot": 104, "yhot": 105 }, + "wait": { "xhot": 104, "yhot": 105 }, + "left_ptr_watch": { "xhot": 104, "yhot": 105 }, - "wayland_cursor": { "xhot": 100, "yhot": 100 }, + "wayland_cursor": { "xhot": 100, "yhot": 100 }, - "x_cursor": { "xhot": 100, "yhot": 100 }, + "x_cursor": { "xhot": 100, "yhot": 100 }, - "xterm": { "xhot": 97, "yhot": 97 }, + "xterm": { "xhot": 97, "yhot": 97 }, - "zoom_in": { "xhot": 76, "yhot": 78 }, + "zoom_in": { "xhot": 76, "yhot": 78 }, - "zoom_out": { "xhot": 76, "yhot": 78 } + "zoom_out": { "xhot": 76, "yhot": 78 } } diff --git a/nodemon.json b/nodemon.json index add0447..cde9605 100644 --- a/nodemon.json +++ b/nodemon.json @@ -1,13 +1,13 @@ { - "restartable": "rs", - "ignore": [".git", "node_modules/**/node_modules"], - "verbose": true, - "execMap": { - "ts": "node --require ts-node/register" - }, - "watch": ["src/"], - "env": { - "NODE_ENV": "development" - }, - "ext": "js,json,ts" + "restartable": "rs", + "ignore": [".git", "node_modules/**/node_modules"], + "verbose": true, + "execMap": { + "ts": "node --require ts-node/register" + }, + "watch": ["src/"], + "env": { + "NODE_ENV": "development" + }, + "ext": "js,json,ts" } diff --git a/package.json b/package.json index 6f82618..1ddaefa 100644 --- a/package.json +++ b/package.json @@ -1,33 +1,33 @@ { - "name": "apple_cursor", - "version": "1.0.6", - "description": "🍎 macOS Cursor Theme", - "main": "index.js", - "scripts": { - "clean": "rm -rf bitmaps themes", - "dev": "nodemon src/index.ts", - "watch": "nodemon --inspect src/index.ts", - "py_install": "pip install -r requirements.txt", - "render": "yarn ts-node src/index.ts", - "build": "python build.py", - "compile": "yarn clean && yarn render && yarn build" - }, - "repository": "git@github.com:ful1e5/apple_cursor.git", - "author": "Kaiz Khatri", - "license": "GPL-3.0", - "private": true, - "devDependencies": { - "@types/pixelmatch": "^5.2.2", - "@types/pngjs": "^3.4.2", - "@types/puppeteer": "^3.0.1", - "nodemon": "^2.0.4", - "ts-node": "^8.10.2", - "tslint": "^6.1.2", - "typescript": "^3.9.7" - }, - "dependencies": { - "pixelmatch": "^5.2.1", - "pngjs": "^6.0.0", - "puppeteer": "^5.2.1" - } + "name": "apple_cursor", + "version": "1.0.6", + "description": "🍎 macOS Cursor Theme", + "main": "index.js", + "scripts": { + "clean": "rm -rf bitmaps themes", + "dev": "nodemon src/index.ts", + "watch": "nodemon --inspect src/index.ts", + "py_install": "pip install -r requirements.txt", + "render": "yarn ts-node src/index.ts", + "build": "python build.py", + "compile": "yarn clean && yarn render && yarn build" + }, + "repository": "git@github.com:ful1e5/apple_cursor.git", + "author": "Kaiz Khatri", + "license": "GPL-3.0", + "private": true, + "devDependencies": { + "@types/pixelmatch": "^5.2.2", + "@types/pngjs": "^3.4.2", + "@types/puppeteer": "^3.0.1", + "nodemon": "^2.0.4", + "ts-node": "^8.10.2", + "tslint": "^6.1.2", + "typescript": "^3.9.7" + }, + "dependencies": { + "pixelmatch": "^5.2.1", + "pngjs": "^6.0.0", + "puppeteer": "^5.2.1" + } } diff --git a/src/config.ts b/src/config.ts index a69a14e..3aa67cc 100644 --- a/src/config.ts +++ b/src/config.ts @@ -2,13 +2,12 @@ import { resolve } from "path"; import { readdirSync, existsSync } from "fs"; // Source Directory -const svgsDir = resolve(__dirname, "svg"); -if (!existsSync(svgsDir)) { - console.log("Source .svg files not found"); -} +const staticCursorsDir = resolve(__dirname, "svg", "static"); +const animatedCursorsDir = resolve(__dirname, "svg", "animated"); -const staticCursorsDir = resolve(svgsDir, "static"); -const animatedCursorsDir = resolve(svgsDir, "animated"); +if (!existsSync(staticCursorsDir) || !existsSync(animatedCursorsDir)) { + throw new Error("svg directory not found"); +} // Out Directory const bitmapsDir = resolve(__dirname, "../", "bitmaps"); diff --git a/src/index.ts b/src/index.ts index e0a20ab..7ca4ed4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,16 +1,40 @@ +import "module-alias/register"; + import fs from "fs"; import path from "path"; -import puppeteer from "puppeteer"; +import Pixelmatch from "pixelmatch"; -import { htmlTemplate } from "./utils/htmlTemplate"; -import { staticCursors, bitmapsDir, animatedCursors } from "./config"; -import { matchImages } from "./utils/matchImages"; -import { saveFrames, Frames } from "./utils/saveFrames"; +import { PNG } from "pngjs"; +import puppeteer, { ElementHandle, Page } from "puppeteer"; + +import { animatedCursors, bitmapsDir, staticCursors } from "./config"; import { getFrameName } from "./utils/getFrameName"; +import { toHTML } from "./utils/toHTML"; + +const getSVGElement = async (page: Page) => { + const svg = await page.$("#container svg"); + + if (!svg) { + throw new Error("svg element not found!"); + } + return svg; +}; + +const screenshot = async (element: ElementHandle): Promise => { + return await element.screenshot({ + omitBackground: true, + encoding: "binary", + }); +}; + +const saveFrame = (key: string, frame: Buffer) => { + const out_path = path.resolve(bitmapsDir, key); + fs.writeFileSync(out_path, frame, { encoding: "binary" }); +}; const main = async () => { const browser = await puppeteer.launch({ - ignoreDefaultArgs: [" --single-process ", "--no-sandbox"], + ignoreDefaultArgs: ["--single-process", "--no-sandbox"], headless: true, }); @@ -18,100 +42,70 @@ const main = async () => { fs.mkdirSync(bitmapsDir); } - try { - console.log("📸 Rendering Static Cursors..."); - - for (let svgPath of staticCursors) { - const buffer = fs.readFileSync(path.resolve(svgPath), "utf8"); - if (!buffer) throw new Error(`${svgPath} File Read error`); - - // Generating HTML Template - const data = buffer.toString(); - const template = htmlTemplate(data); - - // config - const bitmapName = `${path.basename(svgPath, ".svg")}.png`; - const out = path.resolve(bitmapsDir, bitmapName); - - // Render - const page = await browser.newPage(); - await page.setContent(template); - - await page.waitForSelector("#container"); - const svgElement = await page.$("#container svg"); - if (!svgElement) throw new Error("svg element not found"); - await svgElement.screenshot({ omitBackground: true, path: out }); - - await page.close(); + for (const svgFilePath of staticCursors) { + const svgData = fs.readFileSync(svgFilePath, "utf-8"); + if (!svgData) { + throw new Error(`${svgFilePath} File Read error`); } - console.log("🎥 Rendering Animated Cursors..."); + const page = await browser.newPage(); + const html = toHTML(svgData); - for (let svgPath of animatedCursors) { - const buffer = fs.readFileSync(svgPath, "utf8"); - if (!buffer) throw new Error(`${svgPath} File Read error`); + await page.setContent(html); + const svg = await getSVGElement(page); - // Generating HTML Template - const data = buffer.toString(); - const template = htmlTemplate(data); + const key = `${path.basename(svgFilePath, ".svg")}.png`; + const out = path.join(bitmapsDir, key); - const page = await browser.newPage(); - await page.setContent(template, { waitUntil: "networkidle2" }); - - await page.waitForSelector("#container"); - const svgElement = await page.$("#container svg"); - if (!svgElement) throw new Error("svg element not found"); - - // Render Config - let index = 1; - let breakRendering = false; - const frames: Frames = {}; - const firstKey = getFrameName(index, svgPath); - - console.log("Rendering", path.basename(svgPath), "..."); - console.log(firstKey); - - // 1st Frame - frames[firstKey] = { - buffer: await svgElement.screenshot({ - omitBackground: true, - encoding: "binary", - }), - }; - - // Pushing frames until it match to 1st frame - index++; - while (!breakRendering) { - const newFrame = await svgElement.screenshot({ - omitBackground: true, - encoding: "binary", - }); - const key = getFrameName(index, svgPath); - console.log(key); - const diff = matchImages({ - img1Buff: frames[firstKey].buffer, - img2Buff: newFrame, - }); - - if (!(diff < 700)) { - frames[key] = { buffer: newFrame }; - } else { - breakRendering = true; - } - index++; - } - - saveFrames(frames); - - await page.close(); - } - - console.log(`\nBitmaps stored at ${bitmapsDir}\n\n🎉 Render Done.`); - process.exit(0); - } catch (error) { - console.error(error); - process.exit(1); + console.log("Saving", key, "..."); + await svg.screenshot({ omitBackground: true, path: out }); + await page.close(); } + + for (const svgFilePath of animatedCursors) { + const svgData = fs.readFileSync(svgFilePath, "utf8"); + if (!svgData) { + throw new Error(`${svgFilePath} File Read error`); + } + + const page = await browser.newPage(); + const html = toHTML(svgData); + + await page.setContent(html); + const svg = await getSVGElement(page); + + let index = 1; + let breakRendering = false; + + // Rendering 1st frame + const img1 = await screenshot(svg); + const key1 = getFrameName(index, svgFilePath); + + console.log("Saving", key1, "..."); + saveFrame(key1, img1); + + // Rendering frames till `imgN` matched to `img1` + while (!breakRendering) { + ++index; + const imgN = await screenshot(svg); + const keyN = getFrameName(index, svgFilePath); + + console.log("Saving", keyN, "..."); + saveFrame(keyN, imgN); + + const { data: img1Data, width, height } = PNG.sync.read(img1); + const { data: imgNData } = PNG.sync.read(imgN); + + const diff = Pixelmatch(img1Data, imgNData, null, width, height); + + if (diff <= 100) { + breakRendering = !breakRendering; + } + } + + await page.close(); + } + await browser.close(); }; main(); diff --git a/src/utils/toHTML.ts b/src/utils/toHTML.ts index e64ef19..36fbbf4 100644 --- a/src/utils/toHTML.ts +++ b/src/utils/toHTML.ts @@ -16,4 +16,4 @@ export const template = ` `; export const toHTML = (svgData: string): string => - template.replace("", svgData); + template.replace("", svgData); From 8ad5d2720e26aca868cdd15b99d835b5958cadcf Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Tue, 26 Jan 2021 19:59:14 +0530 Subject: [PATCH 12/63] =?UTF-8?q?=F0=9F=A4=AB=20unuseful=20import?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 7ca4ed4..c08db83 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,3 @@ -import "module-alias/register"; - import fs from "fs"; import path from "path"; import Pixelmatch from "pixelmatch"; From 1108cfd7b492e973ce56e01efc81467afd72121c Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Wed, 27 Jan 2021 12:59:57 +0530 Subject: [PATCH 13/63] =?UTF-8?q?=F0=9F=93=82=20Structure=20bitmaper?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .prettierrc | 4 - bitmap/package.json | 26 +++ bitmap/src/config.ts | 23 ++ {src => bitmap/src}/index.ts | 12 +- {src => bitmap/src}/utils/getFrameName.ts | 0 {src => bitmap/src}/utils/toHTML.ts | 0 bitmap/tsconfig.json | 12 + yarn.lock => bitmap/yarn.lock | 206 ++---------------- nodemon.json | 13 -- package.json | 33 --- src/config.ts | 23 -- {src/svg => svg}/README.md | 0 {src/svg => svg}/animated/left_ptr_watch.svg | 0 {src/svg => svg}/animated/wait.svg | 0 {src/svg => svg}/static/all_scroll.svg | 0 {src/svg => svg}/static/bd_double_arrow.svg | 0 .../svg => svg}/static/bottom_left_corner.svg | 0 .../static/bottom_right_corner.svg | 0 {src/svg => svg}/static/bottom_side.svg | 0 {src/svg => svg}/static/bottom_tee.svg | 0 {src/svg => svg}/static/center_ptr.svg | 0 {src/svg => svg}/static/circle.svg | 0 {src/svg => svg}/static/context_menu.svg | 0 {src/svg => svg}/static/copy.svg | 0 {src/svg => svg}/static/cross.svg | 0 {src/svg => svg}/static/crossed_circle.svg | 0 {src/svg => svg}/static/crosshair.svg | 0 {src/svg => svg}/static/dnd_ask.svg | 0 {src/svg => svg}/static/dnd_copy.svg | 0 {src/svg => svg}/static/dnd_link.svg | 0 {src/svg => svg}/static/dnd_move.svg | 0 {src/svg => svg}/static/dnd_no_drop.svg | 0 {src/svg => svg}/static/dnd_none.svg | 0 {src/svg => svg}/static/dotbox.svg | 0 {src/svg => svg}/static/fd_double_arrow.svg | 0 {src/svg => svg}/static/grabbing.svg | 0 {src/svg => svg}/static/hand1.svg | 0 {src/svg => svg}/static/hand2.svg | 0 {src/svg => svg}/static/left_ptr.svg | 0 {src/svg => svg}/static/left_side.svg | 0 {src/svg => svg}/static/left_tee.svg | 0 {src/svg => svg}/static/link.svg | 0 {src/svg => svg}/static/ll_angle.svg | 0 {src/svg => svg}/static/lr_angle.svg | 0 {src/svg => svg}/static/move.svg | 0 {src/svg => svg}/static/pencil.svg | 0 {src/svg => svg}/static/plus.svg | 0 {src/svg => svg}/static/pointer_move.svg | 0 {src/svg => svg}/static/question_arrow.svg | 0 {src/svg => svg}/static/right_ptr.svg | 0 {src/svg => svg}/static/right_side.svg | 0 {src/svg => svg}/static/right_tee.svg | 0 {src/svg => svg}/static/sb_down_arrow.svg | 0 {src/svg => svg}/static/sb_h_double_arrow.svg | 0 {src/svg => svg}/static/sb_left_arrow.svg | 0 {src/svg => svg}/static/sb_right_arrow.svg | 0 {src/svg => svg}/static/sb_up_arrow.svg | 0 {src/svg => svg}/static/sb_v_double_arrow.svg | 0 {src/svg => svg}/static/tcross.svg | 0 {src/svg => svg}/static/top_left_corner.svg | 0 {src/svg => svg}/static/top_right_corner.svg | 0 {src/svg => svg}/static/top_side.svg | 0 {src/svg => svg}/static/top_tee.svg | 0 {src/svg => svg}/static/ul_angle.svg | 0 {src/svg => svg}/static/ur_angle.svg | 0 {src/svg => svg}/static/vertical_text.svg | 0 {src/svg => svg}/static/wayland_cursor.svg | 0 {src/svg => svg}/static/x_cursor.svg | 0 {src/svg => svg}/static/xterm.svg | 0 {src/svg => svg}/static/zoom_in.svg | 0 {src/svg => svg}/static/zoom_out.svg | 0 71 files changed, 92 insertions(+), 260 deletions(-) delete mode 100644 .prettierrc create mode 100644 bitmap/package.json create mode 100644 bitmap/src/config.ts rename {src => bitmap/src}/index.ts (90%) rename {src => bitmap/src}/utils/getFrameName.ts (100%) rename {src => bitmap/src}/utils/toHTML.ts (100%) create mode 100644 bitmap/tsconfig.json rename yarn.lock => bitmap/yarn.lock (86%) delete mode 100644 nodemon.json delete mode 100644 package.json delete mode 100644 src/config.ts rename {src/svg => svg}/README.md (100%) rename {src/svg => svg}/animated/left_ptr_watch.svg (100%) rename {src/svg => svg}/animated/wait.svg (100%) rename {src/svg => svg}/static/all_scroll.svg (100%) rename {src/svg => svg}/static/bd_double_arrow.svg (100%) rename {src/svg => svg}/static/bottom_left_corner.svg (100%) rename {src/svg => svg}/static/bottom_right_corner.svg (100%) rename {src/svg => svg}/static/bottom_side.svg (100%) rename {src/svg => svg}/static/bottom_tee.svg (100%) rename {src/svg => svg}/static/center_ptr.svg (100%) rename {src/svg => svg}/static/circle.svg (100%) rename {src/svg => svg}/static/context_menu.svg (100%) rename {src/svg => svg}/static/copy.svg (100%) rename {src/svg => svg}/static/cross.svg (100%) rename {src/svg => svg}/static/crossed_circle.svg (100%) rename {src/svg => svg}/static/crosshair.svg (100%) rename {src/svg => svg}/static/dnd_ask.svg (100%) rename {src/svg => svg}/static/dnd_copy.svg (100%) rename {src/svg => svg}/static/dnd_link.svg (100%) rename {src/svg => svg}/static/dnd_move.svg (100%) rename {src/svg => svg}/static/dnd_no_drop.svg (100%) rename {src/svg => svg}/static/dnd_none.svg (100%) rename {src/svg => svg}/static/dotbox.svg (100%) rename {src/svg => svg}/static/fd_double_arrow.svg (100%) rename {src/svg => svg}/static/grabbing.svg (100%) rename {src/svg => svg}/static/hand1.svg (100%) rename {src/svg => svg}/static/hand2.svg (100%) rename {src/svg => svg}/static/left_ptr.svg (100%) rename {src/svg => svg}/static/left_side.svg (100%) rename {src/svg => svg}/static/left_tee.svg (100%) rename {src/svg => svg}/static/link.svg (100%) rename {src/svg => svg}/static/ll_angle.svg (100%) rename {src/svg => svg}/static/lr_angle.svg (100%) rename {src/svg => svg}/static/move.svg (100%) rename {src/svg => svg}/static/pencil.svg (100%) rename {src/svg => svg}/static/plus.svg (100%) rename {src/svg => svg}/static/pointer_move.svg (100%) rename {src/svg => svg}/static/question_arrow.svg (100%) rename {src/svg => svg}/static/right_ptr.svg (100%) rename {src/svg => svg}/static/right_side.svg (100%) rename {src/svg => svg}/static/right_tee.svg (100%) rename {src/svg => svg}/static/sb_down_arrow.svg (100%) rename {src/svg => svg}/static/sb_h_double_arrow.svg (100%) rename {src/svg => svg}/static/sb_left_arrow.svg (100%) rename {src/svg => svg}/static/sb_right_arrow.svg (100%) rename {src/svg => svg}/static/sb_up_arrow.svg (100%) rename {src/svg => svg}/static/sb_v_double_arrow.svg (100%) rename {src/svg => svg}/static/tcross.svg (100%) rename {src/svg => svg}/static/top_left_corner.svg (100%) rename {src/svg => svg}/static/top_right_corner.svg (100%) rename {src/svg => svg}/static/top_side.svg (100%) rename {src/svg => svg}/static/top_tee.svg (100%) rename {src/svg => svg}/static/ul_angle.svg (100%) rename {src/svg => svg}/static/ur_angle.svg (100%) rename {src/svg => svg}/static/vertical_text.svg (100%) rename {src/svg => svg}/static/wayland_cursor.svg (100%) rename {src/svg => svg}/static/x_cursor.svg (100%) rename {src/svg => svg}/static/xterm.svg (100%) rename {src/svg => svg}/static/zoom_in.svg (100%) rename {src/svg => svg}/static/zoom_out.svg (100%) diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 222861c..0000000 --- a/.prettierrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "tabWidth": 2, - "useTabs": false -} diff --git a/bitmap/package.json b/bitmap/package.json new file mode 100644 index 0000000..c6178db --- /dev/null +++ b/bitmap/package.json @@ -0,0 +1,26 @@ +{ + "name": "apple_cursor_bitmap", + "version": "1.0.7", + "main": "index.js", + "scripts": { + "watch": "nodemon --inspect src/index.ts", + "render": "yarn ts-node src/index.ts" + }, + "repository": "git@github.com:ful1e5/apple_cursor.git", + "author": "Kaiz Khatri", + "license": "GPL-3.0", + "private": true, + "devDependencies": { + "@types/pixelmatch": "^5.2.2", + "@types/pngjs": "^3.4.2", + "@types/puppeteer": "^5.4.2", + "nodemon": "^2.0.7", + "ts-node": "^9.1.1", + "typescript": "^4.1.3" + }, + "dependencies": { + "pixelmatch": "^5.2.1", + "pngjs": "^6.0.0", + "puppeteer": "^5.5.0" + } +} diff --git a/bitmap/src/config.ts b/bitmap/src/config.ts new file mode 100644 index 0000000..b4d523f --- /dev/null +++ b/bitmap/src/config.ts @@ -0,0 +1,23 @@ +import path from "path"; +import { readdirSync, existsSync } from "fs"; + +// Directory resolve +const projectRoot = path.resolve(__dirname, "../../"); + +const outDir = path.resolve(projectRoot, "pngs"); +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"); +} + +const staticCursors = readdirSync(staticSvgDir).map((f) => + path.resolve(staticSvgDir, f) +); +const animatedCursors = readdirSync(animatedSvgDir).map((f) => + path.resolve(animatedSvgDir, f) +); + +export { staticCursors, animatedCursors, outDir }; diff --git a/src/index.ts b/bitmap/src/index.ts similarity index 90% rename from src/index.ts rename to bitmap/src/index.ts index c08db83..c914757 100644 --- a/src/index.ts +++ b/bitmap/src/index.ts @@ -5,7 +5,7 @@ import Pixelmatch from "pixelmatch"; import { PNG } from "pngjs"; import puppeteer, { ElementHandle, Page } from "puppeteer"; -import { animatedCursors, bitmapsDir, staticCursors } from "./config"; +import { animatedCursors, outDir, staticCursors } from "./config"; import { getFrameName } from "./utils/getFrameName"; import { toHTML } from "./utils/toHTML"; @@ -26,7 +26,7 @@ const screenshot = async (element: ElementHandle): Promise => { }; const saveFrame = (key: string, frame: Buffer) => { - const out_path = path.resolve(bitmapsDir, key); + const out_path = path.resolve(outDir, key); fs.writeFileSync(out_path, frame, { encoding: "binary" }); }; @@ -36,8 +36,10 @@ const main = async () => { headless: true, }); - if (!fs.existsSync(bitmapsDir)) { - fs.mkdirSync(bitmapsDir); + if (!fs.existsSync(outDir)) { + fs.mkdirSync(outDir); + } else { + throw new Error(`out directory '${outDir}' already exists.`); } for (const svgFilePath of staticCursors) { @@ -53,7 +55,7 @@ const main = async () => { const svg = await getSVGElement(page); const key = `${path.basename(svgFilePath, ".svg")}.png`; - const out = path.join(bitmapsDir, key); + const out = path.join(outDir, key); console.log("Saving", key, "..."); await svg.screenshot({ omitBackground: true, path: out }); diff --git a/src/utils/getFrameName.ts b/bitmap/src/utils/getFrameName.ts similarity index 100% rename from src/utils/getFrameName.ts rename to bitmap/src/utils/getFrameName.ts diff --git a/src/utils/toHTML.ts b/bitmap/src/utils/toHTML.ts similarity index 100% rename from src/utils/toHTML.ts rename to bitmap/src/utils/toHTML.ts diff --git a/bitmap/tsconfig.json b/bitmap/tsconfig.json new file mode 100644 index 0000000..9bb0cc5 --- /dev/null +++ b/bitmap/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "strict": true, + "noUnusedLocals": true, + "strictNullChecks": true, + "esModuleInterop": true, + "target": "ES2015", + "module": "commonjs", + "lib": ["es2015", "dom"], + "noUnusedParameters": true + } +} diff --git a/yarn.lock b/bitmap/yarn.lock similarity index 86% rename from yarn.lock rename to bitmap/yarn.lock index 08595e3..df97966 100644 --- a/yarn.lock +++ b/bitmap/yarn.lock @@ -2,27 +2,6 @@ # yarn lockfile v1 -"@babel/code-frame@^7.0.0": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" - integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== - dependencies: - "@babel/highlight" "^7.10.4" - -"@babel/helper-validator-identifier@^7.10.4": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed" - integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw== - -"@babel/highlight@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143" - integrity sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA== - dependencies: - "@babel/helper-validator-identifier" "^7.10.4" - chalk "^2.0.0" - js-tokens "^4.0.0" - "@sindresorhus/is@^0.14.0": version "0.14.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" @@ -54,10 +33,10 @@ dependencies: "@types/node" "*" -"@types/puppeteer@^3.0.1": - version "3.0.5" - resolved "https://registry.yarnpkg.com/@types/puppeteer/-/puppeteer-3.0.5.tgz#5ef5d023f45c0dfcc82e97548891b11b6ce868fb" - integrity sha512-NkphUMkpbr/us6hp1AqUh/UxX5Tf2UJU94MvaF8OOgIUPBipYodql+yRjcysJKqwnDkchp+cD/8jntI/C9StzA== +"@types/puppeteer@^5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@types/puppeteer/-/puppeteer-5.4.2.tgz#80f3a1f54dedbbf750779716de81401549062072" + integrity sha512-yjbHoKjZFOGqA6bIEI2dfBE5UPqU0YGWzP+ipDVP1iGzmlhksVKTBVZfT3Aj3wnvmcJ2PQ9zcncwOwyavmafBw== dependencies: "@types/node" "*" @@ -95,13 +74,6 @@ ansi-regex@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" @@ -122,13 +94,6 @@ arg@^4.1.0: resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" @@ -200,11 +165,6 @@ buffer@^5.2.1, buffer@^5.5.0: base64-js "^1.3.1" ieee754 "^1.1.13" -builtin-modules@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" - integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= - cacheable-request@^6.0.0: version "6.1.0" resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912" @@ -223,15 +183,6 @@ camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -chalk@^2.0.0, chalk@^2.3.0: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - chalk@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" @@ -277,13 +228,6 @@ clone-response@^1.0.2: dependencies: mimic-response "^1.0.0" -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - color-convert@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" @@ -291,21 +235,11 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - color-name@~1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -commander@^2.12.1: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -323,6 +257,11 @@ configstore@^5.0.1: write-file-atomic "^3.0.0" xdg-basedir "^4.0.0" +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + crypto-random-string@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" @@ -410,16 +349,6 @@ escape-goat@^2.0.0: resolved "https://registry.yarnpkg.com/escape-goat/-/escape-goat-2.1.1.tgz#1b2dc77003676c457ec760b2dc68edb648188675" integrity sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q== -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - extract-zip@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a" @@ -468,11 +397,6 @@ fsevents@~2.3.1: resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.1.tgz#b209ab14c61012636c8863507edf7fb68cc54e9f" integrity sha512-YR47Eg4hChJGAB1O3yEAOkGO+rlzutoICGqGo9EZ4lKWokzZRSyIW1QmTzqjtw8MJdj9srP869CuWw/hyzSiBw== -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - get-stream@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" @@ -494,7 +418,7 @@ glob-parent@~5.1.0: dependencies: is-glob "^4.0.1" -glob@^7.1.1, glob@^7.1.3: +glob@^7.1.3: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -550,13 +474,6 @@ has-yarn@^2.1.0: resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-2.1.0.tgz#137e11354a7b5bf11aa5cb649cf0c6f3ff2b2e77" integrity sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw== -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - http-cache-semantics@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" @@ -627,13 +544,6 @@ is-ci@^2.0.0: dependencies: ci-info "^2.0.0" -is-core-module@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" - integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== - dependencies: - has "^1.0.3" - is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -694,19 +604,6 @@ is-yarn-global@^0.3.0: resolved "https://registry.yarnpkg.com/is-yarn-global/-/is-yarn-global-0.3.0.tgz#d502d3382590ea3004893746754c89139973e232" integrity sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw== -js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-yaml@^3.13.1: - version "3.14.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" - integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - json-buffer@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" @@ -767,7 +664,7 @@ minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" -minimist@^1.2.0, minimist@^1.2.5: +minimist@^1.2.0: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== @@ -777,13 +674,6 @@ mkdirp-classic@^0.5.2: resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== -mkdirp@^0.5.3: - version "0.5.5" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" - integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== - dependencies: - minimist "^1.2.5" - ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -804,7 +694,7 @@ node-fetch@^2.6.1: resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== -nodemon@^2.0.4: +nodemon@^2.0.7: version "2.0.7" resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-2.0.7.tgz#6f030a0a0ebe3ea1ba2a38f71bf9bab4841ced32" integrity sha512-XHzK69Awgnec9UzHr1kc8EomQh4sjTQ8oRf8TsGrSmHDx9/UmiGG9E/mM3BuTfNeFwdNBvrqQq/RHL0xIeyFOA== @@ -888,11 +778,6 @@ path-is-absolute@^1.0.0: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -path-parse@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== - pend@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" @@ -962,7 +847,7 @@ pupa@^2.0.1: dependencies: escape-goat "^2.0.0" -puppeteer@^5.2.1: +puppeteer@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-5.5.0.tgz#331a7edd212ca06b4a556156435f58cbae08af00" integrity sha512-OM8ZvTXAhfgFA7wBIIGlPQzvyEETzDjeRa4mZRCRHxYL+GNH5WAuYUQdja3rpWZvkX/JKqmuVgbsxDNsDFjMEg== @@ -1020,14 +905,6 @@ registry-url@^5.0.0: dependencies: rc "^1.2.8" -resolve@^1.3.2: - version "1.19.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" - integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== - dependencies: - is-core-module "^2.1.0" - path-parse "^1.0.6" - responselike@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" @@ -1054,7 +931,7 @@ semver-diff@^3.1.1: dependencies: semver "^6.3.0" -semver@^5.3.0, semver@^5.7.1: +semver@^5.7.1: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -1082,11 +959,6 @@ source-map@^0.6.0: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= - string-width@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" @@ -1131,7 +1003,7 @@ strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= -supports-color@^5.3.0, supports-color@^5.5.0: +supports-color@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== @@ -1195,48 +1067,18 @@ touch@^3.1.0: dependencies: nopt "~1.0.10" -ts-node@^8.10.2: - version "8.10.2" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.10.2.tgz#eee03764633b1234ddd37f8db9ec10b75ec7fb8d" - integrity sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA== +ts-node@^9.1.1: + version "9.1.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.1.1.tgz#51a9a450a3e959401bda5f004a72d54b936d376d" + integrity sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg== dependencies: arg "^4.1.0" + create-require "^1.1.0" diff "^4.0.1" make-error "^1.1.1" source-map-support "^0.5.17" yn "3.1.1" -tslib@^1.13.0, tslib@^1.8.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" - integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - -tslint@^6.1.2: - version "6.1.3" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-6.1.3.tgz#5c23b2eccc32487d5523bd3a470e9aa31789d904" - integrity sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg== - dependencies: - "@babel/code-frame" "^7.0.0" - builtin-modules "^1.1.1" - chalk "^2.3.0" - commander "^2.12.1" - diff "^4.0.1" - glob "^7.1.1" - js-yaml "^3.13.1" - minimatch "^3.0.4" - mkdirp "^0.5.3" - resolve "^1.3.2" - semver "^5.3.0" - tslib "^1.13.0" - tsutils "^2.29.0" - -tsutils@^2.29.0: - version "2.29.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99" - integrity sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA== - dependencies: - tslib "^1.8.1" - type-fest@^0.8.1: version "0.8.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" @@ -1249,10 +1091,10 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typescript@^3.9.7: - version "3.9.7" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa" - integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw== +typescript@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7" + integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg== unbzip2-stream@^1.3.3: version "1.4.3" diff --git a/nodemon.json b/nodemon.json deleted file mode 100644 index cde9605..0000000 --- a/nodemon.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "restartable": "rs", - "ignore": [".git", "node_modules/**/node_modules"], - "verbose": true, - "execMap": { - "ts": "node --require ts-node/register" - }, - "watch": ["src/"], - "env": { - "NODE_ENV": "development" - }, - "ext": "js,json,ts" -} diff --git a/package.json b/package.json deleted file mode 100644 index 1ddaefa..0000000 --- a/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "apple_cursor", - "version": "1.0.6", - "description": "🍎 macOS Cursor Theme", - "main": "index.js", - "scripts": { - "clean": "rm -rf bitmaps themes", - "dev": "nodemon src/index.ts", - "watch": "nodemon --inspect src/index.ts", - "py_install": "pip install -r requirements.txt", - "render": "yarn ts-node src/index.ts", - "build": "python build.py", - "compile": "yarn clean && yarn render && yarn build" - }, - "repository": "git@github.com:ful1e5/apple_cursor.git", - "author": "Kaiz Khatri", - "license": "GPL-3.0", - "private": true, - "devDependencies": { - "@types/pixelmatch": "^5.2.2", - "@types/pngjs": "^3.4.2", - "@types/puppeteer": "^3.0.1", - "nodemon": "^2.0.4", - "ts-node": "^8.10.2", - "tslint": "^6.1.2", - "typescript": "^3.9.7" - }, - "dependencies": { - "pixelmatch": "^5.2.1", - "pngjs": "^6.0.0", - "puppeteer": "^5.2.1" - } -} diff --git a/src/config.ts b/src/config.ts deleted file mode 100644 index 3aa67cc..0000000 --- a/src/config.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { resolve } from "path"; -import { readdirSync, existsSync } from "fs"; - -// Source Directory -const staticCursorsDir = resolve(__dirname, "svg", "static"); -const animatedCursorsDir = resolve(__dirname, "svg", "animated"); - -if (!existsSync(staticCursorsDir) || !existsSync(animatedCursorsDir)) { - throw new Error("svg directory not found"); -} - -// Out Directory -const bitmapsDir = resolve(__dirname, "../", "bitmaps"); - -// Cursors -const staticCursors = readdirSync(staticCursorsDir).map((f) => - resolve(staticCursorsDir, f) -); -const animatedCursors = readdirSync(animatedCursorsDir).map((f) => - resolve(animatedCursorsDir, f) -); - -export { staticCursors, animatedCursors, bitmapsDir }; diff --git a/src/svg/README.md b/svg/README.md similarity index 100% rename from src/svg/README.md rename to svg/README.md diff --git a/src/svg/animated/left_ptr_watch.svg b/svg/animated/left_ptr_watch.svg similarity index 100% rename from src/svg/animated/left_ptr_watch.svg rename to svg/animated/left_ptr_watch.svg diff --git a/src/svg/animated/wait.svg b/svg/animated/wait.svg similarity index 100% rename from src/svg/animated/wait.svg rename to svg/animated/wait.svg diff --git a/src/svg/static/all_scroll.svg b/svg/static/all_scroll.svg similarity index 100% rename from src/svg/static/all_scroll.svg rename to svg/static/all_scroll.svg diff --git a/src/svg/static/bd_double_arrow.svg b/svg/static/bd_double_arrow.svg similarity index 100% rename from src/svg/static/bd_double_arrow.svg rename to svg/static/bd_double_arrow.svg diff --git a/src/svg/static/bottom_left_corner.svg b/svg/static/bottom_left_corner.svg similarity index 100% rename from src/svg/static/bottom_left_corner.svg rename to svg/static/bottom_left_corner.svg diff --git a/src/svg/static/bottom_right_corner.svg b/svg/static/bottom_right_corner.svg similarity index 100% rename from src/svg/static/bottom_right_corner.svg rename to svg/static/bottom_right_corner.svg diff --git a/src/svg/static/bottom_side.svg b/svg/static/bottom_side.svg similarity index 100% rename from src/svg/static/bottom_side.svg rename to svg/static/bottom_side.svg diff --git a/src/svg/static/bottom_tee.svg b/svg/static/bottom_tee.svg similarity index 100% rename from src/svg/static/bottom_tee.svg rename to svg/static/bottom_tee.svg diff --git a/src/svg/static/center_ptr.svg b/svg/static/center_ptr.svg similarity index 100% rename from src/svg/static/center_ptr.svg rename to svg/static/center_ptr.svg diff --git a/src/svg/static/circle.svg b/svg/static/circle.svg similarity index 100% rename from src/svg/static/circle.svg rename to svg/static/circle.svg diff --git a/src/svg/static/context_menu.svg b/svg/static/context_menu.svg similarity index 100% rename from src/svg/static/context_menu.svg rename to svg/static/context_menu.svg diff --git a/src/svg/static/copy.svg b/svg/static/copy.svg similarity index 100% rename from src/svg/static/copy.svg rename to svg/static/copy.svg diff --git a/src/svg/static/cross.svg b/svg/static/cross.svg similarity index 100% rename from src/svg/static/cross.svg rename to svg/static/cross.svg diff --git a/src/svg/static/crossed_circle.svg b/svg/static/crossed_circle.svg similarity index 100% rename from src/svg/static/crossed_circle.svg rename to svg/static/crossed_circle.svg diff --git a/src/svg/static/crosshair.svg b/svg/static/crosshair.svg similarity index 100% rename from src/svg/static/crosshair.svg rename to svg/static/crosshair.svg diff --git a/src/svg/static/dnd_ask.svg b/svg/static/dnd_ask.svg similarity index 100% rename from src/svg/static/dnd_ask.svg rename to svg/static/dnd_ask.svg diff --git a/src/svg/static/dnd_copy.svg b/svg/static/dnd_copy.svg similarity index 100% rename from src/svg/static/dnd_copy.svg rename to svg/static/dnd_copy.svg diff --git a/src/svg/static/dnd_link.svg b/svg/static/dnd_link.svg similarity index 100% rename from src/svg/static/dnd_link.svg rename to svg/static/dnd_link.svg diff --git a/src/svg/static/dnd_move.svg b/svg/static/dnd_move.svg similarity index 100% rename from src/svg/static/dnd_move.svg rename to svg/static/dnd_move.svg diff --git a/src/svg/static/dnd_no_drop.svg b/svg/static/dnd_no_drop.svg similarity index 100% rename from src/svg/static/dnd_no_drop.svg rename to svg/static/dnd_no_drop.svg diff --git a/src/svg/static/dnd_none.svg b/svg/static/dnd_none.svg similarity index 100% rename from src/svg/static/dnd_none.svg rename to svg/static/dnd_none.svg diff --git a/src/svg/static/dotbox.svg b/svg/static/dotbox.svg similarity index 100% rename from src/svg/static/dotbox.svg rename to svg/static/dotbox.svg diff --git a/src/svg/static/fd_double_arrow.svg b/svg/static/fd_double_arrow.svg similarity index 100% rename from src/svg/static/fd_double_arrow.svg rename to svg/static/fd_double_arrow.svg diff --git a/src/svg/static/grabbing.svg b/svg/static/grabbing.svg similarity index 100% rename from src/svg/static/grabbing.svg rename to svg/static/grabbing.svg diff --git a/src/svg/static/hand1.svg b/svg/static/hand1.svg similarity index 100% rename from src/svg/static/hand1.svg rename to svg/static/hand1.svg diff --git a/src/svg/static/hand2.svg b/svg/static/hand2.svg similarity index 100% rename from src/svg/static/hand2.svg rename to svg/static/hand2.svg diff --git a/src/svg/static/left_ptr.svg b/svg/static/left_ptr.svg similarity index 100% rename from src/svg/static/left_ptr.svg rename to svg/static/left_ptr.svg diff --git a/src/svg/static/left_side.svg b/svg/static/left_side.svg similarity index 100% rename from src/svg/static/left_side.svg rename to svg/static/left_side.svg diff --git a/src/svg/static/left_tee.svg b/svg/static/left_tee.svg similarity index 100% rename from src/svg/static/left_tee.svg rename to svg/static/left_tee.svg diff --git a/src/svg/static/link.svg b/svg/static/link.svg similarity index 100% rename from src/svg/static/link.svg rename to svg/static/link.svg diff --git a/src/svg/static/ll_angle.svg b/svg/static/ll_angle.svg similarity index 100% rename from src/svg/static/ll_angle.svg rename to svg/static/ll_angle.svg diff --git a/src/svg/static/lr_angle.svg b/svg/static/lr_angle.svg similarity index 100% rename from src/svg/static/lr_angle.svg rename to svg/static/lr_angle.svg diff --git a/src/svg/static/move.svg b/svg/static/move.svg similarity index 100% rename from src/svg/static/move.svg rename to svg/static/move.svg diff --git a/src/svg/static/pencil.svg b/svg/static/pencil.svg similarity index 100% rename from src/svg/static/pencil.svg rename to svg/static/pencil.svg diff --git a/src/svg/static/plus.svg b/svg/static/plus.svg similarity index 100% rename from src/svg/static/plus.svg rename to svg/static/plus.svg diff --git a/src/svg/static/pointer_move.svg b/svg/static/pointer_move.svg similarity index 100% rename from src/svg/static/pointer_move.svg rename to svg/static/pointer_move.svg diff --git a/src/svg/static/question_arrow.svg b/svg/static/question_arrow.svg similarity index 100% rename from src/svg/static/question_arrow.svg rename to svg/static/question_arrow.svg diff --git a/src/svg/static/right_ptr.svg b/svg/static/right_ptr.svg similarity index 100% rename from src/svg/static/right_ptr.svg rename to svg/static/right_ptr.svg diff --git a/src/svg/static/right_side.svg b/svg/static/right_side.svg similarity index 100% rename from src/svg/static/right_side.svg rename to svg/static/right_side.svg diff --git a/src/svg/static/right_tee.svg b/svg/static/right_tee.svg similarity index 100% rename from src/svg/static/right_tee.svg rename to svg/static/right_tee.svg diff --git a/src/svg/static/sb_down_arrow.svg b/svg/static/sb_down_arrow.svg similarity index 100% rename from src/svg/static/sb_down_arrow.svg rename to svg/static/sb_down_arrow.svg diff --git a/src/svg/static/sb_h_double_arrow.svg b/svg/static/sb_h_double_arrow.svg similarity index 100% rename from src/svg/static/sb_h_double_arrow.svg rename to svg/static/sb_h_double_arrow.svg diff --git a/src/svg/static/sb_left_arrow.svg b/svg/static/sb_left_arrow.svg similarity index 100% rename from src/svg/static/sb_left_arrow.svg rename to svg/static/sb_left_arrow.svg diff --git a/src/svg/static/sb_right_arrow.svg b/svg/static/sb_right_arrow.svg similarity index 100% rename from src/svg/static/sb_right_arrow.svg rename to svg/static/sb_right_arrow.svg diff --git a/src/svg/static/sb_up_arrow.svg b/svg/static/sb_up_arrow.svg similarity index 100% rename from src/svg/static/sb_up_arrow.svg rename to svg/static/sb_up_arrow.svg diff --git a/src/svg/static/sb_v_double_arrow.svg b/svg/static/sb_v_double_arrow.svg similarity index 100% rename from src/svg/static/sb_v_double_arrow.svg rename to svg/static/sb_v_double_arrow.svg diff --git a/src/svg/static/tcross.svg b/svg/static/tcross.svg similarity index 100% rename from src/svg/static/tcross.svg rename to svg/static/tcross.svg diff --git a/src/svg/static/top_left_corner.svg b/svg/static/top_left_corner.svg similarity index 100% rename from src/svg/static/top_left_corner.svg rename to svg/static/top_left_corner.svg diff --git a/src/svg/static/top_right_corner.svg b/svg/static/top_right_corner.svg similarity index 100% rename from src/svg/static/top_right_corner.svg rename to svg/static/top_right_corner.svg diff --git a/src/svg/static/top_side.svg b/svg/static/top_side.svg similarity index 100% rename from src/svg/static/top_side.svg rename to svg/static/top_side.svg diff --git a/src/svg/static/top_tee.svg b/svg/static/top_tee.svg similarity index 100% rename from src/svg/static/top_tee.svg rename to svg/static/top_tee.svg diff --git a/src/svg/static/ul_angle.svg b/svg/static/ul_angle.svg similarity index 100% rename from src/svg/static/ul_angle.svg rename to svg/static/ul_angle.svg diff --git a/src/svg/static/ur_angle.svg b/svg/static/ur_angle.svg similarity index 100% rename from src/svg/static/ur_angle.svg rename to svg/static/ur_angle.svg diff --git a/src/svg/static/vertical_text.svg b/svg/static/vertical_text.svg similarity index 100% rename from src/svg/static/vertical_text.svg rename to svg/static/vertical_text.svg diff --git a/src/svg/static/wayland_cursor.svg b/svg/static/wayland_cursor.svg similarity index 100% rename from src/svg/static/wayland_cursor.svg rename to svg/static/wayland_cursor.svg diff --git a/src/svg/static/x_cursor.svg b/svg/static/x_cursor.svg similarity index 100% rename from src/svg/static/x_cursor.svg rename to svg/static/x_cursor.svg diff --git a/src/svg/static/xterm.svg b/svg/static/xterm.svg similarity index 100% rename from src/svg/static/xterm.svg rename to svg/static/xterm.svg diff --git a/src/svg/static/zoom_in.svg b/svg/static/zoom_in.svg similarity index 100% rename from src/svg/static/zoom_in.svg rename to svg/static/zoom_in.svg diff --git a/src/svg/static/zoom_out.svg b/svg/static/zoom_out.svg similarity index 100% rename from src/svg/static/zoom_out.svg rename to svg/static/zoom_out.svg From 656d1cc60413476bb08d4e457c3b5203d08bd1b2 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Wed, 27 Jan 2021 13:00:58 +0530 Subject: [PATCH 14/63] =?UTF-8?q?=F0=9F=99=88=20Ignore=20png=20directory?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 0c12ae6..7eea436 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ ########## Custom -bitmaps -themes +pngs ########## Python From 13b9861f04fd5c5ba3c8c8cc68a8c2eaffae2945 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Wed, 27 Jan 2021 13:01:28 +0530 Subject: [PATCH 15/63] =?UTF-8?q?=E2=9A=A1=20Builder=20init?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 0 build.py | 19 -------- builder/setup.py | 0 builder/src/__init__.py | 0 builder/src/configure.py | 0 builder/src/generator.py | 0 config.py | 46 ------------------ helper.py | 61 ----------------------- hotspots.json | 102 --------------------------------------- requirements.txt | 2 - scripts/windows.inf | 52 -------------------- 11 files changed, 282 deletions(-) create mode 100644 Makefile delete mode 100644 build.py create mode 100644 builder/setup.py create mode 100644 builder/src/__init__.py create mode 100644 builder/src/configure.py create mode 100644 builder/src/generator.py delete mode 100644 config.py delete mode 100644 helper.py delete mode 100644 hotspots.json delete mode 100644 requirements.txt delete mode 100644 scripts/windows.inf diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e69de29 diff --git a/build.py b/build.py deleted file mode 100644 index 7679079..0000000 --- a/build.py +++ /dev/null @@ -1,19 +0,0 @@ -import json -import log -from clickgen import build_cursor_theme - -from config import name, sizes, delay, bitmaps_dir, temp_folder -from helper import init_build, pack_it - - -def build() -> None: - init_build() - with open('./hotspots.json', 'r') as hotspot_file: - hotspots = json.loads(hotspot_file.read()) - build_cursor_theme(name, image_dir=bitmaps_dir, - cursor_sizes=sizes, out_path=temp_folder, hotspots=hotspots, archive=False, delay=delay) - pack_it() - - -if __name__ == "__main__": - build() diff --git a/builder/setup.py b/builder/setup.py new file mode 100644 index 0000000..e69de29 diff --git a/builder/src/__init__.py b/builder/src/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/builder/src/configure.py b/builder/src/configure.py new file mode 100644 index 0000000..e69de29 diff --git a/builder/src/generator.py b/builder/src/generator.py new file mode 100644 index 0000000..e69de29 diff --git a/config.py b/config.py deleted file mode 100644 index 86ab951..0000000 --- a/config.py +++ /dev/null @@ -1,46 +0,0 @@ -import tempfile -import json - -# Build Config -delay = 50 -name = "macOSBigSur" -sizes = [22, 24, 28, 32, 40, 48, 56, 64, 72, 80, 88, 96] - -bitmaps_dir = "./bitmaps" -package_dir = "./themes" -temp_folder = tempfile.mkdtemp() - -# Cleanup Configs -x11_out = name -win_out = name + "_Windows" - -# getting author name -with open("./package.json") as f: - data = json.loads(f.read()) - author = data["author"] - -# Windows Cursors Config -windows_cursors = { - "right_ptr.cur": "Alternate.cur", - "wait.ani": "Busy.ani", - "crosshair.cur": "Cross.cur", - "left_ptr.cur": "Default.cur", - "bd_double_arrow.cur": "Diagonal_1.cur", - "fd_double_arrow.cur": "Diagonal_2.cur", - "pencil.cur": "Handwriting.cur", - "dnd-ask.cur": "Help.cur", - "sb_h_double_arrow.cur": "Horizontal.cur", - "hand2.cur": "Link.cur", - "hand1.cur": "Move.cur", - "xterm.cur": "Text.cur", - "circle.cur": "Unavailiable.cur", - "sb_v_double_arrow.cur": "Vertical.cur", - "left_ptr_watch.ani": "Work.ani", -} - -# Windows install.inf file content -with open("./scripts/windows.inf") as f: - data = f.read() - window_install_inf_content = data.replace( - "", name + " Cursors" - ).replace("", author) diff --git a/helper.py b/helper.py deleted file mode 100644 index cdf4c20..0000000 --- a/helper.py +++ /dev/null @@ -1,61 +0,0 @@ -import shutil -import json -import sys - -from config import name, temp_folder, bitmaps_dir, win_out, x11_out, window_install_inf_content, windows_cursors, package_dir -from os import path, listdir, rename, remove - - -x11_out_dir = path.join(package_dir, x11_out) -win_out_dir = path.join(package_dir, win_out) - - -def window_bundle() -> None: - # Remove & Rename cursors - # If Key found => Rename else Remove - for cursor in listdir(win_out_dir): - old_path = path.join(win_out_dir, cursor) - - try: - new_path = path.join(win_out_dir, windows_cursors[cursor]) - rename(old_path, new_path) - except KeyError: - remove(old_path) - - # creating install.inf file - install_inf_path = path.join(win_out_dir, "install.inf") - with open(install_inf_path, "w") as file: - file.write(window_install_inf_content) - - -def init_build() -> None: - """ - Print build version. - Remove previously built packages && Check Bitmaps. - """ - with open("./package.json", "r") as package_file: - data = json.loads(package_file.read()) - version = data['version'] - print("⚡ Apple Cursor Version %s" % version) - - # cleanup old packages - if path.exists(package_dir): - shutil.rmtree(package_dir) - - # Checking Bitmaps directory - if not path.exists(bitmaps_dir): - print( - "⚠ BITMAPS NOT FOUND.\n\n`yarn install && yarn render` to Generates Bitmaps") - sys.exit(1) - - -def pack_it() -> None: - """ - Create Crisp 📦 Packages for Windows & X11 Cursor Theme. - """ - # Rename directory - shutil.move(path.join(temp_folder, name, "x11"), x11_out_dir) - shutil.move(path.join(temp_folder, name, "win"), win_out_dir) - - # create install.inf file in Windows Theme - window_bundle() diff --git a/hotspots.json b/hotspots.json deleted file mode 100644 index adbba3b..0000000 --- a/hotspots.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "all_scroll": { "xhot": 100, "yhot": 100 }, - - "bottom_left_corner": { "xhot": 100, "yhot": 100 }, - "fd_double_arrow": { "xhot": 100, "yhot": 100 }, - "top_right_corner": { "xhot": 100, "yhot": 100 }, - - "bottom_right_corner": { "xhot": 100, "yhot": 100 }, - "bd_double_arrow": { "xhot": 100, "yhot": 100 }, - "top_left_corner": { "xhot": 100, "yhot": 100 }, - - "bottom_tee": { "xhot": 141, "yhot": 99 }, - - "center_ptr": { "xhot": 61, "yhot": 100 }, - - "circle": { "xhot": 47, "yhot": 39 }, - "crossed_circle": { "xhot": 47, "yhot": 39 }, - "dnd_no_drop": { "xhot": 47, "yhot": 39 }, - - "context_menu": { "xhot": 61, "yhot": 58 }, - - "copy": { "xhot": 47, "yhot": 39 }, - "dnd_copy": { "xhot": 47, "yhot": 39 }, - - "cross": { "xhot": 100, "yhot": 100 }, - "tcross": { "xhot": 100, "yhot": 100 }, - - "crosshair": { "xhot": 100, "yhot": 100 }, - - "dotbox": { "xhot": 100, "yhot": 100 }, - - "hand1": { "xhot": 94, "yhot": 105 }, - - "hand2": { "xhot": 66, "yhot": 34 }, - - "left_ptr": { "xhot": 68, "yhot": 41 }, - - "left_side": { "xhot": 100, "yhot": 100 }, - "right_side": { "xhot": 100, "yhot": 100 }, - - "left_tee": { "xhot": 100, "yhot": 58 }, - - "link": { "xhot": 61, "yhot": 105 }, - "dnd_link": { "xhot": 61, "yhot": 105 }, - - "ll_angle": { "xhot": 141, "yhot": 58 }, - - "lr_angle": { "xhot": 141, "yhot": 138 }, - - "move": { "xhot": 80, "yhot": 106 }, - "dnd_move": { "xhot": 80, "yhot": 106 }, - "dnd_none": { "xhot": 80, "yhot": 106 }, - "grabbing": { "xhot": 80, "yhot": 106 }, - "pointer_move": { "xhot": 80, "yhot": 106 }, - - "pencil": { "xhot": 141, "yhot": 58 }, - - "plus": { "xhot": 100, "yhot": 100 }, - - "question_arrow": { "xhot": 105, "yhot": 105 }, - "dnd_ask": { "xhot": 105, "yhot": 105 }, - - "right_ptr": { "xhot": 61, "yhot": 138 }, - - "right_tee": { "xhot": 100, "yhot": 138 }, - - "sb_down_arrow": { "xhot": 133, "yhot": 99 }, - - "sb_h_double_arrow": { "xhot": 100, "yhot": 100 }, - - "sb_left_arrow": { "xhot": 100, "yhot": 68 }, - - "sb_right_arrow": { "xhot": 100, "yhot": 138 }, - - "sb_up_arrow": { "xhot": 68, "yhot": 99 }, - - "sb_v_double_arrow": { "xhot": 100, "yhot": 100 }, - - "top_side": { "xhot": 100, "yhot": 100 }, - "bottom_side": { "xhot": 100, "yhot": 100 }, - - "top_tee": { "xhot": 61, "yhot": 99 }, - - "ul_angle": { "xhot": 61, "yhot": 65 }, - - "ur_angle": { "xhot": 61, "yhot": 138 }, - - "vertical_text": { "xhot": 100, "yhot": 102 }, - - "wait": { "xhot": 104, "yhot": 105 }, - "left_ptr_watch": { "xhot": 104, "yhot": 105 }, - - "wayland_cursor": { "xhot": 100, "yhot": 100 }, - - "x_cursor": { "xhot": 100, "yhot": 100 }, - - "xterm": { "xhot": 97, "yhot": 97 }, - - "zoom_in": { "xhot": 76, "yhot": 78 }, - - "zoom_out": { "xhot": 76, "yhot": 78 } -} diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 4c7f1ea..0000000 --- a/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -clickgen==1.1.7 -Pillow==8.0.1 diff --git a/scripts/windows.inf b/scripts/windows.inf deleted file mode 100644 index eed64a2..0000000 --- a/scripts/windows.inf +++ /dev/null @@ -1,52 +0,0 @@ -[Version] -signature="$CHICAGO$" - By Kaiz Khatri -https://github.com/ful1e5/apple_cursor - -[DefaultInstall] -CopyFiles = Scheme.Cur -AddReg = Scheme.Reg - -[DestinationDirs] -Scheme.Cur = 10,"%CUR_DIR%" - -[Scheme.Reg] -HKCU,"Control Panel\Cursors\Schemes","%SCHEME_NAME%",,"%10%\%CUR_DIR%\%pointer%,%10%\%CUR_DIR%\%help%,%10%\%CUR_DIR%\%work%,%10%\%CUR_DIR%\%busy%,%10%\%CUR_DIR%\%Cross%,%10%\%CUR_DIR%\%Text%,%10%\%CUR_DIR%\%Hand%,%10%\%CUR_DIR%\%Unavailiable%,%10%\%CUR_DIR%\%Vert%,%10%\%CUR_DIR%\%Horz%,%10%\%CUR_DIR%\%Dgn1%,%10%\%CUR_DIR%\%Dgn2%,%10%\%CUR_DIR%\%move%,%10%\%CUR_DIR%\%alternate%,%10%\%CUR_DIR%\%link%" - -; -- Installed files - -[Scheme.Cur] -"Default.cur" -"Help.cur" -"Work.ani" -"Busy.ani" -"Cross.cur" -"Text.cur" -"Handwriting.cur" -"Unavailiable.cur" -"Vertical.cur" -"Horizontal.cur" -"Diagonal_1.cur" -"Diagonal_2.cur" -"Move.cur" -"Alternate.cur" -"Link.cur" - -[Strings] -CUR_DIR = "Cursors\" -SCHEME_NAME = "" -pointer = "Default.cur" -help = "Help.cur" -work = "Work.ani" -busy = "Busy.ani" -cross = "Cross.cur" -text = "Text.cur" -hand = "Handwriting.cur" -unavailiable = "Unavailiable.cur" -vert = "Vertical.cur" -horz = "Horizontal.cur" -dgn1 = "Diagonal_1.cur" -dgn2 = "Diagonal_2.cur" -move = "Move.cur" -alternate = "Alternate.cur" -link = "Link.cur" \ No newline at end of file From 526f3c02e2f1460ec21bb6c9f207fffd3352dc1b Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Wed, 27 Jan 2021 16:13:25 +0530 Subject: [PATCH 16/63] =?UTF-8?q?=E2=9A=A1=20Builder=20package=20structure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- builder/{src => applbuild}/__init__.py | 0 builder/applbuild/configure.py | 6 ++++++ builder/applbuild/generator.py | 6 ++++++ builder/build.py | 6 ++++++ builder/setup.py | 22 ++++++++++++++++++++++ builder/src/configure.py | 0 builder/src/generator.py | 0 7 files changed, 40 insertions(+) rename builder/{src => applbuild}/__init__.py (100%) create mode 100644 builder/applbuild/configure.py create mode 100644 builder/applbuild/generator.py create mode 100644 builder/build.py delete mode 100644 builder/src/configure.py delete mode 100644 builder/src/generator.py diff --git a/builder/src/__init__.py b/builder/applbuild/__init__.py similarity index 100% rename from builder/src/__init__.py rename to builder/applbuild/__init__.py diff --git a/builder/applbuild/configure.py b/builder/applbuild/configure.py new file mode 100644 index 0000000..e91a892 --- /dev/null +++ b/builder/applbuild/configure.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + + +def gg() -> None: + print("sdsd") \ No newline at end of file diff --git a/builder/applbuild/generator.py b/builder/applbuild/generator.py new file mode 100644 index 0000000..2a8499b --- /dev/null +++ b/builder/applbuild/generator.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + + +def build() -> None: + print("hdddddd") \ No newline at end of file diff --git a/builder/build.py b/builder/build.py new file mode 100644 index 0000000..b8d965c --- /dev/null +++ b/builder/build.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from applbuild.generator import build + +build() \ No newline at end of file diff --git a/builder/setup.py b/builder/setup.py index e69de29..5d377fd 100644 --- a/builder/setup.py +++ b/builder/setup.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from setuptools import setup + +setup( + name="applbuild", + version="1.0.7", + description="Generate 'macOSBigSur' cursor theme from PNGs file", + url="https://github.com/ful1e5/apple_cursor", + packages=["applbuild"], + package_dir={"applbuild": "applbuild"}, + author="Kaiz Khatri", + author_email="kaizmandhu@gamil.com", + install_requires=["clickgen==1.1.8"], + classifiers=[ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", + ], + python_requires=">=3.8", + zip_safe=True, +) \ No newline at end of file diff --git a/builder/src/configure.py b/builder/src/configure.py deleted file mode 100644 index e69de29..0000000 diff --git a/builder/src/generator.py b/builder/src/generator.py deleted file mode 100644 index e69de29..0000000 From 37d0dfca4d58480ae6a2b21a2b4cdd853d776f84 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Wed, 27 Jan 2021 17:16:21 +0530 Subject: [PATCH 17/63] =?UTF-8?q?=F0=9F=96=BC=EF=B8=8F=20Equal=20width=20&?= =?UTF-8?q?=20height?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- svg/static/hand1.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svg/static/hand1.svg b/svg/static/hand1.svg index 032bde8..5b97d7f 100644 --- a/svg/static/hand1.svg +++ b/svg/static/hand1.svg @@ -1,4 +1,4 @@ - + From 1b4fdce0b5d55afce3acf4fc1a23023cc644995a Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Wed, 27 Jan 2021 17:16:52 +0530 Subject: [PATCH 18/63] =?UTF-8?q?=E2=9A=A1=20Build=20UNIX=20&=20Windows=20?= =?UTF-8?q?cursor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + builder/applbuild/configure.py | 54 +++++++++++++++- builder/applbuild/constants.py | 114 +++++++++++++++++++++++++++++++++ builder/applbuild/generator.py | 112 +++++++++++++++++++++++++++++++- builder/build.py | 9 ++- builder/setup.py | 2 +- 6 files changed, 285 insertions(+), 7 deletions(-) create mode 100644 builder/applbuild/constants.py diff --git a/.gitignore b/.gitignore index 7eea436..6746903 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ ########## Custom pngs +themes ########## Python diff --git a/builder/applbuild/configure.py b/builder/applbuild/configure.py index e91a892..5e107d6 100644 --- a/builder/applbuild/configure.py +++ b/builder/applbuild/configure.py @@ -1,6 +1,56 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +from pathlib import Path +from typing import Any, Dict, List, Tuple, Union -def gg() -> None: - print("sdsd") \ No newline at end of file +from clickgen.util import LikePath, PNGProvider + +from applbuild.constants import * + + +def get_config(bitmaps_dir: LikePath) -> Dict[str, Any]: + """Return configuration of `macOSBigSur` pointers. + + :bitmaps_dir: (str | Path) Path to .png file's directory. + """ + + png = PNGProvider(bitmaps_dir) + config: Dict[str, Any] = {} + + for key, item in X_CURSORS_CFG.items(): + x_hot: int = item.get("x_hot", 0) + y_hot: int = item.get("y_hot", 0) + hotspot: Tuple[int, int] = (x_hot, y_hot) + + delay: int = item.get("delay", X_DELAY) + p: Union[List[Path], Path] = png.get(key) + + data = { + "png": p, + "hotspot": hotspot, + "delay": delay, + } + + win_data = WIN_CURSORS_CFG.get(key) + + if win_data: + win_key = win_data.get("to") + + position = win_data.get("position", "center") + canvas_size: Tuple[int, int] = win_data.get("canvas_size", CANVAS_SIZE) + size: Tuple[int, int] = win_data.get("size", SIZE) + win_delay: int = win_data.get("delay", WIN_DELAY) + + config[key] = { + **data, + "win_key": win_key, + "position": position, + "canvas_size": canvas_size, + "size": size, + "win_delay": win_delay, + } + else: + config[key] = data + + return config diff --git a/builder/applbuild/constants.py b/builder/applbuild/constants.py new file mode 100644 index 0000000..14367a2 --- /dev/null +++ b/builder/applbuild/constants.py @@ -0,0 +1,114 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from typing import Dict, List, Tuple + +# Info +THEME_NAME = "macOSBigSur" +COMMENT = "macOS Big Sur Pointers" +AUTHOR = "Kaiz Khatri" +URL = "https://github.com/ful1e5/apple_cursor" + +# XCursor +X_DELAY: int = 10 +X_SIZES: List[Tuple[int, int]] = [(24, 24), (32, 32)] + + +# Windows Cursor +CANVAS_SIZE = (32, 32) +SIZE = (24, 24) +WIN_DELAY = 3 + +X_CURSORS_CFG: Dict[str, Dict[str, int]] = { + # + # Static + # + "all_scroll.png": {"xhot": 100, "yhot": 100}, + "bottom_left_corner.png": {"xhot": 100, "yhot": 100}, + "fd_double_arrow.png": {"xhot": 100, "yhot": 100}, + "top_right_corner.png": {"xhot": 100, "yhot": 100}, + "bottom_right_corner.png": {"xhot": 100, "yhot": 100}, + "bd_double_arrow.png": {"xhot": 100, "yhot": 100}, + "top_left_corner.png": {"xhot": 100, "yhot": 100}, + "bottom_tee.png": {"xhot": 141, "yhot": 99}, + "center_ptr.png": {"xhot": 61, "yhot": 100}, + "circle.png": {"xhot": 47, "yhot": 39}, + "crossed_circle.png": {"xhot": 47, "yhot": 39}, + "dnd_no_drop.png": {"xhot": 47, "yhot": 39}, + "context_menu.png": {"xhot": 61, "yhot": 58}, + "copy.png": {"xhot": 47, "yhot": 39}, + "dnd_copy.png": {"xhot": 47, "yhot": 39}, + "cross.png": {"xhot": 100, "yhot": 100}, + "tcross.png": {"xhot": 100, "yhot": 100}, + "crosshair.png": {"xhot": 100, "yhot": 100}, + "dotbox.png": {"xhot": 100, "yhot": 100}, + "hand1.png": {"xhot": 94, "yhot": 105}, + "hand2.png": {"xhot": 66, "yhot": 34}, + "left_ptr.png": {"xhot": 68, "yhot": 41}, + "left_side.png": {"xhot": 100, "yhot": 100}, + "right_side.png": {"xhot": 100, "yhot": 100}, + "left_tee.png": {"xhot": 100, "yhot": 58}, + "link.png": {"xhot": 61, "yhot": 105}, + "dnd_link.png": {"xhot": 61, "yhot": 105}, + "ll_angle.png": {"xhot": 141, "yhot": 58}, + "lr_angle.png": {"xhot": 141, "yhot": 138}, + "move.png": {"xhot": 80, "yhot": 106}, + "dnd_move.png": {"xhot": 80, "yhot": 106}, + "dnd_none.png": {"xhot": 80, "yhot": 106}, + "grabbing.png": {"xhot": 80, "yhot": 106}, + "pointer_move.png": {"xhot": 80, "yhot": 106}, + "pencil.png": {"xhot": 141, "yhot": 58}, + "plus.png": {"xhot": 100, "yhot": 100}, + "question_arrow.png": {"xhot": 105, "yhot": 105}, + "dnd_ask.png": {"xhot": 105, "yhot": 105}, + "right_ptr.png": {"xhot": 61, "yhot": 138}, + "right_tee.png": {"xhot": 100, "yhot": 138}, + "sb_down_arrow.png": {"xhot": 133, "yhot": 99}, + "sb_h_double_arrow.png": {"xhot": 100, "yhot": 100}, + "sb_left_arrow.png": {"xhot": 100, "yhot": 68}, + "sb_right_arrow.png": {"xhot": 100, "yhot": 138}, + "sb_up_arrow.png": {"xhot": 68, "yhot": 99}, + "sb_v_double_arrow.png": {"xhot": 100, "yhot": 100}, + "top_side.png": {"xhot": 100, "yhot": 100}, + "bottom_side.png": {"xhot": 100, "yhot": 100}, + "top_tee.png": {"xhot": 61, "yhot": 99}, + "ul_angle.png": {"xhot": 61, "yhot": 65}, + "ur_angle.png": {"xhot": 61, "yhot": 138}, + "vertical_text.png": {"xhot": 100, "yhot": 102}, + "wayland_cursor.png": {"xhot": 100, "yhot": 100}, + "x_cursor.png": {"xhot": 100, "yhot": 100}, + "xterm.png": {"xhot": 97, "yhot": 97}, + "zoom_in.png": {"xhot": 76, "yhot": 78}, + "zoom_out.png": {"xhot": 76, "yhot": 78}, + # + # Animated + # + # Note: Animated cursors not need any extension & frames number + "wait": {"xhot": 104, "yhot": 105}, + "left_ptr_watch": {"xhot": 104, "yhot": 105}, +} + +WIN_CURSORS_CFG: Dict[str, Dict[str, str]] = { + # + # Static + # + "right_ptr.png": {"to": "Alternate", "position": "top_left"}, + "cross.png": {"to": "Cross"}, + "left_ptr.png": {"to": "Default", "position": "top_left"}, + "fd_double_arrow.png": {"to": "Diagonal_1"}, + "bd_double_arrow.png": {"to": "Diagonal_2"}, + "pencil.png": {"to": "Handwriting"}, + "question_arrow.png": {"to": "Help", "position.png": "top_left"}, + "sb_h_double_arrow.png": {"to": "Horizontal"}, + "xterm.png": {"to": "IBeam", "position": "top_left"}, + "hand2.png": {"to": "Link", "position": "top_left"}, + "hand1.png": {"to": "Move"}, + "circle.png": {"to": "Unavailiable", "position": "top_left"}, + "sb_v_double_arrow.png": {"to": "Vertical"}, + # + # Animated + # + # Note: Animated cursors not need any extension & frames number + "wait": {"to": "Busy", "size": (28, 28)}, + "left_ptr_watch": {"to": "Work", "position": "top_left", "size": (28, 28)}, +} diff --git a/builder/applbuild/generator.py b/builder/applbuild/generator.py index 2a8499b..f541cbd 100644 --- a/builder/applbuild/generator.py +++ b/builder/applbuild/generator.py @@ -1,6 +1,114 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +from pathlib import Path +from typing import Any -def build() -> None: - print("hdddddd") \ No newline at end of file +from clickgen.builders import WindowsCursor, XCursor +from clickgen.core import CursorAlias +from clickgen.packagers import WindowsPackager, XPackager +from clickgen.util import LikePath, add_missing_xcursors + +from applbuild.configure import get_config +from applbuild.constants import * + +# +# 📝 Note: All CONSTANT variables are imported from `applbuild.constants` module. +# + + +def xbuild(bitmaps_dir: LikePath, x_out_dir: Path) -> None: + """Build `macOSBigSur` cursor theme for only `X11`(UNIX) platform. + + :bitmaps_dir: (str | Path) Path to .png file's directory. + + :x_out_dir: (Path) Path to output directory, Where X11 cursor theme package store. Created automatically if not exists. + """ + + config = get_config(bitmaps_dir) + + # Building + for _, item in config.items(): + png = item["png"] + hotspot = item["hotspot"] + delay = item["delay"] + + with CursorAlias.from_bitmap(png, hotspot) as alias: + x_cfg = alias.create(X_SIZES, delay) + XCursor.create(x_cfg, x_out_dir) + + add_missing_xcursors(x_out_dir / "cursors", rename=True, force=True) + XPackager(x_out_dir, THEME_NAME, COMMENT) + + +def wbuild(bitmaps_dir: LikePath, win_out_dir: Path) -> None: + """Build `macOSBigSur` cursor theme for only `Windows` platforms. + + :bitmaps_dir: (str | Path) Path to .png file's directory. + + :win_out_dir: (Path) Path to output directory, Where Windows Cursor theme package store. Created automatically if not exists. + """ + + config = get_config(bitmaps_dir) + + # Building + for _, item in config.items(): + png = item["png"] + hotspot = item["hotspot"] + delay = item["delay"] + + with CursorAlias.from_bitmap(png, hotspot) as alias: + alias = alias.create(X_SIZES, delay) + + if item.get("win_key"): + position = item["position"] + size = item["size"] + win_key = item["win_key"] + canvas_size = item["canvas_size"] + + win_cfg = alias.reproduce(size, canvas_size, position, delay=3).rename( + win_key + ) + WindowsCursor.create(win_cfg, win_out_dir) + + WindowsPackager(win_out_dir, THEME_NAME, COMMENT, AUTHOR, URL) + + +def build(bitmaps_dir: LikePath, x_out_dir: Path, win_out_dir: Path) -> None: + """Build `macOSBigSur` cursor theme for `X11` & `Windows` platforms. + + :bitmaps_dir: (str | Path) Path to .png file's directory. + + :x_out_dir: (Path) Path to output directory, Where X11 cursor theme package store. Created automatically if not exists. + + :win_out_dir: (Path) Path to output directory, Where Windows Cursor theme package store. Created automatically if not exists. + """ + + def win_build(item: Any, alias: CursorAlias) -> None: + position = item["position"] + size = item["size"] + win_key = item["win_key"] + canvas_size = item["canvas_size"] + + win_cfg = alias.reproduce(size, canvas_size, position, delay=3).rename(win_key) + WindowsCursor.create(win_cfg, win_out_dir) + + config = get_config(bitmaps_dir) + + # Building + for _, item in config.items(): + png = item["png"] + hotspot = item["hotspot"] + delay = item["delay"] + + with CursorAlias.from_bitmap(png, hotspot) as alias: + x_cfg = alias.create(X_SIZES, delay) + XCursor.create(x_cfg, x_out_dir) + + if item.get("win_key"): + win_build(item, alias) + + add_missing_xcursors(x_out_dir / "cursors", rename=True, force=True) + + XPackager(x_out_dir, THEME_NAME, COMMENT) + WindowsPackager(win_out_dir, THEME_NAME, COMMENT, AUTHOR, URL) diff --git a/builder/build.py b/builder/build.py index b8d965c..0de4c56 100644 --- a/builder/build.py +++ b/builder/build.py @@ -1,6 +1,11 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -from applbuild.generator import build +from pathlib import Path -build() \ No newline at end of file +from applbuild.generator import xbuild + +bitmaps_dir = Path("../pngs") +x_out_dir = Path("../themes") / "macOSBigSur" + +xbuild(bitmaps_dir, x_out_dir) diff --git a/builder/setup.py b/builder/setup.py index 5d377fd..46853fb 100644 --- a/builder/setup.py +++ b/builder/setup.py @@ -5,7 +5,7 @@ from setuptools import setup setup( name="applbuild", - version="1.0.7", + version="1.0.8", description="Generate 'macOSBigSur' cursor theme from PNGs file", url="https://github.com/ful1e5/apple_cursor", packages=["applbuild"], From 72999e89bab85df428af903a64095f6464663bbd Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Thu, 28 Jan 2021 17:48:21 +0530 Subject: [PATCH 19/63] =?UTF-8?q?=F0=9F=9A=80=20Makefiles=20init?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 32 ++++++++++++++++++++++++++++++++ bitmap/Makefile | 18 ++++++++++++++++++ builder/Makefile | 15 +++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 bitmap/Makefile create mode 100644 builder/Makefile diff --git a/Makefile b/Makefile index e69de29..8f74be5 100644 --- a/Makefile +++ b/Makefile @@ -0,0 +1,32 @@ +all: clean render build install + +.PHONY: all + +clean: + rm -rf pngs themes + +render: + cd bitmap && $(MAKE) + +build: + cd builder && $(MAKE) + +SHELL:=/bin/bash +.ONESHELL: +install: themes/macOSBigSur + if [[ $EUID -ne 0 ]]; then + rm -rf ~/.icons/macOSBigSur + cp -r themes/macOSBigSur ~/.icons/ + else + sudo rm -rf /usr/share/icons/macOSBigSur + sudo cp -r themes/macOSBigSur /usr/share/icons/ + fi + + +uninstall: + if [[ $EUID -ne 0 ]]; then + rm -rf ~/.icons/macOSBigSur + else + sudo rm -rf /usr/share/icons/macOSBigSur + fi + diff --git a/bitmap/Makefile b/bitmap/Makefile new file mode 100644 index 0000000..e7aaf94 --- /dev/null +++ b/bitmap/Makefile @@ -0,0 +1,18 @@ +all: install render + +.PHONY: all + +install: node_modules package.json + yarn install + +render: + yarn render + +watch: + yarn watch + +node_modules: + mkdir -p $@ + +clean: + rm -rf node_modules yarn.lock \ No newline at end of file diff --git a/builder/Makefile b/builder/Makefile new file mode 100644 index 0000000..efb48bf --- /dev/null +++ b/builder/Makefile @@ -0,0 +1,15 @@ + +all: setup build clean + +.PHONY: all + +clean: + rm -rf applbuild.egg-info build dist + find -iname "*.pyc" -delete + +setup: clean setup.py + test -d venv || virtualenv venv + . venv/bin/activate; python3 setup.py install + +build: setup build.py + . venv/bin/activate; python3 build.py \ No newline at end of file From 51875b5bc84c4c50d120a797f09bfab69b1c09cf Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Thu, 28 Jan 2021 19:32:56 +0530 Subject: [PATCH 20/63] =?UTF-8?q?=F0=9F=99=88=20Ignore=20builder's=20setup?= =?UTF-8?q?.py=20=20record=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 6746903..9409a67 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ ########## Custom pngs themes +builder/files.txt ########## Python From cb9eacab70ab42853a635c31f5d15ff76d5fc0cc Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Thu, 28 Jan 2021 19:33:49 +0530 Subject: [PATCH 21/63] =?UTF-8?q?=F0=9F=A5=B3=20Suppress=20commands?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bitmap/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bitmap/Makefile b/bitmap/Makefile index e7aaf94..cd1d300 100644 --- a/bitmap/Makefile +++ b/bitmap/Makefile @@ -3,16 +3,16 @@ all: install render .PHONY: all install: node_modules package.json - yarn install + @yarn install render: - yarn render + @yarn render watch: - yarn watch + @yarn watch node_modules: - mkdir -p $@ + @mkdir -p $@ clean: - rm -rf node_modules yarn.lock \ No newline at end of file + @rm -rf node_modules yarn.lock \ No newline at end of file From 8540175d6126de2b398d34ba09a4d3d941b1a68c Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Thu, 28 Jan 2021 19:34:33 +0530 Subject: [PATCH 22/63] =?UTF-8?q?=E2=9A=A1=20Suppress=20commands=20&=20rec?= =?UTF-8?q?ord=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- builder/Makefile | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/builder/Makefile b/builder/Makefile index efb48bf..12877d2 100644 --- a/builder/Makefile +++ b/builder/Makefile @@ -1,15 +1,24 @@ -all: setup build clean +all: clean setup build .PHONY: all -clean: - rm -rf applbuild.egg-info build dist - find -iname "*.pyc" -delete +.ONESHELL: +SHELL:=/bin/bash -setup: clean setup.py - test -d venv || virtualenv venv - . venv/bin/activate; python3 setup.py install +clean: + @rm -rf applbuild.egg-info build dist + @find -iname "*.pyc" -delete + + # Removing setup.py package files if installed + @if [ -f "files.txt" ]; then + @xargs rm -rf < files.txt + @rm -rf files.txt + @fi + +setup: setup.py + @test -d venv || virtualenv venv + @. venv/bin/activate; python3 setup.py install --record files.txt build: setup build.py - . venv/bin/activate; python3 build.py \ No newline at end of file + @. venv/bin/activate; python3 build.py \ No newline at end of file From ecbbc3ff448120d8aeffa6c4e8d41af4760286e2 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Thu, 28 Jan 2021 19:35:03 +0530 Subject: [PATCH 23/63] =?UTF-8?q?=F0=9F=92=BE=20Install=20&=20uninstall=20?= =?UTF-8?q?scripts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 53 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 8f74be5..3fea5b6 100644 --- a/Makefile +++ b/Makefile @@ -1,32 +1,43 @@ -all: clean render build install +theme := macOSBigSur +src := ./themes/$(theme) + +local := ~/.icons +local_dest := $(local)/$(theme) + +root := /usr/share/icons +root_dest := $(root)/$(theme) + +all: clean render build .PHONY: all clean: - rm -rf pngs themes + @rm -rf pngs themes -render: - cd bitmap && $(MAKE) +render: bitmap svg + @cd bitmap && $(MAKE) -build: - cd builder && $(MAKE) +build: pngs + @cd builder && $(MAKE) -SHELL:=/bin/bash .ONESHELL: -install: themes/macOSBigSur - if [[ $EUID -ne 0 ]]; then - rm -rf ~/.icons/macOSBigSur - cp -r themes/macOSBigSur ~/.icons/ - else - sudo rm -rf /usr/share/icons/macOSBigSur - sudo cp -r themes/macOSBigSur /usr/share/icons/ - fi +SHELL:=/bin/bash +install: themes/macOSBigSur + @echo "> Installing '$(theme)' cursors..." + @if [[ $EUID -ne 0 ]]; then + @mkdir -p $(local) + @cp -r $(src) $(local_dest) && echo "> Installed!" + @else + @mkdir -p $(root) + @sudo cp -r $(src) $(root_dest) && echo "> Installed as root!" + @fi uninstall: - if [[ $EUID -ne 0 ]]; then - rm -rf ~/.icons/macOSBigSur - else - sudo rm -rf /usr/share/icons/macOSBigSur - fi - + @if [[ $EUID -ne 0 ]]; then + @echo "> Removing '$(local_dest)'..." + @rm -rf $(local_dest) + @else + @echo "> Removing '$(root_dest)'..." + @sudo rm -rf $(root_dest) + @fi \ No newline at end of file From 03fb3693d5ef285dfcfa55206102f2a6d6e15246 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Thu, 28 Jan 2021 19:36:56 +0530 Subject: [PATCH 24/63] =?UTF-8?q?=F0=9F=A7=B9=20cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tsconfig.json | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 tsconfig.json diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index dc5662d..0000000 --- a/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compilerOptions": { - "target": "es2017", - "module": "commonjs", - "lib": ["es2015", "dom"], - "outDir": "dist", - "typeRoots": ["node_modules/@types"], - "strict": true, - "strictNullChecks": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitReturns": true, - "resolveJsonModule": true, - "noFallthroughCasesInSwitch": true, - "esModuleInterop": true - }, - "include": ["src/**/*", "node_modules/@types/puppeteer/index.d.ts"], - "exclude": ["node_modules", "**/*.test.ts"] -} From 7c35cc1a57af5809dcc2c56a0c9f7dee85fa425a Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Fri, 29 Jan 2021 18:16:28 +0530 Subject: [PATCH 25/63] =?UTF-8?q?=F0=9F=92=96=20Build=20windows=20cursors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- builder/applbuild/generator.py | 2 +- builder/build.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/builder/applbuild/generator.py b/builder/applbuild/generator.py index f541cbd..64bd82c 100644 --- a/builder/applbuild/generator.py +++ b/builder/applbuild/generator.py @@ -58,7 +58,7 @@ def wbuild(bitmaps_dir: LikePath, win_out_dir: Path) -> None: delay = item["delay"] with CursorAlias.from_bitmap(png, hotspot) as alias: - alias = alias.create(X_SIZES, delay) + alias.create(X_SIZES, delay) if item.get("win_key"): position = item["position"] diff --git a/builder/build.py b/builder/build.py index 0de4c56..a22ecf4 100644 --- a/builder/build.py +++ b/builder/build.py @@ -3,9 +3,11 @@ from pathlib import Path -from applbuild.generator import xbuild +from applbuild.generator import xbuild, wbuild bitmaps_dir = Path("../pngs") x_out_dir = Path("../themes") / "macOSBigSur" +win_out_dir = Path("../themes") / "macOSBigSur-Windows" xbuild(bitmaps_dir, x_out_dir) +wbuild(bitmaps_dir,win_out_dir) \ No newline at end of file From 7cf892265c4411757e42c3457eee794db1e44425 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Fri, 29 Jan 2021 19:12:14 +0530 Subject: [PATCH 26/63] =?UTF-8?q?=E2=9A=A1=20Command=20line=20arguments=20?= =?UTF-8?q?added?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- builder/build.py | 58 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 52 insertions(+), 6 deletions(-) diff --git a/builder/build.py b/builder/build.py index a22ecf4..f2a502f 100644 --- a/builder/build.py +++ b/builder/build.py @@ -1,13 +1,59 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +import argparse from pathlib import Path -from applbuild.generator import xbuild, wbuild +from applbuild.generator import build, wbuild, xbuild -bitmaps_dir = Path("../pngs") -x_out_dir = Path("../themes") / "macOSBigSur" -win_out_dir = Path("../themes") / "macOSBigSur-Windows" +parser = argparse.ArgumentParser( + prog="apple_builder", + description="'macOSBigSur' cursor build python script.", +) -xbuild(bitmaps_dir, x_out_dir) -wbuild(bitmaps_dir,win_out_dir) \ No newline at end of file +# Positional Args. +parser.add_argument( + "platform", + choices=("windows", "unix", "all"), + default="all", + const="all", + nargs="?", + help="Set package type, Which you want to build. (default: '%(default)s')", +) + + +# Optional Args. +parser.add_argument( + "-p", + "--png-dir", + dest="png_dir", + metavar="PNG", + type=str, + default="../pngs", + help="To change pngs directory. (default: %(default)s)", +) + +parser.add_argument( + "-o", + "--out-dir", + dest="out_dir", + metavar="OUT", + type=str, + default="../themes", + help="To change output directory. (default: %(default)s)", +) + + +# Preparing build +args = parser.parse_args() + +bitmaps_dir = Path(args.png_dir) +x_out_dir = Path(args.out_dir) / "macOSBigSur" +win_out_dir = Path(args.out_dir) / "macOSBigSur-Windows" + +if args.platform == "unix": + xbuild(bitmaps_dir, x_out_dir) +elif args.platform == "windows": + wbuild(bitmaps_dir, win_out_dir) +else: + build(bitmaps_dir, x_out_dir, win_out_dir) From 8f79fd8faa1e0f632a4db9d188606b102b459c45 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Fri, 29 Jan 2021 19:47:41 +0530 Subject: [PATCH 27/63] =?UTF-8?q?=F0=9F=9A=80=20Unix=20&=20Windows=20recur?= =?UTF-8?q?sive=20build?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 7 +++++++ builder/Makefile | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3fea5b6..8dd2aa7 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,12 @@ root_dest := $(root)/$(theme) all: clean render build +unix: clean render pngs + @cd builder && make build_unix + +windows: clean render pngs + @cd builder && make build_windows + .PHONY: all clean: @@ -23,6 +29,7 @@ build: pngs .ONESHELL: SHELL:=/bin/bash + install: themes/macOSBigSur @echo "> Installing '$(theme)' cursors..." @if [[ $EUID -ne 0 ]]; then diff --git a/builder/Makefile b/builder/Makefile index 12877d2..a181b41 100644 --- a/builder/Makefile +++ b/builder/Makefile @@ -21,4 +21,10 @@ setup: setup.py @. venv/bin/activate; python3 setup.py install --record files.txt build: setup build.py - @. venv/bin/activate; python3 build.py \ No newline at end of file + @. venv/bin/activate; python3 build.py + +build_unix: setup build.py + @. venv/bin/activate; python3 build.py unix + +build_windows: setup build.py + @. venv/bin/activate; python3 build.py windows \ No newline at end of file From a2e5dbecdebf5e1a491cf4527ca4e3f1d1ec5a46 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Sat, 30 Jan 2021 17:57:07 +0530 Subject: [PATCH 28/63] =?UTF-8?q?=F0=9F=94=97=20Dependencies=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 29ca4a2..0574a6d 100644 --- a/README.md +++ b/README.md @@ -193,7 +193,7 @@ sudo mv macOSBigSur /usr/share/icons/ ```bash brew install --cask xquartz -brew install libpng gcc +brew install libpng ``` ##### Debain/ubuntu @@ -216,9 +216,11 @@ sudo dnf install libx11-devel libxcursor-devel libpng-devel ## Build Dependencies +- [gcc](https://gcc.gnu.org/install/) +- [make](https://www.gnu.org/software/make/) - [nodejs](https://nodejs.org/en/) (<=12.x.x) - [yarn](https://classic.yarnpkg.com/en/docs/install/) -- [python](https://www.python.org/downloads/) (<=3.6) +- [python](https://www.python.org/downloads/) (<=3.8) - [pip3](https://pip.pypa.io/en/stable/installing/) ### Node Packages @@ -235,7 +237,7 @@ sudo dnf install libx11-devel libxcursor-devel libpng-devel ### ⚡ Auto Build (using GitHub Actions) -GitHub Actions is automatically runs on every `push`(on **main** and **dev** branches) and `pull request`(on **main** branch), You found theme resources in `artifact` section of **build**.GitHub **Actions** available inside [.github/workflows](https://github.com/ful1e5/apple_cursor/tree/main/.github/workflows) directory. +GitHub Actions is automatically runs on every `push`(on **main** and **dev** branches) and `pull request`(on **main** branch), You found theme resources in `artifact` section of **build**.GitHub **Actions** source is available inside [.github/workflows](https://github.com/ful1e5/apple_cursor/tree/main/.github/workflows) directory. ### Manual Build From eadf06538a218659cf6a65a4e2f6df391ccf9bbc Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Sat, 30 Jan 2021 18:11:55 +0530 Subject: [PATCH 29/63] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Build?= =?UTF-8?q?=20docs=20updated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 85 ++++++++++++++++++++++-------------------------- builder/build.py | 2 +- 2 files changed, 39 insertions(+), 48 deletions(-) diff --git a/README.md b/README.md index 0574a6d..69a739d 100644 --- a/README.md +++ b/README.md @@ -74,37 +74,36 @@ Enjoy upcoming **[macOS BigSur](https://www.apple.com/macos/big-sur-preview/)**
Table of Contents (click to expand) - - [Apple Cursor](#apple-cursor) +- [Apple Cursor](#apple-cursor) - [Cursor Sizes](#cursor-sizes) - [Colors](#colors) - [Quick install](#quick-install) - - [Manual Install](#manual-install) - - [Linux/X11](#linuxx11) - - [Windows](#windows) - - [Preview:](#preview) - - [Dependencies](#dependencies) - - [External Libraries](#external-libraries) - - [Install External Libraries](#install-external-libraries) - - [macOS](#macos) - - [Debain/ubuntu](#debainubuntu) - - [ArchLinux/Manjaro](#archlinuxmanjaro) - - [Fedora/Fedora Silverblue/CentOS/RHEL](#fedorafedora-silverbluecentosrhel) - - [Build Dependencies](#build-dependencies) - - [Node Packages](#node-packages) - - [PyPi Packages](#pypi-packages) - - [Build From Scratch](#build-from-scratch) - - [⚡ Auto Build (using GitHub Actions)](#-auto-build-using-github-actions) - - [Manual Build](#manual-build) - - [Setup python environment](#setup-python-environment) - - [Compile From Source](#compile-from-source) - - [Using yarn](#using-yarn) - - [Install Build Theme](#install-build-theme) - - [Linux](#linux) - - [Windows](#windows-1) - - [Bugs](#bugs) - - [Getting Help](#getting-help) - - [Contributing](#contributing) - - [Support](#support) + - [Manual Install](#manual-install) + - [Linux/X11](#linuxx11) + - [Windows](#windows) + - [Preview:](#preview) +- [Dependencies](#dependencies) + - [External Libraries](#external-libraries) + - [Install External Libraries](#install-external-libraries) + - [macOS](#macos) + - [Debain/ubuntu](#debainubuntu) + - [ArchLinux/Manjaro](#archlinuxmanjaro) + - [Fedora/Fedora Silverblue/CentOS/RHEL](#fedorafedora-silverbluecentosrhel) + - [Build Dependencies](#build-dependencies) + - [Node Packages](#node-packages) + - [PyPi Packages](#pypi-packages) + - [Build From Scratch](#build-from-scratch) + - [⚡ Auto Build (using GitHub Actions)](#-auto-build-using-github-actions) + - [Manual Build](#manual-build) + - [Build only `XCursor` theme](#build-only-xcursor-theme) + - [Build only `Windows` theme](#build-only-windows-theme) + - [Install Build Theme](#install-build-theme) + - [Linux](#linux) + - [Windows](#windows-1) +- [Bugs](#bugs) +- [Getting Help](#getting-help) +- [Contributing](#contributing) + - [Support](#support) @@ -241,39 +240,31 @@ GitHub Actions is automatically runs on every `push`(on **main** and **dev** bra ### Manual Build -#### Setup python environment - ```bash -python3 -m pip install --upgrade pip # Update pip to latest -python3 -m venv venv # Create new virtualenv named `venv` -source venv/bin/activate # Activate virtualenv - -deactivate # For Deactivate virtualenv +make ``` -#### Compile From Source - -> Make sure your [python environment](#setup-python-environment) setup and `virtualenv` is **active**. - -##### Using yarn +#### Build only `XCursor` theme ```bash -yarn install # Install all Node Packages -yarn py_install # Install all PyPi Packages -yarn compile # Compile the cursor theme +make unix ``` -After build, `bitmaps` and `themes` directory are generated at project **root**. +#### Build only `Windows` theme + +```bash +make windows +``` ### Install Build Theme - Built cursor themes are available inside `themes` directory. #### Linux ```bash -cd ./themes -rm -rf ~/.icons/macOSBigSur && cp macOSBigSur ~/.icons/ # installing Theme to local user(recommended) +make install # install as local level + +sudo make install # install as root level ``` #### Windows diff --git a/builder/build.py b/builder/build.py index f2a502f..23a7f21 100644 --- a/builder/build.py +++ b/builder/build.py @@ -49,7 +49,7 @@ args = parser.parse_args() bitmaps_dir = Path(args.png_dir) x_out_dir = Path(args.out_dir) / "macOSBigSur" -win_out_dir = Path(args.out_dir) / "macOSBigSur-Windows" +win_out_dir = Path(args.out_dir) / "macOSBigSur_Windows" if args.platform == "unix": xbuild(bitmaps_dir, x_out_dir) From d1a1d29a9821e3fb1f0e8c2badfca82154ddf443 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Sat, 30 Jan 2021 18:43:13 +0530 Subject: [PATCH 30/63] =?UTF-8?q?=F0=9F=9A=80=20Increase=20"Unavailiable.c?= =?UTF-8?q?ur'=20size=20to=2032x32?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- builder/applbuild/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/applbuild/constants.py b/builder/applbuild/constants.py index 14367a2..3fbd0d9 100644 --- a/builder/applbuild/constants.py +++ b/builder/applbuild/constants.py @@ -103,7 +103,7 @@ WIN_CURSORS_CFG: Dict[str, Dict[str, str]] = { "xterm.png": {"to": "IBeam", "position": "top_left"}, "hand2.png": {"to": "Link", "position": "top_left"}, "hand1.png": {"to": "Move"}, - "circle.png": {"to": "Unavailiable", "position": "top_left"}, + "circle.png": {"to": "Unavailiable", "position": "top_left", "size": (32,32)}, "sb_v_double_arrow.png": {"to": "Vertical"}, # # Animated From f44649e90eff3c3ec467aa2eb1eb8fe52f5e23aa Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Sat, 30 Jan 2021 20:37:13 +0530 Subject: [PATCH 31/63] =?UTF-8?q?=F0=9F=8C=88=20Manual=20build=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PLING.bbcode | 2 +- README.md | 86 ++++++++++++++++++++++------------------------------ 2 files changed, 38 insertions(+), 50 deletions(-) diff --git a/PLING.bbcode b/PLING.bbcode index 4c38d9a..3d5ce0e 100644 --- a/PLING.bbcode +++ b/PLING.bbcode @@ -1,4 +1,4 @@ -[b]macOS Big Sur[/b] Cursor Theme with [b]HiDPi[/b] Display support. This Cursor is built with [b][url=https://github.com/ful1e5/clickgen]clickgen[/url][/b] and render with the [b][url=https://github.com/puppeteer/puppeteer/]puppeteer[/url][/b]. +[b]macOS Big Sur[/b] Cursor Theme with [b]HiDPI[/b] Display support. This Cursor is built with [b][url=https://github.com/ful1e5/clickgen]clickgen[/url][/b] and render with the [b][url=https://github.com/puppeteer/puppeteer/]puppeteer[/url][/b]. [i]Available Sizes[/i] [b]22, 24, 28, 32, 40, 48, 56, 64, 72, 80, 88, 96[/b] [i]Get latest build[/i] @[b][url=https://github.com/ful1e5/apple_cursor/actions]GitHub Actions[/url][/b] diff --git a/README.md b/README.md index 69a739d..591d8fa 100644 --- a/README.md +++ b/README.md @@ -68,42 +68,39 @@ # Apple Cursor -Enjoy upcoming **[macOS BigSur](https://www.apple.com/macos/big-sur-preview/)** Cursor Theme for `Windows` and `Linux` with _HiDPi Support_ 🎉. +Enjoy **[macOS Big Sur](https://www.apple.com/macos/big-sur-preview/)** Cursor Theme for `Windows` and `Linux` with _HiDPI Support_ 🎉.
Table of Contents (click to expand) -- [Apple Cursor](#apple-cursor) + - [Apple Cursor](#apple-cursor) - [Cursor Sizes](#cursor-sizes) - [Colors](#colors) - [Quick install](#quick-install) - - [Manual Install](#manual-install) - - [Linux/X11](#linuxx11) - - [Windows](#windows) - - [Preview:](#preview) -- [Dependencies](#dependencies) - - [External Libraries](#external-libraries) - - [Install External Libraries](#install-external-libraries) - - [macOS](#macos) - - [Debain/ubuntu](#debainubuntu) - - [ArchLinux/Manjaro](#archlinuxmanjaro) - - [Fedora/Fedora Silverblue/CentOS/RHEL](#fedorafedora-silverbluecentosrhel) - - [Build Dependencies](#build-dependencies) - - [Node Packages](#node-packages) - - [PyPi Packages](#pypi-packages) - - [Build From Scratch](#build-from-scratch) - - [⚡ Auto Build (using GitHub Actions)](#-auto-build-using-github-actions) - - [Manual Build](#manual-build) - - [Build only `XCursor` theme](#build-only-xcursor-theme) - - [Build only `Windows` theme](#build-only-windows-theme) - - [Install Build Theme](#install-build-theme) - - [Linux](#linux) - - [Windows](#windows-1) -- [Bugs](#bugs) -- [Getting Help](#getting-help) -- [Contributing](#contributing) - - [Support](#support) + - [Manual Install](#manual-install) + - [Linux/X11](#linuxx11) + - [Windows](#windows) + - [Preview:](#preview) + - [Dependencies](#dependencies) + - [External Libraries](#external-libraries) + - [Install External Libraries](#install-external-libraries) + - [macOS](#macos) + - [Debain/ubuntu](#debainubuntu) + - [ArchLinux/Manjaro](#archlinuxmanjaro) + - [Fedora/Fedora Silverblue/CentOS/RHEL](#fedorafedora-silverbluecentosrhel) + - [Build Dependencies](#build-dependencies) + - [Node Packages](#node-packages) + - [PyPi Packages](#pypi-packages) + - [Build From Scratch](#build-from-scratch) + - [⚡ Auto Build (using GitHub Actions)](#-auto-build-using-github-actions) + - [Manual Build](#manual-build) + - [Build & Install only `XCursor` theme](#build--install-only-xcursor-theme) + - [Build & Install only `Windows` theme](#build--install-only-windows-theme) + - [Bugs](#bugs) + - [Getting Help](#getting-help) + - [Contributing](#contributing) + - [Support](#support)
@@ -244,38 +241,29 @@ GitHub Actions is automatically runs on every `push`(on **main** and **dev** bra make ``` -#### Build only `XCursor` theme +#### Build & Install only `XCursor` theme ```bash make unix +make install +# OR +sudo make install # install as root ``` -#### Build only `Windows` theme +#### Build & Install only `Windows` theme ```bash make windows ``` -### Install Build Theme -Built cursor themes are available inside `themes` directory. +> For double click installation, Check [this](#windows). -#### Linux - -```bash -make install # install as local level - -sudo make install # install as root level -``` - -#### Windows - -1. unzip `macOSBigSur_Windows.zip` file -2. Open the `settings` app. -3. **Goto** `Devices` -> `Mouse` -> `Additional Mouse Options`. -4. **Goto** the `pointers` tab. -5. Replace each cursor in the currently applied cursor set with the corresponding cursor in the `macOSBigSur_Windows` folder. -6. Click "**save as**" and type in the desired name. -7. Click "**apply**" and "**ok**". +1. Open the `settings` app. +2. **Goto** `Devices` -> `Mouse` -> `Additional Mouse Options`. +3. **Goto** the `pointers` tab. +4. Replace each cursor in the currently applied cursor set with the corresponding cursor in the `macOSBigSur_Windows` folder. +5. Click "**save as**" and type in the desired name. +6. Click "**apply**" and "**ok**". From 2360da1472b3868e636af33805d8969ebb037f0a Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Sun, 31 Jan 2021 16:41:38 +0530 Subject: [PATCH 32/63] =?UTF-8?q?=F0=9F=96=BC=EF=B8=8F=20frames=20increase?= =?UTF-8?q?d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bitmap/src/index.ts | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/bitmap/src/index.ts b/bitmap/src/index.ts index c914757..a0b771a 100644 --- a/bitmap/src/index.ts +++ b/bitmap/src/index.ts @@ -75,31 +75,53 @@ const main = async () => { const svg = await getSVGElement(page); let index = 1; + const playbackRate = 0.1; let breakRendering = false; // Rendering 1st frame const img1 = await screenshot(svg); - const key1 = getFrameName(index, svgFilePath); + const key1 = getFrameName(index, svgFilePath, 4); console.log("Saving", key1, "..."); saveFrame(key1, img1); + // stop animation + // @ts-ignore + await page._client.send("Animation.setPlaybackRate", { + playbackRate: 0, + }); + // Rendering frames till `imgN` matched to `img1` while (!breakRendering) { ++index; - const imgN = await screenshot(svg); - const keyN = getFrameName(index, svgFilePath); - console.log("Saving", keyN, "..."); - saveFrame(keyN, imgN); + // resume animation + // @ts-ignore + await page._client.send("Animation.setPlaybackRate", { + playbackRate, + }); + + const imgN = await screenshot(svg); + const keyN = getFrameName(index, svgFilePath, 4); const { data: img1Data, width, height } = PNG.sync.read(img1); const { data: imgNData } = PNG.sync.read(imgN); - const diff = Pixelmatch(img1Data, imgNData, null, width, height); + const diff = Pixelmatch(img1Data, imgNData, null, width, height, { + threshold: 0.2, + }); if (diff <= 100) { breakRendering = !breakRendering; + } else { + console.log("Saving", keyN, "..."); + saveFrame(keyN, imgN); + + // stop animation + // @ts-ignore + await page._client.send("Animation.setPlaybackRate", { + playbackRate: 0, + }); } } From ff6772e41e77b40fe02bd52da1faa031f155d25d Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Sun, 31 Jan 2021 16:42:23 +0530 Subject: [PATCH 33/63] =?UTF-8?q?=E2=9A=A1=20Frames=20padding=20added?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bitmap/src/utils/getFrameName.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bitmap/src/utils/getFrameName.ts b/bitmap/src/utils/getFrameName.ts index 5b3dfff..d7d5d70 100644 --- a/bitmap/src/utils/getFrameName.ts +++ b/bitmap/src/utils/getFrameName.ts @@ -8,7 +8,11 @@ export const frameNumber = (index: number, endIndex: number) => { return result; }; -export const getFrameName = (index: number, fileName: string) => { - const frame = frameNumber(index, 2); +export const getFrameName = ( + index: number, + fileName: string, + padding: number = 2 +) => { + const frame = frameNumber(index, padding); return `${path.basename(fileName, ".svg")}-${frame}.png`; }; From ab188cf7d4099a6082af3f4e06f63bff2e18647f Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Sun, 31 Jan 2021 17:51:11 +0530 Subject: [PATCH 34/63] =?UTF-8?q?=F0=9F=A7=B9=20Remove=20symlinks=20from?= =?UTF-8?q?=20"svg"=20directory?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- svg/README.md | 53 ------------------- svg/static/{x_cursor.svg => X_cursor.svg} | 0 svg/static/{all_scroll.svg => all-scroll.svg} | 0 svg/static/bd_double_arrow.svg | 1 - svg/static/bottom_side.svg | 1 - .../{context_menu.svg => context-menu.svg} | 0 svg/static/dnd_ask.svg | 1 - svg/static/dnd_copy.svg | 1 - svg/static/dnd_link.svg | 1 - svg/static/dnd_move.svg | 1 - svg/static/dnd_none.svg | 1 - svg/static/fd_double_arrow.svg | 1 - svg/static/grabbing.svg | 1 - svg/static/pointer_move.svg | 1 - svg/static/right_side.svg | 1 - svg/static/tcross.svg | 1 - svg/static/top_left_corner.svg | 1 - svg/static/top_right_corner.svg | 1 - .../{vertical_text.svg => vertical-text.svg} | 0 ...{wayland_cursor.svg => wayland-cursor.svg} | 0 svg/static/{zoom_in.svg => zoom-in.svg} | 0 svg/static/{zoom_out.svg => zoom-out.svg} | 0 22 files changed, 67 deletions(-) delete mode 100644 svg/README.md rename svg/static/{x_cursor.svg => X_cursor.svg} (100%) rename svg/static/{all_scroll.svg => all-scroll.svg} (100%) delete mode 120000 svg/static/bd_double_arrow.svg delete mode 120000 svg/static/bottom_side.svg rename svg/static/{context_menu.svg => context-menu.svg} (100%) delete mode 120000 svg/static/dnd_ask.svg delete mode 120000 svg/static/dnd_copy.svg delete mode 120000 svg/static/dnd_link.svg delete mode 120000 svg/static/dnd_move.svg delete mode 120000 svg/static/dnd_none.svg delete mode 120000 svg/static/fd_double_arrow.svg delete mode 120000 svg/static/grabbing.svg delete mode 120000 svg/static/pointer_move.svg delete mode 120000 svg/static/right_side.svg delete mode 120000 svg/static/tcross.svg delete mode 120000 svg/static/top_left_corner.svg delete mode 120000 svg/static/top_right_corner.svg rename svg/static/{vertical_text.svg => vertical-text.svg} (100%) rename svg/static/{wayland_cursor.svg => wayland-cursor.svg} (100%) rename svg/static/{zoom_in.svg => zoom-in.svg} (100%) rename svg/static/{zoom_out.svg => zoom-out.svg} (100%) diff --git a/svg/README.md b/svg/README.md deleted file mode 100644 index a50432e..0000000 --- a/svg/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# Cursor Source Info - -## Symbolic Cursors - -| Preview | Source | Symbolic links | Windows Cursor name | -| :-------------------------------------------------------: | :---------------------: | :-------------------------------------------------------------: | :-----------------: | -| | all_scroll.svg | `None` | `SizeAll.cur` | -| | bottom_left_corner.svg | `fd_double_arrow.svg` `top_right_corner.svg` | `SizeNESW.cur` | -| | bottom_right_corner.svg | `bd_double_arrow.svg` `top_left_corner.svg` | `SizeNWSE.cur` | -| | bottom_tee.svg | `None` | | -| | center_ptr.svg | `None` | | -| | circle.svg | `crossed_circle.svg` `dnd_no_drop.svg` | `NO.cur` | -| | context_menu.svg | `None` | | -| | copy.svg | `dnd_copy.svg` | | -| | cross.svg | `tcross.svg` | | -| | crosshair.svg | `None` | `Cross.cur` | -| | dotbox.svg | `None` | | -| | hand1.svg | `None` | | -| | hand2.svg | `None` | `Hand.cur` | -| | left_ptr.svg | `None` | `Arrow.cur` | -| | left_ptr_watch.svg | `None` | `AppStarting.ani` | -| | left_side.svg | `right_side.svg` | | -| | left_tee.svg | `None` | | -| | link.svg | `dnd_link.svg` | | -| | ll_angle.svg | `None` | | -| | lr_angle.svg | `None` | | -| | move.svg | `dnd_move.svg` `dnd_none.svg` `grabbing.svg` `pointer_move.svg` | | -| | pencil.svg | `None` | `Handwriting.cur` | -| | plus.svg | `None` | | -| | question_arrow.svg | `dnd_ask.svg` | `Help.cur` | -| | right_ptr.svg | `None` | | -| | right_tee.svg | `None` | | -| | sb_down_arrow.svg | `None` | | -| | sb_h_double_arrow.svg | `None` | `SizeWE.cur` | -| | sb_left_arrow.svg | `None` | | -| | sb_right_arrow.svg | `None` | | -| | sb_up_arrow.svg | `None` | `UpArrow.cur` | -| | sb_v_double_arrow.svg | `None` | `SizeNS.cur` | -| | top_side.svg | `bottom_side.svg` | | -| | top_tee.svg | `None` | | -| | ul_angle.svg | `None` | | -| | ur_angle.svg | `None` | | -| | vertical_text.svg | `None` | | -| | wait.svg | `None` | `Wait.ani` | -| | wayland_cursor.svg | `None` | | -| | x_cursor.svg | `None` | | -| | xterm.svg | `None` | `IBeam.cur` | -| | zoom_in.svg | `None` | | -| | zoom_out.svg | `None` | | - -## Figma File - -[![Figma File](https://imgur.com/NMzjENG.png)](https://www.figma.com/file/OZw8Ylb9xPFw9h1uZYSMFa/Mac-Cursor?node-id=0%3A1) diff --git a/svg/static/x_cursor.svg b/svg/static/X_cursor.svg similarity index 100% rename from svg/static/x_cursor.svg rename to svg/static/X_cursor.svg diff --git a/svg/static/all_scroll.svg b/svg/static/all-scroll.svg similarity index 100% rename from svg/static/all_scroll.svg rename to svg/static/all-scroll.svg diff --git a/svg/static/bd_double_arrow.svg b/svg/static/bd_double_arrow.svg deleted file mode 120000 index a3a3e2d..0000000 --- a/svg/static/bd_double_arrow.svg +++ /dev/null @@ -1 +0,0 @@ -bottom_right_corner.svg \ No newline at end of file diff --git a/svg/static/bottom_side.svg b/svg/static/bottom_side.svg deleted file mode 120000 index 9c7bb92..0000000 --- a/svg/static/bottom_side.svg +++ /dev/null @@ -1 +0,0 @@ -top_side.svg \ No newline at end of file diff --git a/svg/static/context_menu.svg b/svg/static/context-menu.svg similarity index 100% rename from svg/static/context_menu.svg rename to svg/static/context-menu.svg diff --git a/svg/static/dnd_ask.svg b/svg/static/dnd_ask.svg deleted file mode 120000 index 14c57d2..0000000 --- a/svg/static/dnd_ask.svg +++ /dev/null @@ -1 +0,0 @@ -question_arrow.svg \ No newline at end of file diff --git a/svg/static/dnd_copy.svg b/svg/static/dnd_copy.svg deleted file mode 120000 index 4b1d7e7..0000000 --- a/svg/static/dnd_copy.svg +++ /dev/null @@ -1 +0,0 @@ -copy.svg \ No newline at end of file diff --git a/svg/static/dnd_link.svg b/svg/static/dnd_link.svg deleted file mode 120000 index 4abb12d..0000000 --- a/svg/static/dnd_link.svg +++ /dev/null @@ -1 +0,0 @@ -link.svg \ No newline at end of file diff --git a/svg/static/dnd_move.svg b/svg/static/dnd_move.svg deleted file mode 120000 index 37362fe..0000000 --- a/svg/static/dnd_move.svg +++ /dev/null @@ -1 +0,0 @@ -move.svg \ No newline at end of file diff --git a/svg/static/dnd_none.svg b/svg/static/dnd_none.svg deleted file mode 120000 index 37362fe..0000000 --- a/svg/static/dnd_none.svg +++ /dev/null @@ -1 +0,0 @@ -move.svg \ No newline at end of file diff --git a/svg/static/fd_double_arrow.svg b/svg/static/fd_double_arrow.svg deleted file mode 120000 index acc15d0..0000000 --- a/svg/static/fd_double_arrow.svg +++ /dev/null @@ -1 +0,0 @@ -bottom_left_corner.svg \ No newline at end of file diff --git a/svg/static/grabbing.svg b/svg/static/grabbing.svg deleted file mode 120000 index 37362fe..0000000 --- a/svg/static/grabbing.svg +++ /dev/null @@ -1 +0,0 @@ -move.svg \ No newline at end of file diff --git a/svg/static/pointer_move.svg b/svg/static/pointer_move.svg deleted file mode 120000 index 37362fe..0000000 --- a/svg/static/pointer_move.svg +++ /dev/null @@ -1 +0,0 @@ -move.svg \ No newline at end of file diff --git a/svg/static/right_side.svg b/svg/static/right_side.svg deleted file mode 120000 index 36e195a..0000000 --- a/svg/static/right_side.svg +++ /dev/null @@ -1 +0,0 @@ -left_side.svg \ No newline at end of file diff --git a/svg/static/tcross.svg b/svg/static/tcross.svg deleted file mode 120000 index e0b26b0..0000000 --- a/svg/static/tcross.svg +++ /dev/null @@ -1 +0,0 @@ -cross.svg \ No newline at end of file diff --git a/svg/static/top_left_corner.svg b/svg/static/top_left_corner.svg deleted file mode 120000 index a3a3e2d..0000000 --- a/svg/static/top_left_corner.svg +++ /dev/null @@ -1 +0,0 @@ -bottom_right_corner.svg \ No newline at end of file diff --git a/svg/static/top_right_corner.svg b/svg/static/top_right_corner.svg deleted file mode 120000 index acc15d0..0000000 --- a/svg/static/top_right_corner.svg +++ /dev/null @@ -1 +0,0 @@ -bottom_left_corner.svg \ No newline at end of file diff --git a/svg/static/vertical_text.svg b/svg/static/vertical-text.svg similarity index 100% rename from svg/static/vertical_text.svg rename to svg/static/vertical-text.svg diff --git a/svg/static/wayland_cursor.svg b/svg/static/wayland-cursor.svg similarity index 100% rename from svg/static/wayland_cursor.svg rename to svg/static/wayland-cursor.svg diff --git a/svg/static/zoom_in.svg b/svg/static/zoom-in.svg similarity index 100% rename from svg/static/zoom_in.svg rename to svg/static/zoom-in.svg diff --git a/svg/static/zoom_out.svg b/svg/static/zoom-out.svg similarity index 100% rename from svg/static/zoom_out.svg rename to svg/static/zoom-out.svg From 73c57c7f45847bd6148d1b931d8eb2beeb33343f Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Sun, 31 Jan 2021 18:00:24 +0530 Subject: [PATCH 35/63] =?UTF-8?q?=F0=9F=94=A7=20Configure=20macOSBigSur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- builder/applbuild/constants.py | 51 +++++++++++++++++----------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/builder/applbuild/constants.py b/builder/applbuild/constants.py index 3fbd0d9..32210b8 100644 --- a/builder/applbuild/constants.py +++ b/builder/applbuild/constants.py @@ -11,56 +11,56 @@ URL = "https://github.com/ful1e5/apple_cursor" # XCursor X_DELAY: int = 10 -X_SIZES: List[Tuple[int, int]] = [(24, 24), (32, 32)] +X_SIZES: List[Tuple[int, int]] = [ + (22, 22), + (24, 24), + (28, 28), + (32, 32), + (40, 40), + (48, 48), + (56, 56), + (64, 64), + (72, 72), + (80, 80), + (88, 88), + (96, 96), +] # Windows Cursor +WIN_DELAY = 3 CANVAS_SIZE = (32, 32) SIZE = (24, 24) -WIN_DELAY = 3 X_CURSORS_CFG: Dict[str, Dict[str, int]] = { # # Static # - "all_scroll.png": {"xhot": 100, "yhot": 100}, + "all-scroll.png": {"xhot": 100, "yhot": 100}, "bottom_left_corner.png": {"xhot": 100, "yhot": 100}, - "fd_double_arrow.png": {"xhot": 100, "yhot": 100}, - "top_right_corner.png": {"xhot": 100, "yhot": 100}, "bottom_right_corner.png": {"xhot": 100, "yhot": 100}, - "bd_double_arrow.png": {"xhot": 100, "yhot": 100}, - "top_left_corner.png": {"xhot": 100, "yhot": 100}, "bottom_tee.png": {"xhot": 141, "yhot": 99}, "center_ptr.png": {"xhot": 61, "yhot": 100}, "circle.png": {"xhot": 47, "yhot": 39}, "crossed_circle.png": {"xhot": 47, "yhot": 39}, "dnd_no_drop.png": {"xhot": 47, "yhot": 39}, - "context_menu.png": {"xhot": 61, "yhot": 58}, + "context-menu.png": {"xhot": 61, "yhot": 58}, "copy.png": {"xhot": 47, "yhot": 39}, - "dnd_copy.png": {"xhot": 47, "yhot": 39}, "cross.png": {"xhot": 100, "yhot": 100}, - "tcross.png": {"xhot": 100, "yhot": 100}, "crosshair.png": {"xhot": 100, "yhot": 100}, "dotbox.png": {"xhot": 100, "yhot": 100}, "hand1.png": {"xhot": 94, "yhot": 105}, "hand2.png": {"xhot": 66, "yhot": 34}, "left_ptr.png": {"xhot": 68, "yhot": 41}, "left_side.png": {"xhot": 100, "yhot": 100}, - "right_side.png": {"xhot": 100, "yhot": 100}, "left_tee.png": {"xhot": 100, "yhot": 58}, "link.png": {"xhot": 61, "yhot": 105}, - "dnd_link.png": {"xhot": 61, "yhot": 105}, "ll_angle.png": {"xhot": 141, "yhot": 58}, "lr_angle.png": {"xhot": 141, "yhot": 138}, "move.png": {"xhot": 80, "yhot": 106}, - "dnd_move.png": {"xhot": 80, "yhot": 106}, - "dnd_none.png": {"xhot": 80, "yhot": 106}, - "grabbing.png": {"xhot": 80, "yhot": 106}, - "pointer_move.png": {"xhot": 80, "yhot": 106}, "pencil.png": {"xhot": 141, "yhot": 58}, "plus.png": {"xhot": 100, "yhot": 100}, "question_arrow.png": {"xhot": 105, "yhot": 105}, - "dnd_ask.png": {"xhot": 105, "yhot": 105}, "right_ptr.png": {"xhot": 61, "yhot": 138}, "right_tee.png": {"xhot": 100, "yhot": 138}, "sb_down_arrow.png": {"xhot": 133, "yhot": 99}, @@ -70,16 +70,15 @@ X_CURSORS_CFG: Dict[str, Dict[str, int]] = { "sb_up_arrow.png": {"xhot": 68, "yhot": 99}, "sb_v_double_arrow.png": {"xhot": 100, "yhot": 100}, "top_side.png": {"xhot": 100, "yhot": 100}, - "bottom_side.png": {"xhot": 100, "yhot": 100}, "top_tee.png": {"xhot": 61, "yhot": 99}, "ul_angle.png": {"xhot": 61, "yhot": 65}, "ur_angle.png": {"xhot": 61, "yhot": 138}, - "vertical_text.png": {"xhot": 100, "yhot": 102}, - "wayland_cursor.png": {"xhot": 100, "yhot": 100}, - "x_cursor.png": {"xhot": 100, "yhot": 100}, + "vertical-text.png": {"xhot": 100, "yhot": 102}, + "wayland-cursor.png": {"xhot": 100, "yhot": 100}, + "X_cursor.png": {"xhot": 100, "yhot": 100}, "xterm.png": {"xhot": 97, "yhot": 97}, - "zoom_in.png": {"xhot": 76, "yhot": 78}, - "zoom_out.png": {"xhot": 76, "yhot": 78}, + "zoom-in.png": {"xhot": 76, "yhot": 78}, + "zoom-out.png": {"xhot": 76, "yhot": 78}, # # Animated # @@ -95,15 +94,15 @@ WIN_CURSORS_CFG: Dict[str, Dict[str, str]] = { "right_ptr.png": {"to": "Alternate", "position": "top_left"}, "cross.png": {"to": "Cross"}, "left_ptr.png": {"to": "Default", "position": "top_left"}, - "fd_double_arrow.png": {"to": "Diagonal_1"}, - "bd_double_arrow.png": {"to": "Diagonal_2"}, + "bottom_left_corner.png": {"to": "Diagonal_1"}, + "bottom_right_corner.png": {"to": "Diagonal_2"}, "pencil.png": {"to": "Handwriting"}, "question_arrow.png": {"to": "Help", "position.png": "top_left"}, "sb_h_double_arrow.png": {"to": "Horizontal"}, "xterm.png": {"to": "IBeam", "position": "top_left"}, "hand2.png": {"to": "Link", "position": "top_left"}, "hand1.png": {"to": "Move"}, - "circle.png": {"to": "Unavailiable", "position": "top_left", "size": (32,32)}, + "circle.png": {"to": "Unavailiable", "position": "top_left", "size": (32, 32)}, "sb_v_double_arrow.png": {"to": "Vertical"}, # # Animated From 09f36540f33a046943a8c583478bf7088e74b2d0 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Sun, 31 Jan 2021 18:22:23 +0530 Subject: [PATCH 36/63] =?UTF-8?q?=F0=9F=8E=AF=20Hotspots=20fixed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- builder/applbuild/configure.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builder/applbuild/configure.py b/builder/applbuild/configure.py index 5e107d6..055fef9 100644 --- a/builder/applbuild/configure.py +++ b/builder/applbuild/configure.py @@ -19,8 +19,8 @@ def get_config(bitmaps_dir: LikePath) -> Dict[str, Any]: config: Dict[str, Any] = {} for key, item in X_CURSORS_CFG.items(): - x_hot: int = item.get("x_hot", 0) - y_hot: int = item.get("y_hot", 0) + x_hot: int = item.get("xhot", 0) + y_hot: int = item.get("yhot", 0) hotspot: Tuple[int, int] = (x_hot, y_hot) delay: int = item.get("delay", X_DELAY) From 41d2554eefcdcb9916558b812d85b9ed94d13c9e Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Mon, 1 Feb 2021 17:33:08 +0530 Subject: [PATCH 37/63] =?UTF-8?q?=F0=9F=94=97=20Create=20symlinks=20custom?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- builder/applbuild/generator.py | 9 ++- builder/applbuild/symlinks.py | 132 +++++++++++++++++++++++++++++++++ 2 files changed, 137 insertions(+), 4 deletions(-) create mode 100644 builder/applbuild/symlinks.py diff --git a/builder/applbuild/generator.py b/builder/applbuild/generator.py index 64bd82c..34646de 100644 --- a/builder/applbuild/generator.py +++ b/builder/applbuild/generator.py @@ -7,10 +7,11 @@ from typing import Any from clickgen.builders import WindowsCursor, XCursor from clickgen.core import CursorAlias from clickgen.packagers import WindowsPackager, XPackager -from clickgen.util import LikePath, add_missing_xcursors +from clickgen.util import LikePath from applbuild.configure import get_config from applbuild.constants import * +from applbuild.symlinks import add_missing_xcursor # # 📝 Note: All CONSTANT variables are imported from `applbuild.constants` module. @@ -37,7 +38,7 @@ def xbuild(bitmaps_dir: LikePath, x_out_dir: Path) -> None: x_cfg = alias.create(X_SIZES, delay) XCursor.create(x_cfg, x_out_dir) - add_missing_xcursors(x_out_dir / "cursors", rename=True, force=True) + add_missing_xcursor(x_out_dir / "cursors") XPackager(x_out_dir, THEME_NAME, COMMENT) @@ -108,7 +109,7 @@ def build(bitmaps_dir: LikePath, x_out_dir: Path, win_out_dir: Path) -> None: if item.get("win_key"): win_build(item, alias) - add_missing_xcursors(x_out_dir / "cursors", rename=True, force=True) - + add_missing_xcursor(x_out_dir / "cursors") XPackager(x_out_dir, THEME_NAME, COMMENT) + WindowsPackager(win_out_dir, THEME_NAME, COMMENT, AUTHOR, URL) diff --git a/builder/applbuild/symlinks.py b/builder/applbuild/symlinks.py new file mode 100644 index 0000000..bed9d9c --- /dev/null +++ b/builder/applbuild/symlinks.py @@ -0,0 +1,132 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import os +from typing import Dict, List, Union + +from clickgen.util import LikePath, chdir + + +def add_missing_xcursor(directory: LikePath) -> None: + """Add missing `XCursor` to the Unix cursor package. + + :directory: (Path|str) directory where XCursors are available. + """ + + symlinks: List[Dict[str, Union[str, List[str]]]] = [ + {"src": "all-scroll", "links": ["fleur", "size_all"]}, + { + "src": "bottom_left_corner", + "links": ["sw-resize", "top_right_corner", "fd_double_arrow"], + }, + { + "src": "bottom_right_corner", + "links": ["top_left_corner", "se-resize", "bd_double_arrow"], + }, + {"src": "circle", "links": ["not-allowed", "forbidden"]}, + { + "src": "copy", + "links": [ + "1081e37283d90000800003c07f3ef6bf", + "6407b0e94181790501fd1e167b474872", + "b66166c04f8c3109214a4fbd64a50fc8", + "dnd_copy", + ], + }, + {"src": "cross", "links": ["cross_reverse", "diamond_cross", "tcross"]}, + { + "src": "crossed_circle", + "links": ["03b6e0fcb3499374a867c041f52298f0", "not-allowed"], + }, + {"src": "dnd_no_drop", "links": ["no-drop"]}, + {"src": "dotbox", "links": ["dot_box_mask", "draped_box", "icon", "target"]}, + {"src": "hand1", "links": ["grab", "openhand"]}, + { + "src": "hand2", + "links": [ + "9d800788f1b08800ae810202380a0822", + "e29285e634086352946a0e7090d73106", + "pointer", + "pointing_hand", + ], + }, + {"src": "left_ptr", "links": ["arrow", "default"]}, + {"src": "left_side", "links": ["w-resize", "right_side"]}, + { + "src": "link", + "links": [ + "3085a0e285430894940527032f8b26df", + "640fb0e74195791501fd1ed57b41487f", + "a2a266d0498c3104214a47bd64ab0fc8", + "alias", + "dnd_link", + "dnd-link", + "dnd_link", + ], + }, + { + "src": "move", + "links": [ + "4498f0e0c1937ffe01fd06f973665830", + "9081237383d90e509aa00f00170e968f", + "grabbing", + "pointer_move", + "dnd_move", + "dnd_none", + ], + }, + {"src": "pencil", "links": ["draft"]}, + {"src": "plus", "links": ["cell"]}, + { + "src": "question_arrow", + "links": [ + "5c6cd98b3f3ebcb1f9c7f1c204630408", + "d9ce0ab605698f320427677b458ad60b", + "help", + "left_ptr_help", + "whats_this", + "dnd_ask", + ], + }, + {"src": "right_ptr", "links": ["draft_large", "draft_small"]}, + {"src": "sb_down_arrow", "links": ["down-arrow"]}, + { + "src": "sb_h_double_arrow", + "links": [ + "028006030e0e7ebffc7f7070c0600140", + "14fef782d02440884392942c1120523", + "col-resize", + "ew-resize", + "h_double_arrow", + "size-hor", + "size_hor", + "split_h", + ], + }, + {"src": "sb_left_arrow", "links": ["left-arrow"]}, + {"src": "sb_right_arrow", "links": ["right-arrow"]}, + {"src": "sb_up_arrow", "links": ["up-arrow"]}, + { + "src": "sb_v_double_arrow", + "links": [ + "00008160000006810000408080010102", + "2870a09082c103050810ffdffffe0204", + "double_arrow", + "ns-resize", + "row-resize", + "size-ver", + "size_ver", + "split_v", + "v_double_arrow", + ], + }, + {"src": "top_side", "links": ["n-resize", "bottom_side"]}, + {"src": "X_cursor", "links": ["pirate", "x-cursor"]}, + {"src": "xterm", "links": ["ibeam", "text"]}, + ] + + with chdir(directory): + for item in symlinks: + src = item.get("src") + for link in item.get("links"): + os.symlink(src, link) From a562552838685c530b4206379241eca7c2cbb5f8 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Mon, 1 Feb 2021 17:36:49 +0530 Subject: [PATCH 38/63] =?UTF-8?q?=F0=9F=A7=B9=20Remove=20dublicates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- builder/applbuild/constants.py | 1 - builder/applbuild/symlinks.py | 9 ++++++--- svg/static/circle.svg | 21 --------------------- 3 files changed, 6 insertions(+), 25 deletions(-) delete mode 100644 svg/static/circle.svg diff --git a/builder/applbuild/constants.py b/builder/applbuild/constants.py index 32210b8..ecc9d31 100644 --- a/builder/applbuild/constants.py +++ b/builder/applbuild/constants.py @@ -41,7 +41,6 @@ X_CURSORS_CFG: Dict[str, Dict[str, int]] = { "bottom_right_corner.png": {"xhot": 100, "yhot": 100}, "bottom_tee.png": {"xhot": 141, "yhot": 99}, "center_ptr.png": {"xhot": 61, "yhot": 100}, - "circle.png": {"xhot": 47, "yhot": 39}, "crossed_circle.png": {"xhot": 47, "yhot": 39}, "dnd_no_drop.png": {"xhot": 47, "yhot": 39}, "context-menu.png": {"xhot": 61, "yhot": 58}, diff --git a/builder/applbuild/symlinks.py b/builder/applbuild/symlinks.py index bed9d9c..718f0a3 100644 --- a/builder/applbuild/symlinks.py +++ b/builder/applbuild/symlinks.py @@ -23,7 +23,6 @@ def add_missing_xcursor(directory: LikePath) -> None: "src": "bottom_right_corner", "links": ["top_left_corner", "se-resize", "bd_double_arrow"], }, - {"src": "circle", "links": ["not-allowed", "forbidden"]}, { "src": "copy", "links": [ @@ -36,7 +35,12 @@ def add_missing_xcursor(directory: LikePath) -> None: {"src": "cross", "links": ["cross_reverse", "diamond_cross", "tcross"]}, { "src": "crossed_circle", - "links": ["03b6e0fcb3499374a867c041f52298f0", "not-allowed"], + "links": [ + "03b6e0fcb3499374a867c041f52298f0", + "not-allowed", + "forbidden", + "circle", + ], }, {"src": "dnd_no_drop", "links": ["no-drop"]}, {"src": "dotbox", "links": ["dot_box_mask", "draped_box", "icon", "target"]}, @@ -61,7 +65,6 @@ def add_missing_xcursor(directory: LikePath) -> None: "alias", "dnd_link", "dnd-link", - "dnd_link", ], }, { diff --git a/svg/static/circle.svg b/svg/static/circle.svg deleted file mode 100644 index 903dc11..0000000 --- a/svg/static/circle.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file From 420197b9503a11925fd424f7f77f4a8334a98870 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Mon, 1 Feb 2021 18:38:58 +0530 Subject: [PATCH 39/63] =?UTF-8?q?=F0=9F=93=A6=20Build=20Logs=20&=20missing?= =?UTF-8?q?=20cursors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- builder/applbuild/constants.py | 6 +++- builder/applbuild/generator.py | 4 +++ builder/applbuild/symlinks.py | 51 +++++++++++++++++++++++++++------- 3 files changed, 50 insertions(+), 11 deletions(-) diff --git a/builder/applbuild/constants.py b/builder/applbuild/constants.py index ecc9d31..16671aa 100644 --- a/builder/applbuild/constants.py +++ b/builder/applbuild/constants.py @@ -101,7 +101,11 @@ WIN_CURSORS_CFG: Dict[str, Dict[str, str]] = { "xterm.png": {"to": "IBeam", "position": "top_left"}, "hand2.png": {"to": "Link", "position": "top_left"}, "hand1.png": {"to": "Move"}, - "circle.png": {"to": "Unavailiable", "position": "top_left", "size": (32, 32)}, + "crossed_circle.png": { + "to": "Unavailiable", + "position": "top_left", + "size": (32, 32), + }, "sb_v_double_arrow.png": {"to": "Vertical"}, # # Animated diff --git a/builder/applbuild/generator.py b/builder/applbuild/generator.py index 34646de..15a4b13 100644 --- a/builder/applbuild/generator.py +++ b/builder/applbuild/generator.py @@ -36,6 +36,7 @@ def xbuild(bitmaps_dir: LikePath, x_out_dir: Path) -> None: with CursorAlias.from_bitmap(png, hotspot) as alias: x_cfg = alias.create(X_SIZES, delay) + print(f"Building {x_cfg.stem} XCursor...") XCursor.create(x_cfg, x_out_dir) add_missing_xcursor(x_out_dir / "cursors") @@ -70,6 +71,7 @@ def wbuild(bitmaps_dir: LikePath, win_out_dir: Path) -> None: win_cfg = alias.reproduce(size, canvas_size, position, delay=3).rename( win_key ) + print(f"Building {win_cfg.stem} Windows Cursor...") WindowsCursor.create(win_cfg, win_out_dir) WindowsPackager(win_out_dir, THEME_NAME, COMMENT, AUTHOR, URL) @@ -92,6 +94,7 @@ def build(bitmaps_dir: LikePath, x_out_dir: Path, win_out_dir: Path) -> None: canvas_size = item["canvas_size"] win_cfg = alias.reproduce(size, canvas_size, position, delay=3).rename(win_key) + print(f"Building {win_cfg.stem} Windows Cursor...") WindowsCursor.create(win_cfg, win_out_dir) config = get_config(bitmaps_dir) @@ -104,6 +107,7 @@ def build(bitmaps_dir: LikePath, x_out_dir: Path, win_out_dir: Path) -> None: with CursorAlias.from_bitmap(png, hotspot) as alias: x_cfg = alias.create(X_SIZES, delay) + print(f"Building {x_cfg.stem} XCursor...") XCursor.create(x_cfg, x_out_dir) if item.get("win_key"): diff --git a/builder/applbuild/symlinks.py b/builder/applbuild/symlinks.py index 718f0a3..82a265d 100644 --- a/builder/applbuild/symlinks.py +++ b/builder/applbuild/symlinks.py @@ -17,11 +17,27 @@ def add_missing_xcursor(directory: LikePath) -> None: {"src": "all-scroll", "links": ["fleur", "size_all"]}, { "src": "bottom_left_corner", - "links": ["sw-resize", "top_right_corner", "fd_double_arrow"], + "links": [ + "fcf1c3c7cd4491d801f1e1c78f100000", + "sw-resize", + "ne-resize", + "size_bdiag", + "nesw-resize", + "top_right_corner", + "fd_double_arrow", + ], }, { "src": "bottom_right_corner", - "links": ["top_left_corner", "se-resize", "bd_double_arrow"], + "links": [ + "c7088f0f3e6c8088236ef8e1e3e70000", + "top_left_corner", + "se-resize", + "nw-resize", + "size_fdiag", + "nwse-resize", + "bd_double_arrow", + ], }, { "src": "copy", @@ -29,10 +45,13 @@ def add_missing_xcursor(directory: LikePath) -> None: "1081e37283d90000800003c07f3ef6bf", "6407b0e94181790501fd1e167b474872", "b66166c04f8c3109214a4fbd64a50fc8", - "dnd_copy", + "dnd-copy", ], }, - {"src": "cross", "links": ["cross_reverse", "diamond_cross", "tcross"]}, + { + "src": "cross", + "links": ["cross_reverse", "diamond_cross", "tcross", "color-picker"], + }, { "src": "crossed_circle", "links": [ @@ -55,7 +74,16 @@ def add_missing_xcursor(directory: LikePath) -> None: ], }, {"src": "left_ptr", "links": ["arrow", "default"]}, - {"src": "left_side", "links": ["w-resize", "right_side"]}, + { + "src": "left_ptr_watch", + "links": [ + "00000000000000020006000e7e9ffc3f", + "08e8e1c95fe2fc01f976f1e063a24ccd", + "3ecb610c1bf2410f44200f48c40d3599", + "progress", + ], + }, + {"src": "left_side", "links": ["w-resize", "right_side", "e-resize"]}, { "src": "link", "links": [ @@ -63,7 +91,6 @@ def add_missing_xcursor(directory: LikePath) -> None: "640fb0e74195791501fd1ed57b41487f", "a2a266d0498c3104214a47bd64ab0fc8", "alias", - "dnd_link", "dnd-link", ], }, @@ -72,10 +99,12 @@ def add_missing_xcursor(directory: LikePath) -> None: "links": [ "4498f0e0c1937ffe01fd06f973665830", "9081237383d90e509aa00f00170e968f", + "fcf21c00b30f7e3f83fe0dfd12e71cff", "grabbing", "pointer_move", - "dnd_move", - "dnd_none", + "dnd-move", + "closedhand", + "dnd-none", ], }, {"src": "pencil", "links": ["draft"]}, @@ -88,7 +117,7 @@ def add_missing_xcursor(directory: LikePath) -> None: "help", "left_ptr_help", "whats_this", - "dnd_ask", + "dnd-ask", ], }, {"src": "right_ptr", "links": ["draft_large", "draft_small"]}, @@ -123,7 +152,8 @@ def add_missing_xcursor(directory: LikePath) -> None: "v_double_arrow", ], }, - {"src": "top_side", "links": ["n-resize", "bottom_side"]}, + {"src": "top_side", "links": ["s-resize", "n-resize", "bottom_side"]}, + {"src": "wait", "links": ["watch"]}, {"src": "X_cursor", "links": ["pirate", "x-cursor"]}, {"src": "xterm", "links": ["ibeam", "text"]}, ] @@ -132,4 +162,5 @@ def add_missing_xcursor(directory: LikePath) -> None: for item in symlinks: src = item.get("src") for link in item.get("links"): + print(f"Creating symlink {src} -> {link}") os.symlink(src, link) From c6f5ba6238ee28bb1dbe793b1e7d20a9a953e264 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Tue, 2 Feb 2021 16:12:56 +0530 Subject: [PATCH 40/63] =?UTF-8?q?=F0=9F=92=BE=20Print=20installtion=20dire?= =?UTF-8?q?ctory=20in=20"make=20install"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8dd2aa7..7f2010d 100644 --- a/Makefile +++ b/Makefile @@ -31,13 +31,14 @@ SHELL:=/bin/bash install: themes/macOSBigSur - @echo "> Installing '$(theme)' cursors..." @if [[ $EUID -ne 0 ]]; then + @echo "> Installing '$(theme)' cursors inside $(local)/..." @mkdir -p $(local) @cp -r $(src) $(local_dest) && echo "> Installed!" @else + @echo "> Installing '$(theme)' cursors inside $(root)/..." @mkdir -p $(root) - @sudo cp -r $(src) $(root_dest) && echo "> Installed as root!" + @sudo cp -r $(src) $(root_dest) && echo "> Installed!" @fi uninstall: From d035d0cc657640e10ed112addd2c05741a035d51 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Tue, 2 Feb 2021 16:31:23 +0530 Subject: [PATCH 41/63] =?UTF-8?q?=F0=9F=8C=88=20Design=20Improvements?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- svg/animated/left_ptr_watch.svg | 45 +++++++++---------- svg/animated/wait.svg | 71 +++++++++++++----------------- svg/static/X_cursor.svg | 5 +-- svg/static/all-scroll.svg | 5 +-- svg/static/bottom_left_corner.svg | 7 +-- svg/static/bottom_right_corner.svg | 7 +-- svg/static/bottom_tee.svg | 3 -- svg/static/context-menu.svg | 2 +- svg/static/copy.svg | 24 +++++----- svg/static/cross.svg | 7 +-- svg/static/crossed_circle.svg | 16 +++---- svg/static/crosshair.svg | 15 +++---- svg/static/dnd_no_drop.svg | 22 ++------- svg/static/dotbox.svg | 3 -- svg/static/hand1.svg | 15 +++---- svg/static/hand2.svg | 5 +-- svg/static/left_ptr.svg | 3 -- svg/static/left_side.svg | 7 +-- svg/static/left_tee.svg | 7 +-- svg/static/link.svg | 7 +-- svg/static/ll_angle.svg | 7 +-- svg/static/lr_angle.svg | 7 +-- svg/static/move.svg | 11 ++--- svg/static/pencil.svg | 3 -- svg/static/plus.svg | 11 ++--- svg/static/question_arrow.svg | 12 ++--- svg/static/right_ptr.svg | 3 -- svg/static/right_tee.svg | 7 +-- svg/static/sb_down_arrow.svg | 8 ++-- svg/static/sb_h_double_arrow.svg | 3 -- svg/static/sb_left_arrow.svg | 8 ++-- svg/static/sb_right_arrow.svg | 8 ++-- svg/static/sb_up_arrow.svg | 7 +-- svg/static/sb_v_double_arrow.svg | 3 -- svg/static/top_side.svg | 7 +-- svg/static/top_tee.svg | 7 +-- svg/static/ul_angle.svg | 7 +-- svg/static/ur_angle.svg | 7 +-- svg/static/vertical-text.svg | 11 ++--- svg/static/wayland-cursor.svg | 5 +-- svg/static/xterm.svg | 11 ++--- svg/static/zoom-in.svg | 3 -- svg/static/zoom-out.svg | 3 -- 43 files changed, 145 insertions(+), 290 deletions(-) diff --git a/svg/animated/left_ptr_watch.svg b/svg/animated/left_ptr_watch.svg index 2d0707f..74fec06 100644 --- a/svg/animated/left_ptr_watch.svg +++ b/svg/animated/left_ptr_watch.svg @@ -1,42 +1,37 @@ - - - - - - - - - - - - - + + + + + + + + - + - + - + - + - - - \ No newline at end of file diff --git a/svg/animated/wait.svg b/svg/animated/wait.svg index 4c2f3ba..5bad903 100644 --- a/svg/animated/wait.svg +++ b/svg/animated/wait.svg @@ -1,37 +1,31 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + - @@ -41,38 +35,35 @@ - - - - - - - - - \ No newline at end of file diff --git a/svg/static/X_cursor.svg b/svg/static/X_cursor.svg index c92c5ab..fd06534 100644 --- a/svg/static/X_cursor.svg +++ b/svg/static/X_cursor.svg @@ -1,8 +1,5 @@ - - - \ No newline at end of file diff --git a/svg/static/all-scroll.svg b/svg/static/all-scroll.svg index e7e538c..b6ba0f4 100644 --- a/svg/static/all-scroll.svg +++ b/svg/static/all-scroll.svg @@ -1,12 +1,9 @@ - - - - - - \ No newline at end of file diff --git a/svg/static/bottom_right_corner.svg b/svg/static/bottom_right_corner.svg index 61cf654..1dcda9f 100644 --- a/svg/static/bottom_right_corner.svg +++ b/svg/static/bottom_right_corner.svg @@ -1,11 +1,8 @@ - - - \ No newline at end of file diff --git a/svg/static/bottom_tee.svg b/svg/static/bottom_tee.svg index 306233b..db94cb5 100644 --- a/svg/static/bottom_tee.svg +++ b/svg/static/bottom_tee.svg @@ -1,7 +1,4 @@ - - - diff --git a/svg/static/context-menu.svg b/svg/static/context-menu.svg index e326ad2..aecdf86 100644 --- a/svg/static/context-menu.svg +++ b/svg/static/context-menu.svg @@ -10,7 +10,7 @@ - diff --git a/svg/static/copy.svg b/svg/static/copy.svg index 5390c7d..5ab43d3 100644 --- a/svg/static/copy.svg +++ b/svg/static/copy.svg @@ -1,20 +1,17 @@ - - - - - + + - - + - @@ -24,9 +21,10 @@ - - - + + + \ No newline at end of file diff --git a/svg/static/cross.svg b/svg/static/cross.svg index d894d8d..3ef71f3 100644 --- a/svg/static/cross.svg +++ b/svg/static/cross.svg @@ -1,9 +1,6 @@ - - - + d="M155 89H110.926V45H89.0734V89H45V111H89.0734V155H110.926V111H155V89Z" fill="white" /> + d="M148 96.3816H103.624V52H96.376V96.3816H52V103.619H96.376V148H103.624V103.619H148V96.3816Z" fill="black" /> \ No newline at end of file diff --git a/svg/static/crossed_circle.svg b/svg/static/crossed_circle.svg index 8535691..f5dfa29 100644 --- a/svg/static/crossed_circle.svg +++ b/svg/static/crossed_circle.svg @@ -1,20 +1,16 @@ - - - - + + d="M60.4287 26.6787V96.3216L78.9996 78.4814L80.0004 77.6161H111.5L60.4287 26.6787Z" fill="black" /> - + diff --git a/svg/static/crosshair.svg b/svg/static/crosshair.svg index 09f696f..973f349 100644 --- a/svg/static/crosshair.svg +++ b/svg/static/crosshair.svg @@ -1,15 +1,12 @@ - - - + fill="white" /> - - - - + stroke="#797979" stroke-width="6" /> + + + + \ No newline at end of file diff --git a/svg/static/dnd_no_drop.svg b/svg/static/dnd_no_drop.svg index e22810c..ee015c3 100644 --- a/svg/static/dnd_no_drop.svg +++ b/svg/static/dnd_no_drop.svg @@ -1,20 +1,4 @@ - - - - - - - - - - - - - - - - - - - + + + \ No newline at end of file diff --git a/svg/static/dotbox.svg b/svg/static/dotbox.svg index 7bd24db..e005537 100644 --- a/svg/static/dotbox.svg +++ b/svg/static/dotbox.svg @@ -1,7 +1,4 @@ - - - diff --git a/svg/static/hand1.svg b/svg/static/hand1.svg index 5b97d7f..8a5d23e 100644 --- a/svg/static/hand1.svg +++ b/svg/static/hand1.svg @@ -1,11 +1,8 @@ - - - - + - - - + d="M63.5067 104.312C62.4882 100.407 61.4697 95.4908 59.2872 88.1483C57.5517 82.3472 55.7329 79.2019 54.4027 75.3068C52.7918 70.568 51.2536 67.7977 49.2478 63.0069C47.8033 59.5804 45.4649 52.0921 44.4984 48.0095C43.2616 42.7083 44.8413 38.3862 47.0342 35.4492C49.6636 31.9186 57.032 30.3459 61.1372 31.7936C64.9929 33.1475 68.8694 37.126 70.6569 40.0005C73.65 44.7913 74.3671 46.5827 78.1085 56.0602C82.1929 66.3917 83.97 76.0358 84.4585 79.2957L85.3382 84.7274C85.3509 84.8056 85.3406 84.8089 85.3386 84.7297V84.7297C84.9749 74.0128 84.261 52.9149 84.4897 41.2919C84.5105 39.9797 85.1548 35.1784 85.3627 33.8453C86.1733 28.6379 88.5325 25.5135 92.357 23.6492C96.6388 21.5558 101.981 21.41 106.917 23.4721C111.313 25.2739 113.423 29.2003 114.057 34.1161C114.203 35.2513 115.034 44.3956 115.024 45.6453C114.888 56.3205 115.086 62.7361 115.179 68.2872C115.221 70.693 115.211 85.2113 115.356 83.5866C115.99 76.7545 116.333 50.3737 118.931 42.5313C120.428 38.0217 123.14 34.7618 127.183 32.8559C131.662 30.7417 138.75 32.1269 141.775 35.3867C144.736 38.5632 146.41 42.5938 146.784 47.395C147.116 51.613 146.586 56.7371 146.576 60.3615C146.576 69.3912 146.358 74.1507 146.191 82.4514C146.181 82.8471 146.036 85.555 146.43 84.3469C147.407 81.4307 148.384 78.702 149.195 76.5878C149.704 75.286 151.7 70.1931 152.926 67.6415C154.111 65.2044 155.119 63.7984 157.239 60.4761C159.318 57.2162 161.552 55.8102 164.181 54.6333C169.793 52.1859 175.707 55.7998 177.702 60.7885C178.596 63.0277 177.796 68.2143 177.411 72.2969C176.777 79.0353 174.772 85.8987 173.753 89.4606C172.423 94.116 170.905 102.323 170.22 106.135C169.471 110.238 167.788 120.528 166.489 125.09C165.595 128.225 162.633 135.275 159.712 139.504C159.712 139.504 148.551 152.522 147.324 158.376C146.108 164.239 146.514 164.281 146.275 168.426C146.094 171.429 146.831 175.111 147.254 176.923C147.392 177.515 146.996 178.106 146.392 178.172C143.955 178.436 138.181 178.957 134.707 178.393C130.644 177.747 125.614 169.634 124.315 167.166C122.527 163.75 118.713 164.406 117.227 166.926C114.888 170.915 109.858 178.07 106.304 178.518C99.6031 179.362 85.95 178.868 74.8683 178.739C74.2479 178.731 73.7759 178.172 73.8527 177.556C74.2079 174.712 74.7289 167.458 71.3221 164.583C68.1523 161.875 62.6961 156.418 59.4327 153.543L50.786 143.951C47.8344 140.202 44.2489 132.568 37.8678 123.278C34.2511 118.028 27.1944 111.977 24.5235 106.833C22.2059 102.406 21.0835 96.8968 22.5489 93.0329C24.8872 86.8464 29.564 83.6907 36.7038 84.3677C42.0976 84.8885 45.5168 86.5132 49.57 89.9605C51.9084 91.9393 55.5251 95.522 57.3646 97.7508C59.0586 99.7817 59.4743 100.625 61.2826 103.052C63.673 106.249 64.4213 107.832 63.5067 104.312Z" + fill="white" stroke="black" stroke-width="8" /> + + + \ No newline at end of file diff --git a/svg/static/hand2.svg b/svg/static/hand2.svg index ffde511..dd1e64c 100644 --- a/svg/static/hand2.svg +++ b/svg/static/hand2.svg @@ -1,10 +1,7 @@ - - - + fill="white" stroke="black" stroke-width="8" /> diff --git a/svg/static/left_ptr.svg b/svg/static/left_ptr.svg index 6aa65d7..4556993 100644 --- a/svg/static/left_ptr.svg +++ b/svg/static/left_ptr.svg @@ -1,7 +1,4 @@ - - - - - - \ No newline at end of file diff --git a/svg/static/left_tee.svg b/svg/static/left_tee.svg index f704d0e..239efd4 100644 --- a/svg/static/left_tee.svg +++ b/svg/static/left_tee.svg @@ -1,11 +1,8 @@ - - - \ No newline at end of file diff --git a/svg/static/link.svg b/svg/static/link.svg index 60efe5a..f397a81 100644 --- a/svg/static/link.svg +++ b/svg/static/link.svg @@ -1,11 +1,8 @@ - - - \ No newline at end of file diff --git a/svg/static/ll_angle.svg b/svg/static/ll_angle.svg index 2d35f1b..368843a 100644 --- a/svg/static/ll_angle.svg +++ b/svg/static/ll_angle.svg @@ -1,11 +1,8 @@ - - - \ No newline at end of file diff --git a/svg/static/lr_angle.svg b/svg/static/lr_angle.svg index dd90a0c..3765546 100644 --- a/svg/static/lr_angle.svg +++ b/svg/static/lr_angle.svg @@ -1,11 +1,8 @@ - - - \ No newline at end of file diff --git a/svg/static/move.svg b/svg/static/move.svg index 3732775..1ec5ff0 100644 --- a/svg/static/move.svg +++ b/svg/static/move.svg @@ -1,11 +1,8 @@ - - - - - - + + + \ No newline at end of file diff --git a/svg/static/pencil.svg b/svg/static/pencil.svg index a235e3b..0ec361d 100644 --- a/svg/static/pencil.svg +++ b/svg/static/pencil.svg @@ -1,7 +1,4 @@ - - - diff --git a/svg/static/plus.svg b/svg/static/plus.svg index 47940d4..5505ad0 100644 --- a/svg/static/plus.svg +++ b/svg/static/plus.svg @@ -1,9 +1,6 @@ - - - - - - - + + + + \ No newline at end of file diff --git a/svg/static/question_arrow.svg b/svg/static/question_arrow.svg index 1cc74ef..5a663ee 100644 --- a/svg/static/question_arrow.svg +++ b/svg/static/question_arrow.svg @@ -1,13 +1,9 @@ - - - - + d="M74.7074 50.8678C80.4576 46.2864 91.1229 42.6532 100.194 42.5969C114.56 42.5124 122.122 46.8779 128.907 53.4026C135.435 59.6832 138.434 66.0952 137.95 75.9339C137.561 83.9419 135.416 88.5889 132.218 92.9356C130.34 95.5737 126.743 98.9534 121.42 103.056L116.363 107.093C113.232 110.097 111.865 111.439 110.67 114.791C109.778 117.288 110.717 153.499 110.67 157.404H91.6163C91.5878 147.866 90.582 110.538 91.6163 106.426C92.6316 102.427 96.3796 99.5354 101.703 95.4328L107.092 91.2458C108.876 89.9314 111.78 87.3591 112.862 85.7913C114.835 83.1063 116.031 79.3887 116.192 76.1686C116.344 73.1362 115.423 69.6063 112.928 66.527C109.967 62.8657 106.257 60.5375 99.027 60.8567C93.3243 61.1101 88.9595 63.9829 86.2931 66.696C83.1619 69.888 81.7955 75.1828 81.5678 79.3699H62.8086C63.3969 65.438 66.1676 57.6647 74.7074 50.8678Z" + fill="white" stroke="white" stroke-width="20" /> - + \ No newline at end of file diff --git a/svg/static/right_ptr.svg b/svg/static/right_ptr.svg index 8dcbe1e..c6085fd 100644 --- a/svg/static/right_ptr.svg +++ b/svg/static/right_ptr.svg @@ -1,7 +1,4 @@ - - - - - - \ No newline at end of file diff --git a/svg/static/sb_down_arrow.svg b/svg/static/sb_down_arrow.svg index 52825d2..e9d786a 100644 --- a/svg/static/sb_down_arrow.svg +++ b/svg/static/sb_down_arrow.svg @@ -1,9 +1,7 @@ - - - + d="M79.3434 48L79.3333 118.536H39L99.4899 179.014L160 118.536H119.667V48H79.3434Z" fill="white" /> + d="M109.623 58.0138V128.644H135.8L99.5002 164.828L63.2002 128.644H89.3775L89.3876 58.0138H109.623Z" + fill="black" /> \ No newline at end of file diff --git a/svg/static/sb_h_double_arrow.svg b/svg/static/sb_h_double_arrow.svg index bc17a5b..7456beb 100644 --- a/svg/static/sb_h_double_arrow.svg +++ b/svg/static/sb_h_double_arrow.svg @@ -1,7 +1,4 @@ - - - diff --git a/svg/static/sb_left_arrow.svg b/svg/static/sb_left_arrow.svg index f960fc4..65fcf1f 100644 --- a/svg/static/sb_left_arrow.svg +++ b/svg/static/sb_left_arrow.svg @@ -1,9 +1,7 @@ - - - + d="M150.014 80.3434L79.478 80.3333V40L19 100.49L79.478 161V120.667H150.014V80.3434Z" fill="white" /> + d="M140.914 110.536H70.2832V136.714L34.1001 100.414L70.2832 64.1136V90.2909L140.914 90.3011V110.536Z" + fill="black" /> \ No newline at end of file diff --git a/svg/static/sb_right_arrow.svg b/svg/static/sb_right_arrow.svg index 4cb4e58..39aaae3 100644 --- a/svg/static/sb_right_arrow.svg +++ b/svg/static/sb_right_arrow.svg @@ -1,9 +1,7 @@ - - - + d="M48 80.3434L118.536 80.3333V40L179.014 100.49L118.536 161V120.667H48V80.3434Z" fill="white" /> + d="M57.0996 110.536H127.73V136.714L163.913 100.414L127.73 64.1136V90.2909L57.0996 90.3011V110.536Z" + fill="black" /> \ No newline at end of file diff --git a/svg/static/sb_up_arrow.svg b/svg/static/sb_up_arrow.svg index 05c2594..41da323 100644 --- a/svg/static/sb_up_arrow.svg +++ b/svg/static/sb_up_arrow.svg @@ -1,9 +1,6 @@ - - - + d="M80.3434 151.014L80.3333 80.478H40L100.49 20L161 80.478H120.667V151.014H80.3434Z" fill="white" /> + d="M110.623 141V70.3693H136.8L100.5 34.1862L64.2002 70.3693H90.3775L90.3876 141H110.623Z" fill="black" /> \ No newline at end of file diff --git a/svg/static/sb_v_double_arrow.svg b/svg/static/sb_v_double_arrow.svg index 68e65e2..2a2549b 100644 --- a/svg/static/sb_v_double_arrow.svg +++ b/svg/static/sb_v_double_arrow.svg @@ -1,7 +1,4 @@ - - - diff --git a/svg/static/top_side.svg b/svg/static/top_side.svg index b8666bc..6c9b09e 100644 --- a/svg/static/top_side.svg +++ b/svg/static/top_side.svg @@ -1,11 +1,8 @@ - - - \ No newline at end of file diff --git a/svg/static/top_tee.svg b/svg/static/top_tee.svg index 7c4d899..90f7aa9 100644 --- a/svg/static/top_tee.svg +++ b/svg/static/top_tee.svg @@ -1,11 +1,8 @@ - - - \ No newline at end of file diff --git a/svg/static/ul_angle.svg b/svg/static/ul_angle.svg index 9d531e2..8236102 100644 --- a/svg/static/ul_angle.svg +++ b/svg/static/ul_angle.svg @@ -1,11 +1,8 @@ - - - \ No newline at end of file diff --git a/svg/static/ur_angle.svg b/svg/static/ur_angle.svg index 622007d..c7713bb 100644 --- a/svg/static/ur_angle.svg +++ b/svg/static/ur_angle.svg @@ -1,11 +1,8 @@ - - - \ No newline at end of file diff --git a/svg/static/vertical-text.svg b/svg/static/vertical-text.svg index e4bf3d8..7fe2316 100644 --- a/svg/static/vertical-text.svg +++ b/svg/static/vertical-text.svg @@ -1,11 +1,8 @@ - - - + d="M161.618 131.577L161.147 136H165.595H174.935H178.704L178.928 132.238C179.337 125.385 177.994 118.543 175.025 112.341C172.796 107.683 169.704 103.5 165.927 100C169.704 96.4997 172.796 92.3171 175.025 87.6594C177.994 81.4573 179.337 74.6146 178.928 67.7617L178.704 64H174.935H165.595H161.031L161.63 68.5252C162.937 78.3944 157.159 88.0366 147.7 91.6657H104.775V86.4438V82.4438H100.775H91.4353H87.4353V86.4438V91.6657H53.3047C43.8373 87.9566 38.1312 78.3864 39.3643 68.4948L39.9246 64H35.395H26.0549H22.2675L22.0609 67.7818C21.6878 74.6112 23.0342 81.4237 25.9772 87.6097C28.1969 92.2753 31.2719 96.4735 35.0298 100C31.2719 103.527 28.1969 107.725 25.9772 112.39C23.0342 118.576 21.6878 125.389 22.0609 132.218L22.2675 136H26.0549H35.395H39.8361L39.3732 131.583C38.8634 126.719 40.0127 121.822 42.6456 117.668C45.1609 113.7 48.8955 110.624 53.3074 108.888H87.5287V114.11V118.11H91.5287H100.869H104.869V114.11V108.888H147.603C152.04 110.599 155.801 113.668 158.334 117.642C160.982 121.797 162.136 126.704 161.618 131.577Z" + fill="white" stroke="white" stroke-width="8" /> + d="M165.595 132H174.935C175.304 125.826 174.094 119.659 171.417 114.068C168.741 108.476 164.683 103.638 159.618 100C164.683 96.3617 168.741 91.5242 171.417 85.9324C174.094 80.3406 175.304 74.1741 174.935 68H165.595C167.183 79.9885 159.991 91.6081 148.41 95.6657H100.775V86.4438H91.4353V95.6657H52.5807C40.999 91.5158 33.9006 79.9885 35.395 68H26.0549C25.7184 74.1604 26.9326 80.3073 29.5893 85.8913C32.2459 91.4753 36.2622 96.3225 41.2792 100C36.2622 103.677 32.2459 108.525 29.5893 114.109C26.9326 119.693 25.7184 125.84 26.0549 132H35.395C34.7909 126.236 36.1537 120.439 39.2672 115.527C42.3806 110.615 47.0663 106.871 52.5807 104.888H91.5287V114.11H100.869V104.888H148.316C153.857 106.84 158.573 110.575 161.707 115.492C164.84 120.409 166.21 126.223 165.595 132Z" + fill="black" stroke="black" stroke-width="2" /> \ No newline at end of file diff --git a/svg/static/wayland-cursor.svg b/svg/static/wayland-cursor.svg index 8be0097..4fec0c9 100644 --- a/svg/static/wayland-cursor.svg +++ b/svg/static/wayland-cursor.svg @@ -1,11 +1,8 @@ - - - \ No newline at end of file diff --git a/svg/static/xterm.svg b/svg/static/xterm.svg index 01ece7b..c975077 100644 --- a/svg/static/xterm.svg +++ b/svg/static/xterm.svg @@ -1,11 +1,8 @@ - - - + d="M132.077 38.8823L136.5 39.3529V34.9048V25.5647V21.7964L132.738 21.5718C125.885 21.1628 119.043 22.5057 112.841 25.4746C108.183 27.7041 104 30.796 100.5 34.5729C96.9997 30.796 92.8171 27.7041 88.1594 25.4746C81.9573 22.5057 75.1146 21.1628 68.2617 21.5718L64.5 21.7964V25.5647V34.9048V39.4695L69.0252 38.8701C78.8944 37.563 88.5366 43.3407 92.1657 52.7999V95.7247H86.9438H82.9438V99.7247V109.065V113.065H86.9438H92.1657V147.195C88.4566 156.663 78.8864 162.369 68.9948 161.136L64.5 160.575V165.105V174.445V178.232L68.2818 178.439C75.1112 178.812 81.9237 177.466 88.1097 174.523C92.7753 172.303 96.9735 169.228 100.5 165.47C104.027 169.228 108.225 172.303 112.89 174.523C119.076 177.466 125.889 178.812 132.718 178.439L136.5 178.232V174.445V165.105V160.664L132.083 161.127C127.219 161.637 122.322 160.487 118.168 157.854C114.2 155.339 111.124 151.605 109.388 147.193V112.971H114.61H118.61V108.971V99.6313V95.6313H114.61H109.388V52.897C111.099 48.46 114.168 44.6987 118.142 42.1663C122.297 39.518 127.204 38.364 132.077 38.8823Z" + fill="white" stroke="white" stroke-width="8" /> + d="M132.5 34.9048V25.5647C126.326 25.1962 120.159 26.4059 114.568 29.0825C108.976 31.7592 104.138 35.8169 100.5 40.8824C96.8617 35.8169 92.0242 31.7592 86.4324 29.0825C80.8406 26.4059 74.6741 25.1962 68.5 25.5647V34.9048C80.4885 33.317 92.1081 40.5088 96.1657 52.0905V99.7247H86.9438V109.065H96.1657V147.919C92.0158 159.501 80.4885 166.599 68.5 165.105V174.445C74.6604 174.782 80.8073 173.567 86.3913 170.911C91.9753 168.254 96.8225 164.238 100.5 159.221C104.177 164.238 109.025 168.254 114.609 170.911C120.193 173.567 126.34 174.782 132.5 174.445V165.105C126.736 165.709 120.939 164.346 116.027 161.233C111.115 158.119 107.371 153.434 105.388 147.919V108.971H114.61V99.6313H105.388V52.1839C107.34 46.6426 111.075 41.9267 115.992 38.7931C120.909 35.6596 126.723 34.2902 132.5 34.9048Z" + fill="black" stroke="black" stroke-width="2" /> \ No newline at end of file diff --git a/svg/static/zoom-in.svg b/svg/static/zoom-in.svg index 82e9d83..fc8de9b 100644 --- a/svg/static/zoom-in.svg +++ b/svg/static/zoom-in.svg @@ -1,7 +1,4 @@ - - - diff --git a/svg/static/zoom-out.svg b/svg/static/zoom-out.svg index 6f62b66..3a8965a 100644 --- a/svg/static/zoom-out.svg +++ b/svg/static/zoom-out.svg @@ -1,7 +1,4 @@ - - - From e71b23738fb22f15aa0e469ca51eb6749fbef176 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Tue, 2 Feb 2021 17:19:11 +0530 Subject: [PATCH 42/63] =?UTF-8?q?=F0=9F=94=A7=20Linear=20cursor=20transati?= =?UTF-8?q?ons?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- builder/applbuild/constants.py | 66 +++++++++++++++++----------------- svg/static/left_ptr.svg | 8 ++--- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/builder/applbuild/constants.py b/builder/applbuild/constants.py index 16671aa..6216d42 100644 --- a/builder/applbuild/constants.py +++ b/builder/applbuild/constants.py @@ -10,7 +10,7 @@ AUTHOR = "Kaiz Khatri" URL = "https://github.com/ful1e5/apple_cursor" # XCursor -X_DELAY: int = 10 +X_DELAY: int = 5 X_SIZES: List[Tuple[int, int]] = [ (22, 22), (24, 24), @@ -39,51 +39,51 @@ X_CURSORS_CFG: Dict[str, Dict[str, int]] = { "all-scroll.png": {"xhot": 100, "yhot": 100}, "bottom_left_corner.png": {"xhot": 100, "yhot": 100}, "bottom_right_corner.png": {"xhot": 100, "yhot": 100}, - "bottom_tee.png": {"xhot": 141, "yhot": 99}, - "center_ptr.png": {"xhot": 61, "yhot": 100}, - "crossed_circle.png": {"xhot": 47, "yhot": 39}, - "dnd_no_drop.png": {"xhot": 47, "yhot": 39}, - "context-menu.png": {"xhot": 61, "yhot": 58}, - "copy.png": {"xhot": 47, "yhot": 39}, + "bottom_tee.png": {"xhot": 98, "yhot": 137}, + "center_ptr.png": {"xhot": 100, "yhot": 70}, + "context-menu.png": {"xhot": 43, "yhot": 61}, + "copy.png": {"xhot": 67, "yhot": 46}, "cross.png": {"xhot": 100, "yhot": 100}, + "crossed_circle.png": {"xhot": 67, "yhot": 46}, "crosshair.png": {"xhot": 100, "yhot": 100}, + "dnd_no_drop.png": {"xhot": 100, "yhot": 100}, "dotbox.png": {"xhot": 100, "yhot": 100}, - "hand1.png": {"xhot": 94, "yhot": 105}, - "hand2.png": {"xhot": 66, "yhot": 34}, - "left_ptr.png": {"xhot": 68, "yhot": 41}, + "hand1.png": {"xhot": 94, "yhot": 72}, + "hand2.png": {"xhot": 67, "yhot": 46}, + "left_ptr.png": {"xhot": 69, "yhot": 56}, "left_side.png": {"xhot": 100, "yhot": 100}, - "left_tee.png": {"xhot": 100, "yhot": 58}, - "link.png": {"xhot": 61, "yhot": 105}, - "ll_angle.png": {"xhot": 141, "yhot": 58}, - "lr_angle.png": {"xhot": 141, "yhot": 138}, - "move.png": {"xhot": 80, "yhot": 106}, - "pencil.png": {"xhot": 141, "yhot": 58}, - "plus.png": {"xhot": 100, "yhot": 100}, - "question_arrow.png": {"xhot": 105, "yhot": 105}, - "right_ptr.png": {"xhot": 61, "yhot": 138}, - "right_tee.png": {"xhot": 100, "yhot": 138}, - "sb_down_arrow.png": {"xhot": 133, "yhot": 99}, + "left_tee.png": {"xhot": 100, "yhot": 100}, + "link.png": {"xhot": 120, "yhot": 55}, + "ll_angle.png": {"xhot": 100, "yhot": 100}, + "lr_angle.png": {"xhot": 100, "yhot": 100}, + "move.png": {"xhot": 80, "yhot": 71}, + "pencil.png": {"xhot": 81, "yhot": 117}, + "plus.png": {"xhot": 98, "yhot": 100}, + "question_arrow.png": {"xhot": 99, "yhot": 99}, + "right_ptr.png": {"xhot": 136, "yhot": 66}, + "right_tee.png": {"xhot": 98, "yhot": 99}, + "sb_down_arrow.png": {"xhot": 100, "yhot": 100}, "sb_h_double_arrow.png": {"xhot": 100, "yhot": 100}, - "sb_left_arrow.png": {"xhot": 100, "yhot": 68}, - "sb_right_arrow.png": {"xhot": 100, "yhot": 138}, - "sb_up_arrow.png": {"xhot": 68, "yhot": 99}, + "sb_left_arrow.png": {"xhot": 100, "yhot": 100}, + "sb_right_arrow.png": {"xhot": 100, "yhot": 100}, + "sb_up_arrow.png": {"xhot": 100, "yhot": 100}, "sb_v_double_arrow.png": {"xhot": 100, "yhot": 100}, "top_side.png": {"xhot": 100, "yhot": 100}, - "top_tee.png": {"xhot": 61, "yhot": 99}, - "ul_angle.png": {"xhot": 61, "yhot": 65}, - "ur_angle.png": {"xhot": 61, "yhot": 138}, - "vertical-text.png": {"xhot": 100, "yhot": 102}, + "top_tee.png": {"xhot": 100, "yhot": 100}, + "ul_angle.png": {"xhot": 100, "yhot": 100}, + "ur_angle.png": {"xhot": 100, "yhot": 100}, + "vertical-text.png": {"xhot": 96, "yhot": 99}, "wayland-cursor.png": {"xhot": 100, "yhot": 100}, "X_cursor.png": {"xhot": 100, "yhot": 100}, - "xterm.png": {"xhot": 97, "yhot": 97}, - "zoom-in.png": {"xhot": 76, "yhot": 78}, - "zoom-out.png": {"xhot": 76, "yhot": 78}, + "xterm.png": {"xhot": 100, "yhot": 104}, + "zoom-in.png": {"xhot": 100, "yhot": 100}, + "zoom-out.png": {"xhot": 100, "yhot": 100}, # # Animated # # Note: Animated cursors not need any extension & frames number - "wait": {"xhot": 104, "yhot": 105}, - "left_ptr_watch": {"xhot": 104, "yhot": 105}, + "wait": {"xhot": 100, "yhot": 100}, + "left_ptr_watch": {"xhot": 67, "yhot": 46}, } WIN_CURSORS_CFG: Dict[str, Dict[str, str]] = { diff --git a/svg/static/left_ptr.svg b/svg/static/left_ptr.svg index 4556993..b2d7376 100644 --- a/svg/static/left_ptr.svg +++ b/svg/static/left_ptr.svg @@ -1,10 +1,10 @@ - - - - \ No newline at end of file From e4aa2ccbee7aa8dc17573929f52a154365a82ae9 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Tue, 2 Feb 2021 17:54:11 +0530 Subject: [PATCH 43/63] =?UTF-8?q?=F0=9F=92=9D=20Smooth=20animation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bitmap/src/index.ts | 2 +- builder/applbuild/constants.py | 6 +++--- builder/applbuild/generator.py | 20 ++++++++++++-------- svg/animated/wait.svg | 2 +- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/bitmap/src/index.ts b/bitmap/src/index.ts index a0b771a..2b95690 100644 --- a/bitmap/src/index.ts +++ b/bitmap/src/index.ts @@ -108,7 +108,7 @@ const main = async () => { const { data: imgNData } = PNG.sync.read(imgN); const diff = Pixelmatch(img1Data, imgNData, null, width, height, { - threshold: 0.2, + threshold: 0.12, }); if (diff <= 100) { diff --git a/builder/applbuild/constants.py b/builder/applbuild/constants.py index 6216d42..3aad1c1 100644 --- a/builder/applbuild/constants.py +++ b/builder/applbuild/constants.py @@ -10,7 +10,7 @@ AUTHOR = "Kaiz Khatri" URL = "https://github.com/ful1e5/apple_cursor" # XCursor -X_DELAY: int = 5 +X_DELAY: int = 10 X_SIZES: List[Tuple[int, int]] = [ (22, 22), (24, 24), @@ -28,7 +28,7 @@ X_SIZES: List[Tuple[int, int]] = [ # Windows Cursor -WIN_DELAY = 3 +WIN_DELAY = 1 CANVAS_SIZE = (32, 32) SIZE = (24, 24) @@ -91,7 +91,7 @@ WIN_CURSORS_CFG: Dict[str, Dict[str, str]] = { # Static # "right_ptr.png": {"to": "Alternate", "position": "top_left"}, - "cross.png": {"to": "Cross"}, + "cross.png": {"to": "Cross", "size": (32, 32)}, "left_ptr.png": {"to": "Default", "position": "top_left"}, "bottom_left_corner.png": {"to": "Diagonal_1"}, "bottom_right_corner.png": {"to": "Diagonal_2"}, diff --git a/builder/applbuild/generator.py b/builder/applbuild/generator.py index 15a4b13..6075771 100644 --- a/builder/applbuild/generator.py +++ b/builder/applbuild/generator.py @@ -36,7 +36,7 @@ def xbuild(bitmaps_dir: LikePath, x_out_dir: Path) -> None: with CursorAlias.from_bitmap(png, hotspot) as alias: x_cfg = alias.create(X_SIZES, delay) - print(f"Building {x_cfg.stem} XCursor...") + print(f"Building '{x_cfg.stem}' XCursor...") XCursor.create(x_cfg, x_out_dir) add_missing_xcursor(x_out_dir / "cursors") @@ -67,11 +67,12 @@ def wbuild(bitmaps_dir: LikePath, win_out_dir: Path) -> None: size = item["size"] win_key = item["win_key"] canvas_size = item["canvas_size"] + win_delay = item["win_delay"] - win_cfg = alias.reproduce(size, canvas_size, position, delay=3).rename( - win_key - ) - print(f"Building {win_cfg.stem} Windows Cursor...") + win_cfg = alias.reproduce( + size, canvas_size, position, delay=win_delay + ).rename(win_key) + print(f"Building '{win_cfg.stem}' Windows Cursor...") WindowsCursor.create(win_cfg, win_out_dir) WindowsPackager(win_out_dir, THEME_NAME, COMMENT, AUTHOR, URL) @@ -92,9 +93,12 @@ def build(bitmaps_dir: LikePath, x_out_dir: Path, win_out_dir: Path) -> None: size = item["size"] win_key = item["win_key"] canvas_size = item["canvas_size"] + win_delay = item["win_delay"] - win_cfg = alias.reproduce(size, canvas_size, position, delay=3).rename(win_key) - print(f"Building {win_cfg.stem} Windows Cursor...") + win_cfg = alias.reproduce(size, canvas_size, position, delay=win_delay).rename( + win_key + ) + print(f"Building '{win_cfg.stem}' Windows Cursor...") WindowsCursor.create(win_cfg, win_out_dir) config = get_config(bitmaps_dir) @@ -107,7 +111,7 @@ def build(bitmaps_dir: LikePath, x_out_dir: Path, win_out_dir: Path) -> None: with CursorAlias.from_bitmap(png, hotspot) as alias: x_cfg = alias.create(X_SIZES, delay) - print(f"Building {x_cfg.stem} XCursor...") + print(f"Building '{x_cfg.stem}' XCursor...") XCursor.create(x_cfg, x_out_dir) if item.get("win_key"): diff --git a/svg/animated/wait.svg b/svg/animated/wait.svg index 5bad903..43ee9ce 100644 --- a/svg/animated/wait.svg +++ b/svg/animated/wait.svg @@ -4,7 +4,7 @@ + begin="0s" dur="0.6s" repeatCount="indefinite" /> From f4e1a7377a6223a1157c0f3f7d1d8431de5368a9 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Wed, 3 Feb 2021 17:32:50 +0530 Subject: [PATCH 44/63] =?UTF-8?q?=F0=9F=9A=80=20Github=20Action=20'build'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 54 +++++++++---------- .gitignore | 2 +- Makefile | 12 ++--- {bitmap => bitmapper}/Makefile | 0 {bitmap => bitmapper}/package.json | 4 +- {bitmap => bitmapper}/src/config.ts | 2 +- {bitmap => bitmapper}/src/index.ts | 0 .../src/utils/getFrameName.ts | 0 {bitmap => bitmapper}/src/utils/toHTML.ts | 0 {bitmap => bitmapper}/tsconfig.json | 0 {bitmap => bitmapper}/yarn.lock | 0 builder/build.py | 2 +- 12 files changed, 37 insertions(+), 39 deletions(-) rename {bitmap => bitmapper}/Makefile (100%) rename {bitmap => bitmapper}/package.json (90%) rename {bitmap => bitmapper}/src/config.ts (92%) rename {bitmap => bitmapper}/src/index.ts (100%) rename {bitmap => bitmapper}/src/utils/getFrameName.ts (100%) rename {bitmap => bitmapper}/src/utils/toHTML.ts (100%) rename {bitmap => bitmapper}/tsconfig.json (100%) rename {bitmap => bitmapper}/yarn.lock (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2011ff0..81c4432 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,6 +27,11 @@ jobs: sudo apt install libx11-dev libxcursor-dev libpng-dev continue-on-error: false + - name: Set Up NodeJS 12.x + - uses: actions/setup-node@v1 + with: + node-version: "12.x" + - name: Get yarn cache directory path id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" @@ -39,51 +44,44 @@ jobs: restore-keys: | ${{ runner.os }}-yarn- - - uses: actions/setup-node@v1 - with: - node-version: "12.x" - - run: yarn install - - run: yarn render - - - name: Set up Python + - name: Set up Python 3.8 uses: actions/setup-python@v2 with: - python-version: "3.x" + python-version: "3.8" - - name: Cache pip dependencies - uses: actions/cache@v2 + - name: Get pip cache directory path + id: pip-cache-dir-path + run: echo "::set-output name=dir::$(pip cache dir)" + + - uses: actions/cache@v2 + id: pip-cache # use this to check for `cache-hit` (`steps.pip-cache.outputs.cache-hit != 'true'`) with: - # This path is specific to Ubuntu - path: ~/.cache/pip - # Look to see if there is a cache hit for the corresponding requirements file - key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} + path: ${{ steps.pip-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} restore-keys: | ${{ runner.os }}-pip- - ${{ runner.os }}- - - - name: Install pip dependencies - run: | - python -m pip install --upgrade pip - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - continue-on-error: false - name: Generating `macOSBigSur` Cursor Theme - run: python build.py + run: make - name: Compressing Artifacts run: | - tar -cvzf logs.tar.gz build.log - tar -cvzf bitmaps.tar.gz bitmaps - tar -cvzf macOSBigSur.tar.gz themes + tar -cvzf macOSBigSur.tar.gz themes/macOSBigSur - name: Uploading `bitmaps` artifact uses: actions/upload-artifact@v2 with: - name: bitmaps - path: bitmaps.tar.gz + name: bitmaps/* + path: bitmaps - - name: Uploading `macOSBigSur` Theme artifact + - 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/* diff --git a/.gitignore b/.gitignore index 9409a67..586d00a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ ########## Custom -pngs +bitmaps themes builder/files.txt diff --git a/Makefile b/Makefile index 7f2010d..817b625 100644 --- a/Makefile +++ b/Makefile @@ -9,21 +9,21 @@ root_dest := $(root)/$(theme) all: clean render build -unix: clean render pngs +unix: clean render bitmaps @cd builder && make build_unix -windows: clean render pngs +windows: clean render bitmaps @cd builder && make build_windows .PHONY: all clean: - @rm -rf pngs themes + @rm -rf bitmaps themes -render: bitmap svg - @cd bitmap && $(MAKE) +render: bitmapper svg + @cd bitmapper && $(MAKE) -build: pngs +build: bitmaps @cd builder && $(MAKE) .ONESHELL: diff --git a/bitmap/Makefile b/bitmapper/Makefile similarity index 100% rename from bitmap/Makefile rename to bitmapper/Makefile diff --git a/bitmap/package.json b/bitmapper/package.json similarity index 90% rename from bitmap/package.json rename to bitmapper/package.json index c6178db..f4f7051 100644 --- a/bitmap/package.json +++ b/bitmapper/package.json @@ -1,6 +1,6 @@ { - "name": "apple_cursor_bitmap", - "version": "1.0.7", + "name": "apple_cursor_bitmapper", + "version": "1.0.8", "main": "index.js", "scripts": { "watch": "nodemon --inspect src/index.ts", diff --git a/bitmap/src/config.ts b/bitmapper/src/config.ts similarity index 92% rename from bitmap/src/config.ts rename to bitmapper/src/config.ts index b4d523f..6ab4744 100644 --- a/bitmap/src/config.ts +++ b/bitmapper/src/config.ts @@ -4,7 +4,7 @@ import { readdirSync, existsSync } from "fs"; // Directory resolve const projectRoot = path.resolve(__dirname, "../../"); -const outDir = path.resolve(projectRoot, "pngs"); +const outDir = path.resolve(projectRoot, "bitmaps"); const staticSvgDir = path.resolve(projectRoot, "svg", "static"); const animatedSvgDir = path.resolve(projectRoot, "svg", "animated"); diff --git a/bitmap/src/index.ts b/bitmapper/src/index.ts similarity index 100% rename from bitmap/src/index.ts rename to bitmapper/src/index.ts diff --git a/bitmap/src/utils/getFrameName.ts b/bitmapper/src/utils/getFrameName.ts similarity index 100% rename from bitmap/src/utils/getFrameName.ts rename to bitmapper/src/utils/getFrameName.ts diff --git a/bitmap/src/utils/toHTML.ts b/bitmapper/src/utils/toHTML.ts similarity index 100% rename from bitmap/src/utils/toHTML.ts rename to bitmapper/src/utils/toHTML.ts diff --git a/bitmap/tsconfig.json b/bitmapper/tsconfig.json similarity index 100% rename from bitmap/tsconfig.json rename to bitmapper/tsconfig.json diff --git a/bitmap/yarn.lock b/bitmapper/yarn.lock similarity index 100% rename from bitmap/yarn.lock rename to bitmapper/yarn.lock diff --git a/builder/build.py b/builder/build.py index 23a7f21..726c7cc 100644 --- a/builder/build.py +++ b/builder/build.py @@ -29,7 +29,7 @@ parser.add_argument( dest="png_dir", metavar="PNG", type=str, - default="../pngs", + default="../bitmaps", help="To change pngs directory. (default: %(default)s)", ) From 8d1f9a67154601cc38f3785be21285b075882e73 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Wed, 3 Feb 2021 17:41:02 +0530 Subject: [PATCH 45/63] =?UTF-8?q?=E2=9C=A8=20Prettier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 81c4432..2c8c7a8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,15 +23,9 @@ jobs: - uses: actions/checkout@v2 - name: Install build dependencies (apt) - run: | - sudo apt install libx11-dev libxcursor-dev libpng-dev + run: sudo apt install -y libx11-dev libxcursor-dev libpng-dev continue-on-error: false - - name: Set Up NodeJS 12.x - - uses: actions/setup-node@v1 - with: - node-version: "12.x" - - name: Get yarn cache directory path id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" @@ -44,10 +38,10 @@ jobs: restore-keys: | ${{ runner.os }}-yarn- - - name: Set up Python 3.8 - uses: actions/setup-python@v2 + - name: Set Up NodeJS 12.x + - uses: actions/setup-node@v1 with: - python-version: "3.8" + node-version: "12.x" - name: Get pip cache directory path id: pip-cache-dir-path @@ -61,12 +55,16 @@ jobs: 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 - - name: Compressing Artifacts - run: | - tar -cvzf macOSBigSur.tar.gz themes/macOSBigSur + - name: Compressing UNIX theme + run: tar -cvzf macOSBigSur.tar.gz themes/macOSBigSur - name: Uploading `bitmaps` artifact uses: actions/upload-artifact@v2 From 857f322ea6a99a268f894072b6caca6747f7857f Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Wed, 3 Feb 2021 17:51:34 +0530 Subject: [PATCH 46/63] =?UTF-8?q?=E2=9A=A1=20Fix=20Action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2c8c7a8..3e7e28a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -69,8 +69,8 @@ jobs: - name: Uploading `bitmaps` artifact uses: actions/upload-artifact@v2 with: - name: bitmaps/* - path: bitmaps + name: bitmaps + path: bitmaps/* - name: Uploading `macOSBigSur` UNIX Theme artifact uses: actions/upload-artifact@v2 From 54fb0bc473a0a2cf840e906e3193dbf2f1c0fdbf Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Wed, 3 Feb 2021 18:21:20 +0530 Subject: [PATCH 47/63] =?UTF-8?q?=F0=9F=9A=80=20apt=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3e7e28a..d2a673a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,8 @@ jobs: - uses: actions/checkout@v2 - name: Install build dependencies (apt) - run: sudo apt install -y libx11-dev libxcursor-dev libpng-dev + run: | + sudo apt install -y libx11-dev libxcursor-dev libpng-dev continue-on-error: false - name: Get yarn cache directory path From 561fe8283f504a5cf8e1d6e4cfa386365ce9505b Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Wed, 3 Feb 2021 18:31:56 +0530 Subject: [PATCH 48/63] =?UTF-8?q?=F0=9F=93=A6=20step=20name=20added?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d2a673a..dd84e5f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,14 +24,15 @@ jobs: - name: Install build dependencies (apt) run: | - sudo apt install -y libx11-dev libxcursor-dev libpng-dev + 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)" - - uses: actions/cache@v2 + - 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 }} @@ -48,7 +49,8 @@ jobs: id: pip-cache-dir-path run: echo "::set-output name=dir::$(pip cache dir)" - - uses: actions/cache@v2 + - 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: ${{ steps.pip-cache-dir-path.outputs.dir }} From 9353defcdb445b7acd917fa3bb1675752db50887 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Wed, 3 Feb 2021 18:33:02 +0530 Subject: [PATCH 49/63] =?UTF-8?q?=F0=9F=9A=A8=20Debug=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 46 ++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dd84e5f..0fb74af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -58,31 +58,31 @@ jobs: restore-keys: | ${{ runner.os }}-pip- - - name: Set up Python 3.8 - uses: actions/setup-python@v2 - with: - python-version: "3.8" + # - name: Set up Python 3.8 + # uses: actions/setup-python@v2 + # with: + # python-version: "3.8" - - name: Generating `macOSBigSur` Cursor Theme - run: make + # - name: Generating `macOSBigSur` Cursor Theme + # run: make - - name: Compressing UNIX theme - run: tar -cvzf macOSBigSur.tar.gz themes/macOSBigSur + # - 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 `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` 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/* + # - name: Uploading `macOSBigSur` Windows Theme artifact + # uses: actions/upload-artifact@v2 + # with: + # name: macOSBigSur_Windows + # path: themes/macOSBigSur_Windows/* From e9b9a64dea2dc88f7b324dda9bafd12624448068 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Wed, 3 Feb 2021 18:52:07 +0530 Subject: [PATCH 50/63] =?UTF-8?q?=F0=9F=9A=80=20Syntax=20error=20fixed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 60 ++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0fb74af..1ae2be8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,16 +21,15 @@ jobs: steps: - uses: actions/checkout@v2 - + - name: Install build dependencies (apt) - run: | - sudo apt install -y libx11-dev libxcursor-dev libpng-dev + 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'`) @@ -39,9 +38,9 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - + - name: Set Up NodeJS 12.x - - uses: actions/setup-node@v1 + uses: actions/setup-node@v1 with: node-version: "12.x" @@ -58,31 +57,32 @@ jobs: restore-keys: | ${{ runner.os }}-pip- - # - name: Set up Python 3.8 - # uses: actions/setup-python@v2 - # with: - # python-version: "3.8" + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: "3.8" - # - name: Generating `macOSBigSur` Cursor Theme - # run: make + - name: Generating `macOSBigSur` Cursor Theme + run: make + continue-on-error: false - # - name: Compressing UNIX theme - # run: tar -cvzf macOSBigSur.tar.gz themes/macOSBigSur + - 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 `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` 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/* + - name: Uploading `macOSBigSur` Windows Theme artifact + uses: actions/upload-artifact@v2 + with: + name: macOSBigSur_Windows + path: themes/macOSBigSur_Windows/* From 21bcebae6c67e678237de38a7ede0c702e28ff6c Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Wed, 3 Feb 2021 18:54:18 +0530 Subject: [PATCH 51/63] =?UTF-8?q?=F0=9F=92=BE=20Caching?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1ae2be8..f954210 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,7 +52,7 @@ jobs: uses: actions/cache@v2 id: pip-cache # use this to check for `cache-hit` (`steps.pip-cache.outputs.cache-hit != 'true'`) with: - path: ${{ steps.pip-cache-dir-path.outputs.dir }} + path: ${{ steps.pip-cache-dir-path.output.dir }} key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} restore-keys: | ${{ runner.os }}-pip- From 376b4d35961147b5b6cf67b08f18aaf665e1d5c2 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Wed, 3 Feb 2021 19:00:49 +0530 Subject: [PATCH 52/63] =?UTF-8?q?=F0=9F=93=A6=20Hardcoded=20"pip"=20cachin?= =?UTF-8?q?g=20path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f954210..39bcc24 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,15 +44,11 @@ jobs: with: node-version: "12.x" - - name: Get pip cache directory path - id: pip-cache-dir-path - run: echo "::set-output name=dir::$(pip cache dir)" - - 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: ${{ steps.pip-cache-dir-path.output.dir }} + path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} restore-keys: | ${{ runner.os }}-pip- From 692ad284c8856743bffadd001f6c33c3fd64f429 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Thu, 4 Feb 2021 17:51:55 +0530 Subject: [PATCH 53/63] =?UTF-8?q?=F0=9F=93=82=20Constants=20frame=20rates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bitmapper/src/index.ts | 94 ++++++++++++++--------------- bitmapper/src/utils/frameNumber.ts | 7 +++ bitmapper/src/utils/getFrameName.ts | 18 ------ bitmapper/src/utils/matchImages.ts | 11 ++++ svg/animated/left_ptr_watch.svg | 2 +- svg/animated/wait.svg | 2 +- 6 files changed, 64 insertions(+), 70 deletions(-) create mode 100644 bitmapper/src/utils/frameNumber.ts delete mode 100644 bitmapper/src/utils/getFrameName.ts create mode 100644 bitmapper/src/utils/matchImages.ts diff --git a/bitmapper/src/index.ts b/bitmapper/src/index.ts index 2b95690..9cff291 100644 --- a/bitmapper/src/index.ts +++ b/bitmapper/src/index.ts @@ -1,12 +1,10 @@ import fs from "fs"; import path from "path"; -import Pixelmatch from "pixelmatch"; - -import { PNG } from "pngjs"; import puppeteer, { ElementHandle, Page } from "puppeteer"; import { animatedCursors, outDir, staticCursors } from "./config"; -import { getFrameName } from "./utils/getFrameName"; +import { frameNumber } from "./utils/frameNumber"; +import { matchImages } from "./utils/matchImages"; import { toHTML } from "./utils/toHTML"; const getSVGElement = async (page: Page) => { @@ -19,13 +17,27 @@ const getSVGElement = async (page: Page) => { }; const screenshot = async (element: ElementHandle): Promise => { - return await element.screenshot({ + return element.screenshot({ omitBackground: true, encoding: "binary", }); }; -const saveFrame = (key: string, frame: Buffer) => { +const stopAnimation = async (page: Page) => { + // @ts-ignore + await page._client.send("Animation.setPlaybackRate", { + playbackRate: 0, + }); +}; + +const resumeAnimation = async (page: Page, playbackRate: number = 0.1) => { + // @ts-ignore + await page._client.send("Animation.setPlaybackRate", { + playbackRate, + }); +}; + +const saveFrameImage = (key: string, frame: Buffer) => { const out_path = path.resolve(outDir, key); fs.writeFileSync(out_path, frame, { encoding: "binary" }); }; @@ -73,56 +85,38 @@ const main = async () => { await page.setContent(html); const svg = await getSVGElement(page); + await stopAnimation(page); let index = 1; - const playbackRate = 0.1; + const frameLimit = 300; let breakRendering = false; + let prevImg: Buffer; - // Rendering 1st frame - const img1 = await screenshot(svg); - const key1 = getFrameName(index, svgFilePath, 4); - - console.log("Saving", key1, "..."); - saveFrame(key1, img1); - - // stop animation - // @ts-ignore - await page._client.send("Animation.setPlaybackRate", { - playbackRate: 0, - }); - - // Rendering frames till `imgN` matched to `img1` + // Rendering frames till `imgN` matched to `imgN-1` (When Animation is done) while (!breakRendering) { - ++index; - - // resume animation - // @ts-ignore - await page._client.send("Animation.setPlaybackRate", { - playbackRate, - }); - - const imgN = await screenshot(svg); - const keyN = getFrameName(index, svgFilePath, 4); - - const { data: img1Data, width, height } = PNG.sync.read(img1); - const { data: imgNData } = PNG.sync.read(imgN); - - const diff = Pixelmatch(img1Data, imgNData, null, width, height, { - threshold: 0.12, - }); - - if (diff <= 100) { - breakRendering = !breakRendering; - } else { - console.log("Saving", keyN, "..."); - saveFrame(keyN, imgN); - - // stop animation - // @ts-ignore - await page._client.send("Animation.setPlaybackRate", { - playbackRate: 0, - }); + if (index > frameLimit) { + throw new Error("Reached the frame limit."); } + + resumeAnimation(page); + const img = await screenshot(svg); + stopAnimation(page); + + if (index > 1) { + // @ts-ignore + const diff = matchImages(prevImg, img); + if (diff <= 100) { + breakRendering = !breakRendering; + } + } + const frame = frameNumber(index, 3); + const key = `${path.basename(svgFilePath, ".svg")}-${frame}.png`; + + console.log("Saving", key, "..."); + saveFrameImage(key, img); + + prevImg = img; + ++index; } await page.close(); diff --git a/bitmapper/src/utils/frameNumber.ts b/bitmapper/src/utils/frameNumber.ts new file mode 100644 index 0000000..76d1165 --- /dev/null +++ b/bitmapper/src/utils/frameNumber.ts @@ -0,0 +1,7 @@ +export const frameNumber = (index: number, padding: number) => { + let result = "" + index; + while (result.length < padding) { + result = "0" + result; + } + return result; +}; diff --git a/bitmapper/src/utils/getFrameName.ts b/bitmapper/src/utils/getFrameName.ts deleted file mode 100644 index d7d5d70..0000000 --- a/bitmapper/src/utils/getFrameName.ts +++ /dev/null @@ -1,18 +0,0 @@ -import path from "path"; - -export const frameNumber = (index: number, endIndex: number) => { - let result = "" + index; - while (result.length < endIndex) { - result = "0" + result; - } - return result; -}; - -export const getFrameName = ( - index: number, - fileName: string, - padding: number = 2 -) => { - const frame = frameNumber(index, padding); - return `${path.basename(fileName, ".svg")}-${frame}.png`; -}; diff --git a/bitmapper/src/utils/matchImages.ts b/bitmapper/src/utils/matchImages.ts new file mode 100644 index 0000000..6d09a95 --- /dev/null +++ b/bitmapper/src/utils/matchImages.ts @@ -0,0 +1,11 @@ +import Pixelmatch from "pixelmatch"; +import { PNG } from "pngjs"; + +export const matchImages = (img1: Buffer, img2: Buffer): number => { + const { data: img1Data, width, height } = PNG.sync.read(img1); + const { data: imgNData } = PNG.sync.read(img2); + + return Pixelmatch(img1Data, imgNData, null, width, height, { + threshold: 0.1, + }); +}; diff --git a/svg/animated/left_ptr_watch.svg b/svg/animated/left_ptr_watch.svg index 74fec06..eeae5ea 100644 --- a/svg/animated/left_ptr_watch.svg +++ b/svg/animated/left_ptr_watch.svg @@ -1,7 +1,7 @@ + begin="0s" dur="0.6s" repeatCount="1" /> diff --git a/svg/animated/wait.svg b/svg/animated/wait.svg index 43ee9ce..26710b5 100644 --- a/svg/animated/wait.svg +++ b/svg/animated/wait.svg @@ -4,7 +4,7 @@ + begin="0s" dur="0.6s" repeatCount="1" /> From 3f09a14176bc8b9f9163f271ed434e6c7e641152 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Thu, 4 Feb 2021 19:48:59 +0530 Subject: [PATCH 54/63] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Increase=20size?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- svg/animated/wait.svg | 138 ++++++++++++++++++++------------------- svg/static/cross.svg | 5 +- svg/static/crosshair.svg | 12 ++-- 3 files changed, 80 insertions(+), 75 deletions(-) diff --git a/svg/animated/wait.svg b/svg/animated/wait.svg index 26710b5..d09ca3e 100644 --- a/svg/animated/wait.svg +++ b/svg/animated/wait.svg @@ -1,69 +1,73 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/svg/static/cross.svg b/svg/static/cross.svg index 3ef71f3..415ccb4 100644 --- a/svg/static/cross.svg +++ b/svg/static/cross.svg @@ -1,6 +1,7 @@ + d="M180 84H115.893V20H84.1067V84H20V116H84.1067V180H115.893V116H180V84Z" fill="white" /> + d="M169.818 94.7369H105.271V30.1819H94.7286V94.7369H30.1816V105.263H94.7286V169.818H105.271V105.263H169.818V94.7369Z" + fill="black" /> \ No newline at end of file diff --git a/svg/static/crosshair.svg b/svg/static/crosshair.svg index 973f349..663386b 100644 --- a/svg/static/crosshair.svg +++ b/svg/static/crosshair.svg @@ -1,12 +1,12 @@ + fill="black" /> - - - - + stroke="black" stroke-width="6" /> + + + + \ No newline at end of file From d6f9ad87508e19c29f1c1fd0bc777f30f7a324f1 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Thu, 4 Feb 2021 19:49:42 +0530 Subject: [PATCH 55/63] =?UTF-8?q?=F0=9F=94=A7=20Dynamic=20Cursors=20sizes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 13 ------ builder/applbuild/configure.py | 49 ++++++++++++++++++-- builder/applbuild/constants.py | 48 +++++++++---------- builder/applbuild/generator.py | 84 +++++++++++++++++----------------- 4 files changed, 109 insertions(+), 85 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 39bcc24..368ef77 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,6 @@ on: - "**.bbcode" - LICENSE branches: [main, dev] - pull_request: paths-ignore: - "**.md" @@ -18,18 +17,14 @@ on: 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'`) @@ -38,12 +33,10 @@ jobs: 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'`) @@ -52,31 +45,25 @@ jobs: 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: diff --git a/builder/applbuild/configure.py b/builder/applbuild/configure.py index 055fef9..26975ae 100644 --- a/builder/applbuild/configure.py +++ b/builder/applbuild/configure.py @@ -6,15 +6,47 @@ from typing import Any, Dict, List, Tuple, Union from clickgen.util import LikePath, PNGProvider -from applbuild.constants import * +from applbuild.constants import ( + WIN_CANVAS_SIZE, + WIN_CURSORS_CFG, + WIN_DELAY, + WIN_SIZE, + X_CURSORS_CFG, + X_DELAY, + X_SIZES, +) -def get_config(bitmaps_dir: LikePath) -> Dict[str, Any]: +def get_config(bitmaps_dir: LikePath, **kwargs) -> Dict[str, Any]: """Return configuration of `macOSBigSur` pointers. + Args: + :bitmaps_dir: (str | Path) Path to .png file's directory. + + Keywords Args: + + :x_sizes: (List[Tuple[int, int]] | Tuple[int, int]) List or Tuple of xcursor sizes. + + :win_size: (Tuple[int, int]) Single size for Windows cursor. + + Example: + + ```python + get_config("./bitmaps", x_sizes=[(24, 24), (32, 32)], win_size=(32, 32)) + ``` """ + if kwargs.get("x_sizes"): + x_sizes = kwargs.pop("x_sizes") + else: + x_sizes = X_SIZES + + if kwargs.get("win_size"): + w_size = kwargs.pop("win_size") + else: + w_size = WIN_SIZE + png = PNGProvider(bitmaps_dir) config: Dict[str, Any] = {} @@ -28,6 +60,7 @@ def get_config(bitmaps_dir: LikePath) -> Dict[str, Any]: data = { "png": p, + "x_sizes": x_sizes, "hotspot": hotspot, "delay": delay, } @@ -38,16 +71,22 @@ def get_config(bitmaps_dir: LikePath) -> Dict[str, Any]: win_key = win_data.get("to") position = win_data.get("position", "center") - canvas_size: Tuple[int, int] = win_data.get("canvas_size", CANVAS_SIZE) - size: Tuple[int, int] = win_data.get("size", SIZE) win_delay: int = win_data.get("delay", WIN_DELAY) + canvas_size: Tuple[int, int] = win_data.get("canvas_size", WIN_CANVAS_SIZE) + win_size: Tuple[int, int] = win_data.get("size", w_size) + + # Because provided cursor size is bigger than cursor's canvas. + # Also, "position" settings will not effect on cursor because the cursor's canvas and cursor sizes are equals. + if (win_size[0] > canvas_size[0]) or (win_size[1] > canvas_size[1]): + canvas_size = win_size + config[key] = { **data, "win_key": win_key, "position": position, "canvas_size": canvas_size, - "size": size, + "win_size": win_size, "win_delay": win_delay, } else: diff --git a/builder/applbuild/constants.py b/builder/applbuild/constants.py index 3aad1c1..8f4831c 100644 --- a/builder/applbuild/constants.py +++ b/builder/applbuild/constants.py @@ -29,13 +29,13 @@ X_SIZES: List[Tuple[int, int]] = [ # Windows Cursor WIN_DELAY = 1 -CANVAS_SIZE = (32, 32) -SIZE = (24, 24) +WIN_CANVAS_SIZE = (32, 32) +WIN_SIZE = (24, 24) X_CURSORS_CFG: Dict[str, Dict[str, int]] = { - # - # Static - # + ########## + # Static # + ########## "all-scroll.png": {"xhot": 100, "yhot": 100}, "bottom_left_corner.png": {"xhot": 100, "yhot": 100}, "bottom_right_corner.png": {"xhot": 100, "yhot": 100}, @@ -78,20 +78,20 @@ X_CURSORS_CFG: Dict[str, Dict[str, int]] = { "xterm.png": {"xhot": 100, "yhot": 104}, "zoom-in.png": {"xhot": 100, "yhot": 100}, "zoom-out.png": {"xhot": 100, "yhot": 100}, - # - # Animated - # - # Note: Animated cursors not need any extension & frames number - "wait": {"xhot": 100, "yhot": 100}, + ############ + # Animated # + ############ + # Note: Animated cursors don't need an extension and frame numbers. "left_ptr_watch": {"xhot": 67, "yhot": 46}, + "wait": {"xhot": 100, "yhot": 100}, } WIN_CURSORS_CFG: Dict[str, Dict[str, str]] = { - # - # Static - # - "right_ptr.png": {"to": "Alternate", "position": "top_left"}, - "cross.png": {"to": "Cross", "size": (32, 32)}, + ########## + # Static # + ########## + "right_ptr.png": {"to": "Alternate", "position": "top_right"}, + "cross.png": {"to": "Cross"}, "left_ptr.png": {"to": "Default", "position": "top_left"}, "bottom_left_corner.png": {"to": "Diagonal_1"}, "bottom_right_corner.png": {"to": "Diagonal_2"}, @@ -101,16 +101,12 @@ WIN_CURSORS_CFG: Dict[str, Dict[str, str]] = { "xterm.png": {"to": "IBeam", "position": "top_left"}, "hand2.png": {"to": "Link", "position": "top_left"}, "hand1.png": {"to": "Move"}, - "crossed_circle.png": { - "to": "Unavailiable", - "position": "top_left", - "size": (32, 32), - }, + "crossed_circle.png": {"to": "Unavailiable", "position": "top_left"}, "sb_v_double_arrow.png": {"to": "Vertical"}, - # - # Animated - # - # Note: Animated cursors not need any extension & frames number - "wait": {"to": "Busy", "size": (28, 28)}, - "left_ptr_watch": {"to": "Work", "position": "top_left", "size": (28, 28)}, + ############ + # Animated # + ############ + # Note: Animated cursors don't need frame numbers. + "left_ptr_watch": {"to": "Work", "position": "top_left"}, + "wait": {"to": "Busy", "size": WIN_CANVAS_SIZE}, } diff --git a/builder/applbuild/generator.py b/builder/applbuild/generator.py index 6075771..a4a7b13 100644 --- a/builder/applbuild/generator.py +++ b/builder/applbuild/generator.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- from pathlib import Path -from typing import Any +from typing import Any, Dict from clickgen.builders import WindowsCursor, XCursor from clickgen.core import CursorAlias @@ -10,32 +10,32 @@ from clickgen.packagers import WindowsPackager, XPackager from clickgen.util import LikePath from applbuild.configure import get_config -from applbuild.constants import * +from applbuild.constants import AUTHOR, COMMENT, THEME_NAME, URL from applbuild.symlinks import add_missing_xcursor -# -# 📝 Note: All CONSTANT variables are imported from `applbuild.constants` module. -# - -def xbuild(bitmaps_dir: LikePath, x_out_dir: Path) -> None: +def xbuild( + bitmaps_dir: LikePath, + x_out_dir: Path, +) -> None: """Build `macOSBigSur` cursor theme for only `X11`(UNIX) platform. :bitmaps_dir: (str | Path) Path to .png file's directory. - :x_out_dir: (Path) Path to output directory, Where X11 cursor theme package store. Created automatically if not exists. + :x_out_dir: (Path) Path to the output directory, Where the `X11` cursor theme package will generate. It also creates a directory if not exists. """ - config = get_config(bitmaps_dir) + config: Dict[str, Dict[str, Any]] = get_config(bitmaps_dir) # Building for _, item in config.items(): - png = item["png"] - hotspot = item["hotspot"] - delay = item["delay"] + png = item.get("png") + hotspot = item.get("hotspot") + x_sizes = item.get("x_sizes") + delay = item.get("delay") with CursorAlias.from_bitmap(png, hotspot) as alias: - x_cfg = alias.create(X_SIZES, delay) + x_cfg = alias.create(x_sizes, delay) print(f"Building '{x_cfg.stem}' XCursor...") XCursor.create(x_cfg, x_out_dir) @@ -48,29 +48,30 @@ def wbuild(bitmaps_dir: LikePath, win_out_dir: Path) -> None: :bitmaps_dir: (str | Path) Path to .png file's directory. - :win_out_dir: (Path) Path to output directory, Where Windows Cursor theme package store. Created automatically if not exists. + :win_out_dir: (Path) Path to the output directory, Where the `Windows` cursor theme package will generate. It also creates a directory if not exists. """ - config = get_config(bitmaps_dir) + config: Dict[str, Dict[str, Any]] = get_config(bitmaps_dir) # Building for _, item in config.items(): - png = item["png"] - hotspot = item["hotspot"] - delay = item["delay"] + png = item.get("png") + hotspot = item.get("hotspot") + x_sizes = item.get("x_sizes") + delay = item.get("delay") with CursorAlias.from_bitmap(png, hotspot) as alias: - alias.create(X_SIZES, delay) + alias.create(x_sizes, delay) if item.get("win_key"): - position = item["position"] - size = item["size"] - win_key = item["win_key"] - canvas_size = item["canvas_size"] - win_delay = item["win_delay"] + position = item.get("position") + win_size = item.get("win_size") + win_key = item.get("win_key") + canvas_size = item.get("canvas_size") + win_delay = item.get("win_delay") win_cfg = alias.reproduce( - size, canvas_size, position, delay=win_delay + win_size, canvas_size, position, delay=win_delay ).rename(win_key) print(f"Building '{win_cfg.stem}' Windows Cursor...") WindowsCursor.create(win_cfg, win_out_dir) @@ -83,34 +84,35 @@ def build(bitmaps_dir: LikePath, x_out_dir: Path, win_out_dir: Path) -> None: :bitmaps_dir: (str | Path) Path to .png file's directory. - :x_out_dir: (Path) Path to output directory, Where X11 cursor theme package store. Created automatically if not exists. + :x_out_dir: (Path) Path to the output directory, Where the `X11` cursor theme package will generate. It also creates a directory if not exists. - :win_out_dir: (Path) Path to output directory, Where Windows Cursor theme package store. Created automatically if not exists. + :win_out_dir: (Path) Path to the output directory, Where the `Windows` cursor theme package will generate. It also creates a directory if not exists. """ - def win_build(item: Any, alias: CursorAlias) -> None: - position = item["position"] - size = item["size"] - win_key = item["win_key"] - canvas_size = item["canvas_size"] - win_delay = item["win_delay"] + def win_build(item: Dict[str, Any], alias: CursorAlias) -> None: + position = item.get("position") + win_size = item.get("win_size") + win_key = item.get("win_key") + canvas_size = item.get("canvas_size") + win_delay = item.get("win_delay") - win_cfg = alias.reproduce(size, canvas_size, position, delay=win_delay).rename( - win_key - ) + win_cfg = alias.reproduce( + win_size, canvas_size, position, delay=win_delay + ).rename(win_key) print(f"Building '{win_cfg.stem}' Windows Cursor...") WindowsCursor.create(win_cfg, win_out_dir) - config = get_config(bitmaps_dir) + config: Dict[str, Dict[str, Any]] = get_config(bitmaps_dir) # Building for _, item in config.items(): - png = item["png"] - hotspot = item["hotspot"] - delay = item["delay"] + png = item.get("png") + hotspot = item.get("hotspot") + x_sizes = item.get("x_sizes") + delay = item.get("delay") with CursorAlias.from_bitmap(png, hotspot) as alias: - x_cfg = alias.create(X_SIZES, delay) + x_cfg = alias.create(x_sizes, delay) print(f"Building '{x_cfg.stem}' XCursor...") XCursor.create(x_cfg, x_out_dir) From c776ae7aeffcb119ff6d26dd2a2ced97fb7b4ff1 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Thu, 4 Feb 2021 20:20:21 +0530 Subject: [PATCH 56/63] =?UTF-8?q?=E2=9A=A1=20Cleanup=20&=20extra=20args=20?= =?UTF-8?q?added?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- builder/applbuild/configure.py | 10 ++++-- builder/applbuild/generator.py | 25 +++++---------- builder/build.py | 57 ++++++++++++++++++++++++++++++++-- 3 files changed, 69 insertions(+), 23 deletions(-) diff --git a/builder/applbuild/configure.py b/builder/applbuild/configure.py index 26975ae..94d0ff6 100644 --- a/builder/applbuild/configure.py +++ b/builder/applbuild/configure.py @@ -24,16 +24,20 @@ def get_config(bitmaps_dir: LikePath, **kwargs) -> Dict[str, Any]: :bitmaps_dir: (str | Path) Path to .png file's directory. + Keywords Args: - :x_sizes: (List[Tuple[int, int]] | Tuple[int, int]) List or Tuple of xcursor sizes. + :x_sizes: (List[Size] | Size) List of sizes or single size for xcursors. + + :win_canvas_size: (Size) Windows cursor's canvas size. + + :win_size: (Size) Size for Windows cursor. - :win_size: (Tuple[int, int]) Single size for Windows cursor. Example: ```python - get_config("./bitmaps", x_sizes=[(24, 24), (32, 32)], win_size=(32, 32)) + get_config("./bitmaps", x_sizes=[(24, 24), (32, 32)], win_canvas_size=(32, 32), win_size=(24, 24)) ``` """ diff --git a/builder/applbuild/generator.py b/builder/applbuild/generator.py index a4a7b13..6e28d4d 100644 --- a/builder/applbuild/generator.py +++ b/builder/applbuild/generator.py @@ -7,27 +7,22 @@ from typing import Any, Dict from clickgen.builders import WindowsCursor, XCursor from clickgen.core import CursorAlias from clickgen.packagers import WindowsPackager, XPackager -from clickgen.util import LikePath -from applbuild.configure import get_config from applbuild.constants import AUTHOR, COMMENT, THEME_NAME, URL from applbuild.symlinks import add_missing_xcursor def xbuild( - bitmaps_dir: LikePath, + config: Dict[str, Dict[str, Any]], x_out_dir: Path, ) -> None: """Build `macOSBigSur` cursor theme for only `X11`(UNIX) platform. - :bitmaps_dir: (str | Path) Path to .png file's directory. + :config: (Dict) `macOSBigSur` configuration. :x_out_dir: (Path) Path to the output directory, Where the `X11` cursor theme package will generate. It also creates a directory if not exists. """ - config: Dict[str, Dict[str, Any]] = get_config(bitmaps_dir) - - # Building for _, item in config.items(): png = item.get("png") hotspot = item.get("hotspot") @@ -43,17 +38,14 @@ def xbuild( XPackager(x_out_dir, THEME_NAME, COMMENT) -def wbuild(bitmaps_dir: LikePath, win_out_dir: Path) -> None: +def wbuild(config: Dict[str, Dict[str, Any]], win_out_dir: Path) -> None: """Build `macOSBigSur` cursor theme for only `Windows` platforms. - :bitmaps_dir: (str | Path) Path to .png file's directory. + :config: (Dict) `macOSBigSur` configuration. :win_out_dir: (Path) Path to the output directory, Where the `Windows` cursor theme package will generate. It also creates a directory if not exists. """ - config: Dict[str, Dict[str, Any]] = get_config(bitmaps_dir) - - # Building for _, item in config.items(): png = item.get("png") hotspot = item.get("hotspot") @@ -79,10 +71,12 @@ def wbuild(bitmaps_dir: LikePath, win_out_dir: Path) -> None: WindowsPackager(win_out_dir, THEME_NAME, COMMENT, AUTHOR, URL) -def build(bitmaps_dir: LikePath, x_out_dir: Path, win_out_dir: Path) -> None: +def build( + config: Dict[str, Dict[str, Any]], x_out_dir: Path, win_out_dir: Path +) -> None: """Build `macOSBigSur` cursor theme for `X11` & `Windows` platforms. - :bitmaps_dir: (str | Path) Path to .png file's directory. + :config: (Dict) `macOSBigSur` configuration. :x_out_dir: (Path) Path to the output directory, Where the `X11` cursor theme package will generate. It also creates a directory if not exists. @@ -102,9 +96,6 @@ def build(bitmaps_dir: LikePath, x_out_dir: Path, win_out_dir: Path) -> None: print(f"Building '{win_cfg.stem}' Windows Cursor...") WindowsCursor.create(win_cfg, win_out_dir) - config: Dict[str, Dict[str, Any]] = get_config(bitmaps_dir) - - # Building for _, item in config.items(): png = item.get("png") hotspot = item.get("hotspot") diff --git a/builder/build.py b/builder/build.py index 726c7cc..6e3a5a2 100644 --- a/builder/build.py +++ b/builder/build.py @@ -3,6 +3,7 @@ import argparse from pathlib import Path +from applbuild.configure import get_config from applbuild.generator import build, wbuild, xbuild @@ -44,16 +45,66 @@ parser.add_argument( ) +parser.add_argument( + "-xs", + "--xsizes", + dest="xsizes", + metavar="SIZE", + nargs="+", + default=[ + 22, + 24, + 28, + 32, + 40, + 48, + 56, + 64, + 72, + 80, + 88, + 96, + ], + type=int, + help="Set pixel-size for xcursor. (default: %(default)s)", +) + + +parser.add_argument( + "-ws", + "--win-size", + dest="win_size", + metavar="SIZE", + default=24, + type=int, + help="Set pixel-size for Windows cursors. (default: %(default)s)", +) + + +parser.add_argument( + "-wcs", + "--win-canvas-size", + dest="win_sizes", + metavar="SIZE", + default=32, + type=int, + help="Set pixel-size for Windows cursor's canvas. (default: %(default)s)", +) + # Preparing build args = parser.parse_args() bitmaps_dir = Path(args.png_dir) + x_out_dir = Path(args.out_dir) / "macOSBigSur" win_out_dir = Path(args.out_dir) / "macOSBigSur_Windows" + +config = get_config(bitmaps_dir) + if args.platform == "unix": - xbuild(bitmaps_dir, x_out_dir) + xbuild(config, x_out_dir) elif args.platform == "windows": - wbuild(bitmaps_dir, win_out_dir) + wbuild(config, win_out_dir) else: - build(bitmaps_dir, x_out_dir, win_out_dir) + build(config, x_out_dir, win_out_dir) From 05ce0701926acb823877697420412b6990a23053 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Fri, 5 Feb 2021 19:19:45 +0530 Subject: [PATCH 57/63] =?UTF-8?q?=F0=9F=96=BC=EF=B8=8F=20cursor's=20defaul?= =?UTF-8?q?t=20size=20in=20'build.py'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- builder/applbuild/configure.py | 41 ++++++++++++++++------------------ builder/applbuild/constants.py | 18 +-------------- builder/build.py | 18 +++++++++------ 3 files changed, 31 insertions(+), 46 deletions(-) diff --git a/builder/applbuild/configure.py b/builder/applbuild/configure.py index 94d0ff6..89514ad 100644 --- a/builder/applbuild/configure.py +++ b/builder/applbuild/configure.py @@ -2,19 +2,18 @@ # -*- coding: utf-8 -*- from pathlib import Path -from typing import Any, Dict, List, Tuple, Union +from typing import Any, Dict, List, Tuple, TypeVar, Union from clickgen.util import LikePath, PNGProvider -from applbuild.constants import ( - WIN_CANVAS_SIZE, - WIN_CURSORS_CFG, - WIN_DELAY, - WIN_SIZE, - X_CURSORS_CFG, - X_DELAY, - X_SIZES, -) +from applbuild.constants import WIN_CURSORS_CFG, WIN_DELAY, X_CURSORS_CFG, X_DELAY + + +X = TypeVar("X") + + +def to_tuple(x: X) -> Tuple[X, X]: + return (x, x) def get_config(bitmaps_dir: LikePath, **kwargs) -> Dict[str, Any]: @@ -27,11 +26,11 @@ def get_config(bitmaps_dir: LikePath, **kwargs) -> Dict[str, Any]: Keywords Args: - :x_sizes: (List[Size] | Size) List of sizes or single size for xcursors. + :x_sizes: (List[int]) List of pixel-sizes for xcursors. - :win_canvas_size: (Size) Windows cursor's canvas size. + :win_canvas_size: (int) Windows cursor's canvas pixel-size. - :win_size: (Size) Size for Windows cursor. + :win_size: (int) Pixel-size for Windows cursor. Example: @@ -41,15 +40,13 @@ def get_config(bitmaps_dir: LikePath, **kwargs) -> Dict[str, Any]: ``` """ - if kwargs.get("x_sizes"): - x_sizes = kwargs.pop("x_sizes") - else: - x_sizes = X_SIZES + w_size = to_tuple(kwargs.pop("win_size")) + w_canvas_size = to_tuple(kwargs.pop("win_canvas_size")) + x = kwargs.pop("x_sizes") - if kwargs.get("win_size"): - w_size = kwargs.pop("win_size") - else: - w_size = WIN_SIZE + x_sizes = [] + for s in x: + x_sizes.append(to_tuple(s)) png = PNGProvider(bitmaps_dir) config: Dict[str, Any] = {} @@ -77,7 +74,7 @@ def get_config(bitmaps_dir: LikePath, **kwargs) -> Dict[str, Any]: position = win_data.get("position", "center") win_delay: int = win_data.get("delay", WIN_DELAY) - canvas_size: Tuple[int, int] = win_data.get("canvas_size", WIN_CANVAS_SIZE) + canvas_size: Tuple[int, int] = win_data.get("canvas_size", w_canvas_size) win_size: Tuple[int, int] = win_data.get("size", w_size) # Because provided cursor size is bigger than cursor's canvas. diff --git a/builder/applbuild/constants.py b/builder/applbuild/constants.py index 8f4831c..94c2e9c 100644 --- a/builder/applbuild/constants.py +++ b/builder/applbuild/constants.py @@ -11,26 +11,10 @@ URL = "https://github.com/ful1e5/apple_cursor" # XCursor X_DELAY: int = 10 -X_SIZES: List[Tuple[int, int]] = [ - (22, 22), - (24, 24), - (28, 28), - (32, 32), - (40, 40), - (48, 48), - (56, 56), - (64, 64), - (72, 72), - (80, 80), - (88, 88), - (96, 96), -] # Windows Cursor WIN_DELAY = 1 -WIN_CANVAS_SIZE = (32, 32) -WIN_SIZE = (24, 24) X_CURSORS_CFG: Dict[str, Dict[str, int]] = { ########## @@ -108,5 +92,5 @@ WIN_CURSORS_CFG: Dict[str, Dict[str, str]] = { ############ # Note: Animated cursors don't need frame numbers. "left_ptr_watch": {"to": "Work", "position": "top_left"}, - "wait": {"to": "Busy", "size": WIN_CANVAS_SIZE}, + "wait": {"to": "Busy"}, } diff --git a/builder/build.py b/builder/build.py index 6e3a5a2..c55ab11 100644 --- a/builder/build.py +++ b/builder/build.py @@ -3,8 +3,8 @@ import argparse from pathlib import Path -from applbuild.configure import get_config +from applbuild.configure import get_config from applbuild.generator import build, wbuild, xbuild parser = argparse.ArgumentParser( @@ -49,7 +49,7 @@ parser.add_argument( "-xs", "--xsizes", dest="xsizes", - metavar="SIZE", + metavar="INT", nargs="+", default=[ 22, @@ -74,7 +74,7 @@ parser.add_argument( "-ws", "--win-size", dest="win_size", - metavar="SIZE", + metavar="INT", default=24, type=int, help="Set pixel-size for Windows cursors. (default: %(default)s)", @@ -84,8 +84,8 @@ parser.add_argument( parser.add_argument( "-wcs", "--win-canvas-size", - dest="win_sizes", - metavar="SIZE", + dest="win_canvas_size", + metavar="INT", default=32, type=int, help="Set pixel-size for Windows cursor's canvas. (default: %(default)s)", @@ -99,8 +99,12 @@ bitmaps_dir = Path(args.png_dir) x_out_dir = Path(args.out_dir) / "macOSBigSur" win_out_dir = Path(args.out_dir) / "macOSBigSur_Windows" - -config = get_config(bitmaps_dir) +config = get_config( + bitmaps_dir, + x_sizes=args.xsizes, + win_canvas_size=args.win_canvas_size, + win_size=args.win_size, +) if args.platform == "unix": xbuild(config, x_out_dir) From ae0cddf732eca59eba05bc551e15f4366bfd2edf Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Fri, 5 Feb 2021 19:59:26 +0530 Subject: [PATCH 58/63] =?UTF-8?q?=E2=9A=A1=20Customize=20Cursor's=20sizes?= =?UTF-8?q?=20from=20'make'=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 84 ++++++++++++++++++++++++++++-------------------- builder/Makefile | 10 ++++-- 2 files changed, 56 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 591d8fa..f802a24 100644 --- a/README.md +++ b/README.md @@ -74,33 +74,36 @@ Enjoy **[macOS Big Sur](https://www.apple.com/macos/big-sur-preview/)** Cursor T
Table of Contents (click to expand) - - [Apple Cursor](#apple-cursor) +- [Apple Cursor](#apple-cursor) - [Cursor Sizes](#cursor-sizes) - [Colors](#colors) - [Quick install](#quick-install) - - [Manual Install](#manual-install) - - [Linux/X11](#linuxx11) - - [Windows](#windows) - - [Preview:](#preview) - - [Dependencies](#dependencies) - - [External Libraries](#external-libraries) - - [Install External Libraries](#install-external-libraries) - - [macOS](#macos) - - [Debain/ubuntu](#debainubuntu) - - [ArchLinux/Manjaro](#archlinuxmanjaro) - - [Fedora/Fedora Silverblue/CentOS/RHEL](#fedorafedora-silverbluecentosrhel) - - [Build Dependencies](#build-dependencies) - - [Node Packages](#node-packages) - - [PyPi Packages](#pypi-packages) - - [Build From Scratch](#build-from-scratch) - - [⚡ Auto Build (using GitHub Actions)](#-auto-build-using-github-actions) - - [Manual Build](#manual-build) - - [Build & Install only `XCursor` theme](#build--install-only-xcursor-theme) - - [Build & Install only `Windows` theme](#build--install-only-windows-theme) - - [Bugs](#bugs) - - [Getting Help](#getting-help) - - [Contributing](#contributing) - - [Support](#support) + - [Manual Install](#manual-install) + - [Linux/X11](#linuxx11) + - [Windows](#windows) + - [Preview:](#preview) +- [Dependencies](#dependencies) + - [External Libraries](#external-libraries) + - [Install External Libraries](#install-external-libraries) + - [macOS](#macos) + - [Debain/ubuntu](#debainubuntu) + - [ArchLinux/Manjaro](#archlinuxmanjaro) + - [Fedora/Fedora Silverblue/CentOS/RHEL](#fedorafedora-silverbluecentosrhel) + - [Build Dependencies](#build-dependencies) + - [Node Packages](#node-packages) + - [PyPi Packages](#pypi-packages) + - [Build From Scratch](#build-from-scratch) + - [⚡ Auto Build (using GitHub Actions)](#-auto-build-using-github-actions) + - [Manual Build](#manual-build) + - [Build `XCursor` theme](#build-xcursor-theme) + - [Customize `XCursor` size](#customize-xcursor-size) + - [Install `XCursor` theme](#install-xcursor-theme) + - [Build `Windows` theme](#build-windows-theme) + - [Customize `Windows Cursor` size](#customize-windows-cursor-size) +- [Bugs](#bugs) +- [Getting Help](#getting-help) +- [Contributing](#contributing) + - [Support](#support) @@ -241,29 +244,40 @@ GitHub Actions is automatically runs on every `push`(on **main** and **dev** bra make ``` -#### Build & Install only `XCursor` theme +#### Build `XCursor` theme ```bash make unix -make install -# OR +``` + +#### Customize `XCursor` size + +```bash +make unix X_SIZES=22 # Only built '22px' pixel-size. +make unix X_SIZES=22 24 32 # Multiple sizes are provided with ' '(Space) +``` + +#### Install `XCursor` theme + +```bash +make install # install as user + # OR sudo make install # install as root ``` -#### Build & Install only `Windows` theme +#### Build `Windows` theme ```bash make windows ``` -> For double click installation, Check [this](#windows). +#### Customize `Windows Cursor` size -1. Open the `settings` app. -2. **Goto** `Devices` -> `Mouse` -> `Additional Mouse Options`. -3. **Goto** the `pointers` tab. -4. Replace each cursor in the currently applied cursor set with the corresponding cursor in the `macOSBigSur_Windows` folder. -5. Click "**save as**" and type in the desired name. -6. Click "**apply**" and "**ok**". +```bash +make windows WIN_SIZE=96 # Supports only one pixel-size +``` + +> For installation follow [these](#windows) steps. diff --git a/builder/Makefile b/builder/Makefile index a181b41..4776919 100644 --- a/builder/Makefile +++ b/builder/Makefile @@ -6,6 +6,10 @@ all: clean setup build .ONESHELL: SHELL:=/bin/bash +X_SIZES ?=22 24 28 32 40 48 56 64 72 80 88 96 +WIN_CANVAS_SIZE ?= 32 +WIN_SIZE ?= 24 + clean: @rm -rf applbuild.egg-info build dist @find -iname "*.pyc" -delete @@ -21,10 +25,10 @@ setup: setup.py @. venv/bin/activate; python3 setup.py install --record files.txt build: setup build.py - @. venv/bin/activate; python3 build.py + @. venv/bin/activate; python3 build.py --xsizes $(X_SIZES) --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE) build_unix: setup build.py - @. venv/bin/activate; python3 build.py unix + @. venv/bin/activate; python3 build.py unix --xsizes $(X_SIZES) build_windows: setup build.py - @. venv/bin/activate; python3 build.py windows \ No newline at end of file + @. venv/bin/activate; python3 build.py windows --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE) \ No newline at end of file From 15a2af83fbdf29af64cdcf0ee6391168c09cb9ff Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Sat, 6 Feb 2021 18:24:47 +0530 Subject: [PATCH 59/63] =?UTF-8?q?=E2=9A=A1Git=20config=20file=20init?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitconfig | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .gitconfig diff --git a/.gitconfig b/.gitconfig new file mode 100644 index 0000000..c833a6e --- /dev/null +++ b/.gitconfig @@ -0,0 +1,6 @@ +[user] + name=Kaiz Khatri + email=kaizmandhu@gmail.com +[alias] + co=checkout + br=branch From 8b9165dab753df46db1089d91f99e593ccc191cf Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Sat, 6 Feb 2021 20:10:15 +0530 Subject: [PATCH 60/63] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Prettier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PLING.bbcode | 7 ++++--- README.md | 58 ++++++++++++++++++++++++++-------------------------- 2 files changed, 33 insertions(+), 32 deletions(-) diff --git a/PLING.bbcode b/PLING.bbcode index 3d5ce0e..cd908cb 100644 --- a/PLING.bbcode +++ b/PLING.bbcode @@ -1,11 +1,12 @@ [b]macOS Big Sur[/b] Cursor Theme with [b]HiDPI[/b] Display support. This Cursor is built with [b][url=https://github.com/ful1e5/clickgen]clickgen[/url][/b] and render with the [b][url=https://github.com/puppeteer/puppeteer/]puppeteer[/url][/b]. [i]Available Sizes[/i] [b]22, 24, 28, 32, 40, 48, 56, 64, 72, 80, 88, 96[/b] -[i]Get latest build[/i] @[b][url=https://github.com/ful1e5/apple_cursor/actions]GitHub Actions[/url][/b] +[i]Get the latest build[/i] @[b][url=https://github.com/ful1e5/apple_cursor/actions]GitHub Actions[/url][/b] [i]Release Notification[/i] at [b][url=https://twitter.com/ful1e5]Twitter[/url][/b](@ful1e5) +For [i]Customizing Size[/i] check [b][url=https://github.com/ful1e5/apple_cursor#manual-build]README.md[/url][/b] [b]Linux/X11 installation[/b] -Get the latest stable Linux release from the [b][url=https://www.pling.com/p/1408466/#files-panel]Pling[/url][/b]. Unpack [b].tar.gz[/b] file and follow these [b]commands[/b]. +Get the latest stable Linux release from the [b][url=https://www.pling.com/p/1408466/#files-panel]Pling[/url][/b]. Unpack the [b].tar.gz[/b] file and follow these [b]commands[/b]. [b]Install[/b] [b]For all user:[/b] @@ -23,7 +24,7 @@ Get the latest stable Linux release from the [b][url=https://www.pling.com/p/140 [list=1] [*]unzip [b]macOSBigSur_Windows.zip[/b] file[/*] [*]Open [b]macOSBigSur_Windows/[/b] in Explorer, and [b]right-click[/b] on [b]install.inf[/b].[/*] - [*]Click 'Install' from the context menu, and authorise the modifications to your system.[/*] + [*]Click 'Install' from the context menu, and authorize the modifications to your system.[/*] [*]Open [i]Control Panel > Personalisation and Appearance > Change mouse pointers[/i], and select [b]MacOSBigSur Cursors[/b].[/*] [*]Click '[b]Apply[/b]'.[/*] [/list] diff --git a/README.md b/README.md index f802a24..66f2aed 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ GitHub Action Build - + CodeFactor @@ -31,7 +31,7 @@ Clickgen - +
@@ -74,36 +74,36 @@ Enjoy **[macOS Big Sur](https://www.apple.com/macos/big-sur-preview/)** Cursor T
Table of Contents (click to expand) -- [Apple Cursor](#apple-cursor) + - [Apple Cursor](#apple-cursor) - [Cursor Sizes](#cursor-sizes) - [Colors](#colors) - [Quick install](#quick-install) - - [Manual Install](#manual-install) - - [Linux/X11](#linuxx11) - - [Windows](#windows) - - [Preview:](#preview) -- [Dependencies](#dependencies) - - [External Libraries](#external-libraries) - - [Install External Libraries](#install-external-libraries) - - [macOS](#macos) - - [Debain/ubuntu](#debainubuntu) - - [ArchLinux/Manjaro](#archlinuxmanjaro) - - [Fedora/Fedora Silverblue/CentOS/RHEL](#fedorafedora-silverbluecentosrhel) - - [Build Dependencies](#build-dependencies) - - [Node Packages](#node-packages) - - [PyPi Packages](#pypi-packages) - - [Build From Scratch](#build-from-scratch) - - [⚡ Auto Build (using GitHub Actions)](#-auto-build-using-github-actions) - - [Manual Build](#manual-build) - - [Build `XCursor` theme](#build-xcursor-theme) - - [Customize `XCursor` size](#customize-xcursor-size) - - [Install `XCursor` theme](#install-xcursor-theme) - - [Build `Windows` theme](#build-windows-theme) - - [Customize `Windows Cursor` size](#customize-windows-cursor-size) -- [Bugs](#bugs) -- [Getting Help](#getting-help) -- [Contributing](#contributing) - - [Support](#support) + - [Manual Install](#manual-install) + - [Linux/X11](#linuxx11) + - [Windows](#windows) + - [Preview:](#preview) + - [Dependencies](#dependencies) + - [External Libraries](#external-libraries) + - [Install External Libraries](#install-external-libraries) + - [macOS](#macos) + - [Debain/ubuntu](#debainubuntu) + - [ArchLinux/Manjaro](#archlinuxmanjaro) + - [Fedora/Fedora Silverblue/CentOS/RHEL](#fedorafedora-silverbluecentosrhel) + - [Build Dependencies](#build-dependencies) + - [Node Packages](#node-packages) + - [PyPi Packages](#pypi-packages) + - [Build From Scratch](#build-from-scratch) + - [⚡ Auto Build (using GitHub Actions)](#-auto-build-using-github-actions) + - [Manual Build](#manual-build) + - [Build `XCursor` theme](#build-xcursor-theme) + - [Customize `XCursor` size](#customize-xcursor-size) + - [Install `XCursor` theme](#install-xcursor-theme) + - [Build `Windows` theme](#build-windows-theme) + - [Customize `Windows Cursor` size](#customize-windows-cursor-size) + - [Bugs](#bugs) + - [Getting Help](#getting-help) + - [Contributing](#contributing) + - [Support](#support)
From 5c5ad2099d07572aac1ac20500bc51e55f729b9e Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Sat, 6 Feb 2021 20:10:33 +0530 Subject: [PATCH 61/63] =?UTF-8?q?=F0=9F=9A=80=20Prepare=20v1.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 24 ++++++++++++++++++++++++ bitmapper/package.json | 2 +- builder/setup.py | 2 +- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a746048..60822dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [unreleased] +## [1.1.0] - 7 Feb 2021 + +### Added + +- Smooth animation of `Animated Cursors` +- Auto-Package by `clickgen` +- Customize & Build with `make` +- Organized project +- Builder with `setup.py` +- Cursors design #33 **fixed** + +### Changed + +- Variable length frames render **fixed** +- Minimum frames rendering added. +- Windows cursors are renamed +- cursor's config moved to `builder/applbuild/constants.py` + +## [1.0.6] - 1 Nov 2020 + +### Added + +- `left_ptr_watch` with **blue pinwheel** + ### Changed - `build.log` removed feature in **clickgen v1.1.8** diff --git a/bitmapper/package.json b/bitmapper/package.json index f4f7051..5c5c22c 100644 --- a/bitmapper/package.json +++ b/bitmapper/package.json @@ -1,6 +1,6 @@ { "name": "apple_cursor_bitmapper", - "version": "1.0.8", + "version": "1.1.0", "main": "index.js", "scripts": { "watch": "nodemon --inspect src/index.ts", diff --git a/builder/setup.py b/builder/setup.py index 46853fb..5eaf231 100644 --- a/builder/setup.py +++ b/builder/setup.py @@ -5,7 +5,7 @@ from setuptools import setup setup( name="applbuild", - version="1.0.8", + version="1.1.0", description="Generate 'macOSBigSur' cursor theme from PNGs file", url="https://github.com/ful1e5/apple_cursor", packages=["applbuild"], From ca53439374dc3857508a6d86165e2109bf935eb4 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Sun, 7 Feb 2021 09:51:42 +0530 Subject: [PATCH 62/63] =?UTF-8?q?=F0=9F=96=BC=EF=B8=8F=20Preview=20changed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 90 +++++++++++++++++++++++++++---------------------------- 1 file changed, 44 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index 66f2aed..5dbd8ba 100644 --- a/README.md +++ b/README.md @@ -74,36 +74,36 @@ Enjoy **[macOS Big Sur](https://www.apple.com/macos/big-sur-preview/)** Cursor T
Table of Contents (click to expand) - - [Apple Cursor](#apple-cursor) - - [Cursor Sizes](#cursor-sizes) - - [Colors](#colors) - - [Quick install](#quick-install) - - [Manual Install](#manual-install) - - [Linux/X11](#linuxx11) - - [Windows](#windows) - - [Preview:](#preview) - - [Dependencies](#dependencies) - - [External Libraries](#external-libraries) - - [Install External Libraries](#install-external-libraries) - - [macOS](#macos) - - [Debain/ubuntu](#debainubuntu) - - [ArchLinux/Manjaro](#archlinuxmanjaro) - - [Fedora/Fedora Silverblue/CentOS/RHEL](#fedorafedora-silverbluecentosrhel) - - [Build Dependencies](#build-dependencies) - - [Node Packages](#node-packages) - - [PyPi Packages](#pypi-packages) - - [Build From Scratch](#build-from-scratch) - - [⚡ Auto Build (using GitHub Actions)](#-auto-build-using-github-actions) - - [Manual Build](#manual-build) - - [Build `XCursor` theme](#build-xcursor-theme) - - [Customize `XCursor` size](#customize-xcursor-size) - - [Install `XCursor` theme](#install-xcursor-theme) - - [Build `Windows` theme](#build-windows-theme) - - [Customize `Windows Cursor` size](#customize-windows-cursor-size) - - [Bugs](#bugs) - - [Getting Help](#getting-help) - - [Contributing](#contributing) - - [Support](#support) +- [Apple Cursor](#apple-cursor) + - [Cursor Sizes](#cursor-sizes) + - [Colors](#colors) + - [Quick install](#quick-install) + - [Manual Install](#manual-install) + - [Linux/X11](#linuxx11) + - [Windows](#windows) + - [Preview:](#preview) +- [Dependencies](#dependencies) + - [External Libraries](#external-libraries) + - [Install External Libraries](#install-external-libraries) + - [macOS](#macos) + - [Debain/ubuntu](#debainubuntu) + - [ArchLinux/Manjaro](#archlinuxmanjaro) + - [Fedora/Fedora Silverblue/CentOS/RHEL](#fedorafedora-silverbluecentosrhel) + - [Build Dependencies](#build-dependencies) + - [Node Packages](#node-packages) + - [PyPi Packages](#pypi-packages) + - [Build From Scratch](#build-from-scratch) + - [⚡ Auto Build (using GitHub Actions)](#-auto-build-using-github-actions) + - [Manual Build](#manual-build) + - [Build `XCursor` theme](#build-xcursor-theme) + - [Customize `XCursor` size](#customize-xcursor-size) + - [Install `XCursor` theme](#install-xcursor-theme) + - [Build `Windows` theme](#build-windows-theme) + - [Customize `Windows Cursor` size](#customize-windows-cursor-size) +- [Bugs](#bugs) +- [Getting Help](#getting-help) +- [Contributing](#contributing) + - [Support](#support)
@@ -166,12 +166,10 @@ sudo mv macOSBigSur /usr/share/icons/ #### Preview: -> Detailed Cursors Informations inside [src/svgs/README.md](https://github.com/ful1e5/apple_cursor/blob/main/src/svg/README.md) -

- +
macOSBigSur Cursors 🍎

@@ -182,9 +180,9 @@ sudo mv macOSBigSur /usr/share/icons/ ## External Libraries -- libxcursor -- libx11 -- libpng (<=1.6) +- libxcursor +- libx11 +- libpng (<=1.6) #### Install External Libraries @@ -215,22 +213,22 @@ sudo dnf install libx11-devel libxcursor-devel libpng-devel ## Build Dependencies -- [gcc](https://gcc.gnu.org/install/) -- [make](https://www.gnu.org/software/make/) -- [nodejs](https://nodejs.org/en/) (<=12.x.x) -- [yarn](https://classic.yarnpkg.com/en/docs/install/) -- [python](https://www.python.org/downloads/) (<=3.8) -- [pip3](https://pip.pypa.io/en/stable/installing/) +- [gcc](https://gcc.gnu.org/install/) +- [make](https://www.gnu.org/software/make/) +- [nodejs](https://nodejs.org/en/) (<=12.x.x) +- [yarn](https://classic.yarnpkg.com/en/docs/install/) +- [python](https://www.python.org/downloads/) (<=3.8) +- [pip3](https://pip.pypa.io/en/stable/installing/) ### Node Packages -- [puppeteer](https://www.npmjs.com/package/puppeteer) -- [pngjs](https://www.npmjs.com/package/pngjs) -- [pixelmatch](https://www.npmjs.com/package/pixelmatch) +- [puppeteer](https://www.npmjs.com/package/puppeteer) +- [pngjs](https://www.npmjs.com/package/pngjs) +- [pixelmatch](https://www.npmjs.com/package/pixelmatch) ### PyPi Packages -- [clickgen](https://pypi.org/project/clickgen/s) +- [clickgen](https://pypi.org/project/clickgen/s) ## Build From Scratch From a59be4c675c953e9dab536be4f2c651f988e79b3 Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Sun, 7 Feb 2021 10:32:57 +0530 Subject: [PATCH 63/63] =?UTF-8?q?=F0=9F=9A=80=20Figma=20file=20added?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 5dbd8ba..914953b 100644 --- a/README.md +++ b/README.md @@ -166,6 +166,8 @@ sudo mv macOSBigSur /usr/share/icons/ #### Preview: +> Check Figma file [here](https://www.figma.com/file/OZw8Ylb9xPFw9h1uZYSMFa/Mac-Cursor?node-id=0%3A1) +

@@ -314,4 +316,6 @@ Give a **★** or Follow on [GitHub](https://github.com/ful1e5),That's work as *

I'm Using Katana +

+ I'm Using Katana