Files
davidandClaude Opus 5.5 bc07e1d3e3 Set up Pop!_OS for a Federated Core, like CoreDesktop's configure
A port of CoreDesktop's configure to Pop!_OS 24.04 with COSMIC, in the shape
of connector-macos: its own install.sh, update and configure, installed in
~/.local/share/federated-connector/connector.

Every configure item is ported: the Core (email, calendars and contacts
through GNOME Online Accounts and Evolution, as COSMIC has no accounts of its
own; Superpanel; files over davfs2; Element; Tally; the email watcher),
Tailscale, backups, AI agents in the sandbox and their sign-ins, languages
with mise, AI servers, printers, network storage and the agent sandbox.
Folders go in the COSMIC Files sidebar. Each item installs what it needs
from apt, Flathub or the tool's own apt repository when you set it up.

smoketest/run checks it in Ubuntu 24.04 containers with Docker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 14:20:47 -07:00

33 lines
893 B
Bash

#!/bin/bash
#
# Purpose : Show a folder in the Files sidebar. Source this file; needs
# CONNECTOR.
#
# COSMIC Files has its own list (see lib/cosmic-favorites). GTK apps, such
# as Evolution's file chooser, read ~/.config/gtk-3.0/bookmarks, so the folder
# goes in both.
GTK_BOOKMARKS="$HOME/.config/gtk-3.0/bookmarks"
COSMIC_FAVORITES="$CONNECTOR/configure.d/lib/cosmic-favorites"
# sidebar_add <folder> <name>
sidebar_add() {
mkdir -p "$(dirname "$GTK_BOOKMARKS")"
grep -qs "^file://$1 " "$GTK_BOOKMARKS" || echo "file://$1 $2" >> "$GTK_BOOKMARKS"
"$COSMIC_FAVORITES" add "$1" "$2"
}
sidebar_remove() {
local tmp
if [ -f "$GTK_BOOKMARKS" ]; then
tmp="$(mktemp)" || return 1
grep -vF "file://$1 " "$GTK_BOOKMARKS" > "$tmp"
mv -f "$tmp" "$GTK_BOOKMARKS"
fi
"$COSMIC_FAVORITES" remove "$1"
}
sidebar_has() {
"$COSMIC_FAVORITES" has "$1" 2> /dev/null
}