Coder Social home page Coder Social logo

modus-exporter's Introduction

modus-exporter

Important note

This library was created before version 1.0 of modus-themes. Since then a lot of changes have been made which make this library incompatible with newer versions.

Protesilaos Stavrou (the creator of modus-themes has now released his own exporter, so please use that instead of this project.

Introduction

modus-exporter is an Emacs Lisp library for Emacs and the modus-themes. The goal of this project is to provide a set of functions allowing these themes to be exported to a variety of formats for other software.

Installation

Currently this library is only available via the GitHub repository at https://github.com/polaris64/modus-exporter. Once the library is more fully-featured I intend also to host it via ELPA and MELPA.

Manually

Simply clone the above Git repository to a local directory and add it to your load-path. Then make sure to (require 'modus-exporter) before using it.

Via straight.el

(straight-use-package
 '(modus-exporter :type git :host github :repo "polaris64/modus-exporter" :files '("*.el" "exporters")))

In Doom Emacs

Add the following to packages.el in your Doom configuration directory (usually ~/.doom.d/)

(package! modus-exporter
  :recipe (:type git :host github :repo "polaris64/modus-exporter" :files ("*.el" "exporters")))

Current progress

This is an early prototype and as such only includes support for a couple of export formats at present: the Alacritty terminal and Tmux. Now that the concept has been proven to work more export formats will be added in due course.

Contributions

Contributions of other exporters by way of pull requests would be greatly appreciated as well as general comments and suggestions for improvement.

Adding an exporter

Simply copy an existing file in the exporters directory, give it a unique name and modify it accordingly. Each file in this directory should define a single function which outputs the specified theme in the new format and register that function in the modus-exporter-export-functions alist with a unique name.

How to use

The intended way to use this library is by way of the modus-exporter-insert-theme-colours-at-point function. Taking Alacritty as an example, this function can be used to export one of the themes directly to the Alacritty configuration file as follows: -

  1. Open alacritty.yml;
  2. Navigate to the colors section;
  3. Delete or otherwise disable the current colour configuration;
  4. Place the point at the position at which the new colours should be inserted; and
  5. Call the above function, specify the theme to export, and finally select the format (alacritty).

After following the above steps the selected theme colours should be in alacritty.yml. Simply saving the file should activate this new colour theme in all Alacritty terminals.

The procedure for other export formats once created should be the same.

NOTE: currently the theme to export must be loaded in Emacs. So for example, if exporting modus-operandi then this theme must have been loaded previously via load-theme. If the theme is not loaded then calling an export function specifying this theme will cause an error.

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.