mirror of
https://github.com/ful1e5/Bibata_Cursor.git
synced 2025-05-23 11:36:55 -04:00
commit
1d04c411fb
28 changed files with 512 additions and 543 deletions
21
CHANGELOG.md
21
CHANGELOG.md
|
@ -7,13 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
## [unreleased]
|
## [unreleased]
|
||||||
|
|
||||||
|
## [Bibata v1.1.1] - 26 Mar 2021
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- use `clickgen.packagers` for packaging **X11/UNIX** cursors
|
||||||
|
- typing supports from `clickgen` (v1.1.9)
|
||||||
|
- Set clickgen version to v1.1.9 inside `builder/setup.py`
|
||||||
|
- `Pillow` version locked at **8.1.1** by clickgen **v1.1.9**
|
||||||
|
- **2 Space** format in `bitmapper`
|
||||||
|
- Sphinx based docsstring in `builder/bbpkg`
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
- Clean builder cache on every `make` commands
|
||||||
|
- Bibata builder `bbpkg` install as system level
|
||||||
|
- Removed python3 virtual environment from `builder/Makefile`
|
||||||
|
- **clean** target fixed in `builder/Makefile`
|
||||||
- Bibata Rainbow packages move to [own](https://github.com/ful1e5/Bibata_Cursor_Rainbow) repo
|
- Bibata Rainbow packages move to [own](https://github.com/ful1e5/Bibata_Cursor_Rainbow) repo
|
||||||
- puppeteer `svg` element timeout fixed
|
- puppeteer `svg` element timeout fixed
|
||||||
- optional options typing in `BitmapGenerator.ts`
|
- optional options typing in `BitmapGenerator.ts`
|
||||||
- Format `svg` files
|
- Format `svg` files
|
||||||
- Remove old username of author with Contributors table
|
- Remove old username of an author with Contributors table
|
||||||
|
|
||||||
## [Bibata v1.1.0] - 26 Feb 2021
|
## [Bibata v1.1.0] - 26 Feb 2021
|
||||||
|
|
||||||
|
@ -180,7 +195,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
- Initial release 🎊
|
- Initial release 🎊
|
||||||
|
|
||||||
[unreleased]: https://github.com/ful1e5/Bibata_Cursor/compare/v1.1.0...main
|
[unreleased]: https://github.com/ful1e5/Bibata_Cursor/compare/v1.1.1...main
|
||||||
|
[bibata v1.1.1]: https://github.com/ful1e5/Bibata_Cursor/compare/v1.1.0...v1.1.1
|
||||||
[bibata v1.1.0]: https://github.com/ful1e5/Bibata_Cursor/compare/v1.0.3...v1.1.0
|
[bibata v1.1.0]: https://github.com/ful1e5/Bibata_Cursor/compare/v1.0.3...v1.1.0
|
||||||
[bibata v1.0.3]: https://github.com/ful1e5/Bibata_Cursor/compare/v1.0.2...v1.0.3
|
[bibata v1.0.3]: https://github.com/ful1e5/Bibata_Cursor/compare/v1.0.2...v1.0.3
|
||||||
[bibata v1.0.2]: https://github.com/ful1e5/Bibata_Cursor/compare/v1.0.1...v1.0.2
|
[bibata v1.0.2]: https://github.com/ful1e5/Bibata_Cursor/compare/v1.0.1...v1.0.2
|
||||||
|
@ -193,3 +209,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
[bibata v.0.4.1]: https://github.com/ful1e5/Bibata_Cursor/compare/v0.3.1...v0.4.1
|
[bibata v.0.4.1]: https://github.com/ful1e5/Bibata_Cursor/compare/v0.3.1...v0.4.1
|
||||||
[bibata v0.3.1]: https://github.com/ful1e5/Bibata_Cursor/compare/v0.3...v0.3.1
|
[bibata v0.3.1]: https://github.com/ful1e5/Bibata_Cursor/compare/v0.3...v0.3.1
|
||||||
[bibata v0.3]: https://github.com/ful1e5/Bibata_Cursor/tree/v0.3
|
[bibata v0.3]: https://github.com/ful1e5/Bibata_Cursor/tree/v0.3
|
||||||
|
[bibata v0.3]: https://github.com/ful1e5/Bibata_Cursor/tree/v0.3
|
||||||
|
|
10
Makefile
10
Makefile
|
@ -32,21 +32,21 @@ render_modern: bitmapper svg
|
||||||
#
|
#
|
||||||
|
|
||||||
build: bitmaps
|
build: bitmaps
|
||||||
@cd builder && make setup build
|
@cd builder && make setup build clean
|
||||||
|
|
||||||
build_unix: bitmaps
|
build_unix: bitmaps
|
||||||
@rm -rf themes
|
@rm -rf themes
|
||||||
@cd builder && make setup build_unix
|
@cd builder && make setup build_unix clean
|
||||||
|
|
||||||
build_windows: bitmaps
|
build_windows: bitmaps
|
||||||
@rm -rf themes
|
@rm -rf themes
|
||||||
@cd builder && make setup build_windows
|
@cd builder && make setup build_windows clean
|
||||||
|
|
||||||
build_modern: bitmaps
|
build_modern: bitmaps
|
||||||
@cd builder && make setup build_modern
|
@cd builder && make setup build_modern clean
|
||||||
|
|
||||||
build_original: bitmaps
|
build_original: bitmaps
|
||||||
@cd builder && make setup build_original
|
@cd builder && make setup build_original clean
|
||||||
|
|
||||||
#
|
#
|
||||||
# Installation
|
# Installation
|
||||||
|
|
12
README.md
12
README.md
|
@ -72,15 +72,6 @@
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<!-- Sub Projects -->
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><strong>Sub Projects</strong> (click to expand)</summary>
|
|
||||||
|
|
||||||
- [Bibata Rainbow](./bitmapper/packages/rainbow)
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
# Bibata ?
|
# Bibata ?
|
||||||
|
|
||||||
Bibata is **OpenSource**, Compact and Material Designed Cursor set. This project masterelop for improve `Cursor` Experience.
|
Bibata is **OpenSource**, Compact and Material Designed Cursor set. This project masterelop for improve `Cursor` Experience.
|
||||||
|
@ -333,8 +324,9 @@ make windows WIN_SIZE=96 # Supports only one pixel-size
|
||||||
|
|
||||||
# You may also like...
|
# You may also like...
|
||||||
|
|
||||||
- [**Bibata Extra**](https://github.com/ful1e5/Bibata_Extra_Cursor) - More Bibata!
|
|
||||||
- [**Bibata Adapta**](https://gitlab.com/cscs/Bibata_AdaptaBreath_Cursors) - Bibata Based Cursor Made for AdaptaBreath and Manjaro.
|
- [**Bibata Adapta**](https://gitlab.com/cscs/Bibata_AdaptaBreath_Cursors) - Bibata Based Cursor Made for AdaptaBreath and Manjaro.
|
||||||
|
- [**Bibata Extra**](https://github.com/ful1e5/Bibata_Extra_Cursor) - More Bibata!
|
||||||
|
- [**Bibata Rainbow**](https://github.com/ful1e5/Bibata_Cursor_Rainbow) - 'Semi-Animated' Bibata cursors with rainbow colors
|
||||||
- [**Bibata Translucent**](https://github.com/Silicasandwhich/Bibata_Cursor_Translucent) - Bibata translucent is a translucent flavor of the Bibata.
|
- [**Bibata Translucent**](https://github.com/Silicasandwhich/Bibata_Cursor_Translucent) - Bibata translucent is a translucent flavor of the Bibata.
|
||||||
|
|
||||||
<!-- Bug Report -->
|
<!-- Bug Report -->
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "bibata-cursor",
|
"name": "bibata-cursor",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"description": "Material Based Cursors",
|
"description": "Material Based Cursors",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"author": "Kaiz Khatri",
|
"author": "Kaiz Khatri",
|
||||||
|
|
|
@ -112,7 +112,12 @@ class BitmapsGenerator {
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
const opt = Object.assign(
|
const opt = Object.assign(
|
||||||
{ playbackRate: 0.1, diff: 0, frameLimit: 300, framePadding: 4 },
|
{
|
||||||
|
playbackRate: 0.3,
|
||||||
|
diff: 0,
|
||||||
|
frameLimit: 300,
|
||||||
|
framePadding: 4,
|
||||||
|
},
|
||||||
options
|
options
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -152,4 +157,5 @@ class BitmapsGenerator {
|
||||||
await page.close();
|
await page.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export { BitmapsGenerator };
|
export { BitmapsGenerator };
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "bibata-modern",
|
"name": "bibata-modern",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"description": "Rounded edges bibata cursors",
|
"description": "Rounded edges bibata cursors",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "bibata-original",
|
"name": "bibata-original",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"description": "Sharp edges bibata cursors",
|
"description": "Sharp edges bibata cursors",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -414,17 +414,6 @@ through@^2.3.8:
|
||||||
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
|
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
|
||||||
integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=
|
integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=
|
||||||
|
|
||||||
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==
|
|
||||||
dependencies:
|
|
||||||
arg "^4.1.0"
|
|
||||||
diff "^4.0.1"
|
|
||||||
make-error "^1.1.1"
|
|
||||||
source-map-support "^0.5.17"
|
|
||||||
yn "3.1.1"
|
|
||||||
|
|
||||||
ts-node@^9.1.1:
|
ts-node@^9.1.1:
|
||||||
version "9.1.1"
|
version "9.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.1.1.tgz#51a9a450a3e959401bda5f004a72d54b936d376d"
|
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.1.1.tgz#51a9a450a3e959401bda5f004a72d54b936d376d"
|
||||||
|
@ -437,7 +426,7 @@ ts-node@^9.1.1:
|
||||||
source-map-support "^0.5.17"
|
source-map-support "^0.5.17"
|
||||||
yn "3.1.1"
|
yn "3.1.1"
|
||||||
|
|
||||||
typescript@^4.0.5, typescript@^4.1.5:
|
typescript@^4.1.5:
|
||||||
version "4.1.5"
|
version "4.1.5"
|
||||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.5.tgz#123a3b214aaff3be32926f0d8f1f6e704eb89a72"
|
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.5.tgz#123a3b214aaff3be32926f0d8f1f6e704eb89a72"
|
||||||
integrity sha512-6OSu9PTIzmn9TCDiovULTnET6BgXtDYL4Gg4szY+cGsc3JP1dQL8qvE8kShTRx1NIw4Q9IBHlwODjkjWEtMUyA==
|
integrity sha512-6OSu9PTIzmn9TCDiovULTnET6BgXtDYL4Gg4szY+cGsc3JP1dQL8qvE8kShTRx1NIw4Q9IBHlwODjkjWEtMUyA==
|
||||||
|
|
|
@ -7,14 +7,14 @@ bitmaps_dir = "../bitmaps"
|
||||||
.ONESHELL:
|
.ONESHELL:
|
||||||
SHELL:=/bin/bash
|
SHELL:=/bin/bash
|
||||||
|
|
||||||
X_SIZES ?=22 24 28 32 40 48 56 64 72 80 88 96
|
THEMES = Amber Classic Ice
|
||||||
|
X_SIZES ?= 22 24 28 32 40 48 56 64 72 80 88 96
|
||||||
WIN_CANVAS_SIZE ?= 32
|
WIN_CANVAS_SIZE ?= 32
|
||||||
WIN_SIZE ?= 24
|
WIN_SIZE ?= 24
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@rm -rf applbuild.egg-info build dist
|
@rm -rf bbpkg.egg-info build dist
|
||||||
@find -iname "*.pyc" -delete
|
@find -iname "*.pyc" -delete
|
||||||
|
|
||||||
# Removing setup.py package files if installed
|
# Removing setup.py package files if installed
|
||||||
@if [ -f "files.txt" ]; then
|
@if [ -f "files.txt" ]; then
|
||||||
@xargs rm -rf < files.txt
|
@xargs rm -rf < files.txt
|
||||||
|
@ -22,41 +22,31 @@ clean:
|
||||||
@fi
|
@fi
|
||||||
|
|
||||||
setup: setup.py
|
setup: setup.py
|
||||||
@test -d venv || python3 -m venv venv
|
@python3 setup.py install --user --record files.txt
|
||||||
@. venv/bin/activate; python3 setup.py install --record files.txt
|
|
||||||
|
|
||||||
build: build_modern build_original
|
build: build_modern build_original
|
||||||
|
|
||||||
build_modern: build.py
|
build_modern: build.py
|
||||||
@. venv/bin/activate; python3 build.py -p "$(bitmaps_dir)/Bibata-Modern-Amber" --xsizes $(X_SIZES) --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE)
|
@$(foreach theme,$(THEMES), python3 build.py -p "$(bitmaps_dir)/Bibata-Modern-$(theme)" --xsizes $(X_SIZES) --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE);)
|
||||||
@. venv/bin/activate; python3 build.py -p "$(bitmaps_dir)/Bibata-Modern-Classic" --xsizes $(X_SIZES) --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE)
|
|
||||||
@. venv/bin/activate; python3 build.py -p "$(bitmaps_dir)/Bibata-Modern-Ice" --xsizes $(X_SIZES) --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE)
|
|
||||||
|
|
||||||
build_original: build.py
|
build_original: build.py
|
||||||
@. venv/bin/activate; python3 build.py -p "$(bitmaps_dir)/Bibata-Original-Amber" --xsizes $(X_SIZES) --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE)
|
@$(foreach theme,$(THEMES), python3 build.py -p "$(bitmaps_dir)/Bibata-Original-$(theme)" --xsizes $(X_SIZES) --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE);)
|
||||||
@. venv/bin/activate; python3 build.py -p "$(bitmaps_dir)/Bibata-Original-Classic" --xsizes $(X_SIZES) --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE)
|
|
||||||
@. venv/bin/activate; python3 build.py -p "$(bitmaps_dir)/Bibata-Original-Ice" --xsizes $(X_SIZES) --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE)
|
|
||||||
|
|
||||||
build_unix: build_modern_unix build_original_unix
|
build_unix: build_modern_unix build_original_unix
|
||||||
|
|
||||||
build_modern_unix: build.py
|
build_modern_unix: build.py
|
||||||
@. venv/bin/activate; python3 build.py unix -p "$(bitmaps_dir)/Bibata-Modern-Amber" --xsizes $(X_SIZES)
|
@$(foreach theme,$(THEMES), python3 build.py unix -p "$(bitmaps_dir)/Bibata-Modern-$(theme)" --xsizes $(X_SIZES);)
|
||||||
@. venv/bin/activate; python3 build.py unix -p "$(bitmaps_dir)/Bibata-Modern-Classic" --xsizes $(X_SIZES)
|
|
||||||
@. venv/bin/activate; python3 build.py unix -p "$(bitmaps_dir)/Bibata-Modern-Ice" --xsizes $(X_SIZES)
|
|
||||||
|
|
||||||
build_original_unix: build.py
|
build_original_unix: build.py
|
||||||
@. venv/bin/activate; python3 build.py unix -p "$(bitmaps_dir)/Bibata-Original-Amber" --xsizes $(X_SIZES)
|
@$(foreach theme,$(THEMES), python3 build.py unix -p "$(bitmaps_dir)/Bibata-Original-$(theme)" --xsizes $(X_SIZES);)
|
||||||
@. venv/bin/activate; python3 build.py unix -p "$(bitmaps_dir)/Bibata-Original-Classic" --xsizes $(X_SIZES)
|
|
||||||
@. venv/bin/activate; python3 build.py unix -p "$(bitmaps_dir)/Bibata-Original-Ice" --xsizes $(X_SIZES)
|
|
||||||
|
|
||||||
build_windows: build_modern_windows build_original_windows
|
build_windows: build_modern_windows build_original_windows
|
||||||
|
|
||||||
build_modern_windows: build.py
|
build_modern_windows: build.py
|
||||||
@. venv/bin/activate; python3 build.py windows -p "$(bitmaps_dir)/Bibata-Modern-Amber" --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE)
|
@$(foreach theme,$(THEMES), python3 build.py windows -p "$(bitmaps_dir)/Bibata-Modern-$(theme)" --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE);)
|
||||||
@. venv/bin/activate; python3 build.py windows -p "$(bitmaps_dir)/Bibata-Modern-Classic" --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE)
|
|
||||||
@. venv/bin/activate; python3 build.py windows -p "$(bitmaps_dir)/Bibata-Modern-Ice" --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE)
|
|
||||||
|
|
||||||
build_original_windows: build.py
|
build_original_windows: build.py
|
||||||
@. venv/bin/activate; python3 build.py windows -p "$(bitmaps_dir)/Bibata-Original-Amber" --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE)
|
@$(foreach theme,$(THEMES), python3 build.py windows -p "$(bitmaps_dir)/Bibata-Original-$(theme)" --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE);)
|
||||||
@. venv/bin/activate; python3 build.py windows -p "$(bitmaps_dir)/Bibata-Original-Classic" --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE)
|
|
||||||
@. venv/bin/activate; python3 build.py windows -p "$(bitmaps_dir)/Bibata-Original-Ice" --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE)
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from typing import Any, Dict, Tuple, TypeVar
|
from pathlib import Path
|
||||||
|
from typing import Any, Dict, Tuple, TypeVar, Union
|
||||||
|
|
||||||
from clickgen.util import PNGProvider
|
from clickgen.util import PNGProvider
|
||||||
|
|
||||||
|
@ -15,24 +16,20 @@ def to_tuple(x: X) -> Tuple[X, X]:
|
||||||
return (x, x)
|
return (x, x)
|
||||||
|
|
||||||
|
|
||||||
def get_config(bitmaps_dir, **kwargs) -> Dict[str, Any]:
|
def get_config(bitmaps_dir: Union[str, Path], **kwargs) -> Dict[str, Any]:
|
||||||
"""Return configuration of `Bibata` pointers.
|
"""Return configuration of `Bibata`.
|
||||||
|
|
||||||
```
|
:param bitmaps_dir: Path to .png file's directory.
|
||||||
Args:
|
:type bitmaps_dir: Union[str, Path]
|
||||||
|
|
||||||
:bitmaps_dir: (str | Path) Path to .png file's directory.
|
:param x_sizes: List of pixel-sizes for xcursors.
|
||||||
|
:type x_sizes: List[int]
|
||||||
|
|
||||||
|
:param win_canvas_size: Windows cursor's canvas pixel-size.
|
||||||
|
:type win_canvas_size: int
|
||||||
|
|
||||||
Keywords Args:
|
:param win_size: Pixel-size for Windows cursor.
|
||||||
|
:type win_size: int
|
||||||
:x_sizes: (List[int]) List of pixel-sizes for xcursors.
|
|
||||||
|
|
||||||
:win_canvas_size: (int) Windows cursor's canvas pixel-size.
|
|
||||||
|
|
||||||
:win_size: (int) Pixel-size for Windows cursor.
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@ URL = "https://github.com/ful1e5/Bibata_Cursor"
|
||||||
# XCursor
|
# XCursor
|
||||||
X_DELAY: int = 13
|
X_DELAY: int = 13
|
||||||
|
|
||||||
|
|
||||||
# Windows Cursor
|
# Windows Cursor
|
||||||
WIN_DELAY = 1
|
WIN_DELAY = 1
|
||||||
|
|
||||||
|
|
|
@ -4,16 +4,16 @@
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any, Dict, NamedTuple
|
from typing import Any, Dict, NamedTuple
|
||||||
|
|
||||||
|
from bbpkg.constants import AUTHOR, URL
|
||||||
|
from bbpkg.symlinks import add_missing_xcursor
|
||||||
from clickgen.builders import WindowsCursor, XCursor
|
from clickgen.builders import WindowsCursor, XCursor
|
||||||
from clickgen.core import CursorAlias
|
from clickgen.core import CursorAlias
|
||||||
from clickgen.packagers import WindowsPackager
|
from clickgen.packagers import WindowsPackager, XPackager
|
||||||
|
|
||||||
from bbpkg.constants import AUTHOR, URL
|
|
||||||
from bbpkg.packager import XPackager
|
|
||||||
from bbpkg.symlinks import add_missing_xcursor
|
|
||||||
|
|
||||||
|
|
||||||
class Info(NamedTuple):
|
class Info(NamedTuple):
|
||||||
|
"""Important cursor package's information field"""
|
||||||
|
|
||||||
name: str
|
name: str
|
||||||
comment: str
|
comment: str
|
||||||
|
|
||||||
|
@ -21,14 +21,16 @@ class Info(NamedTuple):
|
||||||
def xbuild(config: Dict[str, Dict[str, Any]], x_out_dir: Path, info: Info) -> None:
|
def xbuild(config: Dict[str, Dict[str, Any]], x_out_dir: Path, info: Info) -> None:
|
||||||
"""Build `Bibata` cursor theme for only `X11`(UNIX) platform.
|
"""Build `Bibata` cursor theme for only `X11`(UNIX) platform.
|
||||||
|
|
||||||
```
|
:param config: `Bibata` configuration.
|
||||||
:config: (Dict) `Bibata` configuration.
|
:type config: Dict[str, Dict[str, Any]]
|
||||||
|
|
||||||
:x_out_dir: (Path) Path to the output directory,
|
:param x_out_dir: Path to the output directory, \
|
||||||
Where the `X11` cursor theme package will generate.
|
Where the `X11` cursor theme package will generate.\
|
||||||
It also creates a directory if not exists.
|
It also creates a directory if not exists.
|
||||||
:info: (Dict) Content theme name & comment
|
:type x_out_dir: Path
|
||||||
```
|
|
||||||
|
:param info: Content theme name & comment
|
||||||
|
:type info: Info
|
||||||
"""
|
"""
|
||||||
|
|
||||||
for _, item in config.items():
|
for _, item in config.items():
|
||||||
|
@ -49,14 +51,16 @@ def xbuild(config: Dict[str, Dict[str, Any]], x_out_dir: Path, info: Info) -> No
|
||||||
def wbuild(config: Dict[str, Dict[str, Any]], win_out_dir: Path, info: Info) -> None:
|
def wbuild(config: Dict[str, Dict[str, Any]], win_out_dir: Path, info: Info) -> None:
|
||||||
"""Build `Bibata` cursor theme for only `Windows` platforms.
|
"""Build `Bibata` cursor theme for only `Windows` platforms.
|
||||||
|
|
||||||
```
|
:param config: `Bibata` configuration.
|
||||||
:config: (Dict) `Bibata` configuration.
|
:type config: Dict[str, Dict[str, Any]]
|
||||||
|
|
||||||
:win_out_dir: (Path) Path to the output directory,
|
:param win_out_dir: Path to the output directory,\
|
||||||
Where the `Windows` cursor theme package will generate.
|
Where the `Windows` cursor theme package will \
|
||||||
It also creates a directory if not exists.
|
generate. It also creates a directory if not exists.
|
||||||
:info: (Dict) Content theme name & comment
|
:type win_out_dir: Path
|
||||||
```
|
|
||||||
|
:param info: Content theme name & comment
|
||||||
|
:type info: Dict
|
||||||
"""
|
"""
|
||||||
|
|
||||||
for _, item in config.items():
|
for _, item in config.items():
|
||||||
|
@ -89,18 +93,16 @@ def build(
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Build `Bibata` cursor theme for `X11` & `Windows` platforms.
|
"""Build `Bibata` cursor theme for `X11` & `Windows` platforms.
|
||||||
|
|
||||||
```
|
:param config: `Bibata` configuration.
|
||||||
:config: (Dict) `Bibata` configuration.
|
:type config: Dict[str, Dict[str, Any]]
|
||||||
|
|
||||||
:x_out_dir: (Path) Path to the output directory,
|
:param win_out_dir: Path to the output directory,\
|
||||||
Where the `X11` cursor theme package will generate.
|
Where the `Windows` cursor theme package will \
|
||||||
It also creates a directory if not exists.
|
generate. It also creates a directory if not exists.
|
||||||
|
:type win_out_dir: Path
|
||||||
|
|
||||||
:win_out_dir: (Path) Path to the output directory,
|
:param info: Content theme name & comment
|
||||||
Where the `Windows` cursor theme package will generate.
|
:type info: Dict
|
||||||
It also creates a directory if not exists.
|
|
||||||
:info: (Dict) Content theme name & comment
|
|
||||||
```
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def win_build(item: Dict[str, Any], alias: CursorAlias) -> None:
|
def win_build(item: Dict[str, Any], alias: CursorAlias) -> None:
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
from pathlib import Path
|
|
||||||
from string import Template
|
|
||||||
from typing import Dict
|
|
||||||
|
|
||||||
THEME_FILES_TEMPLATES: Dict[str, Template] = {
|
|
||||||
"cursor.theme": Template("[Icon Theme]\nName=$theme_name\nInherits=$theme_name"),
|
|
||||||
"index.theme": Template(
|
|
||||||
'[Icon Theme]\nName=$theme_name\nComment=$comment\nInherits="hicolor"'
|
|
||||||
),
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def XPackager(directory: Path, theme_name: str, comment: str) -> None:
|
|
||||||
""" Create a crispy `XCursors` theme package. """
|
|
||||||
|
|
||||||
# Writing all .theme files
|
|
||||||
files: Dict[str, str] = {}
|
|
||||||
for file, template in THEME_FILES_TEMPLATES.items():
|
|
||||||
files[file] = template.safe_substitute(theme_name=theme_name, comment=comment)
|
|
||||||
|
|
||||||
for f, data in files.items():
|
|
||||||
fp: Path = directory / f
|
|
||||||
fp.write_text(data)
|
|
|
@ -2,14 +2,17 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
from pathlib import Path
|
||||||
|
from typing import Union
|
||||||
|
|
||||||
from clickgen.util import chdir
|
from clickgen.util import chdir
|
||||||
|
|
||||||
|
|
||||||
def add_missing_xcursor(directory) -> None:
|
def add_missing_xcursor(directory: Union[str, Path]) -> None:
|
||||||
"""Add missing `XCursor` to the Unix cursor package.
|
"""Add missing `XCursor` to the UNIX cursor package.
|
||||||
|
|
||||||
:directory: (Path|str) directory where XCursors are available.
|
:param directory: directory where XCursors are available.
|
||||||
|
:type directory: Union[str, Path]
|
||||||
"""
|
"""
|
||||||
|
|
||||||
symlinks = [
|
symlinks = [
|
||||||
|
|
|
@ -5,14 +5,14 @@ from setuptools import setup
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="bbpkg",
|
name="bbpkg",
|
||||||
version="1.1.0",
|
version="1.1.1",
|
||||||
description="Generate 'Bibata' cursor theme from PNGs file",
|
description="Generate 'Bibata' cursor theme from PNGs file",
|
||||||
url="https://github.com/ful1e5/Bibata_Cursor",
|
url="https://github.com/ful1e5/Bibata_Cursor",
|
||||||
packages=["bbpkg"],
|
packages=["bbpkg"],
|
||||||
package_dir={"bbpkg": "bbpkg"},
|
package_dir={"bbpkg": "bbpkg"},
|
||||||
author="Kaiz Khatri",
|
author="Kaiz Khatri",
|
||||||
author_email="kaizmandhu@gamil.com",
|
author_email="kaizmandhu@gamil.com",
|
||||||
install_requires=["clickgen==1.1.8"],
|
install_requires=["clickgen==1.1.9"],
|
||||||
classifiers=[
|
classifiers=[
|
||||||
"Programming Language :: Python :: 3",
|
"Programming Language :: Python :: 3",
|
||||||
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue