about summary refs log tree commit diff stats
path: root/res/map/index-iso-8859-6.txt
blob: a0691ffddcace4ffdc3d88c1f1a2ca14f4e319e3 (plain) (blame)
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
# For details on index index-iso-8859-6.txt see the Encoding Standard
# https://encoding.spec.whatwg.org/
#
# Identifier: 85bb7b5c2dc75975afebe5743935ba4ed5a09c1e9e34e9bfb2ff80293f5d8bbc
# Date: 2018-01-06

  0	0x0080	€ (<control>)
  1	0x0081	 (<control>)
  2	0x0082	‚ (<control>)
  3	0x0083	ƒ (<control>)
  4	0x0084	„ (<control>)
  5	0x0085	… (<control>)
  6	0x0086	† (<control>)
  7	0x0087	‡ (<control>)
  8	0x0088	ˆ (<control>)
  9	0x0089	‰ (<control>)
 10	0x008A	Š (<control>)
 11	0x008B	‹ (<control>)
 12	0x008C	Œ (<control>)
 13	0x008D	 (<control>)
 14	0x008E	Ž (<control>)
 15	0x008F	 (<control>)
 16	0x0090	 (<control>)
 17	0x0091	‘ (<control>)
 18	0x0092	’ (<control>)
 19	0x0093	“ (<control>)
 20	0x0094	” (<control>)
 21	0x0095	• (<control>)
 22	0x0096	– (<control>)
 23	0x0097	— (<control>)
 24	0x0098	˜ (<control>)
 25	0x0099	™ (<control>)
 26	0x009A	š (<control>)
 27	0x009B	› (<control>)
 28	0x009C	œ (<control>)
 29	0x009D	 (<control>)
 30	0x009E	ž (<control>)
 31	0x009F	Ÿ (<control>)
 32	0x00A0	  (NO-BREAK SPACE)
 36	0x00A4	¤ (CURRENCY SIGN)
 44	0x060C	، (ARABIC COMMA)
 45	0x00AD	­ (SOFT HYPHEN)
 59	0x061B	؛ (ARABIC SEMICOLON)
 63	0x061F	؟ (ARABIC QUESTION MARK)
 65	0x0621	ء (ARABIC LETTER HAMZA)
 66	0x0622	آ (ARABIC LETTER ALEF WITH MADDA ABOVE)
 67	0x0623	أ (ARABIC LETTER ALEF WITH HAMZA ABOVE)
 68	0x0624	ؤ (ARABIC LETTER WAW WITH HAMZA ABOVE)
 69	0x0625	إ (ARABIC LETTER ALEF WITH HAMZA BELOW)
 70	0x0626	ئ (ARABIC LETTER YEH WITH HAMZA ABOVE)
 71	0x0627	ا (ARABIC LETTER ALEF)
 72	0x0628	ب (ARABIC LETTER BEH)
 73	0x0629	ة (ARABIC LETTER TEH MARBUTA)
 74	0x062A	ت (ARABIC LETTER TEH)
 75	0x062B	ث (ARABIC LETTER THEH)
 76	0x062C	ج (ARABIC LETTER JEEM)
 77	0x062D	ح (ARABIC LETTER HAH)
 78	0x062E	خ (ARABIC LETTER KHAH)
 79	0x062F	د (ARABIC LETTER DAL)
 80	0x0630	ذ (ARABIC LETTER THAL)
 81	0x0631	ر (ARABIC LETTER REH)
 82	0x0632	ز (ARABIC LETTER ZAIN)
 83	0x0633	س (ARABIC LETTER SEEN)
 84	0x0634	ش (ARABIC LETTER SHEEN)
 85	0x0635	ص (ARABIC LETTER SAD)
 86	0x0636	ض (ARABIC LETTER DAD)
 87	0x0637	ط (ARABIC LETTER TAH)
 88	0x0638	ظ (ARABIC LETTER ZAH)
 89	0x0639	ع (ARABIC LETTER AIN)
 90	0x063A	غ (ARABIC LETTER GHAIN)
 96	0x0640	ـ (ARABIC TATWEEL)
 97	0x0641	ف (ARABIC LETTER FEH)
 98	0x0642	ق (ARABIC LETTER QAF)
 99	0x0643	ك (ARABIC LETTER KAF)
100	0x0644	ل (ARABIC LETTER LAM)
101	0x0645	م (ARABIC LETTER MEEM)
102	0x0646	ن (ARABIC LETTER NOON)
103	0x0647	ه (ARABIC LETTER HEH)
104	0x0648	و (ARABIC LETTER WAW)
105	0x0649	ى (ARABIC LETTER ALEF MAKSURA)
106	0x064A	ي (ARABIC LETTER YEH)
107	0x064B	ً (ARABIC FATHATAN)
108	0x064C	ٌ (ARABIC DAMMATAN)
109	0x064D	ٍ (ARABIC KASRATAN)
110	0x064E	َ (ARABIC FATHA)
111	0x064F	ُ (ARABIC DAMMA)
112	0x0650	ِ (ARABIC KASRA)
113	0x0651	ّ (ARABIC SHADDA)
114	0x0652	ْ (ARABIC SUKUN)
hlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*
 * (C)opyright MMIV-MMVI Anselm R. Garbe <garbeam at gmail dot com>
 * See LICENSE file for license details.
 */
#include "dwm.h"
#include <stdio.h>
#include <string.h>
#include <X11/Xlocale.h>

/* static */

static unsigned int
textnw(const char *text, unsigned int len)
{
	XRectangle r;

	if(dc.font.set) {
		XmbTextExtents(dc.font.set, text, len, NULL, &r);
		return r.width;
	}
	return XTextWidth(dc.font.xfont, text, len);
}

static void
drawtext(const char *text, Bool invert)
{
	int x, y, w, h;
	static char buf[256];
	unsigned int len, olen;
	XGCValues gcv;
	XPoint points[5];
	XRectangle r = { dc.x, dc.y, dc.w, dc.h };

	XSetForeground(dpy, dc.gc, invert ? dc.fg : dc.bg);
	XFillRectangles(dpy, dc.drawable, dc.gc, &r, 1);
	XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter);
	XSetForeground(dpy, dc.gc, dc.border);
	points[0].x = dc.x;
	points[0].y = dc.y;
	points[1].x = dc.w - 1;
	points[1].y = 0;
	points[2].x = 0;
	points[2].y = dc.h - 1;
	points[3].x = -(dc.w - 1);
	points[3].y = 0;
	points[4].x = 0;
	points[4].y = -(dc.h - 1);
	XDrawLines(dpy, dc.drawable, dc.gc, points, 5, CoordModePrevious);

	if(!text)
		return;

	w = 0;
	olen = len = strlen(text);
	if(len >= sizeof(buf))
		len = sizeof(buf) - 1;
	memcpy(buf, text, len);
	buf[len] = 0;

	h = dc.font.ascent + dc.font.descent;
	y = dc.y + (dc.h / 2) - (h / 2) + dc.font.ascent;
	x = dc.x + (h / 2);

	/* shorten text if necessary */
	while(len && (w = textnw(buf, len)) > dc.w - h)
		buf[--len] = 0;
	if(len < olen) {
		if(len > 1)
			buf[len - 1] = '.';
		if(len > 2)
			buf[len - 2] = '.';
		if(len > 3)
			buf[len - 3] = '.';
	}

	if(w > dc.w)
		return; /* too long */

	gcv.foreground = invert ? dc.bg : dc.fg;
	gcv.background = invert ? dc.fg : dc.bg;
	if(dc.font.set) {
		XChangeGC(dpy, dc.gc, GCForeground | GCBackground, &gcv);
		XmbDrawImageString(dpy, dc.drawable, dc.font.set, dc.gc,
				x, y, buf, len);
	}
	else {
		gcv.font = dc.font.xfont->fid;
		XChangeGC(dpy, dc.gc, GCForeground | GCBackground | GCFont, &gcv);
		XDrawImageString(dpy, dc.drawable, dc.gc, x, y, buf, len);
	}
}

/* extern */

void
drawall()
{
	Client *c;

	for(c = clients; c; c = getnext(c->next))
		drawtitle(c);
	drawstatus();
}

void
drawstatus()
{
	int i, x;
	Bool istile = arrange == dotile;

	dc.x = dc.y = 0;
	dc.w = bw;
	drawtext(NULL, !istile);

	dc.w = 0;
	for(i = 0; i < ntags; i++) {
		dc.x += dc.w;
		dc.w = textw(tags[i]);
		if(istile)
			drawtext(tags[i], seltag[i]);
		else
			drawtext(tags[i], !seltag[i]);
	}
	x = dc.x + dc.w;
	dc.w = textw(stext);
	dc.x = bx + bw - dc.w;
	drawtext(stext, !istile);
	if(sel && ((dc.w = dc.x - x) >= bh)) {
		dc.x = x;
		drawtext(sel->name, istile);
	}
	XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, bw, bh, 0, 0);
	XSync(dpy, False);
}

void
drawtitle(Client *c)
{
	int i;
	Bool istile = arrange == dotile;

	if(c == sel && issel) {
		drawstatus();
		XUnmapWindow(dpy, c->title);
		XSetWindowBorder(dpy, c->win, dc.fg);
		return;
	}

	XSetWindowBorder(dpy, c->win, dc.bg);
	XMapWindow(dpy, c->title);

	dc.x = dc.y = 0;
	dc.w = 0;
	for(i = 0; i < ntags; i++) {
		if(c->tags[i]) {
			dc.x += dc.w;
			dc.w = textw(tags[i]);
			drawtext(tags[i], !istile);
		}
	}
	dc.x += dc.w;
	dc.w = c->tw - dc.x;
	drawtext(c->name, !istile);
	XCopyArea(dpy, dc.drawable, c->title, dc.gc, 0, 0, c->tw, c->th, 0, 0);
	XSync(dpy, False);
}

unsigned long
getcolor(const char *colstr)
{
	Colormap cmap = DefaultColormap(dpy, screen);
	XColor color;

	XAllocNamedColor(dpy, cmap, colstr, &color, &color);
	return color.pixel;
}

void
setfont(const char *fontstr)
{
	char **missing, *def;
	int i, n;

	missing = NULL;
	setlocale(LC_ALL, "");
	if(dc.font.set)
		XFreeFontSet(dpy, dc.font.set);
	dc.font.set = XCreateFontSet(dpy, fontstr, &missing, &n, &def);
	if(missing) {
		while(n--)
			fprintf(stderr, "missing fontset: %s\n", missing[n]);
		XFreeStringList(missing);
		if(dc.font.set) {
			XFreeFontSet(dpy, dc.font.set);
			dc.font.set = NULL;
		}
	}
	if(dc.font.set) {
		XFontSetExtents *font_extents;
		XFontStruct **xfonts;
		char **font_names;

		dc.font.ascent = dc.font.descent = 0;
		font_extents = XExtentsOfFontSet(dc.font.set);
		n = XFontsOfFontSet(dc.font.set, &xfonts, &font_names);
		for(i = 0, dc.font.ascent = 0, dc.font.descent = 0; i < n; i++) {
			if(dc.font.ascent < (*xfonts)->ascent)
				dc.font.ascent = (*xfonts)->ascent;
			if(dc.font.descent < (*xfonts)->descent)
				dc.font.descent = (*xfonts)->descent;
			xfonts++;
		}
	}
	else {
		if(dc.font.xfont)
			XFreeFont(dpy, dc.font.xfont);
		dc.font.xfont = NULL;
		dc.font.xfont = XLoadQueryFont(dpy, fontstr);
		if (!dc.font.xfont)
			dc.font.xfont = XLoadQueryFont(dpy, "fixed");
		if (!dc.font.xfont)
			eprint("error, cannot init 'fixed' font\n");
		dc.font.ascent = dc.font.xfont->ascent;
		dc.font.descent = dc.font.xfont->descent;
	}
	dc.font.height = dc.font.ascent + dc.font.descent;
}

unsigned int
textw(const char *text)
{
	return textnw(text, strlen(text)) + dc.font.height;
}