Closed notpeelz closed 3 weeks ago
What do you think about 10f589b? Now I either have to find something to template it with uwsm-bin-name
, or drop the renaming thing entirely.
Nice! I looked through it briefly and left a couple comments. Overall it looks good :+1:
As for the uwsm-bin-name
option:
I thought you could use configure_file()
for this, but it seems to strip trailing white spaces, which breaks scdoc's parser.
This is what I used:
scdoc = dependency(
'scdoc',
version: '>=1.9.2',
native: true,
required: get_option('man-pages'),
)
if scdoc.found()
scdoc_prog = find_program(scdoc.get_variable(pkgconfig: 'scdoc'), native: true)
mandir = get_option('mandir')
man_files = [
'uwsm.1.scd.in',
'uwsm-plugins.3.scd',
]
conf = configuration_data()
conf.set('BIN_NAME', UWSM_BIN_NAME)
foreach filename : man_files
basename = filename.split('/')[-1]
if basename.endswith('.in')
basename = basename.substring(0, -3)
scd_file = configure_file(
input: filename,
output: basename,
configuration: conf,
)
else
scd_file = filename
endif
topic = basename.split('.')[-3]
section = basename.split('.')[-2]
output = '@0@.@1@'.format(topic, section)
custom_target(
output,
input: scd_file,
output: output,
command: scdoc_prog,
install: true,
feed: true,
capture: true,
install_dir: '@0@/man@1@'.format(mandir, section),
)
endforeach
endif
I don't think it's worth the trouble. It's probably better to remove uwsm-bin-name
instead.
Thanks for the feedback, closing this.
Whenever I run
uwsm -h
, I find that it floods my terminal with a lot of information. I have to fullscreen the terminal or reduce the font size in order to see all of the text.I think it would be a good idea to move the more verbose information to manpages to make it easier to read (and reduce the cognitive load).
A couple examples on how to set this up with meson (requires #17):