Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.
/ gcolors Public archive

My color library to have consistent colors in all the system

Notifications You must be signed in to change notification settings

gerardet46/gcolors

Repository files navigation

GCOLORS - Gerardet Colors

This repo is unmaintened!

This color library (header files and some utilities) are meant to have several color schemes (.h files). This color schemes can be included directly in C programs (such us suckless programs)

It can also set environment variables with the colors formatted in #rrggbb

Installation

Simply run

sudo ./install

and header files will be installed at /usr/include and scripts in /opt/gcolors

Color schemes

This are the available color schemes

  • nord
  • dracula

Edit gcolors folder (/usr/include/gcolors/) to add/del/change color schemes. Don't forget to include them all in /usr/include/gcolors.h

Usage

Use colors

In C files:

Just type

#include <gcolors.h>

and you can add COL_GROC, for example, to get the yellow color (see definitions in /usr/include/gcolors/your_theme.h)

In scripts

If you have set environment variables (see it below) then you can echo "$COL_GROC" to display the yellow color.

This is useful for example for configuring dwmblocks with status2d, which allows you typing any color in the hex format, which is the format followed by gcolors

Change color scheme

sudo /opt/gcolors/change.sh [theme_name (nord, dracula, ...)]

Remake pkgs that need gcolors.h

Edit the file /opt/gcolors/makepkgs, which contains a list of folders that contain programs (such us dwm or dmenu) that need to be recompiled.

NOTE 1: Run it with regular user! (don't run it with sudo)

NOTE 2: To enter HOME directory, please type ~/ instead of $HOME in that file, as you can see in the example included in this repository

Then, run

/opt/remake.sh

to re-make (install clean) those packages

Set environment variables

Just add the following to the autostart (maybe ~/.xinitrc)

. /opt/gcolors/colors_env.sh

Notice that it must be sourced (with . or source). You can run it also in the fly to refresh color variables

Make all this with dmenu!

Run the following:

/opt/gcolors/theme_dmenu.sh

to open dmenu (must be installed). There you can select the theme and it will be changed, remaked and set the env. variables! Make sure you have a program to ask SUDO_ASKPASS to enter the password to change the theme

Colors

The name of the colors are in catalan. You can see the header files (in /usr/include/gcolors) to see the colors.

If you want to add more themes, please follow the same syntax.

About

My color library to have consistent colors in all the system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published