This repository was archived by the owner on Apr 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathREADME
More file actions
147 lines (111 loc) · 7.81 KB
/
Copy pathREADME
File metadata and controls
147 lines (111 loc) · 7.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
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 https://github.com/alacritty/alacritty/issues/656 |
| kitty good |
| vte [0] good 1a651cf990e67c4046fbff7674249259bcaa89a8 |
| xterm good |
| urxvt good |
| |
| st patch ./misc/st-osc_10_11_12-20200418-66520e1.patch |
| |
| hyper clueless https://github.com/vercel/hyper/issues/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.