Giter Club home page Giter Club logo

xtheme's Introduction

xtheme - An XTerm/UXTerm/RXVT/URXVT themeing tool
gh: emctague/xtheme

Generates .Xresources and .Xdefaults based on a simpler theme configuration
file format than the standard XRDB one. Made specifically for themeing.


Usage: xtheme <file>

Dependencies:
All you need is gcc on a linux system.

Building:
$ make

Installing:
# make install



Why?

Because I've gotten tired of searching for the options I want for my XResources
file - the names tend to be a bit weird, they're long and repetitive, and for
some reason various sources of documentation seem to disagree on what options
are available to use. To solve this problem, I wrote my own, simpler format
that includes only themeing-related options that a sane person would actually
want to use. I also documented each option clearly below.

Frankly, if you're comfortable editing your regular .Xresources file and don't
plan on changing it often, you probably shouldn't bother with this. I made it
for myself, to fix a problem I have personally,  and figured I'd share it.



Writing a Theme:

A theme/config file consists of lines containing a property, along with any
other information that particular property requires. See `example.xth` for an
example configuration.

There are three types of options that can be set:

 - Flags
   These options are simply listed on a line, and they enable or disable a
   certain feature. No value is given for this sort of option.

 - Values
   These options have a specific value that should come after them on the
   same line, separated by a space.

 - Lists
   These options are given on a line on their own, followed by a certain number
   of lines, each containing a single value for the list.

Please note:

 - Colors must be in hex (#xxxxxx) or basic name (red, green, blue, etc.) format.

 - Any lines that aren't valid config options will be silently ignored, so you
   don't need any particular formatting to make a comment.

 - Indentation of a line will probably result in xtheme failing to recognize the option.

Options:

 - color fg (Value)
   Sets the foreground color to the one specified.

 - color bg (Value)
   Sets the background color to the one specified.

 - color cursor (Value)
   Sets the cursor color to the one specified.

 - color bold (Value)
   Sets the bold color to the one specified. This will also tell XTerm to use
   colored text for "bold" instead of actual bold text.

 - color italic (Value)
   Sets the italic color to the one specified. This will also tell XTerm to use
   colored text for "italic" instead of actual italic text.

 - color underline (Value)
   Sets the underline color to the one specified. This will also tell XTerm to
   use colored text for "underline" instead of actual underlined text.

 - colors (List)
   Sets all 16 terminal colors (color0 to color15). These colors must be
   specified in proper order on the following lines. 16 lines of color values
   must follow.

 - font face (Value)
   Sets the font to the one whose name is specified.

 - font size (Value)
   Sets the font's size, in points, to the value specified.

 - padding (Value)
   Sets the padding around the outer edges of the terminal, in pixels, to the
   value specified

 - use scrollbar (Value)
   Set to true to enable the scrollbar, or false to disable. This isn't a
   flag because the default can be a bit more inconsistent, so we need the
   ability to turn it off or on.

 - cursor blink (Flag)
   Makes the cursor blink.

 - use clipboard (Flag)
   Enables using Ctrl+Shift+V and Ctrl+Shift+C to copy and paste.



Copyright / Licensing:

Source Code, associated/accompanying project files, documentation, and binaries
resulting from the compilation of source code are Copyright 2018 Ethan McTague.

Source code, associated/accompanying project files, documentation, and binaries
resulting from the compilation of source code licensed under the BSD 2-Clause
License, see accompanying "COPYING" file for license terms.

xtheme's People

Contributors

emctague avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

xterm-x11

xtheme's Issues

fprintf 06-03-21

make returns:

gcc -Wall -Werror -c src/xtheme.c -o build/xtheme.o
src/xtheme.c: In function ‘main’:
src/xtheme.c:97:6: error: format not a string literal and no format arguments [-Werror=format-security]
   97 |      fprintf (out, properties[i].output);
      |      ^~~~~~~
src/xtheme.c:99:6: error: format not a string literal and no format arguments [-Werror=format-security]
   99 |      fprintf (out, properties[i].output_false);
      |      ^~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:17: build/xtheme.o] Error 1

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.