• This repository has been archived on 26/Apr/2024
  • Stars
    star
    185
  • Rank 208,271 (Top 5 %)
  • Language
    C
  • License
    MIT License
  • Created almost 6 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Change terminal colors on-the-fly independent of terminal emulator.
paleta
________________________________________________________________________________

Change terminal colors on-the-fly independent of terminal emulator.

Most terminal emulators support a set of escape sequences which allow for the
modification of the terminal's color palette. Combined with the ability to write
to all open terminal devices, this allows for theming in a truly independent way.

Paleta reads a list of colors over <stdin>, transforms the input into the set of
escape sequences and sends these sequences to every open terminal in the system.
It additionally prints the sequences to <stdout>.

+------------------------------------------------------------------------------+
|                                                                              |
|  $ paleta < palettes/jellybeans-dark > ~/.cache/current-palette              |
|                                                                              |
+------------------------------------------------------------------------------+

This tool is small and generic. It reads input and writes output. Effortless to
incorporate with the system. This repository also contains 150~ popular palettes
ready for use with paleta.


terminal support
________________________________________________________________________________

+------------------------------------------------------------------------------+
|                                                                              |
|  this list is not complete                                                   |
|                                                                              |
|                                                                              |
|  alacritty  good        alacritty/alacritty#656    |
|  kitty      good                                                             |
|  vte [0]    good        1a651cf990e67c4046fbff7674249259bcaa89a8             |
|  xterm      good                                                             |
|  urxvt      good                                                             |
|                                                                              |
|  st         patch       ./misc/st-osc_10_11_12-20200418-66520e1.patch        |
|                                                                              |
|  hyper      clueless    vercel/hyper#2038          |
|                                                                              |
|                                                                              |
+------------------------------------------------------------------------------+

[0] vte includes Termite, XFCE terminal, GNOME terminal, Konsole and many more.


dependencies
________________________________________________________________________________

- POSIX <stdio.h> <stdlib.h> <glob.h>
- C99 compiler


build
________________________________________________________________________________

See src/config.h for configuration.

+------------------------------------------------------------------------------+
|                                                                              |
|  Using make (recommended)                                                    |
|                                                                              |
|  $ make                                                                      |
|  $ make install                                                              |
|                                                                              |
|                                                                              |
|  Invoking the compiler directly                                              |
|                                                                              |
|  $ c99 $CFLAGS -o paleta src/paleta.c                                        |
|                                                                              |
|                                                                              |
+------------------------------------------------------------------------------+


usage
________________________________________________________________________________

+------------------------------------------------------------------------------+
|                                                                              |
|  1. Set the colorscheme to jellybeans-dark in all open terminals.            |
|                                                                              |
|  $ paleta < palettes/jellybeans-dark > ~/.cache/current-palette              |
|                                                                              |
+------------------------------------------------------------------------------+

Saving paleta's <stdout> to a file is how the current palette is stored. This
file is used to set the palette in newly opened terminals. Scripts might instead
store this in a variable or ignore it entirely as they maintain state.


setup
________________________________________________________________________________

This line must be added to $SHELL's startup file. It tells future terminals to
load the current palette at launch.

+------------------------------------------------------------------------------+
|                                                                              |
|  $ echo 'cat ~/.cache/current-palette' >> ~/.bashrc                          |
|                                                                              |
+------------------------------------------------------------------------------+


input format
________________________________________________________________________________

Input is one hex color per line, without #. The first three lines are
reserved for <foreground>, <background> and <cursor> with the remaining lines
filling the numerical palette (0-256).

Example: https://github.com/dylanaraps/paleta/blob/master/palettes/gruvbox-dark

+------------------------------------------------------------------------------+
|  format                             |  example                               |
+-------------------------------------+----------------------------------------+
|                                     |                                        |
|  <foreground>                       |  dedede                                |
|  <background>                       |  121212                                |
|  <cursor>                           |  dedede                                |
|  <color0>                           |  929292                                |
|  <color1>                           |  e27373                                |
|  <color2>                           |  94b979                                |
|                                     |                                        |
|  ...                                |  ,,,                                   |
|                                     |                                        |
|  <color256>                         |  1ab2a8                                |
|                                     |                                        |
|                                     |                                        |
+-------------------------------------+----------------------------------------+

The maximum palette is (3 + 256). This is configurable at compile-time.


software written around paleta
________________________________________________________________________________

- shuffle through palettes in a directory. https://github.com/dylanaraps/bin/blob/c06b2c0df0194487fc4cb9c65b451b6369e2c398/shuffle


todo
________________________________________________________________________________

- [ ] Find good 256 color palettes to include. All are currently 16 colors.
      256 color palettes added to this repository should contain -256 in their
      filenames.

More Repositories

1

pure-bash-bible

๐Ÿ“– A collection of pure bash alternatives to external processes.
Shell
36,517
star
2

neofetch

๐Ÿ–ผ๏ธ A command-line system information tool written in bash 3.2+
Shell
21,666
star
3

pywal

๐ŸŽจ Generate and change color-schemes on the fly.
Python
8,250
star
4

pure-sh-bible

๐Ÿ“– A collection of pure POSIX sh alternatives to external processes.
Shell
6,485
star
5

fff

๐Ÿ“ A simple file manager written in bash.
Shell
4,088
star
6

pfetch

๐Ÿง A pretty system information tool written in POSIX sh.
Shell
2,053
star
7

sowm

An itsy bitsy floating window manager (220~ sloc!).
C
913
star
8

wal

๐ŸŽจ Generate and change colorschemes on the fly. Deprecated, use pywal instead. -->
Shell
730
star
9

pxltrm

๐Ÿ–Œ๏ธ pxltrm - [WIP] A pixel art editor inside the terminal
Shell
650
star
10

dotfiles

๐Ÿ™ dotfiles
Vim Script
545
star
11

writing-a-tui-in-bash

How to write a TUI in BASH
518
star
12

pash

๐Ÿ”’ A simple password manager using GPG written in POSIX sh.
Shell
341
star
13

birch

An IRC client written in bash
Shell
319
star
14

torque

๐Ÿš‚ A TUI client for transmission written in pure bash.
Shell
229
star
15

wal.vim

๐ŸŽจ A vim colorscheme for use with wal
Vim Script
219
star
16

shfm

file manager written in posix shell
Shell
216
star
17

promptless

๐Ÿš€ A super fast and extremely minimal shell prompt.
Shell
188
star
18

bin

๐Ÿ—‘๏ธ scripts
Shell
146
star
19

bum

๐ŸŽต Download and display album art for mpd/mopidy tracks.
Python
137
star
20

openbox-patched

PKGBUILD and patches for Openbox with Rounded Corners
112
star
21

fff.vim

A plugin for vim/neovim which allows you to use fff as a file opener.
Vim Script
104
star
22

bareutils

A coreutils written in pure bash.
Shell
89
star
23

k

kiss pkg man written in c
C
55
star
24

clutter-home

clutter your home directory!
50
star
25

eiwd

iwd without dbus
C
47
star
26

barsh

Use your terminal as a bar
Shell
39
star
27

nosj

a json parser written in pure bash
Shell
37
star
28

dylanaraps

37
star
29

bush

This is an experiment to see how many standard tools and functions we can re-implement in pure bash.
Shell
33
star
30

crayon

๐ŸŽจ A dark 16 color colorscheme for Vim, Gvim, and Nvim
Vim Script
29
star
31

startpage

๐Ÿ”— Simple start page written in HTML/SCSS
CSS
29
star
32

ryuuko

๐ŸŽจ A colorscheme~
Vim Script
28
star
33

wiki

KISS Linux - Wiki (The wiki is now a part of the website)
27
star
34

pow

Shell
25
star
35

hello-world.rs

๐Ÿš€Memory safe, blazing fast, configurable, minimal hello world written in rust(๐Ÿš€) under 1 line of code with few(774๐Ÿš€) dependencies๐Ÿš€
Rust
25
star
36

root.vim

๐ŸŒด Automatically set directory to your project's root based on a known dir/file.
Vim Script
23
star
37

nfu

Neofetch Utils - A set of C programs to print system information.
C
22
star
38

wm

xcb wm
C
20
star
39

pkg

Package Manager for Kiss Linux
Shell
18
star
40

neofetch-branding

Logos for Neofetch
16
star
41

codegolf

my bash code golfs
16
star
42

okpal

okpal - Swap on the fly between a bunch of palettes
Shell
15
star
43

eiwd_old

SEE: https://github.com/dylanaraps/eiwd
C
14
star
44

taskrunner.nvim

๐Ÿƒ Runs Gulp/Gruntfiles in terminal splits
Vim Script
14
star
45

discord-selena

Log all Discord messages for transparency
Python
12
star
46

libdbus-stub

stub libdbus to appease
C
12
star
47

blog

Shell
11
star
48

dylan-kiss

Dylan's KISS repository
Objective-C
11
star
49

kiss-flatpak

flatpak for kiss
Shell
11
star
50

str

C
10
star
51

kiss-initramfs

[WIP] initramfs tool for KISS (help wanted!)
Shell
9
star
52

sowm-patches

READ: https://github.com/dylanaraps/sowm/pull/57
8
star
53

golfetch

simple fetch script for Linux.
Shell
8
star
54

coal

๐Ÿš‚ A bash script that takes a list of colors and outputs them in various formats for use in other programs.
Shell
8
star
55

reddit-sidebar-toggle

๐Ÿ‘ฝ Toggle the sidebar on reddit.com
JavaScript
8
star
56

dylan.k1ss.org

HTML
7
star
57

wayland-experiment

Shell
6
star
58

uncompress

6
star
59

pywal-branding

Logos for pywal
Shell
5
star
60

xyz-redirect

simply a cheeky way to 301 redirect https to another domain leveraging netlify to handle the SSL cert.
HTML
5
star
61

repo

๐Ÿ“ฆ Dylan's Cydia Repo
Shell
5
star
62

dlink-ssid-bypass

๐Ÿ“ก Bypass SSID validation on D-Link DSL-2750B
4
star
63

pascal_lint.nvim

๐Ÿ† Show fpc compiler output in a neovim split.
Vim Script
4
star
64

blag

blag
HTML
3
star
65

oldyiayias

Old website for Yiayias Greek Cafe
CSS
3
star
66

languages

Shell
3
star
67

kisslinux-irc-logs

Freenode #kisslinux IRC logs (2019-2021)
3
star
68

dylanaraps.github.io-old

๐Ÿ”— My personal website.
HTML
2
star
69

google

Remake of Google.com for an assignment
HTML
2
star
70

2211

mnml trmnl using vte
C
2
star
71

kiss-submodule-links

Shell
2
star
72

eww-static-test

Rust
1
star
73

yiayias

Recreating Yiayia's website 6 months later
HyPhy
1
star