This is to out-source the table making in terminal to the external
library.
I removed the in-house table implementation since it is not used any
more, and had been replaced by comfy-table, we use this instead.
I also have reimplemented table_max_width since new implementation
removed max width , with the new implemetation it will work again.
Signed-off-by: Perma Alesheikh <me@prma.dev>
In order to reduce our dependencies, we are replacing the dependencies
that use console_rs with those that use crossterm.
This commit will completely replace dialoguer with inquire.
Signed-off-by: Perma Alesheikh <me@prma.dev>
Considering that "dialoguer" uses "console" backend library, and the
future of himalaya is reliant on "crossterm", we are moving from
dialoguer, to inquire.
This commit is going to include some experimental changes to one file.
Signed-off-by: Perma Alesheikh <me@prma.dev>
After using cargo shear, there are 3 crates that are shown to be unused.
I have checked the files, no mentions there. I have removed them, and
cargo check --all-features --all-targets gives no errors.
Signed-off-by: Perma Alesheikh <me@prma.dev>
Since Himalaya is intended to be ran as a CLI in the terminal emulator
environment, their user experience could vastly improve with better and
more colorful error messages and logging.
This change will replace more minimal libraries for error-reporting/han-
dling with their more advanced counterparts.
Since these crates have tight integrations, this commit will change both
in one shot.
Also we have don't need env_logger any more. So I also have removed that
guy as well.
Signed-off-by: Perma Alesheikh <me@prma.dev>
As requested in <https://todo.sr.ht/~soywod/pimalaya/131> I removed
flake-utils. This reduces the number of flake inputs and doesn't add
much code.
The way this works, is that instead of `eachDefaultSystem` we have a
function `forEachSupportedSystem`, this function generates an attrset
with a key for each system in the `supportedSystems` array, whose value
is the result of calling the provided function with the system as an
argument:
```nix repl
repl> forEachSupportedSystem f
{
"x86_64-linux" = f "x86_64-linux";
...
}
```
This is slightly clumsier than `flake-utils.lib.eachDefaultSystem`,
which rewrites the returned attrset, but it is much less code and
simpler to understand.
I tested the build with `nix build` on `x86_64-linux` and it still works
c:
As discussed in
<https://github.com/nix-community/home-manager/issues/5069>.
I set `ExecStart=%install_dir%/himalaya` so when packaging himalaya
people nee to explicitly set the path to himalaya (i.e. `sed
's:%install_dir%:/usr/bin:' assets/himalaya-watch@.service`). This is
done automatically in `install.sh` if `$PREFIX` is `/usr`, Otherwise
the packager should handle it themselves
For `nix` it would be (`sed 's:%install_dir%:$out/bin:'
assets/himalaya-watch@.service`). I don't know where it should be placed
(probably `$out/share/systemd/user` as nix will add that to
`$XDG_DATA_DIRS` which is searched by `systemctl --user`.
I swear I checked the address like 4 times before sending the email, I
have no idea how I managed to mess it up T-T. I was wondering why the
formatting was so messed up in sr.ht.