GithubHelp home page GithubHelp logo

art's Introduction

art

Caution

You will most likely have to edit the EDITME file since this script is at this moment only adapted for my dotfiles.

What is it ?

art is a theme generator that takes an image, generates colors from it and creates a theme with two variations from those colors, a dark and a light one. It then updates some configuration files and any open terminal with desired colors. Each generated theme is saved in a special folder, that can be accessed at any time.

How does it work ?

  1. Load an image
  2. Generate a certain number of colors
  3. Choose 5 colors
    • The darkest
    • The redest
    • The greenest
    • The blueest
    • The lightest
  4. Tweak those colors and create a grey color from the darkest one
  5. Check the colors
    • If some colors are too similar, adjust them
  6. Generate files

How to install ?

Dependencies

imagemagick: Used to generate the first array of colors

Instructions

cd WHEREVER_YOU_WANT
git clone https://github.com/gawlk/art.git
cd art
echo "PATH="${PATH}:$( pwd )"" >> ${HOME}/.bashrc

How to use ?

art - Theme generator

Arguments:
(none)                              Load the current theme
-blk                                Preset the black color
-blu                                Preset the blue color
-c | -copy "theme" "name"           Copy a theme and exit
-clear                              Clear all configuration files
-clear-all                          Clear all configuration files and delete the theme folder
-dark                               Set the brightness of the theme to dark
-delete "theme"                     Delete a theme and exit
-grn                                Preset the green color
-gry                                Preset the grey color
-h | -help                          Display this menu and exit
-i | -image "file" "name"           Create a theme using a local picture
-l | -link "link" "name"            Create a theme using a link to an image
-light                              Set the brightness of the theme to light
-list                               Display a list of available themes and exit
-n | -next                          Load the next theme from the list
-name                               Display the name of the current theme and exit
-o | -override                      Enable overriding of existing themes (one-time only)
-p | -previous                      Load the previous theme from the list
-q | -quiet                         Disable logs
-r | -random                        Select a random theme to load
-red                                Preset the red color
-reload                             Regenerate the configuration of the current theme (for devs)
-reload-all                         Regenerate the configuration of all the themes (for devs)
-s | -swap                          Swap the brightness of the current theme
-t | -theme "theme"                 Load a particular theme
-ua | -unsplash-artist "name"       Create a theme using a random picture from an Unsplash's artist
-uc | -unsplash-collection "name"   Create a theme using a random picture from an Unsplash's collection
-ud | -unsplash-daily               Create a theme using Unsplash's picture of the day
-ur | -unsplash-random              Create a theme using a random picture from Unsplash
-wht                                Preset the white color

TODO

  • Improve the selection of rgb in setters.rgb()
  • Improve the ifs in checkers.colors()
  • Find the perfect balance in tweakers.color()

Contributors

art's People

Contributors

drgarlic avatar turquoise-hexagon avatar mngad avatar

Stargazers

 avatar Elisabeth Bommes avatar  avatar BlackHippy avatar ~P avatar  avatar Yining avatar  avatar Joshua Krueger avatar Scott Ivey avatar Diogo Felix avatar Joshua Peele avatar Dave Foster avatar Marcel Klenk avatar Clint Valentine avatar Rany Tith avatar Richard Young avatar Leonardo Baldin avatar Memorias de un informático (Lorenzo) avatar Dylan Zingler avatar Neve Laughery avatar Dave Chenell avatar  avatar Luiz F. A. de Prá avatar Alberto Galera avatar George Kussumoto avatar Sébastien Eustace avatar Jake Schurch avatar Eduardo Bizarro avatar  avatar Andrey avatar Connor Yates avatar Patrick Vickery avatar Michael Lenehan avatar Stefan Maksimovic avatar  avatar Bran Stewart avatar André Neves avatar  avatar Guido Schmidt avatar Asim Shamim avatar Xiao-Hu Tai avatar Oscar Elizondo avatar  avatar Jonathan King avatar  avatar  avatar kota avatar Daniel Serratore avatar  avatar boggs ⚓ avatar Mats-Eric avatar Patryk Zabicki avatar Jacek Wieczorek avatar Peter Beck avatar Maximilian Aigner avatar  avatar geduardcatalindev avatar

Watchers

Ryan avatar  avatar

Forkers

mngad hallonfras

art's Issues

Permission denied

Hi! I wanted to try out this on macOS. I know it's not supported, so feel free to tell me to figure this out myself.

I'm only concerned with the part of the script that figures out the values for the colors, not the actual updating, so I see no issue in this working correctly. All I did so far is changing line 69 in args to path=$(${args[$i]}) because there's no realpath in macOS. The way I did you have to specify the full path of the file, but that looks like a minor inconvenience.

However, I'm getting this in response:

xrandr: Failed to get size of gamma for output default
args: line 69: /Users/[my name]/Pictures/Wallpapers/hills.jpg: Permission denied
ERROR: The provided file doesn't exist

I feel like I can safely ignore both the first and last line, but naturally I can't get past the permission denied. The file in question is:

-rw-r--r--@ 1 [my name] staff 600903 17 Mar 22:38 hills.jpg

So I can't really figure out the issue. Any ideas?

EDIT: yeahhhh, it should have been path=${args[$i]}. I'm sorry, it works now.

Missing shebang

Small error at the top of art script prevents it from running where bash is not default system shell. Shebang at top should read #! not #.

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.