Merge pull request #96 from ful1e5/dev

Bibata v1.1.1
This commit is contained in:
Kaiz Khatri 2021-03-26 11:10:46 +05:30 committed by GitHub
commit 1d04c411fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 512 additions and 543 deletions

View file

@ -7,13 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [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
- 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
- puppeteer `svg` element timeout fixed
- optional options typing in `BitmapGenerator.ts`
- 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
@ -180,7 +195,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- 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.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
@ -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 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

View file

@ -32,21 +32,21 @@ render_modern: bitmapper svg
#
build: bitmaps
@cd builder && make setup build
@cd builder && make setup build clean
build_unix: bitmaps
@rm -rf themes
@cd builder && make setup build_unix
@cd builder && make setup build_unix clean
build_windows: bitmaps
@rm -rf themes
@cd builder && make setup build_windows
@cd builder && make setup build_windows clean
build_modern: bitmaps
@cd builder && make setup build_modern
@cd builder && make setup build_modern clean
build_original: bitmaps
@cd builder && make setup build_original
@cd builder && make setup build_original clean
#
# Installation

View file

@ -72,15 +72,6 @@
---
<!-- Sub Projects -->
<details>
<summary><strong>Sub Projects</strong> (click to expand)</summary>
- [Bibata Rainbow](./bitmapper/packages/rainbow)
</details>
# Bibata ?
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...
- [**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 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.
<!-- Bug Report -->

View file

@ -1,6 +1,6 @@
{
"name": "bibata-cursor",
"version": "1.1.0",
"version": "1.1.1",
"description": "Material Based Cursors",
"main": "index.js",
"author": "Kaiz Khatri",

View file

@ -112,7 +112,12 @@ class BitmapsGenerator {
}
) {
const opt = Object.assign(
{ playbackRate: 0.1, diff: 0, frameLimit: 300, framePadding: 4 },
{
playbackRate: 0.3,
diff: 0,
frameLimit: 300,
framePadding: 4,
},
options
);
@ -152,4 +157,5 @@ class BitmapsGenerator {
await page.close();
}
}
export { BitmapsGenerator };

View file

@ -1,6 +1,6 @@
{
"name": "bibata-modern",
"version": "1.1.0",
"version": "1.1.1",
"description": "Rounded edges bibata cursors",
"main": "dist/index.js",
"scripts": {

View file

@ -1,6 +1,6 @@
{
"name": "bibata-original",
"version": "1.1.0",
"version": "1.1.1",
"description": "Sharp edges bibata cursors",
"main": "dist/index.js",
"scripts": {

View file

@ -414,17 +414,6 @@ through@^2.3.8:
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
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:
version "9.1.1"
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"
yn "3.1.1"
typescript@^4.0.5, typescript@^4.1.5:
typescript@^4.1.5:
version "4.1.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.5.tgz#123a3b214aaff3be32926f0d8f1f6e704eb89a72"
integrity sha512-6OSu9PTIzmn9TCDiovULTnET6BgXtDYL4Gg4szY+cGsc3JP1dQL8qvE8kShTRx1NIw4Q9IBHlwODjkjWEtMUyA==

View file

@ -7,14 +7,14 @@ bitmaps_dir = "../bitmaps"
.ONESHELL:
SHELL:=/bin/bash
THEMES = Amber Classic Ice
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
@rm -rf bbpkg.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
@ -22,41 +22,31 @@ clean:
@fi
setup: setup.py
@test -d venv || python3 -m venv venv
@. venv/bin/activate; python3 setup.py install --record files.txt
@python3 setup.py install --user --record files.txt
build: build_modern build_original
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)
@. 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)
@$(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);)
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)
@. 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)
@$(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);)
build_unix: build_modern_unix build_original_unix
build_modern_unix: build.py
@. venv/bin/activate; python3 build.py unix -p "$(bitmaps_dir)/Bibata-Modern-Amber" --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)
@$(foreach theme,$(THEMES), python3 build.py unix -p "$(bitmaps_dir)/Bibata-Modern-$(theme)" --xsizes $(X_SIZES);)
build_original_unix: build.py
@. venv/bin/activate; python3 build.py unix -p "$(bitmaps_dir)/Bibata-Original-Amber" --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)
@$(foreach theme,$(THEMES), python3 build.py unix -p "$(bitmaps_dir)/Bibata-Original-$(theme)" --xsizes $(X_SIZES);)
build_windows: build_modern_windows build_original_windows
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)
@. 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)
@$(foreach theme,$(THEMES), python3 build.py windows -p "$(bitmaps_dir)/Bibata-Modern-$(theme)" --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE);)
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)
@. 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)
@$(foreach theme,$(THEMES), python3 build.py windows -p "$(bitmaps_dir)/Bibata-Original-$(theme)" --win-size $(WIN_SIZE) --win-canvas-size $(WIN_CANVAS_SIZE);)

View file

@ -1,7 +1,8 @@
#!/usr/bin/env python
# -*- 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
@ -15,24 +16,20 @@ def to_tuple(x: X) -> Tuple[X, X]:
return (x, x)
def get_config(bitmaps_dir, **kwargs) -> Dict[str, Any]:
"""Return configuration of `Bibata` pointers.
def get_config(bitmaps_dir: Union[str, Path], **kwargs) -> Dict[str, Any]:
"""Return configuration of `Bibata`.
```
Args:
:param bitmaps_dir: Path to .png file's directory.
: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:
: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.
```
:param win_size: Pixel-size for Windows cursor.
:type win_size: int
Example:

View file

@ -10,7 +10,6 @@ URL = "https://github.com/ful1e5/Bibata_Cursor"
# XCursor
X_DELAY: int = 13
# Windows Cursor
WIN_DELAY = 1

View file

@ -4,16 +4,16 @@
from pathlib import Path
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.core import CursorAlias
from clickgen.packagers import WindowsPackager
from bbpkg.constants import AUTHOR, URL
from bbpkg.packager import XPackager
from bbpkg.symlinks import add_missing_xcursor
from clickgen.packagers import WindowsPackager, XPackager
class Info(NamedTuple):
"""Important cursor package's information field"""
name: 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:
"""Build `Bibata` cursor theme for only `X11`(UNIX) platform.
```
:config: (Dict) `Bibata` configuration.
:param config: `Bibata` configuration.
:type config: Dict[str, Dict[str, Any]]
:x_out_dir: (Path) Path to the output directory,
Where the `X11` cursor theme package will generate.
:param x_out_dir: Path to the output directory, \
Where the `X11` cursor theme package will generate.\
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():
@ -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:
"""Build `Bibata` cursor theme for only `Windows` platforms.
```
:config: (Dict) `Bibata` configuration.
:param config: `Bibata` configuration.
:type config: Dict[str, Dict[str, Any]]
: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.
:info: (Dict) Content theme name & comment
```
:param win_out_dir: Path to the output directory,\
Where the `Windows` cursor theme package will \
generate. It also creates a directory if not exists.
:type win_out_dir: Path
:param info: Content theme name & comment
:type info: Dict
"""
for _, item in config.items():
@ -89,18 +93,16 @@ def build(
) -> None:
"""Build `Bibata` cursor theme for `X11` & `Windows` platforms.
```
:config: (Dict) `Bibata` configuration.
:param config: `Bibata` configuration.
:type config: Dict[str, Dict[str, Any]]
: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.
:param win_out_dir: Path to the output directory,\
Where the `Windows` cursor theme package will \
generate. It also creates a directory if not exists.
:type win_out_dir: Path
: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.
:info: (Dict) Content theme name & comment
```
:param info: Content theme name & comment
:type info: Dict
"""
def win_build(item: Dict[str, Any], alias: CursorAlias) -> None:

View file

@ -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)

View file

@ -2,14 +2,17 @@
# -*- coding: utf-8 -*-
import os
from pathlib import Path
from typing import Union
from clickgen.util import chdir
def add_missing_xcursor(directory) -> None:
"""Add missing `XCursor` to the Unix cursor package.
def add_missing_xcursor(directory: Union[str, Path]) -> None:
"""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 = [

View file

@ -5,14 +5,14 @@ from setuptools import setup
setup(
name="bbpkg",
version="1.1.0",
version="1.1.1",
description="Generate 'Bibata' cursor theme from PNGs file",
url="https://github.com/ful1e5/Bibata_Cursor",
packages=["bbpkg"],
package_dir={"bbpkg": "bbpkg"},
author="Kaiz Khatri",
author_email="kaizmandhu@gamil.com",
install_requires=["clickgen==1.1.8"],
install_requires=["clickgen==1.1.9"],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",