commit cbb9c1d
ohmu
·
2026-09-24 01:18:44 +0300 MSK
parent 36a19ed
fixed themes; fixed creation defconfig if custom config does not exist; added readme and screenshots for themes
36 files changed,
+103,
-81
M
parser.c
+55,
-0
1@@ -0,0 +1,55 @@
2+# Themes
3+
4+Runtime themes for acme3k.
5+
6+### alef
7+replica of original acme (Plan 9 2e)
8+
9+
10+### base16
11+
12+
13+### blood
14+
15+
16+### bw
17+
18+
19+### calm
20+
21+
22+### choco
23+
24+
25+### cryptos
26+
27+
28+### desert
29+
30+
31+### dusk
32+
33+
34+### duster
35+
36+
37+### ghibli
38+
39+
40+### hacker
41+
42+
43+### homy
44+
45+
46+### milknblood
47+
48+
49+### rosy-mist
50+
51+
52+### suckless
53+
54+
55+### xxiivv
56+
+3,
-6
1@@ -1,11 +1,8 @@
2-# Acme theme based on wal-generated colors
3-# Converted from .Xresources
4-
5 mainfont /tmp/fonts/Iosevka-Oui/16a/font
6 monofont /tmp/fonts/Iosevka-Oui/16a/font
7
8 winbtnstyle square
9-scrollstyle def
10+scrollstyle def
11 colbtnstyle def
12
13 pastels 0
14@@ -32,5 +29,5 @@ scrlbord 1E1E1E
15
16 border C7CCD1
17
18-btn2hl C7AE95
19-btn3hl C7AE95
20+btn2hl C7CCD1
21+btn3hl C7CCD1
+6,
-6
1@@ -2,7 +2,7 @@ mainfont /tmp/fonts/gallant12x22/16/font
2 monofont /tmp/fonts/gallant12x22/16/font
3
4 winbtnstyle ellipse
5-scrollstyle def
6+scrollstyle def
7 colbtnstyle def
8
9 pastels 0
10@@ -11,16 +11,16 @@ mix ffffff
11 root 0F0200
12 tagbg 0F0200
13 tagfg ffffff
14-htagbg b08060
15+htagbg 783129
16 htagfg ffffff
17
18 txtbg 0F0200
19 txtfg ffffff
20-htxtbg b08060
21+htxtbg 783129
22 htxtfg ffffff
23
24 winbtn F55142
25-winbtnbord F55142
26+winbtnbord 783129
27 colbtn 783129
28 tmpbtn ffffff
29 scrlbg 783129
30@@ -29,5 +29,5 @@ scrlbord 0F0200
31
32 border 783129
33
34-btn2hl b08060
35-btn3hl b08060
36+btn2hl 783129
37+btn3hl 783129
+1,
-1
1@@ -4,7 +4,7 @@ monofont /tmp/fonts/Iosevka-Oui/13a/font
2 #monofont /tmp/fonts/XonyFixed12x24rk/13a/font
3
4 winbtnstyle def
5-scrollstyle def
6+scrollstyle def
7 colbtnstyle def
8
9 pastels 0
+3,
-3
1@@ -2,9 +2,9 @@ mainfont /tmp/fonts/gallant12x22/16/font
2 monofont /tmp/fonts/gallant12x22/16/font
3
4 winbtnstyle square
5-scrollstyle xxiivv
6-scrolltilefg 8c7a64
7-scrolltilebg fcf5ec
8+scrollstyle xxiivv
9+scrolltilefg 8c7a64
10+scrolltilebg fcf5ec
11 colbtnstyle def
12
13 pastels 0
+1,
-1
1@@ -2,7 +2,7 @@ mainfont /tmp/fonts/XanhMono-Regular/15a/font
2 monofont /tmp/fonts/XanhMono-Regular/15a/font
3
4 winbtnstyle square
5-scrollstyle def
6+scrollstyle def
7 colbtnstyle def
8
9 pastels 0
+1,
-1
1@@ -2,7 +2,7 @@ mainfont /tmp/fonts/gallant12x22/16/font
2 monofont /tmp/fonts/gallant12x22/16/font
3
4 winbtnstyle square
5-scrollstyle def
6+scrollstyle def
7 colbtnstyle def
8
9 pastels 0
+0,
-33
1@@ -1,33 +0,0 @@
2-mainfont /tmp/fonts/Iosevka-Oui/12a/font
3-monofont /tmp/fonts/Iosevka-Oui/12a/font
4-
5-winbtnstyle def
6-scrollstyle def
7-colbtnstyle def
8-
9-pastels txtbg htagbg htxtbg
10-mix 000044
11-
12-root 000000
13-tagbg 000044
14-tagfg ffffff
15-htagbg 8888cc
16-htagfg 000000
17-
18-txtbg 000000
19-txtfg ffffff
20-htxtbg eeee9e
21-htxtfg 000000
22-
23-winbtn 000000
24-winbtnbord 000000
25-colbtn 000000
26-tmpbtn 99994c
27-scrlbg 99994c
28-scrlfg 000000
29-scrlbord 000000
30-
31-border 000000
32-
33-btn2hl ff0000
34-btn3hl 00ff00
+4,
-4
1@@ -2,7 +2,7 @@ mainfont /tmp/fonts/Iosevka-Oui/13a/font
2 monofont /tmp/fonts/Iosevka-Oui/13a/font
3
4 winbtnstyle square
5-scrollstyle def
6+scrollstyle def
7 colbtnstyle def
8
9 pastels 0
10@@ -24,10 +24,10 @@ winbtnbord 7D6C61
11 colbtn 5D4E46
12 tmpbtn B8846A
13 scrlbg 332E2A
14-scrlfg D3CAC5
15+scrlfg 272320
16 scrlbord 3E3833
17
18 border 3E3833
19
20-btn2hl B8846A
21-btn3hl 96695A
22+btn2hl 3E3833
23+btn3hl 3E3833
+3,
-7
1@@ -1,12 +1,10 @@
2-# dusk: тёмная тема (использование в ~/.acmerc: @include themes/dusk)
3 mainfont /lib/font/bit/lucsans/euro.8.font
4 monofont /lib/font/bit/lucm/unicode.9.font
5
6 winbtnstyle def
7-scrollstyle def
8+scrollstyle def
9 colbtnstyle def
10
11-# пастели выключены: тёмные цвета не надо разбавлять
12 pastels 0
13 mix 1B1E24
14
15@@ -21,7 +19,6 @@ txtfg D8DEE9
16 htxtbg 35507A
17 htxtfg FFFFFF
18
19-# кнопки; tmpbtn = метка "изменено"
20 winbtn 6E8FBF
21 winbtnbord 6E8FBF
22 colbtn 6E8FBF
23@@ -32,6 +29,5 @@ scrlbord 6B7690
24
25 border 0B0C0F
26
27-# подсветка хорд: button 2 (exec), button 3 (look)
28-btn2hl B5525C
29-btn3hl 4F9D69
30+btn2hl 3D4556
31+btn3hl 3D4556
+1,
-1
1@@ -2,7 +2,7 @@ mainfont /tmp/fonts/GoMonoNF/16a/font
2 monofont /tmp/fonts/GoMonoNF/16a/font
3
4 winbtnstyle square
5-scrollstyle def
6+scrollstyle def
7 colbtnstyle def
8
9 pastels 0
+1,
-1
1@@ -2,7 +2,7 @@ mainfont /tmp/fonts/gallant12x22/16/font
2 monofont /tmp/fonts/gallant12x22/16/font
3
4 winbtnstyle square
5-scrollstyle def
6+scrollstyle def
7 colbtnstyle def
8
9 pastels 0
+5,
-5
1@@ -2,10 +2,10 @@ mainfont /tmp/fonts/Iosevka-Oui/12a/font
2 monofont /tmp/fonts/Iosevka-Oui/12a/font
3
4 winbtnstyle def
5-scrollstyle def
6+scrollstyle def
7 colbtnstyle def
8
9-pastels txtbg
10+pastels 0
11 mix ffffff
12
13 root 000000
14@@ -16,7 +16,7 @@ htagfg 000000
15
16 txtbg 000000
17 txtfg 44cc00
18-htxtbg eeee9e
19+htxtbg aaff55
20 htxtfg 000000
21
22 winbtn aaff55
23@@ -29,5 +29,5 @@ scrlbord aaff55
24
25 border aaff55
26
27-btn2hl ff0000
28-btn3hl 00ff00
29+btn2hl aaff55
30+btn3hl aaff55
+1,
-1
1@@ -2,7 +2,7 @@ mainfont /tmp/fonts/Iosevka-Oui/13a/font
2 monofont /tmp/fonts/Iosevka-Oui/13a/font
3
4 winbtnstyle square
5-scrollstyle def
6+scrollstyle def
7 colbtnstyle def
8
9 pastels htagbg htxtbg winbtn colbtn
+4,
-4
1@@ -5,10 +5,10 @@ winbtnstyle p9-2e
2 scrollstyle p9-2e
3 colbtnstyle p9-2e
4
5-scrolltilefg 7C5557
6-scrolltilebg 0F0202
7-colbtntilefg 7C5557
8-colbtntilebg 0F0202
9+scrolltilefg 7C5557
10+scrolltilebg 0F0202
11+colbtntilefg 7C5557
12+colbtntilebg 0F0202
13
14 pastels 0
15 mix ffffff
+1,
-1
1@@ -2,7 +2,7 @@ mainfont /tmp/fonts/Iosevka-Oui/13a/font
2 monofont /tmp/fonts/Iosevka-Oui/13a/font
3
4 winbtnstyle def
5-scrollstyle def
6+scrollstyle def
7 colbtnstyle def
8
9 pastels 0
+1,
-1
1@@ -2,7 +2,7 @@ mainfont /tmp/fonts/Iosevka-Oui/12a/font
2 monofont /tmp/fonts/Iosevka-Oui/12a/font
3
4 winbtnstyle def
5-scrollstyle def
6+scrollstyle def
7 colbtnstyle def
8
9 pastels 0
+3,
-3
1@@ -2,9 +2,9 @@ mainfont /tmp/fonts/Iosevka-Oui/13a/font
2 monofont /tmp/fonts/Iosevka-Oui/13a/font
3
4 winbtnstyle def
5-scrollstyle xxiivv
6-scrolltilefg 000000
7-scrolltilebg FFFFFF
8+scrollstyle xxiivv
9+scrolltilefg 000000
10+scrolltilebg FFFFFF
11 colbtnstyle def
12
13 pastels tagbg txtbg
+0,
-0
+0,
-0
+0,
-0
+0,
-0
+0,
-0
+0,
-0
+0,
-0
+0,
-0
+0,
-0
+0,
-0
+0,
-0
+0,
-0
+0,
-0
+0,
-0
+0,
-0
+0,
-0
+0,
-0
M
parser.c
+9,
-2
1@@ -142,10 +142,17 @@ initconfig(char *custom_config)
2 fprintf(stderr, "error: $HOME not set\n");
3 exit(1);
4 }
5- if(!custom_config)
6+ if(!custom_config){
7 snprintf(path, sizeof(path), "%s/.acmerc", home);
8- else
9+ }else{
10 snprintf(path, sizeof(path), "%s", custom_config);
11+ FILE *custom_f = fopen(path, "r");
12+ if(!custom_f){
13+ fprintf(stderr, "warning: can't open custom config file\n");
14+ free(custom_f);
15+ snprintf(path, sizeof(path), "%s/.acmerc", home);
16+ }
17+ }
18 FILE *f = fopen(path, "r");
19 if(!f){
20 fprintf(stderr, "warning: can't open config file\n");