galaaz 2.1.10.pre.5 → 2.1.10.pre.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/lib/galaaz/cli.rb +109 -4
- data/script/omarchy/README.md +10 -9
- data/script/omarchy/fonts/galaaz.ttf +0 -0
- data/script/omarchy/fonts/omarchy-with-galaaz.ttf +0 -0
- data/script/omarchy/galaaz-add.sh +108 -4
- data/script/omarchy/galaaz-gknit.sh +108 -51
- data/script/omarchy/install-galaaz.sh +48 -34
- data/script/omarchy/nautilus-scripts/gknit-choose-format +61 -0
- data/script/omarchy/nautilus-scripts/gknit-html +39 -0
- data/script/omarchy/nautilus-scripts/gknit-pdf +39 -0
- data/script/omarchy/omarchy-menu.jsonc +1 -1
- data/version.rb +1 -1
- metadata +4 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: da2cad42b34d1068661e204caaa43efea89bda6e81ca2e4dda99c07f75f2ea22
|
|
4
|
+
data.tar.gz: c6d3a26d4439d89c45187192d6ff75ce285664a9f134ce947d4eeb11494eaaf6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fc202447c62b7636446195299178b165933ed490f1f71f55b09e7528aa528697051b73b47d7e7b40084c337eb772b6263242723a8048e77ca3c95856db0e6098
|
|
7
|
+
data.tar.gz: 15452e1e64b207e1b5e85cd41495e42974a76da11266e7467b2ed75de1455c0869322c067ce381b502d86dfb18699fc7e285b1507c20822a8e6752d1e8f2a51a
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 2.1.10.pre.7
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Omarchy: Nautilus Scripts under **Scripts → Galaaz** (Gknit HTML / PDF /
|
|
10
|
+
Choose Format) installed by `galaaz omarchy` and core configure.
|
|
11
|
+
- Omarchy `galaaz-add` for arrow/ledger/demo: install Arch `arrow` and build
|
|
12
|
+
matching Arrow GLib into `/usr/local` so `red-arrow` can compile.
|
|
13
|
+
|
|
14
|
+
## 2.1.10.pre.6
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Omarchy **Galaaz (core)** no longer runs `gem install` / uninstall. Flow is:
|
|
19
|
+
`gem install galaaz` → `galaaz omarchy install` → menu core (setup + blogs).
|
|
20
|
+
- `galaaz --version` / `-v` / `version` prints the installed gem version;
|
|
21
|
+
`galaaz doctor` shows `version:`.
|
|
22
|
+
- `galaaz blogs sync` refreshes sty + logo includes without wiping blogs;
|
|
23
|
+
core installer syncs on re-run; `galaaz add knit` refreshes brand assets.
|
|
24
|
+
|
|
5
25
|
## 2.1.10.pre.5
|
|
6
26
|
|
|
7
27
|
### Fixed
|
data/lib/galaaz/cli.rb
CHANGED
|
@@ -29,6 +29,12 @@ module Galaaz
|
|
|
29
29
|
['galaaz-gknit.sh', 'omarchy-galaaz-gknit', true],
|
|
30
30
|
['debug-galaaz.sh', 'omarchy-galaaz-debug', true]
|
|
31
31
|
].freeze
|
|
32
|
+
# Installed under ~/.local/share/nautilus/scripts/Galaaz/ (Scripts → Galaaz).
|
|
33
|
+
OMARCHY_NAUTILUS_SCRIPTS = [
|
|
34
|
+
['gknit-html', 'Gknit HTML'],
|
|
35
|
+
['gknit-pdf', 'Gknit PDF'],
|
|
36
|
+
['gknit-choose-format', 'Gknit Choose Format']
|
|
37
|
+
].freeze
|
|
32
38
|
OMARCHY_MENU_FILE = 'omarchy-menu.jsonc'
|
|
33
39
|
# Standalone family "galaaz" (debug). Menu uses the merged Omarchy brand font.
|
|
34
40
|
OMARCHY_FONT_REL = File.join('fonts', 'galaaz.ttf')
|
|
@@ -48,12 +54,34 @@ module Galaaz
|
|
|
48
54
|
File.expand_path('../..', __dir__)
|
|
49
55
|
end
|
|
50
56
|
|
|
57
|
+
def gem_version
|
|
58
|
+
spec = Gem.loaded_specs['galaaz']
|
|
59
|
+
return spec.version.to_s if spec
|
|
60
|
+
|
|
61
|
+
begin
|
|
62
|
+
return Gem::Specification.find_by_name('galaaz').version.to_s
|
|
63
|
+
rescue LoadError, Gem::LoadError, NameError
|
|
64
|
+
# fall through to version.rb
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
version_rb = File.join(root, 'version.rb')
|
|
68
|
+
if File.file?(version_rb)
|
|
69
|
+
load version_rb
|
|
70
|
+
return $version.to_s if defined?($version) && $version
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
'unknown'
|
|
74
|
+
end
|
|
75
|
+
|
|
51
76
|
def run(argv)
|
|
52
77
|
cmd = argv[0]
|
|
53
78
|
case cmd
|
|
54
79
|
when nil, '-h', '--help', 'help'
|
|
55
80
|
print_help
|
|
56
81
|
0
|
|
82
|
+
when '-v', '--version', 'version'
|
|
83
|
+
puts "galaaz #{gem_version}"
|
|
84
|
+
0
|
|
57
85
|
when 'setup'
|
|
58
86
|
cmd_setup
|
|
59
87
|
when 'blogs'
|
|
@@ -82,18 +110,21 @@ module Galaaz
|
|
|
82
110
|
def print_help
|
|
83
111
|
puts <<~HELP
|
|
84
112
|
Usage: galaaz <command> [args]
|
|
113
|
+
galaaz --version
|
|
85
114
|
|
|
86
115
|
Commands:
|
|
87
116
|
setup Build the NewBridge gatekeeper; ensure Rcpp
|
|
88
117
|
blogs init [DIR] Copy blog sources (default: ~/galaaz-blogs)
|
|
89
118
|
and sty/galaaz.sty for PDF headers
|
|
90
119
|
Options: --force
|
|
120
|
+
blogs sync [DIR] Refresh sty + logo includes without wiping blogs
|
|
91
121
|
doctor Report Ruby, R, gatekeeper, Rcpp, sty, profiles
|
|
92
122
|
add PROFILE Install an add-on (idempotent)
|
|
93
123
|
Profiles: #{PROFILES.join(', ')}
|
|
94
124
|
omarchy [install] Install Omarchy menu overlay (bundled in gem)
|
|
95
125
|
Options: --from-git [--ref REF]
|
|
96
126
|
omarchy status Show whether overlay helpers are installed
|
|
127
|
+
--version, -v Print installed gem version (#{gem_version})
|
|
97
128
|
|
|
98
129
|
Legacy: any other argument is passed to rake in the Galaaz root
|
|
99
130
|
(e.g. galaaz master_list:scatter_plot).
|
|
@@ -156,6 +187,7 @@ module Galaaz
|
|
|
156
187
|
Writes:
|
|
157
188
|
~/.local/bin/omarchy-install-galaaz (and add/remove/guide/gknit/debug)
|
|
158
189
|
~/.config/omarchy/extensions/omarchy-menu.jsonc
|
|
190
|
+
~/.local/share/nautilus/scripts/Galaaz/ (right-click → Scripts → Galaaz)
|
|
159
191
|
~/.local/share/fonts/galaaz/galaaz.ttf
|
|
160
192
|
~/.local/share/fonts/omarchy-with-galaaz.ttf (family omarchy + U+E90E)
|
|
161
193
|
|
|
@@ -207,6 +239,13 @@ module Galaaz
|
|
|
207
239
|
puts " font galaaz: #{File.file?(font) ? font : 'MISSING'}"
|
|
208
240
|
merged = File.expand_path('~/.local/share/fonts/omarchy-with-galaaz.ttf')
|
|
209
241
|
puts " font omarchy+galaaz: #{File.file?(merged) ? merged : 'MISSING'}"
|
|
242
|
+
nautilus = File.expand_path('~/.local/share/nautilus/scripts/Galaaz')
|
|
243
|
+
if Dir.exist?(nautilus)
|
|
244
|
+
entries = Dir.children(nautilus).reject { |n| n.start_with?('.') }.sort
|
|
245
|
+
puts " nautilus Scripts/Galaaz: #{entries.empty? ? 'empty' : entries.join(', ')}"
|
|
246
|
+
else
|
|
247
|
+
puts ' nautilus Scripts/Galaaz: MISSING'
|
|
248
|
+
end
|
|
210
249
|
bundled = File.join(root, 'script', 'omarchy')
|
|
211
250
|
puts " gem overlay: #{File.directory?(bundled) ? bundled : 'MISSING (reinstall gem)'}"
|
|
212
251
|
0
|
|
@@ -231,6 +270,7 @@ module Galaaz
|
|
|
231
270
|
base = "https://raw.githubusercontent.com/#{OMARCHY_GITHUB_REPO}/#{ref}/script/omarchy"
|
|
232
271
|
puts "galaaz omarchy: fetching #{base}/…"
|
|
233
272
|
names = OMARCHY_BIN_FILES.map(&:first) + [OMARCHY_MENU_FILE, OMARCHY_FONT_REL, OMARCHY_MERGED_FONT_REL]
|
|
273
|
+
names += OMARCHY_NAUTILUS_SCRIPTS.map { |src, _| File.join('nautilus-scripts', src) }
|
|
234
274
|
names.uniq.each do |name|
|
|
235
275
|
url = "#{base}/#{name}"
|
|
236
276
|
dest = File.join(tmp, name)
|
|
@@ -266,9 +306,25 @@ module Galaaz
|
|
|
266
306
|
FileUtils.cp(menu_src, menu_dest)
|
|
267
307
|
puts "galaaz omarchy: #{menu_dest}"
|
|
268
308
|
|
|
309
|
+
install_omarchy_nautilus_scripts_from!(src_dir)
|
|
269
310
|
install_omarchy_font_from!(src_dir)
|
|
270
311
|
end
|
|
271
312
|
|
|
313
|
+
def install_omarchy_nautilus_scripts_from!(src_dir)
|
|
314
|
+
src_root = File.join(src_dir, 'nautilus-scripts')
|
|
315
|
+
dest_root = File.expand_path('~/.local/share/nautilus/scripts/Galaaz')
|
|
316
|
+
FileUtils.mkdir_p(dest_root)
|
|
317
|
+
OMARCHY_NAUTILUS_SCRIPTS.each do |src_name, dest_name|
|
|
318
|
+
src = File.join(src_root, src_name)
|
|
319
|
+
abort_unless(File.file?(src), "missing #{src}")
|
|
320
|
+
dest = File.join(dest_root, dest_name)
|
|
321
|
+
FileUtils.cp(src, dest)
|
|
322
|
+
FileUtils.chmod(0o755, dest)
|
|
323
|
+
puts "galaaz omarchy: #{dest}"
|
|
324
|
+
end
|
|
325
|
+
puts 'galaaz omarchy: Nautilus → right-click .Rmd → Scripts → Galaaz'
|
|
326
|
+
end
|
|
327
|
+
|
|
272
328
|
def install_omarchy_font_from!(src_dir)
|
|
273
329
|
# 1) Standalone galaaz.ttf (family galaaz) — debugging / fc-list checks.
|
|
274
330
|
src = File.join(src_dir, OMARCHY_FONT_REL)
|
|
@@ -316,7 +372,7 @@ module Galaaz
|
|
|
316
372
|
system('fc-cache', '-f', fonts)
|
|
317
373
|
system('fc-cache', '-f', user_fonts)
|
|
318
374
|
end
|
|
319
|
-
warn 'galaaz omarchy:
|
|
375
|
+
warn 'galaaz omarchy: logout/reboot required for Qt to reload brand fonts (killall omarchy-shell is often not enough)' \
|
|
320
376
|
if ENV['OMARCHY_PATH'] || File.directory?(File.expand_path('~/.config/omarchy'))
|
|
321
377
|
end
|
|
322
378
|
|
|
@@ -327,11 +383,14 @@ module Galaaz
|
|
|
327
383
|
case sub
|
|
328
384
|
when 'init'
|
|
329
385
|
blogs_init(argv[1..])
|
|
386
|
+
when 'sync'
|
|
387
|
+
blogs_sync(argv[1..])
|
|
330
388
|
when nil, '-h', '--help'
|
|
331
389
|
puts 'Usage: galaaz blogs init [DIR] [--force]'
|
|
390
|
+
puts ' galaaz blogs sync [DIR] # refresh sty + logo includes (no wipe)'
|
|
332
391
|
0
|
|
333
392
|
else
|
|
334
|
-
raise CliError, "unknown blogs subcommand: #{sub.inspect} (try: init)"
|
|
393
|
+
raise CliError, "unknown blogs subcommand: #{sub.inspect} (try: init|sync)"
|
|
335
394
|
end
|
|
336
395
|
end
|
|
337
396
|
|
|
@@ -344,7 +403,7 @@ module Galaaz
|
|
|
344
403
|
if File.exist?(dest)
|
|
345
404
|
entries = Dir.children(dest).reject { |n| n.start_with?('.') }
|
|
346
405
|
if !entries.empty? && !force
|
|
347
|
-
raise CliError, "#{dest} exists and is not empty (use --force to replace)"
|
|
406
|
+
raise CliError, "#{dest} exists and is not empty (use --force to replace, or: galaaz blogs sync)"
|
|
348
407
|
end
|
|
349
408
|
FileUtils.rm_rf(dest) if force
|
|
350
409
|
end
|
|
@@ -359,16 +418,28 @@ module Galaaz
|
|
|
359
418
|
end
|
|
360
419
|
|
|
361
420
|
File.write(File.join(dest, BLOGS_MARKER), "galaaz blogs init\n")
|
|
362
|
-
|
|
421
|
+
ensure_blog_knit_assets!(dest)
|
|
363
422
|
puts "galaaz blogs init: #{dest}"
|
|
364
423
|
puts "You can now knit with gknit (after: galaaz add knit)"
|
|
365
424
|
0
|
|
366
425
|
end
|
|
367
426
|
|
|
427
|
+
# Refresh sty + per-blog logo includes without wiping ~/galaaz-blogs.
|
|
428
|
+
# Needed after gem upgrades that ship new branding assets (pandoc error 99
|
|
429
|
+
# when _logo_before_body.html / lockup PNG / sty were missing from an older init).
|
|
430
|
+
def blogs_sync(argv)
|
|
431
|
+
dest = File.expand_path(argv[0] || detect_blogs_dir || DEFAULT_BLOGS_DIR)
|
|
432
|
+
abort_unless(File.directory?(dest), "blogs dir missing: #{dest} (run: galaaz blogs init)")
|
|
433
|
+
n = ensure_blog_knit_assets!(dest)
|
|
434
|
+
puts "galaaz blogs sync: #{dest} (#{n} brand files refreshed)"
|
|
435
|
+
0
|
|
436
|
+
end
|
|
437
|
+
|
|
368
438
|
# ---- doctor ----
|
|
369
439
|
|
|
370
440
|
def cmd_doctor
|
|
371
441
|
puts "galaaz doctor"
|
|
442
|
+
puts " version: #{gem_version}"
|
|
372
443
|
puts " root: #{root}"
|
|
373
444
|
print_ruby_engines
|
|
374
445
|
|
|
@@ -551,6 +622,11 @@ module Galaaz
|
|
|
551
622
|
end
|
|
552
623
|
mark_profile!('knit')
|
|
553
624
|
puts 'galaaz add knit: OK'
|
|
625
|
+
blogs = detect_blogs_dir
|
|
626
|
+
if blogs
|
|
627
|
+
ensure_blog_knit_assets!(blogs)
|
|
628
|
+
puts 'galaaz add knit: refreshed blog brand assets (sty + logos)'
|
|
629
|
+
end
|
|
554
630
|
puts 'Example knits (after blogs init → ~/galaaz-blogs):'
|
|
555
631
|
puts ' gknit ~/galaaz-blogs/oh_my/oh_my.Rmd'
|
|
556
632
|
puts ' gknit ~/galaaz-blogs/galaaz_ggplot/galaaz_ggplot.Rmd'
|
|
@@ -917,6 +993,35 @@ module Galaaz
|
|
|
917
993
|
dest
|
|
918
994
|
end
|
|
919
995
|
|
|
996
|
+
# Copy/overwrite brand includes required by blog YAML (pandoc before_body + PDF splash).
|
|
997
|
+
# Returns number of files written.
|
|
998
|
+
def ensure_blog_knit_assets!(blogs_dest)
|
|
999
|
+
blogs_dest = File.expand_path(blogs_dest)
|
|
1000
|
+
install_galaaz_sty_for_blogs!(blogs_dest)
|
|
1001
|
+
written = 0
|
|
1002
|
+
BLOG_NAMES.each do |name|
|
|
1003
|
+
src_blog = File.join(root, 'blogs', name)
|
|
1004
|
+
dest_blog = File.join(blogs_dest, name)
|
|
1005
|
+
next unless File.directory?(src_blog) && File.directory?(dest_blog)
|
|
1006
|
+
|
|
1007
|
+
logo_html = '_logo_before_body.html'
|
|
1008
|
+
src_html = File.join(src_blog, logo_html)
|
|
1009
|
+
if File.file?(src_html)
|
|
1010
|
+
FileUtils.cp(src_html, File.join(dest_blog, logo_html))
|
|
1011
|
+
written += 1
|
|
1012
|
+
end
|
|
1013
|
+
|
|
1014
|
+
lockup = File.join('images', 'galaaz-lockup-stacked.png')
|
|
1015
|
+
src_png = File.join(src_blog, lockup)
|
|
1016
|
+
if File.file?(src_png)
|
|
1017
|
+
FileUtils.mkdir_p(File.join(dest_blog, 'images'))
|
|
1018
|
+
FileUtils.cp(src_png, File.join(dest_blog, lockup))
|
|
1019
|
+
written += 1
|
|
1020
|
+
end
|
|
1021
|
+
end
|
|
1022
|
+
written
|
|
1023
|
+
end
|
|
1024
|
+
|
|
920
1025
|
# TinyTeX installs to ~/.TinyTeX and often ~/bin; Omarchy PATH prefers ~/.local/bin.
|
|
921
1026
|
def ensure_pdflatex_on_path!
|
|
922
1027
|
return if command_present?('pdflatex')
|
data/script/omarchy/README.md
CHANGED
|
@@ -6,16 +6,15 @@ or a real Omarchy install. Works **with or without** an upstream Omarchy PR.
|
|
|
6
6
|
## Recommended: `galaaz omarchy` (gem-bundled)
|
|
7
7
|
|
|
8
8
|
```bash
|
|
9
|
-
gem install galaaz
|
|
10
|
-
galaaz
|
|
11
|
-
galaaz omarchy # A: copy overlay from this gem
|
|
9
|
+
gem install galaaz # choose version yourself (stable or .pre.N)
|
|
10
|
+
galaaz omarchy install # menu overlay + helpers (no second gem install)
|
|
12
11
|
# optional, newer overlay than the gem:
|
|
13
12
|
# galaaz omarchy install --from-git
|
|
14
|
-
# galaaz omarchy install --from-git --ref galaaz2_0
|
|
15
13
|
galaaz omarchy status
|
|
16
14
|
```
|
|
17
15
|
|
|
18
|
-
Then Super+Space → Install → Development → **Galaaz
|
|
16
|
+
Then Super+Space → Install → Development → **Galaaz** → **Galaaz (core)**
|
|
17
|
+
(core configures R/gatekeeper/blogs using the **already-installed** gem).
|
|
19
18
|
|
|
20
19
|
**Important:** `gem install galaaz` alone does **not** add an Omarchy menu until you run
|
|
21
20
|
`galaaz omarchy` (or an upstream catalog row exists).
|
|
@@ -24,7 +23,7 @@ Then Super+Space → Install → Development → **Galaaz**.
|
|
|
24
23
|
|
|
25
24
|
| File | Role |
|
|
26
25
|
|------|------|
|
|
27
|
-
| `install-galaaz.sh` | Core
|
|
26
|
+
| `install-galaaz.sh` | Core configure (R/setup/blogs); uses installed gem; log `~/.local/share/galaaz/install-core.log` |
|
|
28
27
|
| `galaaz-guide.sh` | Guide / docs / knit-demo helper (`omarchy-galaaz-guide`) |
|
|
29
28
|
| `galaaz-add.sh` | Add-on wrapper (`omarchy-galaaz-add`) — pandoc without Arch Haskell stack |
|
|
30
29
|
| `galaaz-gknit.sh` | Safe HTML gknit helper |
|
|
@@ -67,10 +66,12 @@ chmod +x ~/.local/bin/omarchy-*
|
|
|
67
66
|
## TryOmarchy steps
|
|
68
67
|
|
|
69
68
|
1. Install → Development → Ruby on Rails (mise Ruby).
|
|
70
|
-
2. `gem install galaaz && galaaz
|
|
71
|
-
3. Super+Space →
|
|
69
|
+
2. `gem install galaaz && galaaz omarchy install`
|
|
70
|
+
3. Super+Space → Install → Development → **Galaaz** → **Galaaz (core)**.
|
|
72
71
|
|
|
73
|
-
|
|
72
|
+
Core configures **setup + blogs + doctor** using the gem you already installed
|
|
73
|
+
(it does **not** run `gem install` again). It fails if the gatekeeper `.so` is
|
|
74
|
+
missing — “gem installed” alone is not success.
|
|
74
75
|
|
|
75
76
|
4. After core finishes, the same submenu shows Knit / Arrow / TeX / Bio / Examples / Ledger.
|
|
76
77
|
|
|
Binary file
|
|
Binary file
|
|
@@ -108,6 +108,108 @@ ensure_pandoc() {
|
|
|
108
108
|
return 0
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
+
pkg_add() {
|
|
112
|
+
if command -v omarchy-pkg-add >/dev/null 2>&1; then
|
|
113
|
+
omarchy-pkg-add "$@"
|
|
114
|
+
elif command -v pacman >/dev/null 2>&1; then
|
|
115
|
+
sudo pacman -S --noconfirm --needed "$@"
|
|
116
|
+
else
|
|
117
|
+
echo "ERROR: need omarchy-pkg-add or pacman to install: $*" >&2
|
|
118
|
+
return 1
|
|
119
|
+
fi
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
# red-arrow needs pkg-config "arrow" + "arrow-glib" at the same version.
|
|
123
|
+
# Arch ships C++ Arrow (extra/arrow) but not Arrow GLib — build GLib from the
|
|
124
|
+
# matching Apache tarball. Keep ARROW_USE_PKG_CONFIG=false for CRAN R arrow
|
|
125
|
+
# (LIBARROW_BINARY); pacman arrow is only for the Ruby gem.
|
|
126
|
+
ensure_arrow_for_red_arrow() {
|
|
127
|
+
local major ver tmp tarball url build_dir
|
|
128
|
+
major=25
|
|
129
|
+
|
|
130
|
+
echo "==> system: Apache Arrow C++ + GLib (for red-arrow)"
|
|
131
|
+
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}"
|
|
132
|
+
|
|
133
|
+
if ! command -v pkg-config >/dev/null 2>&1; then
|
|
134
|
+
pkg_add pkgconf || return 1
|
|
135
|
+
fi
|
|
136
|
+
|
|
137
|
+
if ! pkg-config --exists "arrow >= ${major}" 2>/dev/null; then
|
|
138
|
+
echo "==> install Arch package: arrow"
|
|
139
|
+
if ! pkg_add arrow; then
|
|
140
|
+
echo "ERROR: failed to install Arch arrow (Apache Arrow C++)" >&2
|
|
141
|
+
return 1
|
|
142
|
+
fi
|
|
143
|
+
fi
|
|
144
|
+
|
|
145
|
+
if ! pkg-config --exists "arrow >= ${major}" 2>/dev/null; then
|
|
146
|
+
echo "ERROR: Apache Arrow C++ >= ${major} still missing after pacman install" >&2
|
|
147
|
+
echo " pkg-config --modversion arrow: $(pkg-config --modversion arrow 2>/dev/null || echo none)" >&2
|
|
148
|
+
return 1
|
|
149
|
+
fi
|
|
150
|
+
ver="$(pkg-config --modversion arrow)"
|
|
151
|
+
echo "arrow (C++): ${ver}"
|
|
152
|
+
|
|
153
|
+
if pkg-config --exists "arrow-glib = ${ver}" 2>/dev/null; then
|
|
154
|
+
echo "arrow-glib: $(pkg-config --modversion arrow-glib) (already installed)"
|
|
155
|
+
return 0
|
|
156
|
+
fi
|
|
157
|
+
|
|
158
|
+
echo "==> Arrow GLib ${ver} missing — building from Apache source (Arch has no matching package)"
|
|
159
|
+
pkg_add meson ninja gobject-introspection glib2 || return 1
|
|
160
|
+
|
|
161
|
+
tarball="apache-arrow-${ver}.tar.gz"
|
|
162
|
+
url="https://dlcdn.apache.org/arrow/arrow-${ver}/${tarball}"
|
|
163
|
+
tmp="$(mktemp -d)"
|
|
164
|
+
build_dir="${tmp}/apache-arrow-${ver}"
|
|
165
|
+
echo "==> download: ${url}"
|
|
166
|
+
if ! curl -fsSL -o "${tmp}/${tarball}" "${url}"; then
|
|
167
|
+
url="https://archive.apache.org/dist/arrow/arrow-${ver}/${tarball}"
|
|
168
|
+
echo "==> fallback: ${url}"
|
|
169
|
+
if ! curl -fsSL -o "${tmp}/${tarball}" "${url}"; then
|
|
170
|
+
echo "ERROR: failed to download Apache Arrow ${ver} sources" >&2
|
|
171
|
+
rm -rf "${tmp}"
|
|
172
|
+
return 1
|
|
173
|
+
fi
|
|
174
|
+
fi
|
|
175
|
+
tar -xzf "${tmp}/${tarball}" -C "${tmp}"
|
|
176
|
+
if [[ ! -d "${build_dir}/c_glib" ]]; then
|
|
177
|
+
echo "ERROR: c_glib missing from ${tarball}" >&2
|
|
178
|
+
rm -rf "${tmp}"
|
|
179
|
+
return 1
|
|
180
|
+
fi
|
|
181
|
+
|
|
182
|
+
echo "==> meson setup / compile / install arrow-glib ${ver}"
|
|
183
|
+
if ! meson setup "${build_dir}/c_glib.build" "${build_dir}/c_glib" \
|
|
184
|
+
--buildtype=release \
|
|
185
|
+
--prefix=/usr/local \
|
|
186
|
+
-Dgtk_doc=false; then
|
|
187
|
+
echo "ERROR: meson setup for arrow-glib failed" >&2
|
|
188
|
+
rm -rf "${tmp}"
|
|
189
|
+
return 1
|
|
190
|
+
fi
|
|
191
|
+
if ! meson compile -C "${build_dir}/c_glib.build"; then
|
|
192
|
+
echo "ERROR: meson compile for arrow-glib failed" >&2
|
|
193
|
+
rm -rf "${tmp}"
|
|
194
|
+
return 1
|
|
195
|
+
fi
|
|
196
|
+
if ! sudo meson install -C "${build_dir}/c_glib.build"; then
|
|
197
|
+
echo "ERROR: meson install for arrow-glib failed" >&2
|
|
198
|
+
rm -rf "${tmp}"
|
|
199
|
+
return 1
|
|
200
|
+
fi
|
|
201
|
+
sudo ldconfig 2>/dev/null || true
|
|
202
|
+
rm -rf "${tmp}"
|
|
203
|
+
|
|
204
|
+
if ! pkg-config --exists "arrow-glib = ${ver}" 2>/dev/null; then
|
|
205
|
+
echo "ERROR: arrow-glib ${ver} still missing after build" >&2
|
|
206
|
+
echo " pkg-config --modversion arrow-glib: $(pkg-config --modversion arrow-glib 2>/dev/null || echo none)" >&2
|
|
207
|
+
return 1
|
|
208
|
+
fi
|
|
209
|
+
echo "arrow-glib: $(pkg-config --modversion arrow-glib) (built from Apache ${ver})"
|
|
210
|
+
return 0
|
|
211
|
+
}
|
|
212
|
+
|
|
111
213
|
pause() {
|
|
112
214
|
local st=$1
|
|
113
215
|
echo
|
|
@@ -138,15 +240,17 @@ case "${PROFILE}" in
|
|
|
138
240
|
fi
|
|
139
241
|
;;
|
|
140
242
|
arrow|ledger|demo)
|
|
141
|
-
# R package arrow: do NOT
|
|
142
|
-
#
|
|
143
|
-
#
|
|
144
|
-
# if the user only refreshed this wrapper.
|
|
243
|
+
# R package arrow: do NOT link pacman arrow (version skew vs CRAN) —
|
|
244
|
+
# LIBARROW_BINARY uses Apache's version-matched prebuilt. pacman arrow +
|
|
245
|
+
# built arrow-glib are only for CRuby red-arrow (Stage B).
|
|
145
246
|
export LIBARROW_BINARY=true
|
|
146
247
|
export NOT_CRAN=true
|
|
147
248
|
export LIBARROW_BUILD=false
|
|
148
249
|
export ARROW_USE_PKG_CONFIG=false
|
|
149
250
|
echo "==> arrow env: LIBARROW_BINARY=true LIBARROW_BUILD=false ARROW_USE_PKG_CONFIG=false"
|
|
251
|
+
if ! ensure_arrow_for_red_arrow; then
|
|
252
|
+
pause 1
|
|
253
|
+
fi
|
|
150
254
|
;;
|
|
151
255
|
bio|examples) ;;
|
|
152
256
|
*)
|
|
@@ -1,73 +1,130 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
# Safe/debug gknit for Omarchy:
|
|
2
|
+
# Safe/debug gknit for Omarchy: log everything, keep the window open.
|
|
3
3
|
#
|
|
4
4
|
# Usage:
|
|
5
|
-
# omarchy-galaaz-gknit [path/to/file.Rmd]
|
|
6
|
-
# omarchy-galaaz-gknit
|
|
5
|
+
# omarchy-galaaz-gknit [path/to/file.Rmd ...]
|
|
6
|
+
# omarchy-galaaz-gknit --output_format pdf_document path.Rmd
|
|
7
|
+
# omarchy-galaaz-gknit path.Rmd pdf_document # positional format (Nautilus)
|
|
7
8
|
#
|
|
8
|
-
# Many shipped blogs list pdf_document before
|
|
9
|
-
# `gknit file.Rmd` then tries PDF first
|
|
10
|
-
# a small VM. This wrapper always requests html_document and tees a log.
|
|
9
|
+
# Default format is html_document. Many shipped blogs list pdf_document before
|
|
10
|
+
# html_document in YAML; a bare `gknit file.Rmd` then tries PDF first.
|
|
11
11
|
set -uo pipefail
|
|
12
12
|
|
|
13
13
|
LOG_DIR="${HOME}/.local/share/galaaz"
|
|
14
14
|
LOG="${LOG_DIR}/gknit-debug.log"
|
|
15
15
|
mkdir -p "${LOG_DIR}"
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
FMT="html_document"
|
|
18
|
+
FILES=()
|
|
19
|
+
|
|
20
|
+
while [[ $# -gt 0 ]]; do
|
|
21
|
+
case "$1" in
|
|
22
|
+
--output_format|-o)
|
|
23
|
+
if [[ $# -lt 2 ]]; then
|
|
24
|
+
echo "Missing value for $1"
|
|
25
|
+
echo "Press Enter to close..."
|
|
26
|
+
read -r _ || true
|
|
27
|
+
exit 1
|
|
28
|
+
fi
|
|
29
|
+
FMT="$2"
|
|
30
|
+
shift 2
|
|
31
|
+
;;
|
|
32
|
+
--)
|
|
33
|
+
shift
|
|
34
|
+
FILES+=("$@")
|
|
35
|
+
break
|
|
36
|
+
;;
|
|
37
|
+
-*)
|
|
38
|
+
echo "Unknown option: $1"
|
|
39
|
+
echo "Press Enter to close..."
|
|
40
|
+
read -r _ || true
|
|
41
|
+
exit 1
|
|
42
|
+
;;
|
|
43
|
+
*)
|
|
44
|
+
# Positional: first non-option that is not an existing .Rmd and looks like
|
|
45
|
+
# an rmarkdown format name can be treated as format when FILES already set,
|
|
46
|
+
# or as format when it does not end in .Rmd/.Rmarkdown.
|
|
47
|
+
lower="${1,,}"
|
|
48
|
+
if [[ "${lower}" == *.rmd || "${lower}" == *.rmarkdown ]]; then
|
|
49
|
+
FILES+=("$1")
|
|
50
|
+
elif [[ ${#FILES[@]} -eq 0 && -f "$1" ]]; then
|
|
51
|
+
FILES+=("$1")
|
|
52
|
+
elif [[ "$1" =~ ^(html_document|pdf_document|all|[a-zA-Z0-9_]+)$ ]]; then
|
|
53
|
+
FMT="$1"
|
|
54
|
+
else
|
|
55
|
+
FILES+=("$1")
|
|
56
|
+
fi
|
|
57
|
+
shift
|
|
58
|
+
;;
|
|
59
|
+
esac
|
|
60
|
+
done
|
|
24
61
|
|
|
25
|
-
{
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
echo "cwd: $(pwd)"
|
|
29
|
-
echo "forcing: --output_format html_document"
|
|
30
|
-
echo "log: ${LOG}"
|
|
31
|
-
command -v pandoc >/dev/null && pandoc --version | head -1 || echo "pandoc: MISSING"
|
|
32
|
-
command -v gknit >/dev/null && echo "gknit: $(command -v gknit)" || echo "gknit: via mise/wrapper"
|
|
33
|
-
free -h 2>/dev/null | head -2 || true
|
|
34
|
-
echo
|
|
35
|
-
} | tee "${LOG}"
|
|
62
|
+
if [[ ${#FILES[@]} -eq 0 ]]; then
|
|
63
|
+
FILES=("${HOME}/galaaz-blogs/oh_my/oh_my.Rmd")
|
|
64
|
+
fi
|
|
36
65
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
mise x ruby -- gknit --output_format html_document --no_clean "${base}"
|
|
44
|
-
else
|
|
45
|
-
gknit --output_format html_document --no_clean "${base}"
|
|
66
|
+
overall=0
|
|
67
|
+
for RMD in "${FILES[@]}"; do
|
|
68
|
+
if [[ ! -f "${RMD}" ]]; then
|
|
69
|
+
echo "Missing Rmd: ${RMD}"
|
|
70
|
+
overall=1
|
|
71
|
+
continue
|
|
46
72
|
fi
|
|
47
|
-
) 2>&1 | tee -a "${LOG}"
|
|
48
|
-
st=${PIPESTATUS[0]}
|
|
49
|
-
set -e
|
|
50
73
|
|
|
51
|
-
{
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
echo "
|
|
59
|
-
|
|
60
|
-
echo
|
|
74
|
+
{
|
|
75
|
+
echo "=== gknit debug $(date -Iseconds) ==="
|
|
76
|
+
echo "rmd: ${RMD}"
|
|
77
|
+
echo "cwd: $(pwd)"
|
|
78
|
+
echo "forcing: --output_format ${FMT}"
|
|
79
|
+
echo "log: ${LOG}"
|
|
80
|
+
command -v pandoc >/dev/null && pandoc --version | head -1 || echo "pandoc: MISSING"
|
|
81
|
+
command -v gknit >/dev/null && echo "gknit: $(command -v gknit)" || echo "gknit: via mise/wrapper"
|
|
82
|
+
free -h 2>/dev/null | head -2 || true
|
|
83
|
+
echo
|
|
84
|
+
} | tee -a "${LOG}"
|
|
85
|
+
|
|
86
|
+
set +e
|
|
87
|
+
(
|
|
88
|
+
cd "$(dirname "${RMD}")" || exit 1
|
|
89
|
+
base="$(basename "${RMD}")"
|
|
90
|
+
if command -v mise >/dev/null 2>&1; then
|
|
91
|
+
mise x ruby -- gknit --output_format "${FMT}" --no_clean "${base}"
|
|
92
|
+
else
|
|
93
|
+
gknit --output_format "${FMT}" --no_clean "${base}"
|
|
94
|
+
fi
|
|
95
|
+
) 2>&1 | tee -a "${LOG}"
|
|
96
|
+
st=${PIPESTATUS[0]}
|
|
97
|
+
set +e
|
|
98
|
+
|
|
99
|
+
{
|
|
100
|
+
echo
|
|
101
|
+
echo "exit: ${st}"
|
|
102
|
+
echo "--- recent kernel/OOM hints (if any) ---"
|
|
103
|
+
dmesg -T 2>/dev/null | grep -iE 'oom|killed process|out of memory' | tail -5 || echo "(no dmesg access or no OOM lines)"
|
|
104
|
+
stem="${RMD%.*}"
|
|
105
|
+
case "${FMT}" in
|
|
106
|
+
pdf_document) out="${stem}.pdf" ;;
|
|
107
|
+
html_document|*) out="${stem}.html" ;;
|
|
108
|
+
esac
|
|
109
|
+
if [[ -f "${out}" ]]; then
|
|
110
|
+
echo "output: ${out}"
|
|
111
|
+
else
|
|
112
|
+
echo "output: not found for format ${FMT} (knit likely failed before write)"
|
|
113
|
+
fi
|
|
114
|
+
echo "FULL LOG: ${LOG}"
|
|
115
|
+
} | tee -a "${LOG}"
|
|
116
|
+
|
|
117
|
+
if [[ "${st}" -ne 0 ]]; then
|
|
118
|
+
overall="${st}"
|
|
61
119
|
fi
|
|
62
|
-
|
|
63
|
-
} | tee -a "${LOG}"
|
|
120
|
+
done
|
|
64
121
|
|
|
65
122
|
echo
|
|
66
|
-
if [[ "${
|
|
67
|
-
echo "FAILED (exit ${
|
|
123
|
+
if [[ "${overall}" -ne 0 ]]; then
|
|
124
|
+
echo "FAILED (exit ${overall}). Scroll up or: less ${LOG}"
|
|
68
125
|
else
|
|
69
126
|
echo "OK."
|
|
70
127
|
fi
|
|
71
128
|
echo "Press Enter to close (so a crash mid-run still leaves this log on disk)..."
|
|
72
129
|
read -r _ || true
|
|
73
|
-
exit "${
|
|
130
|
+
exit "${overall}"
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
# Omarchy-shaped core installer for Galaaz (R-on-Rails).
|
|
3
|
-
# omarchy:summary=
|
|
3
|
+
# omarchy:summary=Configure Galaaz (R-on-Rails)
|
|
4
4
|
# omarchy:name=galaaz
|
|
5
5
|
#
|
|
6
|
+
# Prerequisite (do this yourself first — this script does NOT gem install):
|
|
7
|
+
# gem install galaaz # or: gem install galaaz -v x.y.z / .pre.N
|
|
8
|
+
# galaaz omarchy install # menu overlay + helpers
|
|
9
|
+
# Then: Super+Space → Install → Development → Galaaz → Galaaz (core)
|
|
10
|
+
#
|
|
6
11
|
# Debug log (always written, even if TUI tee fails):
|
|
7
12
|
# ~/.local/share/galaaz/install-core.log
|
|
8
13
|
set -euo pipefail
|
|
9
14
|
|
|
10
|
-
# Optional pin: GALAAZ_GEM_VERSION=2.1.2 omarchy-install-galaaz
|
|
11
|
-
# Default: latest from RubyGems (Omarchy/Rails shape).
|
|
12
|
-
GALAAZ_GEM_VERSION="${GALAAZ_GEM_VERSION:-}"
|
|
13
15
|
LOG_DIR="${HOME}/.local/share/galaaz"
|
|
14
16
|
LOG="${LOG_DIR}/install-core.log"
|
|
15
17
|
mkdir -p "${LOG_DIR}"
|
|
@@ -45,13 +47,13 @@ on_err() {
|
|
|
45
47
|
}
|
|
46
48
|
trap on_err ERR
|
|
47
49
|
|
|
48
|
-
log "=== galaaz core
|
|
50
|
+
log "=== galaaz core configure $(date -Iseconds) ==="
|
|
49
51
|
log "log file: ${LOG}"
|
|
50
52
|
log "script: ${BASH_SOURCE[0]}"
|
|
51
53
|
log "pwd: $(pwd)"
|
|
52
54
|
log "user: $(id -un) home=${HOME}"
|
|
53
55
|
log "PATH: ${PATH}"
|
|
54
|
-
log "
|
|
56
|
+
log "(uses already-installed galaaz gem — does not gem install)"
|
|
55
57
|
log ""
|
|
56
58
|
|
|
57
59
|
pkg_add() {
|
|
@@ -167,35 +169,21 @@ WRAP
|
|
|
167
169
|
log "wrapper: ${HOME}/.local/bin/galaaz"
|
|
168
170
|
}
|
|
169
171
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
LATEST="$(curl -fsSL https://rubygems.org/api/v1/versions/galaaz/latest.json 2>/dev/null \
|
|
180
|
-
| sed -n 's/.*"version":"\([^"]*\)".*/\1/p' || true)"
|
|
181
|
-
if [[ -n "${LATEST}" ]]; then
|
|
182
|
-
log "==> gem install galaaz ${LATEST} (latest on RubyGems)"
|
|
183
|
-
else
|
|
184
|
-
log "==> gem install galaaz (latest on RubyGems)"
|
|
185
|
-
fi
|
|
186
|
-
set +e
|
|
187
|
-
run_ruby gem install galaaz --no-document --source https://rubygems.org 2>&1 | tee -a "${LOG}"
|
|
188
|
-
st=${PIPESTATUS[0]}
|
|
189
|
-
set -e
|
|
190
|
-
[[ ${st} -eq 0 ]] || exit "${st}"
|
|
172
|
+
# Gem must already be installed (user: gem install galaaz [ -v … ]).
|
|
173
|
+
# Do NOT gem install/uninstall here — that pulled stable latest over prereleases.
|
|
174
|
+
log "==> require installed galaaz gem"
|
|
175
|
+
if ! ROOT="$(gem_root 2>/dev/null)" || [[ -z "${ROOT}" || ! -d "${ROOT}" ]]; then
|
|
176
|
+
log "ERROR: galaaz gem not found under this Ruby."
|
|
177
|
+
log "Install first, then re-run core configure:"
|
|
178
|
+
log " gem install galaaz # or gem install galaaz -v <version>"
|
|
179
|
+
log " galaaz omarchy install"
|
|
180
|
+
exit 1
|
|
191
181
|
fi
|
|
192
|
-
|
|
193
182
|
INSTALLED="$(run_ruby ruby -e "puts Gem::Specification.find_by_name('galaaz').version")"
|
|
194
|
-
log "
|
|
183
|
+
log "using galaaz ${INSTALLED}"
|
|
184
|
+
log "gem root: ${ROOT}"
|
|
195
185
|
|
|
196
|
-
ROOT="$(gem_root)"
|
|
197
186
|
BRIDGE="${ROOT}/ext/new_bridge"
|
|
198
|
-
log "gem root: ${ROOT}"
|
|
199
187
|
log "bridge: ${BRIDGE}"
|
|
200
188
|
ls -la "${BRIDGE}" >>"${LOG}" 2>&1 || true
|
|
201
189
|
if [[ ! -f "${BRIDGE}/Makefile" ]]; then
|
|
@@ -254,8 +242,14 @@ log "gatekeeper OK: ${SO}"
|
|
|
254
242
|
log "==> galaaz setup (CLI)"
|
|
255
243
|
galaaz_cli setup >>"${LOG}" 2>&1 || log "WARN: galaaz setup non-zero (so exists; continuing)"
|
|
256
244
|
|
|
257
|
-
log "==> galaaz blogs init"
|
|
258
|
-
|
|
245
|
+
log "==> galaaz blogs init/sync"
|
|
246
|
+
# Fresh machine: init. Upgrade / re-run: sync brand assets without wiping blogs
|
|
247
|
+
# (older gems omitted _logo_before_body.html → pandoc error 99).
|
|
248
|
+
if [[ -f "${HOME}/galaaz-blogs/.galaaz-blogs" ]]; then
|
|
249
|
+
galaaz_cli blogs sync "${HOME}/galaaz-blogs" >>"${LOG}" 2>&1 || log "WARN: blogs sync non-zero"
|
|
250
|
+
else
|
|
251
|
+
galaaz_cli blogs init "${HOME}/galaaz-blogs" >>"${LOG}" 2>&1 || log "WARN: blogs init non-zero"
|
|
252
|
+
fi
|
|
259
253
|
|
|
260
254
|
install_wrapper
|
|
261
255
|
|
|
@@ -323,11 +317,31 @@ if [[ -f "${SCRIPT_DIR}/galaaz-gknit.sh" ]]; then
|
|
|
323
317
|
log "gknit helper: ${HOME}/.local/bin/omarchy-galaaz-gknit"
|
|
324
318
|
fi
|
|
325
319
|
|
|
320
|
+
# Nautilus right-click → Scripts → Galaaz → gknit
|
|
321
|
+
NAUTILUS_SCRIPTS_SRC="${SCRIPT_DIR}/nautilus-scripts"
|
|
322
|
+
NAUTILUS_SCRIPTS_DEST="${HOME}/.local/share/nautilus/scripts/Galaaz"
|
|
323
|
+
if [[ -d "${NAUTILUS_SCRIPTS_SRC}" ]]; then
|
|
324
|
+
mkdir -p "${NAUTILUS_SCRIPTS_DEST}"
|
|
325
|
+
if [[ -f "${NAUTILUS_SCRIPTS_SRC}/gknit-html" ]]; then
|
|
326
|
+
cp "${NAUTILUS_SCRIPTS_SRC}/gknit-html" "${NAUTILUS_SCRIPTS_DEST}/Gknit HTML"
|
|
327
|
+
chmod +x "${NAUTILUS_SCRIPTS_DEST}/Gknit HTML"
|
|
328
|
+
fi
|
|
329
|
+
if [[ -f "${NAUTILUS_SCRIPTS_SRC}/gknit-pdf" ]]; then
|
|
330
|
+
cp "${NAUTILUS_SCRIPTS_SRC}/gknit-pdf" "${NAUTILUS_SCRIPTS_DEST}/Gknit PDF"
|
|
331
|
+
chmod +x "${NAUTILUS_SCRIPTS_DEST}/Gknit PDF"
|
|
332
|
+
fi
|
|
333
|
+
if [[ -f "${NAUTILUS_SCRIPTS_SRC}/gknit-choose-format" ]]; then
|
|
334
|
+
cp "${NAUTILUS_SCRIPTS_SRC}/gknit-choose-format" "${NAUTILUS_SCRIPTS_DEST}/Gknit Choose Format"
|
|
335
|
+
chmod +x "${NAUTILUS_SCRIPTS_DEST}/Gknit Choose Format"
|
|
336
|
+
fi
|
|
337
|
+
log "nautilus Scripts/Galaaz: ${NAUTILUS_SCRIPTS_DEST}"
|
|
338
|
+
fi
|
|
339
|
+
|
|
326
340
|
mkdir -p "${HOME}/.config/galaaz/profiles"
|
|
327
341
|
date -Iseconds >"${HOME}/.config/galaaz/profiles/core"
|
|
328
342
|
|
|
329
343
|
log ""
|
|
330
|
-
log "Core
|
|
344
|
+
log "Core configure complete."
|
|
331
345
|
log "Next: Super+Space → Install → Development → Galaaz → Guide (what's next)"
|
|
332
346
|
log "Docs: https://rbotafogo.github.io/galaaz/"
|
|
333
347
|
log "FULL LOG: ${LOG}"
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Nautilus Scripts → Galaaz → Gknit Choose Format
|
|
3
|
+
# Uses NAUTILUS_SCRIPT_SELECTED_FILE_PATHS (newline-separated).
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
GK="${HOME}/.local/bin/omarchy-galaaz-gknit"
|
|
7
|
+
FILES=()
|
|
8
|
+
|
|
9
|
+
while IFS= read -r f; do
|
|
10
|
+
[[ -z "${f}" ]] && continue
|
|
11
|
+
case "${f,,}" in
|
|
12
|
+
*.rmd|*.rmarkdown) FILES+=("${f}") ;;
|
|
13
|
+
esac
|
|
14
|
+
done <<< "${NAUTILUS_SCRIPT_SELECTED_FILE_PATHS:-}"
|
|
15
|
+
|
|
16
|
+
if [[ ${#FILES[@]} -eq 0 ]]; then
|
|
17
|
+
notify-send "Galaaz" "Select one or more .Rmd files to gknit." 2>/dev/null || true
|
|
18
|
+
exit 1
|
|
19
|
+
fi
|
|
20
|
+
|
|
21
|
+
if [[ ! -x "${GK}" ]]; then
|
|
22
|
+
notify-send "Galaaz" "Missing ${GK}. Run: galaaz omarchy install" 2>/dev/null || true
|
|
23
|
+
exit 1
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
FMT=""
|
|
27
|
+
if command -v zenity >/dev/null 2>&1; then
|
|
28
|
+
FMT="$(
|
|
29
|
+
zenity --list \
|
|
30
|
+
--title="Galaaz gknit" \
|
|
31
|
+
--text="Output format for ${#FILES[@]} Rmd file(s):" \
|
|
32
|
+
--column="Format" \
|
|
33
|
+
html_document \
|
|
34
|
+
pdf_document \
|
|
35
|
+
all \
|
|
36
|
+
--height=280 \
|
|
37
|
+
--width=360 \
|
|
38
|
+
2>/dev/null || true
|
|
39
|
+
)"
|
|
40
|
+
elif command -v kdialog >/dev/null 2>&1; then
|
|
41
|
+
FMT="$(
|
|
42
|
+
kdialog --title "Galaaz gknit" --combobox "Output format:" \
|
|
43
|
+
html_document pdf_document all \
|
|
44
|
+
--default html_document 2>/dev/null || true
|
|
45
|
+
)"
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
if [[ -z "${FMT}" ]]; then
|
|
49
|
+
notify-send "Galaaz" "Format picker cancelled (or install zenity)." 2>/dev/null || true
|
|
50
|
+
exit 0
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
if command -v omarchy-launch-tui >/dev/null 2>&1; then
|
|
54
|
+
omarchy-launch-tui "${GK}" --output_format "${FMT}" -- "${FILES[@]}"
|
|
55
|
+
elif command -v xdg-terminal-exec >/dev/null 2>&1; then
|
|
56
|
+
xdg-terminal-exec "${GK}" --output_format "${FMT}" -- "${FILES[@]}"
|
|
57
|
+
elif command -v alacritty >/dev/null 2>&1; then
|
|
58
|
+
alacritty -e "${GK}" --output_format "${FMT}" -- "${FILES[@]}"
|
|
59
|
+
else
|
|
60
|
+
"${GK}" --output_format "${FMT}" -- "${FILES[@]}"
|
|
61
|
+
fi
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Nautilus Scripts → Galaaz → Gknit HTML
|
|
3
|
+
# Uses NAUTILUS_SCRIPT_SELECTED_FILE_PATHS (newline-separated).
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
GK="${HOME}/.local/bin/omarchy-galaaz-gknit"
|
|
7
|
+
FMT="html_document"
|
|
8
|
+
FILES=()
|
|
9
|
+
|
|
10
|
+
while IFS= read -r f; do
|
|
11
|
+
[[ -z "${f}" ]] && continue
|
|
12
|
+
case "${f,,}" in
|
|
13
|
+
*.rmd|*.rmarkdown) FILES+=("${f}") ;;
|
|
14
|
+
esac
|
|
15
|
+
done <<< "${NAUTILUS_SCRIPT_SELECTED_FILE_PATHS:-}"
|
|
16
|
+
|
|
17
|
+
if [[ ${#FILES[@]} -eq 0 ]]; then
|
|
18
|
+
notify-send "Galaaz" "Select one or more .Rmd files to gknit (HTML)." 2>/dev/null || true
|
|
19
|
+
exit 1
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
if [[ ! -x "${GK}" ]]; then
|
|
23
|
+
notify-send "Galaaz" "Missing ${GK}. Run: galaaz omarchy install" 2>/dev/null || true
|
|
24
|
+
exit 1
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
launch() {
|
|
28
|
+
if command -v omarchy-launch-tui >/dev/null 2>&1; then
|
|
29
|
+
omarchy-launch-tui "${GK}" --output_format "${FMT}" -- "${FILES[@]}"
|
|
30
|
+
elif command -v xdg-terminal-exec >/dev/null 2>&1; then
|
|
31
|
+
xdg-terminal-exec "${GK}" --output_format "${FMT}" -- "${FILES[@]}"
|
|
32
|
+
elif command -v alacritty >/dev/null 2>&1; then
|
|
33
|
+
alacritty -e "${GK}" --output_format "${FMT}" -- "${FILES[@]}"
|
|
34
|
+
else
|
|
35
|
+
"${GK}" --output_format "${FMT}" -- "${FILES[@]}"
|
|
36
|
+
fi
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
launch
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Nautilus Scripts → Galaaz → Gknit PDF
|
|
3
|
+
# Uses NAUTILUS_SCRIPT_SELECTED_FILE_PATHS (newline-separated).
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
GK="${HOME}/.local/bin/omarchy-galaaz-gknit"
|
|
7
|
+
FMT="pdf_document"
|
|
8
|
+
FILES=()
|
|
9
|
+
|
|
10
|
+
while IFS= read -r f; do
|
|
11
|
+
[[ -z "${f}" ]] && continue
|
|
12
|
+
case "${f,,}" in
|
|
13
|
+
*.rmd|*.rmarkdown) FILES+=("${f}") ;;
|
|
14
|
+
esac
|
|
15
|
+
done <<< "${NAUTILUS_SCRIPT_SELECTED_FILE_PATHS:-}"
|
|
16
|
+
|
|
17
|
+
if [[ ${#FILES[@]} -eq 0 ]]; then
|
|
18
|
+
notify-send "Galaaz" "Select one or more .Rmd files to gknit (PDF)." 2>/dev/null || true
|
|
19
|
+
exit 1
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
if [[ ! -x "${GK}" ]]; then
|
|
23
|
+
notify-send "Galaaz" "Missing ${GK}. Run: galaaz omarchy install" 2>/dev/null || true
|
|
24
|
+
exit 1
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
launch() {
|
|
28
|
+
if command -v omarchy-launch-tui >/dev/null 2>&1; then
|
|
29
|
+
omarchy-launch-tui "${GK}" --output_format "${FMT}" -- "${FILES[@]}"
|
|
30
|
+
elif command -v xdg-terminal-exec >/dev/null 2>&1; then
|
|
31
|
+
xdg-terminal-exec "${GK}" --output_format "${FMT}" -- "${FILES[@]}"
|
|
32
|
+
elif command -v alacritty >/dev/null 2>&1; then
|
|
33
|
+
alacritty -e "${GK}" --output_format "${FMT}" -- "${FILES[@]}"
|
|
34
|
+
else
|
|
35
|
+
"${GK}" --output_format "${FMT}" -- "${FILES[@]}"
|
|
36
|
+
fi
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
launch
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"icon": "\uE90E",
|
|
22
22
|
"iconFont": "omarchy",
|
|
23
23
|
"label": "Galaaz (core)",
|
|
24
|
-
"description": "
|
|
24
|
+
"description": "setup + blogs (gem already installed)",
|
|
25
25
|
"action": "omarchy-launch-tui omarchy-install-galaaz",
|
|
26
26
|
"disabled": "test -f ~/.config/galaaz/profiles/core"
|
|
27
27
|
},
|
data/version.rb
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
$gem_name = "galaaz"
|
|
2
|
-
$version="2.1.10.pre.
|
|
2
|
+
$version="2.1.10.pre.7"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: galaaz
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.1.10.pre.
|
|
4
|
+
version: 2.1.10.pre.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rodrigo Botafogo
|
|
@@ -449,6 +449,9 @@ files:
|
|
|
449
449
|
- script/omarchy/galaaz-gknit.sh
|
|
450
450
|
- script/omarchy/galaaz-guide.sh
|
|
451
451
|
- script/omarchy/install-galaaz.sh
|
|
452
|
+
- script/omarchy/nautilus-scripts/gknit-choose-format
|
|
453
|
+
- script/omarchy/nautilus-scripts/gknit-html
|
|
454
|
+
- script/omarchy/nautilus-scripts/gknit-pdf
|
|
452
455
|
- script/omarchy/omarchy-menu.jsonc
|
|
453
456
|
- script/omarchy/remove-galaaz.sh
|
|
454
457
|
- specs/all.rb
|