The main control script for the Caelestia dotfiles
The main control script for the Caelestia dotfiles.
External dependencies
libnotify - sending notificationsswappy - screenshot editorgrim - taking screenshotsdart-sass - discord themingwl-clipboard - copying to clipboardslurp - selecting an areagpu-screen-recorder - screen recordingglib2 - closing notificationscliphist - clipboard historyfuzzel - clipboard history/emoji pickerThe CLI is available from the AUR as caelestia-cli. You can install it with an AUR helper
like yay or manually downloading the PKGBUILD and running makepkg -si.
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).
You can run the CLI directly via nix run:
nix run github:caelestia-dots/cliOr add it to your system configuration:
{
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..default, which can be added to your
environment.systemPackages, users.users..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-shellpackage. This is the recommended installation method, as the CLI exposes the shell via theshellsubcommand, 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) that installs and configures the shell and the CLI.
Install all dependencies, then install
python-build,
python-installer,
python-hatch and
python-hatch-vcs.
e.g. via an AUR helper (yay)
yay -S libnotify swappy grim dart-sass wl-clipboard slurp gpu-screen-recorder glib2 cliphist fuzzel python-build python-installer python-hatch python-hatch-vcsNow, clone the repo, cd into it, build the wheel via python -m build --wheel
and install it via python -m installer dist/*.whl. Then, to install the fish
completions, copy the completions/caelestia.fish file to
/usr/share/fish/vendor_completions.d/caelestia.fish.
git clone https://github.com/caelestia-dots/cli.git
cd cli
python -m build --wheel
sudo python -m installer dist/*.whl
sudo cp completions/caelestia.fish /usr/share/fish/vendor_completions.d/caelestia.fishFor automatic Papirus folder icon colour syncing, you must have papirus-folders
installed, and papirus-folders must to be able to run with sudo without a password prompt.
You can allow this by creating a sudoers file:
echo "$USER ALL=(ALL) NOPASSWD: $(which papirus-folders)" | sudo tee /etc/sudoers.d/papirus-folders
sudo chmod 440 /etc/sudoers.d/papirus-foldersFor live Chromium-based browser theming, the CLI must be allowed to create certain directories in /etc
and write to them via sudo without a password prompt.
You can allow this by creating a sudoers file:
# Fish shell
for dir in /etc/chromium/policies/managed /etc/brave/policies/managed /etc/opt/chrome/policies/managed
echo "$USER ALL=(ALL) NOPASSWD: $(which mkdir) -p $dir" | sudo tee -a /etc/sudoers.d/caelestia-chromium
echo "$USER ALL=(ALL) NOPASSWD: $(which tee) $dir/caelestia.json" | sudo tee -a /etc/sudoers.d/caelestia-chromium
end
sudo chmod 440 /etc/sudoers.d/caelestia-chromium# Bash/other shells
for dir in /etc/chromium/policies/managed /etc/brave/policies/managed /etc/opt/chrome/policies/managed; do
echo "$USER ALL=(ALL) NOPASSWD: $(which mkdir) -p $dir" | sudo tee -a /etc/sudoers.d/caelestia-chromium
echo "$USER ALL=(ALL) NOPASSWD: $(which tee) $dir/caelestia.json" | sudo tee -a /etc/sudoers.d/caelestia-chromium
done
sudo chmod 440 /etc/sudoers.d/caelestia-chromiumAll subcommands/options can be explored via the help flag.
…Custom user templates can be defined in ~/.config/caelestia/templates/.
{{ . }}
primary, secondary, background)hex, rgb, hsl, or a single channel (red, green, blue, hue, saturation, lightness){{ primary.hex }} outputs 3f4ba2{{ primary.rgb }} outputs rgb(193, 132, 207){{ primary.red }} outputs 193{{ primary.hsl }} outputs hsl(268,41%,66%){{ primary.hue }} outputs 268Output files are written to ~/.local/state/caelestia/theme/. You can symlink them to your desired locations.
All configuration options are in ~/.config/caelestia/cli.json.
Example configuration
…No open issues yet, or sync has not completed.