An open API service indexing awesome lists of open source software.

https://github.com/shimeoki/fflogo

Simple app for fastfetch to set custom logo with single config.
https://github.com/shimeoki/fflogo

command-line fastfetch terminal

Last synced: about 2 months ago
JSON representation

Simple app for fastfetch to set custom logo with single config.

Awesome Lists containing this project

README

          

# fflogo

Simple app for [fastfetch](https://github.com/fastfetch-cli/fastfetch) to set
custom logo with single config.

## Problem

You have several logos for fastfetch, but don't want to have different
configs to maintain with paths for the logos?

And you want to "toggle" the logos - not specifying the `--logo` option
dynamically?

Then, you can have a single config with template syntax and do the

```sh
fflogo
```

command to set the logo path to the default config file.

## Prerequisites

- Go 1.24.2 or newer
- Linux (Windows is not supported yet)
- `$XDG_CONFIG_HOME` set
- Go binaries directory (usually `$HOME/go/bin`) in `$PATH`, if using the
`go install command`

## Installation

Get the binary:

```sh
go install github.com/shimeoki/fflogo@latest
```

If you want to do this manually, you can clone the repository, build the
app and move it to the directory included in path. E.g.:

```sh
git clone https://github.com/shimeoki/fflogo.git
cd fflogo
go build .
sudo mv fflogo /usr/bin/fflogo
```

Then, you need to setup the template.

Save your current config as `$XDG_CONFIG_HOME/fastfetch/config.tmpl.jsonc`.

In the `.tmpl` config you need to have these lines:

```jsonc
"logo": {
"type": "file",
"source": "{{ .Source }}",
// other 'logo' options...
},
```

I.e. you need to set logo type to `file` and set the template in `source`.

## Usage

```sh
fflogo
```

The `$XDG_CONFIG_HOME/fastfetch/config.jsonc` will be overwritten with the
template contents and replaced `source` value with expanded path from the
command line argument.

Then you can use fastfetch as usual.

If something goes wrong, you will get an error message and the app will exit.

## Issues

The app is very simple and was written very quick without a good plan, so:

- Paths are hardcoded
- Windows is unsupported
- Code is not very good overall

I don't plan on developing this app much further, but PR's and issues
are still welcomed.