Added usage for stdout mode
This commit is contained in:
parent
ce3415481b
commit
f82adabc11
37
1.1.md
37
1.1.md
|
@ -69,6 +69,43 @@ the distro ascii art and the automatic config creation.
|
||||||
- Fetch now has a Gentoo/Funtoo e-build courtesy of @z1lt0id
|
- Fetch now has a Gentoo/Funtoo e-build courtesy of @z1lt0id
|
||||||
|
|
||||||
|
|
||||||
|
### Stdout
|
||||||
|
|
||||||
|
- Added `stdout` mode which allows you to fetch info in a plain text format that works<br \>
|
||||||
|
with lemonbar and in your scripts. You can use it by launching fetch with `--stdout` to print all functions enabled<br \>
|
||||||
|
in your `printinfo` function. You can selectively print functions by passing arguments to `--stdout`<br \>
|
||||||
|
like so:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# Print the output of all info functions enabled in printinfo
|
||||||
|
fetch --stdout
|
||||||
|
|
||||||
|
# Print the output of memory
|
||||||
|
fetch --stdout memory
|
||||||
|
|
||||||
|
# Print the output of memory and disk
|
||||||
|
fetch --stdout disk
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
- Added `--stdout_seperator` and `$stdout_seperator` which takes a string and adds it<br \>
|
||||||
|
as a seperator between the output.
|
||||||
|
- Added `--stdout_title` and `$stdout_title` which allow you to toggle the `title@hostname`<br \>
|
||||||
|
from appearing in the output.
|
||||||
|
- Added `--stdout_subtitles` which allow you to toggle the `Info:` titles from appearing in<br \>
|
||||||
|
the output.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# Hiding subtitles
|
||||||
|
fetch --stdout --stdout_subtitles off
|
||||||
|
|
||||||
|
# Custom seperator
|
||||||
|
fetch --stdout disk gpu --stdout_seperator " | "
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
**NOTE:** `stdout_subtitles` and `stdout_title` only work when `--stdout` is used on its own.
|
||||||
|
|
||||||
### Info
|
### Info
|
||||||
|
|
||||||
- You can now display info without a subtitle. eg. `info memory`
|
- You can now display info without a subtitle. eg. `info memory`
|
||||||
|
|
|
@ -297,6 +297,15 @@ alias fetch2="fetch \
|
||||||
--ascii_distro distro Which Distro\'s ascii art to print
|
--ascii_distro distro Which Distro\'s ascii art to print
|
||||||
|
|
||||||
|
|
||||||
|
Stdout:
|
||||||
|
--stdout info info Launch fetch in stdout mode which prints the info
|
||||||
|
in a plain-text format that you can use with
|
||||||
|
lemonbar etc.
|
||||||
|
--stdout_title on/off Hide/Show the title in stdout mode.
|
||||||
|
--stdout_seperator string String to use as a seperator in stdout mode.
|
||||||
|
--stdout_subtitles on/off Hide/Show the subtitles in stdout mode.
|
||||||
|
|
||||||
|
|
||||||
Screenshot:
|
Screenshot:
|
||||||
--scrot /path/to/img Take a screenshot, if path is left empty the screen-
|
--scrot /path/to/img Take a screenshot, if path is left empty the screen-
|
||||||
shot function will use \$scrot_dir and \$scrot_name.
|
shot function will use \$scrot_dir and \$scrot_name.
|
||||||
|
|
10
fetch
10
fetch
|
@ -2101,11 +2101,21 @@ usage () { cat << EOF
|
||||||
--ascii_distro distro Which Distro\'s ascii art to print
|
--ascii_distro distro Which Distro\'s ascii art to print
|
||||||
|
|
||||||
|
|
||||||
|
Stdout:
|
||||||
|
--stdout info info Launch fetch in stdout mode which prints the info
|
||||||
|
in a plain-text format that you can use with
|
||||||
|
lemonbar etc.
|
||||||
|
--stdout_title on/off Hide/Show the title in stdout mode.
|
||||||
|
--stdout_seperator string String to use as a seperator in stdout mode.
|
||||||
|
--stdout_subtitles on/off Hide/Show the subtitles in stdout mode.
|
||||||
|
|
||||||
|
|
||||||
Screenshot:
|
Screenshot:
|
||||||
--scrot /path/to/img Take a screenshot, if path is left empty the screen-
|
--scrot /path/to/img Take a screenshot, if path is left empty the screen-
|
||||||
shot function will use \$scrot_dir and \$scrot_name.
|
shot function will use \$scrot_dir and \$scrot_name.
|
||||||
--scrot_cmd cmd Screenshot program to launch
|
--scrot_cmd cmd Screenshot program to launch
|
||||||
|
|
||||||
|
|
||||||
Other:
|
Other:
|
||||||
--config /path/to/config Specify a path to a custom config file
|
--config /path/to/config Specify a path to a custom config file
|
||||||
--config none Launch the script without a config file
|
--config none Launch the script without a config file
|
||||||
|
|
Reference in New Issue