mirror of
https://github.com/caelestia-dots/cli.git
synced 2026-06-06 07:19:29 -05:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 62e7911864 | |||
| 6f8e5849cb |
@@ -20,18 +20,52 @@ The main control script for the Caelestia dotfiles.
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
### Package manager (recommended)
|
### Arch linux
|
||||||
|
|
||||||
The cli is available from the AUR as `caelestia-cli-git`. To install it you can use
|
The CLI is available from the AUR as `caelestia-cli`. You can install it with an AUR helper
|
||||||
an AUR helper like [`yay`](https://github.com/Jguer/yay), or manually download the
|
like [`yay`](https://github.com/Jguer/yay) or manually downloading the PKGBUILD and running `makepkg -si`.
|
||||||
PKGBUILD and run `makepkg -si`.
|
|
||||||
|
|
||||||
e.g. using yay
|
A package following the latest commit also exists as `caelestia-cli-git`. This is bleeding edge
|
||||||
|
and likely to be unstable/have bugs. Regular users are recommended to use the stable package
|
||||||
|
(`caelestia-cli`).
|
||||||
|
|
||||||
|
### Nix
|
||||||
|
|
||||||
|
You can run the CLI directly via `nix run`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
yay -S caelestia-cli-git
|
nix run github:caelestia-dots/cli
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Or add it to your system configuration:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
|
caelestia-cli = {
|
||||||
|
url = "github:caelestia-dots/cli";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
The package is available as `caelestia-cli.packages.<system>.default`, which can be added to your
|
||||||
|
`environment.systemPackages`, `users.users.<username>.packages`, `home.packages` if using home-manager,
|
||||||
|
or a devshell. The CLI can then be used via the `caelestia` command.
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> The default package does not have the shell enabled by default, which is required for full functionality.
|
||||||
|
> To enable the shell, use the `with-shell` package. This is the recommended installation method, as
|
||||||
|
> the CLI exposes the shell via the `shell` subcommand, meaning there is no need for the shell package
|
||||||
|
> to be exposed.
|
||||||
|
|
||||||
|
For home-manager, you can also use the Caelestia's home manager module (explained in
|
||||||
|
[configuring](https://github.com/caelestia-dots/shell?tab=readme-ov-file#home-manager-module)) that
|
||||||
|
installs and configures the shell and the CLI.
|
||||||
|
|
||||||
### Manual installation
|
### Manual installation
|
||||||
|
|
||||||
Install all [dependencies](#dependencies), then install
|
Install all [dependencies](#dependencies), then install
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ from caelestia.utils.paths import config_dir
|
|||||||
def print_version() -> None:
|
def print_version() -> None:
|
||||||
if shutil.which("pacman"):
|
if shutil.which("pacman"):
|
||||||
print("Packages:")
|
print("Packages:")
|
||||||
pkgs = ["caelestia-shell-git", "caelestia-cli-git", "caelestia-meta"]
|
pkgs = ["caelestia-shell", "caelestia-cli", "caelestia-meta"]
|
||||||
versions = subprocess.run(
|
versions = subprocess.run(
|
||||||
["pacman", "-Q", *pkgs], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, text=True
|
["pacman", "-Q", *pkgs], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, text=True
|
||||||
).stdout
|
).stdout
|
||||||
@@ -31,6 +31,14 @@ def print_version() -> None:
|
|||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
print("Caelestia: not installed")
|
print("Caelestia: not installed")
|
||||||
|
|
||||||
|
print()
|
||||||
|
try:
|
||||||
|
shell_ver = subprocess.check_output(["/usr/lib/caelestia/version", "-s"], text=True).strip()
|
||||||
|
print("Shell:")
|
||||||
|
print(" ", shell_ver)
|
||||||
|
except subprocess.CalledProcessError:
|
||||||
|
print("Shell: version helper not available")
|
||||||
|
|
||||||
print()
|
print()
|
||||||
if shutil.which("qs"):
|
if shutil.which("qs"):
|
||||||
print("Quickshell:")
|
print("Quickshell:")
|
||||||
|
|||||||
Reference in New Issue
Block a user