guglicap / wal-discord

Generate Discord css from pywal colors
MIT License
91 stars 6 forks source link

Add man page #10

Open nyctanthous opened 5 years ago

nyctanthous commented 5 years ago

This project seems sufficiently popular and complex to warrant a man page.

I've drafted out a sample page from the contents of your wiki, feel free to chop it up or modify it in any way.

.TH "WAL-DISCORD" "1" "April 2019" "" "wal-discord manual"
.
.SH NAME
\fBwal-discord\fR \- generate CSS files for \fBdiscord\fR based on \fBpywal\fR themes\.
.
.SH SYNOPSIS
.P
A \fBbash\fR script that generates CSS files for \fBdiscord\fR based on \fBpywal\fR themes\. \fBwal-discord\fR only generates a CSS file, and doesn't actually load it into \fBdiscord\fR\. For that, you can either use \fBbeautifuldiscord\fR or \fBbetterdiscord\fR.
.
.P
It is also possible to theme the webapp if you're using \fBfirefox\fR. \fBchromium\fR is unsupported as they do not support user-defined stylesheets in recent versions and thus it would require an addon anyway\.
.
.P
By default, \fBwal-discord\fR generates the CSS theme in
.
.nf

$HOME/.cache/wal-discord/style.css
.
.fi
.
.SH OPTIONS
.IP "-b backend"
Use \fIbackend\fR instead of default backend\.
.IP -h
Show usage\.
.IP "-o filename"
Output to \fIfilename\fR\.
.IP -s
Output to stdout\.
.IP -t
generate \fBbetterdiscord\fR theme\.
.IP -x
generate a \fBfirefox\fR theme for the online instance of Discord\.

.SH "FAQ"
.
.SS "How do I use wal-discord with beautifuldiscord?
.
.P
Once you have \fBbeautifuldiscord\fR installed, simply run
.
.nf

wal-discord; beautifuldiscord --css $HOME/.cache/wal-discord/style.css
.
.fi
.
.SS "How do I use wal-discord with betterdiscord?
.
.P
The \fB\-t\fR flag generates a theme for usage with \fBbetterdiscord\fR. Running
.
.nf

wal-discord -t [-b backend]
.
.fi
.
.P
is sufficient. At this time, \fBbetterdiscord\fR cannot update themes on the fly, so every time you change something you must reload \fBdiscord\fR.
.
.SS "How do I use wal-discord with firefox?
.
The \fB\-x\fR flag generates a theme for usage with \fBfirefox\fR, restart the browser if needed\. Please note that doing this will erase your current userContent.css (if any). If you wish to keep your current userContent.css (for example if you're theming other websites this way) then you can try running
.
.nf

wal-discord -xs >> userContentPath

.
.nf
.
in order to append the generated stylesheet.
.
.SH "BUGS"
.P
\fBwal-discord\fR only supports \fBpywal\fR dark themes (and the \fBdiscord\fR dark theme) and is known not to work very well by default with some \fBpywal\fR integrated themes, such as gruvbox\.
.
guglicap commented 5 years ago

Thank you for the idea, I'll definitely look into it.

cprn commented 4 years ago

I think it'd require proper packaging or at least an install script? One that'd remove the man pages on uninstall as well. I'm not sure, though - I've never made this kind of package before.

@Nyctanthous If you're still interested and willing to give just a bit more push I'd be happy to expand on current installation and implement the proper uninstall in wal-discord script but I need to know where this file is supposed to be placed in this particular case (somewhere in the $HOME or...?).

nyctanthous commented 4 years ago

@cprn Yeah, a proper install script is probably in order. According to the Filesystem Hierarchy Standard, it goes into /user/share/man/....., and I found an example for an Arch PKGBUILD with manpage installation here. I’d imagine appropriating it would be an effective way to build out a solution.

cprn commented 4 years ago

Yeah, I found that as well but my understanding is that's for when we package it and get it approved in at least a semi-official repository, like AUR for Arch-like or Launchpad for Debian-like because that path requires root access. I thought the install script for a GitHub repo should install man pages somewhere in the $HOME directory? I couldn't confirm that, though, by googling and my ~/.local/man does not exist so I don't know if that's a thing at all. How did you test that man page - did you put it somewhere for man to pick up?