Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ rust-version = "1.80"

[dependencies]
anyhow = "1.0.100"
# The shared theme, palettes, accents, labels and widgets, generated from the
# design tokens in Project-Colony-Resources. Pinned to a tag rather than
# tracking main: a change upstream cannot break this build without a deliberate
# bump here.
colony-ui = { git = "https://github.com/Project-Colony/Project-Colony-Resources", tag = "v0.1.0" }
iced = { version = "0.14.0", features = ["tokio", "markdown", "advanced", "image-without-codecs"] }
shell-words = "1.1.1"
serde = { version = "1.0.228", features = ["derive"] }
Expand Down
15 changes: 8 additions & 7 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,17 @@ All async operations (API calls, downloads, scanning) return a `Task<Message>` t

| Data | Location | Duration |
|------|----------|----------|
| Colony repos (cache) | `~/.cache/colony/repos_cache.json` | Offline fallback |
| Scanned apps (cache) | `~/.cache/colony/scan_cache.json` | Session |
| Repo docs (cache) | `~/.cache/colony/docs/<repo>/` | Offline fallback |
| Preferences | `~/.config/colony/preferences.json` | Permanent |
| Favorites | `~/.config/colony/favorites.json` | Permanent |
| OAuth token | OS Keychain / `~/.config/colony/github_token.json` | Permanent |
| Colony repos (cache) | `~/.cache/Colony/Colony/repos_cache.json` | Offline fallback |
| Scanned apps (cache) | `~/.cache/Colony/Colony/scan_cache.json` | Session |
| Repo docs (cache) | `~/.cache/Colony/Colony/repo-docs/<repo>/` | Offline fallback |
| App icons (cache) | `~/.cache/Colony/Colony/repo-icons/<repo>/icon.png` | Offline fallback |
| Preferences | `~/.config/Colony/Colony/preferences/preferences.json` | Permanent |
| Favorites | `~/.config/Colony/Colony/preferences/favorites.json` | Permanent |
| OAuth token | OS Keychain / `~/.config/Colony/Colony/auth/github_token.json` | Permanent |
| Installed versions | `~/.local/share/Colony/apps/<repo>/.colony_version` | Permanent |
| Resolved asset | `~/.local/share/Colony/apps/<repo>/.colony_asset` | Permanent |
| Colony binaries | `~/.local/share/Colony/apps/<repo>/` | Permanent |
| Self-update staging | `~/.local/share/Colony/update-staging/` | Temporary |
| Self-update staging | `~/.cache/Colony/Colony/update-staging/` | Temporary |

## GitHub API

Expand Down
46 changes: 26 additions & 20 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Open the app in Colony → detail view → **Uninstall**. Or delete the app's di

### How do I uninstall Colony itself?

AUR: `sudo pacman -R colony-bin` (or `colony-git`). Manual install: delete the binary plus `~/.config/colony/`, `~/.cache/colony/`, and `~/.local/share/Colony/`.
AUR: `sudo pacman -R colony-bin` (or `colony-git`). Manual install: delete the binary plus `~/.config/Colony/`, `~/.cache/Colony/`, and `~/.local/share/Colony/`.

---

Expand All @@ -72,7 +72,7 @@ You get a 5000 req/h limit and Colony can read private repos you have access to

### Where is the token stored?

In your OS keychain (GNOME keyring, KWallet, macOS Keychain, Windows Credential Manager) via the [keyring](https://crates.io/crates/keyring) crate. If no keychain is available (headless Linux, CI) it falls back to `~/.config/colony/github_token.json` with `chmod 600`.
In your OS keychain (GNOME keyring, KWallet, macOS Keychain, Windows Credential Manager) via the [keyring](https://crates.io/crates/keyring) crate. If no keychain is available (headless Linux, CI) it falls back to `~/.config/Colony/Colony/auth/github_token.json` with `chmod 600`.

### How do I disconnect?

Expand All @@ -93,7 +93,7 @@ Most common causes:
5. The repo is not under the `Project-Colony` org (Colony only scans that org).
6. GitHub rate limit hit — connect your account.

Cache file to inspect: `~/.cache/colony/repos_cache.json`.
Cache file to inspect: `~/.cache/Colony/Colony/repos_cache.json`.

### Does Colony support private repos?

Expand All @@ -119,28 +119,34 @@ If your app is installed but not in any of these (portable binary without `.desk

### Where does Colony store its stuff?

| What | Path |
|----------------------------|---------------------------------------------------------|
| Preferences | `~/.config/colony/preferences.json` |
| Favorites | `~/.config/colony/favorites.json` |
| GitHub token (fallback) | `~/.config/colony/github_token.json` (`chmod 600`) |
| Installed app binaries | `~/.local/share/Colony/apps/<repo>/` |
| Installed version marker | `~/.local/share/Colony/apps/<repo>/.colony_version` |
| Resolved asset filename | `~/.local/share/Colony/apps/<repo>/.colony_asset` |
| Repo list cache | `~/.cache/colony/repos_cache.json` |
| Manifest docs cache | `~/.cache/colony/docs/<repo>/` |
| System app scan cache | `~/.cache/colony/scan_cache.json` |
| Self-update staging | `~/.local/share/Colony/update-staging/` |

Purging the `~/.cache/colony/` directory forces a full re-scan and re-fetch.
| What | Path (Linux) |
|----------------------------|----------------------------------------------------------|
| Preferences | `~/.config/Colony/Colony/preferences/preferences.json` |
| Favorites | `~/.config/Colony/Colony/preferences/favorites.json` |
| GitHub token (fallback) | `~/.config/Colony/Colony/auth/github_token.json` (`600`) |
| Installed app binaries | `~/.local/share/Colony/apps/<repo>/` |
| Installed version marker | `~/.local/share/Colony/apps/<repo>/.colony_version` |
| Resolved asset filename | `~/.local/share/Colony/apps/<repo>/.colony_asset` |
| Repo list cache | `~/.cache/Colony/Colony/repos_cache.json` |
| Manifest docs cache | `~/.cache/Colony/Colony/repo-docs/<repo>/` |
| App icon cache | `~/.cache/Colony/Colony/repo-icons/<repo>/icon.png` |
| System app scan cache | `~/.cache/Colony/Colony/scan_cache.json` |
| Self-update staging | `~/.cache/Colony/Colony/update-staging/` |

On Windows all three roots are `%LOCALAPPDATA%\Colony\`, and on macOS config
and data share `~/Library/Application Support/Colony/` while the cache sits in
`~/Library/Caches/Colony/`. The layout is defined once in
[Project-Colony-Resources](https://github.com/Project-Colony/Project-Colony-Resources/blob/main/design/filesystem.md).

Purging the `~/.cache/Colony/` directory forces a full re-scan and re-fetch.

### Can I edit `preferences.json` by hand?

Yes. Colony re-reads it on launch. The file is JSON with field names matching what the Settings UI displays. Back it up first — malformed JSON resets to defaults.

### Can I override the scan directories?

Yes. Edit `~/.config/colony/preferences.json` and add custom paths under the platform-appropriate scan settings. The Settings UI also exposes this for Linux.
Yes. Edit `~/.config/Colony/Colony/preferences/preferences.json` and add custom paths under the platform-appropriate scan settings. The Settings UI also exposes this for Linux.

### I changed a theme and don't see it — why?

Expand All @@ -161,8 +167,8 @@ colony 2>&1 | tee colony.log
Common causes:

- Missing Linux runtime libs (GTK, dbus, xdo) — on AUR the deps are pulled automatically. For manual downloads, install them via your package manager.
- Corrupted cache — `rm -rf ~/.cache/colony` and relaunch.
- Corrupted preferences — `mv ~/.config/colony/preferences.json ~/.config/colony/preferences.json.bak` and relaunch to regenerate defaults.
- Corrupted cache — `rm -rf ~/.cache/Colony` and relaunch.
- Corrupted preferences — `mv ~/.config/Colony/Colony/preferences/preferences.json{,.bak}` and relaunch to regenerate defaults.

### Download stuck / very slow

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,5 +151,5 @@ upgraded alongside the rest of your system.
[colony-spec.md](colony-spec.md) for the full manifest reference.
- **Rate limit hit?** Connect a GitHub account (section 6).
- **Download fails?** Check your network. Colony retries automatically; logs
go to `~/.cache/colony/` if you need to dig in.
go to `~/.cache/Colony/Colony/` if you need to dig in.
- **More questions?** See the [FAQ](faq.md).
5 changes: 3 additions & 2 deletions src/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::path::PathBuf;
use std::time::Duration;

use crate::github::{APP_VERSION, CONNECT_TIMEOUT, GITHUB_ACCOUNT, LAUNCHER_OWNER, LAUNCHER_REPO};
use crate::persistence::colony_data_dir;
use crate::persistence::colony_cache_dir;

/// Build the HTTP client used for large asset downloads (longer read timeout
/// than the API client).
Expand Down Expand Up @@ -555,7 +555,8 @@ pub async fn download_launcher_asset(
filename: String,
progress_tx: Option<futures::channel::mpsc::UnboundedSender<(u64, Option<u64>)>>,
) -> Result<PathBuf> {
let temp_dir = colony_data_dir()?.join("update-staging");
// Transient by definition: staging lives in the cache.
let temp_dir = colony_cache_dir()?.join("update-staging");
std::fs::create_dir_all(&temp_dir)?;
let dest_path = temp_dir.join(&filename);

Expand Down
82 changes: 3 additions & 79 deletions src/i18n/en.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,77 +376,9 @@ pub(super) fn insert_all(strings: &mut HashMap<String, String>) {
"Overall application appearance.".into(),
);
strings.insert("settings_theme_dark".into(), "Dark".into());
// Theme families
strings.insert("settings_theme_catppuccin".into(), "Catppuccin".into());
strings.insert("settings_theme_catppuccin_latte".into(), "Latte".into());
strings.insert("settings_theme_catppuccin_frappe".into(), "Frappé".into());
strings.insert(
"settings_theme_catppuccin_macchiato".into(),
"Macchiato".into(),
);
strings.insert("settings_theme_catppuccin_mocha".into(), "Mocha".into());
strings.insert("settings_theme_gruvbox".into(), "Gruvbox".into());
strings.insert("settings_theme_light".into(), "Light mode".into());
strings.insert("settings_theme_dark_mode".into(), "Dark mode".into());
strings.insert("settings_theme_everblush".into(), "Everblush".into());
strings.insert("settings_theme_kanagawa".into(), "Kanagawa".into());
strings.insert(
"settings_theme_kanagawa_journal".into(),
"Journal mode".into(),
);
// New theme families
strings.insert("settings_theme_nord".into(), "Nord".into());
strings.insert("settings_theme_dracula".into(), "Dracula".into());
strings.insert("settings_theme_solarized".into(), "Solarized".into());
strings.insert("settings_theme_tokyonight".into(), "Tokyo Night".into());
strings.insert("settings_theme_tokyonight_night".into(), "Night".into());
strings.insert("settings_theme_tokyonight_day".into(), "Day".into());
strings.insert("settings_theme_rosepine".into(), "Rosé Pine".into());
strings.insert("settings_theme_rosepine_main".into(), "Main".into());
strings.insert("settings_theme_rosepine_moon".into(), "Moon".into());
strings.insert("settings_theme_rosepine_dawn".into(), "Dawn".into());
strings.insert("settings_theme_onedark".into(), "One Dark".into());
strings.insert("settings_theme_monokai".into(), "Monokai Pro".into());
strings.insert("settings_theme_monokai_pro".into(), "Pro".into());
strings.insert("settings_theme_monokai_classic".into(), "Classic".into());
strings.insert("settings_theme_monokai_spectrum".into(), "Spectrum".into());
strings.insert("settings_theme_ayu".into(), "Ayu".into());
strings.insert("settings_theme_ayu_mirage".into(), "Mirage".into());
strings.insert("settings_theme_everforest".into(), "Everforest".into());
strings.insert("settings_theme_material".into(), "Material".into());
strings.insert("settings_theme_material_oceanic".into(), "Oceanic".into());
strings.insert(
"settings_theme_material_palenight".into(),
"Palenight".into(),
);
strings.insert(
"settings_theme_material_deepocean".into(),
"Deep Ocean".into(),
);
strings.insert("settings_theme_flexoki".into(), "Flexoki".into());
strings.insert("settings_theme_nightfox".into(), "Nightfox".into());
strings.insert("settings_theme_nightfox_nightfox".into(), "Nightfox".into());
strings.insert("settings_theme_nightfox_dawnfox".into(), "Dawnfox".into());
strings.insert("settings_theme_sonokai".into(), "Sonokai".into());
strings.insert("settings_theme_sonokai_default".into(), "Default".into());
strings.insert("settings_theme_oxocarbon".into(), "Oxocarbon".into());
strings.insert("settings_theme_nightowl".into(), "Night Owl".into());
strings.insert("settings_theme_iceberg".into(), "Iceberg".into());
strings.insert("settings_theme_horizon".into(), "Horizon".into());
strings.insert("settings_theme_melange".into(), "Melange".into());
strings.insert("settings_theme_synthwave".into(), "Synthwave '84".into());
strings.insert("settings_theme_modus".into(), "Modus".into());
strings.insert("settings_theme_modus_operandi".into(), "Operandi".into());
strings.insert("settings_theme_modus_vivendi".into(), "Vivendi".into());
strings.insert(
"settings_theme_stellar_blade".into(),
"Stellar Blade".into(),
);
strings.insert("settings_theme_stellar_blade_eve".into(), "EVE".into());
strings.insert("settings_theme_stellar_blade_tachy".into(), "Tachy".into());
strings.insert("settings_theme_stellar_blade_lily".into(), "Lily".into());
strings.insert("settings_theme_stellar_blade_enya".into(), "Enya".into());
strings.insert("settings_theme_stellar_blade_kaya".into(), "Kaya".into());
// The theme family and variant names are NOT here: they come from
// colony-ui, generated from the design tokens. A family added upstream
// must not need a line in this file - see `Locale::new`.
// Colors & accents
strings.insert("settings_section_colors".into(), "Colors & accents".into());
strings.insert(
Expand All @@ -458,14 +390,6 @@ pub(super) fn insert_all(strings: &mut HashMap<String, String>) {
"settings_accent_color_desc".into(),
"Color used for interactive elements.".into(),
);
strings.insert("settings_accent_red".into(), "Red".into());
strings.insert("settings_accent_orange".into(), "Orange".into());
strings.insert("settings_accent_yellow".into(), "Yellow".into());
strings.insert("settings_accent_green".into(), "Green".into());
strings.insert("settings_accent_blue".into(), "Blue".into());
strings.insert("settings_accent_indigo".into(), "Indigo".into());
strings.insert("settings_accent_violet".into(), "Violet".into());
strings.insert("settings_accent_amber".into(), "Amber".into());
strings.insert(
"settings_auto_accent".into(),
"Auto accent from background".into(),
Expand Down
Loading
Loading