Giter Site home page Giter Site logo

stanio / bibata_cursor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ful1e5/bibata_cursor

2.0 0.0 0.0 131.45 MB

Open source, compact, and material designed cursor set.

License: GNU General Public License v3.0

Shell 81.84% Python 18.16%
linux mouse-cursors windows

bibata_cursor's Introduction

Build (stanio)

This fork uses alternative to the official Bibata_Cursor build tools that should provide somewhat better quality results. The build is Java-based and requires JDK 11 or later. It should automatically download Gradle and specific application dependencies, during the first run. One day I may package it as a self-contained mousegen tool.

Make sure you clone this with --recurse-submodules:

$ git clone --recurse-submodules https://github.com/stanio/Bibata_Cursor.git

or checkout the mousegen-tool submodule afterward:

$ git submodule update --init

A notable difference with the official Bibata_Cursor is this build requires the cursor hostpost embedded into the individual source SVG files, as seen in this fork, rather than maintained separately in configs/**.build.toml files:

  <circle id="cursor-hotstop" cx="..." cy="..." />

Better quality results are achieved by rasterizing the source SVGs at each individual resolution, and employing pixel-grid alignment hints embedded into the sources:

  <path id="align-anchor" d="m #,# ..." />

  <g>
    <path class="align-anchor" d="m #,# ..." />

For my releases I have two scripts with specific configurations:

$ ./mousegen-windows
$ ./mousegen-linux

For building customized versions of the cursors see mousegen-render further.

mousegen-render – Basic options

Get a rough overview of the available options:

$ ./mousegen-render --help

The default output directory is themes/, and without options given, it would render just PNG bitmaps at their default size/resolution (256×256). Customize the build output directory via --build-dir <dir>.

To render either Linux (X) or Windows cursors specify --linux-cursors or --windows-cursors option:

$ ./mousegen-render --windows-cursors
$ ./mousegen-render --linux-cursors

Both can't be effective at the same time, currently.

Filtering cursors to render

To render a few selected cursors – specify them with -f <cursor> options:

$ ./mousegen-render ... -f left_ptr -f left_ptr_watch -f xterm

The <cursor> name is the original file name without the .svg suffix.

Note, the specified filter applies on top of --windows-cursors or --linux-cursors name mapping in effect:

$ ./mousegen-render --windows-cursors -f left_side

will not render any cursor, unless you specify --all-cursors option:

$ ./mousegen-render --windows-cursors --all-cursors -f left_side
$ ./mousegen-render --windows-cursors --all-cursors # render all

Customizing the resolutions/sizes

The default resolutions currently are:

  • Windows: 32, 48, 64, 72, 96, 128
  • Linux: 24, 32, 48, 64, 72, 96

Customize the output resolutions using -r option(s):

$ ./mousegen-render -r 32,48,64

--windows-cursors also implies three (canvas) sizing-schemes: Normal, Large, and Extra-Large (N, L, XL). Customize the sizing schemes via -s option(s). The following will output only Normal and Large variants:

$ ./mousegen-render -s N,L

To reset to just the original sizing use -s SOURCE – that's equivalent to Extra-Large (full canvas) but doesn't change the theme name to reflect that.

Customizing the color

$ ./mousegen-render --color Ice,Turquoise

Find and customize the color mappings in colors.jsonc.

Customizing the pointer shadow

The cursors don't have a shadow by default (I've also removed all shadows from the original sources). To get cursors with shadow use --pointer-shadow:

$ ./mousegen-render --pointer-shadow

The full syntax is:

--pointer-shadow[=<blur>[,<dx>[,<dy>[,<opacity>[,#<color>]]]]]

The default values are:

--pointer-shadow=6,18,9,0.3,#000000

To render both variants: with and without shadow, add --no-shadow-also:

--pointer-shadow --no-shadow-also

Customizing the stroke thickness

--thin-stroke
--stroke-width=12
--stroke-width=6:Hairline
--base-stroke-width=16
--min-stroke-width=1
--default-stroke-also

--all-variants shorthand

Shorthand for --default-stroke-also and --no-shadow-also:

--thin-stroke --pointer-shadow --all-variants

Note, if --color is specified --all-variants doesn't include a default (unchanged) color variant. Have a Default empty color map in colors.json:

{
  "Default": {},
  "White": {
    ...
  },
  ...
}

and specify it explicitly:

--color Default,White

⚠️ Notice: Final Major Version v2.x.x

I've launched the successor to this project at https://www.github.com/ful1e5/bibata for downloading and personalizing Bibata, now the main source for new features. I recommend downloading from there. This repository is still maintained for Linux packages.

💖 Support Bibata's Future

Your sponsorship is crucial for Bibata's ongoing success. A $1 contribution helps maintain servers for 24/7 accessibility. With your support, I can upgrade to high-performance AWS servers, improving user experience. Sponsors also enjoy exclusive premium features for a more rewarding engagement.

Bibata Cursor

build

TLDR; This cursor set is a masterpiece of cursors available on the internet, hand-designed by Abdulkaiz Khatri.

Bibata is an open source, compact, and material designed cursor set that aims to improve the cursor experience for users. It is one of the most popular cursor sets in the Linux community and is now available for free on Windows as well, with multiple color and size options. Its goal is to offer personalized cursors to users.

What does "Bibata" mean?

The sweetest word I ever spoke was "BI-Buh," which, coincidentally, is also the word for peanuts. To make it more pronounceable and not sound like a baby's words, I added the suffix "Ta." And with that, my journey in the world of open source began.

Notes

  • All cursor's SVG files are found in svg directory or you can also find them on Figma.

  • This repository is now synchronized with the bibata project, which has become the new mainstream for acquiring new features and updates. I recommend downloading from there. However, this repository is still periodically maintained to ensure its relevance and usability for linux packages.

shoutout-sponsors

  • 2024-06-14: 4460d91 Partitioned cursor build configuration into multiple files according to platform:
    • build.toml
      • configs/normal/x.build.toml
      • configs/normal/win_xl.build.toml
      • configs/normal/win_rg.build.toml
      • configs/normal/win_lg.build.toml
    • build.right.toml
      • configs/right/x.build.toml
      • configs/right/win_xl.build.toml
      • configs/right/win_rg.build.toml
      • configs/right/win_lg.build.toml

Bibata Amber Bibata Classic Bibata Ice


Bibata Amber Right Bibata Classic Right Bibata Ice Right

Variants:

  • Normal
    • Bibata Original Amber: Yellowish and sharp edge bibata cursors.
    • Bibata Modern Amber: Yellowish and rounded edge bibata cursors.
    • Bibata Original Classic: Black and sharp edge bibata cursors.
    • Bibata Modern Classic: Black and rounded edge bibata cursors.
    • Bibata Original Ice: White and sharp edge bibata cursors.
    • Bibata Modern Ice: White and rounded edge bibata cursors.
  • Right Hand
    • Bibata Original Amber Right: Yellowish and sharp edge right-hand bibata cursors.
    • Bibata Modern Amber Right: Yellowish and rounded edge right-hand bibata cursors.
    • Bibata Original Classic Right: Black and sharp edge right-hand bibata cursors.
    • Bibata Modern Classic Right: Black and rounded edge right-hand bibata cursors.
    • Bibata Original Ice Right: White and sharp edge right-hand bibata cursors.
    • Bibata Modern Ice Right: White and rounded edge right-hand bibata cursors.

Cursor Sizes

Xcursor Sizes:

16 20 22 24 28 32 40 48 56 64 72 80 88 96

Windows Cursor Size:

  • 16x16 - Small
  • 24x24 - Regular
  • 32x32 - Large
  • 48x48 - Extra Large

Colors:

Bibata Amber

  • Base Color - #FF8300 (Amber)
  • Outline Color - #FFFFFF (White)
  • Watch Background Color - #001524 (Rich Black)

Bibata Classic

  • Base Color - #000000 (Black)
  • Outline Color - #FFFFFF (White)
  • Watch Background Color - #000000 (Black)

Bibata Ice

  • Base Color - #FFFFFF (White)
  • Outline Color - #000000 (Black)
  • Watch Background Color - #FFFFFF (White)

How to get it

Easiest Way

You can download latest stable & development releases from bibata.live or on Release Page.

Packages

Note If you're having trouble with the packages please submit a request to the package maintainer before creating an issue.

Arch Linux/Manjaro

AUR @yochananmarqos
paru -S bibata-cursor-theme-bin # (recommended)
paru -S bibata-cursor-theme

Or PKGBUILD

Fedora

copr-repo by @peterwu (recommended)
sudo dnf copr enable peterwu/rendezvous
sudo dnf install bibata-cursor-themes
copr-repo by @muhalantabli
sudo dnf copr enable muhalantabli/copr-repo
sudo dnf install bibata-cursor-theme

Installing Bibata Cursor

Linux X11/Wayland

Installation:

tar -xvf Bibata.tar.gz                # extract `Bibata.tar.gz`
mv Bibata-* ~/.local/share/icons/     # Install to local users
sudo mv Bibata-* /usr/share/icons/    # Install to all users

Uninstallation:

rm ~/.local/share/icons/Bibata-*      # Remove from local users
sudo rm /usr/share/icons/Bibata-*     # Remove from all users

Windows

Installation:

  1. Unzip .zip file
  2. Open unziped directory in Explorer, and right click on install.inf.
  3. Click 'Install' from the context menu, and authorize the modifications to your system.
  4. Open Control Panel > Personalization and Appearance > Change mouse pointers, and select Bibata Cursors.
  5. Click 'Apply'.

Uninstallation:

Run the uninstall.bat script packed with the .zip archive

OR follow these steps:

  1. Go to Registry Editor by typing the same in the start search box.
  2. Expand HKEY_CURRENT_USER folder and expand Control Panel folder.
  3. Go to Cursors folder and click on Schemes folder - all the available custom cursors that are installed will be listed here.
  4. Right Click on the name of cursor file you want to uninstall; for eg.: Bibata Cursors and click Delete.
  5. Click 'yes' when prompted.

Build From Source

Prerequisites

  • Python version 3.7 or higher
  • clickgen>=2.1.8 (pip install clickgen)
  • yarn

Quick start

  1. Install build prerequisites on your system
  2. git clone https://github.com/ful1e5/Bibata_Cursor
  3. cd Bibata_Cursor
  4. yarn install
  5. yarn generate
  6. See Installing Bibata Cursor.

Getting Started

Once you have the build prerequisites installed, You can personalize colors, customize sizes, change target platforms, and more. This process involves using external tools, as this repository only contains SVG files and configuration for these tools:

  • cbmp: Used for customizing colors and generating PNG files.
  • ctgen: Used for customizing sizes and building XCursor and Windows Cursors.

You can refer to the README of each tool for more information on their command-line options.

Crafting Your Bibata

https://bibata.live simplifies the personalization of cursor themes, making it easy and accessible for users. With bibata, you can enhance your cursor experience effortlessly. Best of all, it's available for free, allowing you to enjoy a customized bibata cursor theme tailored to your preferences.

The process of creating custom cursor themes involves two main steps:

  1. Rendering SVG files to PNG files.
  2. Building cursor themes from PNG files.

Customize Colors

cbmp provides three options for changing colors:

  1. -bc: Base color, which replaces the #00FF00 color in the SVG.
  2. -oc: Outlined color, which replaces the #0000FF color in the SVG.
  3. -wc (optional): Watch Background color, which replaces the #FF0000 color in the SVG.
npx cbmp [...] -bc '<hex>' -oc '<hex>' -wc '<hex>'

Alternatively, you can provide a JSON configuration file to render SVG files, which contains a sequence of cbmp commands:

npx cbmp render.json

Customize Sizes

Customize Windows Cursor size

To build Windows cursor with size 16:

ctgen build.toml -s 16 -p windows -d 'bitmaps/Bibata-Modern-Ice' -n 'Bibata-Modern-Ice' -c 'White and rounded egde bibata cusors with size 16'

You can also customize output directory with -o option:

ctgen build.toml -s 16 -p windows -d 'bitmaps/Bibata-Modern-Ice' -o 'out' -n 'Bibata-Modern-Ice' -c 'White and rounded egde Bibata cursors with size 16'
Customize XCursor size

To build XCursor with size 16:

ctgen build.toml -s 16 -p x11 -d 'bitmaps/Bibata-Modern-Ice' -n 'Bibata-Modern-Ice' -c 'White and rounded egde Bibata cursors with size 16'

You can also assign multiple sizes to ctgen for XCursors build:

ctgen build.toml -s 16 18 24 32 -p x11 -d 'bitmaps/Bibata-Modern-Ice' -n 'Bibata-Modern-Ice' -c 'Custom white and rounded egde Bibata cursors'

Examples

Lets generate Bibata-Modern with green and black colors:

npx cbmp -d 'svg/modern' -o 'bitmaps/Bibata-Hacker' -bc '#00FE00' -oc '#000000'

After rendering custom color you have to build cursor through ctgen:

ctgen build.toml -d 'bitmaps/Bibata-Hacker' -n 'Bibata-Hacker' -c 'Green and Black Bibata cursors.'

Afterwards, Generated theme can be found in the themes directory.

Bibata Gruvbox
npx cbmp -d 'svg/original' -o 'bitmaps/Bibata-Gruvbox' -bc '#282828' -oc '#EBDBB2' -wc '#000000'
ctgen build.toml -d 'bitmaps/Bibata-Gruvbox' -n 'Bibata-Gruvbox' -c 'Groovy Bibata cursors.'
Bibata Solarized Dark
npx cbmp -d 'svg/original' -o 'bitmaps/Bibata-Solarized-Dark' -bc '#002b36' -oc '#839496' -wc '#000000'
ctgen build.toml -d 'bitmaps/Bibata-Solarized-Dark' -n 'Bibata-Solarized-Dark' -c 'Solarized Dark Bibata cursors.'
Bibata Solarized Light
npx cbmp -d 'svg/original' -o 'bitmaps/Bibata-Solarized-Light' -bc '#839496' -oc '#002b36'
ctgen build.toml -d 'bitmaps/Bibata-Solarized-Light' -n 'Bibata-Solarized-Light' -c 'Solarized Light Bibata cursors.'
Bibata Dracula
npx cbmp -d 'svg/original' -o 'bitmaas/Bibata-Dracula' -bc '#282a36' -oc '#f8f8f2'
ctgen build.toml -d 'bitmaps/Bibata-Dracula' -n 'Bibata-Dracula' -c 'Dracula Bibata cursors.'

You may also like...

  • Bibata - The place where Bibata's cursor gets personalized.
  • Bibata Adapta - Bibata Based Cursor Made for AdaptaBreath and Manjaro.
  • Bibata Translucent - Bibata translucent is a translucent flavor of the Bibata.

Testing Cursor

There are several websites that allow you to test your cursor states by hovering over buttons. This can be very useful when developing or verifying the behavior of a cursor. The following websites cover many of the most commonly used cursors, although they may not include all available options.

For a blueprint for creating XCursors, you may also want to refer to Cursor-demo.

Credit

Wedge Loading Animation · Adwaita · Dmz · Yaru

bibata_cursor's People

Contributors

allanc56 avatar clefebvre avatar code-factor avatar davidlj95 avatar dependabot[bot] avatar eti0 avatar frontendfixer avatar ful1e5 avatar jmarmstrong1207 avatar khuei avatar luizoti avatar mleyen avatar mmetak avatar monosans avatar orafilynie avatar shatur avatar silicasandwhich avatar stanio avatar suchipi avatar truenaho avatar vperus avatar

Stargazers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.