Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.
/ dragon_byte Public archive

A 42x42 pixels cursor with a dragon drawing that is available for web projects and X11.

License

Notifications You must be signed in to change notification settings

skippyr/dragon_byte

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dragon Byte

Starting Point

A 42x42 pixels cursor with a dragon drawing that is available for web projects and X11.

Installation And Usage

Installing From Releases

Ports of this cursor are available in the Releases page. You can download the latest release of the desired port and start using them by reading their installation instructions as following:

For web project

  • Download the release of the cursor for web projects: web.zip and unzip it in a formidable directory in your machine.
  • Move the css/dragon_byte directory unziped to a formidable directory in your web project.
  • Import the stylesheet file dragon_byte.css of the directory you have just copied inside your HTML file. You can use a link tag for that. Here is a template that you can use:
  • 
    <link
    	rel="stylesheet"
    	href=""
    />
    					

    You still have to insert the relative path to include that stylesheet yourself, in the href attribute shown.

  • Write the CSS rules you need to apply the cursor inside the stylesheet that you imported. It already has all the necessary variables defined and in scope for you to do it. Every variable is prefixed with dragon-byte to make them unique. Want a usage example? What about applying the default cursor for your body element:
  • 
    body
    { cursor: var(--dragon-byte-default); }
    					

    Applying the remaining variables of the cursor is up to you: you will have to manually apply them to your page elements.

For X11

  • Download the release of the cursor for X11: x11.zip and unzip it in a formidable directory in your machine.
  • Move the x11/dragon_byte directory unziped to either:
    • /usr/share/icons for a system wide installation (requires sudo privileges):
    • 
      mkdir -p /usr/share/icons
      mv x11/dragon_byte /usr/share/icons
      							
    • ${HOME}/.local/share/icons for a user installation:
    • 
      mkdir -p ${HOME}/.local/share/icons
      mv x11/dragon_byte ${HOME}/.local/share/icons
      							
  • Apply the cursor using your system's settings application or by using an Xresource rule.

  • Restart X11 for your changes to be properly set.

Building From Source

You can build different ports of the cursor by using a Docker container inside of a UNIX-like system: like MacOS or Linux, which will allow you to create a development environment with all the required dependencies easily.

Unfortunely, Windows uses NTFS file system, so accessing the files created by a Linux container, which uses ext4 file system, may cause some incompatibily. If that is your case, you can try to run it using WSL (Windows Subsytem for Linux) or even on a virtual machine.

Let's get through the steps to do it:

  • Install Docker and enable its daemon.
  • You can find all the information needed to install it in its official website.

  • Download this repository.
  • If you have git installed, you can download it by using the following command:

    git clone --depth=1 https://github.com/skippyr/dragon_byte

    This will clone this repository to the directory dragon_byte in your current directory. If you would like to download it to another directory, simply add its path as an argument in the end of the command when you use it.

    If you do not have git installed, you still can download it from its page on GitHub. Access that page, then click on the button labeled Code on the top of the page, the click on the button labeled Download ZIP that will be in the floating menu that appears. This will download a compressed file containing the repository, you just have to unzip it.

  • Access the repository's directory using a command-line application.
  • cd flamerial.nvim

    If you have choosed another directory in previous step, substitute it in the command when you use it.

  • Create a Docker container image using the Dockerfile.
  • docker build -t dragon_byte .

    This command will create a Docker container image named dragon_byte. Even though it is possible to change that name, I recommend that you keep it the same.

    The process of creating an image may take some time depending of your internet connection. This process can also throw some errors sometimes: saying that it could not retrive packages. That is normal! Just try to create it again.

  • Create and run a Docker container interactively using the image created in the previous step.
  • 
    mkdir -p distributions
    docker run -it --name dragon_byte --mount type=bind,source=$(pwd)/distributions,target=/root/development/dragon_byte/distributions dragon_byte
    					

    Worths to mention: to be able to access the images and ports created, you will need to mount a directory of your file system inside the container using a bind type.

    In the command above, that directory will be the distributions directory that you will have create. It will be connected to the directory /root/development/dragon_byte/distributions inside the container, where the ports will be placed.

  • Run the scripts to create the desired ports.
  • Now, inside the running container, you can use the ruby interpreter to create all the desired ports, simply by running one of the scripts under the scripts directory. They all use a descriptive name, so you will find out what each of them build.

    For example, to create the port for X11:

    ruby scripts/x11_port.rb

    You can also prefer to automatically ZIP the port created by using the --zip flag to any of the scripts. Using the same example as above, but now zipping the final result:

    ruby scripts/x11_port.rb --zip

All the ports will be placed inside the distributions directory inside the repository's root directory. As you have mounted that directory in your file system, you can access it directly in your host's file system too.

After creating the desired ports. Exit the container using the exit command. As you will not need them anymore, use the following commands to remove the container and container image created:


docker rm dragon_byte
docker rmi dragon_byte
			

If you are not using the root user, you will probably want to change the ownership of the distributions directory too so you can modify the files with your own user. Here is the command to do it:

sudo chmod -R $(whoami) distributions

You will need sudo privileges, as that directory will be owned by the root user.

Issues And Suggestions

Report issues and suggestions through the issues tab.

License

This project is released under terms of the MIT License. You can refer to the license as the file LICENSE in the repository's root directory.

Copyright (c) 2023, Sherman Rofeman. MIT License.