Skip to content

Commit

Permalink
💥 [S/C/Celeste + docs] Rename Caberto to Celeste
Browse files Browse the repository at this point in the history
  • Loading branch information
alicerunsonfedora committed Feb 18, 2021
1 parent 71e179d commit 5cd9143
Show file tree
Hide file tree
Showing 36 changed files with 120 additions and 120 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

Candella is a fork of the [AliceOS framework](https://aliceos.app), a Ren'Py framework that provides an operating environment to visual novels. This operating environment includes utilities, classes, and other code that lets developers and players write and use apps designed for the system.

![Caberto Shell in Candella](./.github/release.png)
![Celeste Shell in Candella](./.github/release.png)

## Differences between AliceOS

Expand Down
28 changes: 14 additions & 14 deletions docs/02-caberto-shell.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# Caberto Shell
# Celeste Shell

The default desktop shell for Candella is **Caberto**. Caberto's interface is mainly inspired from the [Lomiri][lomiri] desktop environment and comes with per-user customizations.
The default desktop shell for Candella is **Celeste** (formerly known as Caberto Shell). Celeste's interface is mainly inspired from the [Lomiri][lomiri] desktop environment and comes with per-user customizations.

!!! warning
Caberto is currently in a pre-release state and the documentation here may change as the project evolves.
Celeste is currently in a pre-release state and the documentation here may change as the project evolves.

![Default Caberto Shell desktop](./images/caberto/default.png)
![Default Celeste Shell desktop](./images/celeste/default.png)

## Using Caberto Shell
## Using Celeste Shell

There are two major components to Caberto Shell: the top bar and the launcher on the left-hand side of the screen. In the top bar, you can view the currently-running application's name, the current user, the time, and a few status indicators for settings and exiting the desktop. The launcher on the left displays favorite apps and provides the main entry point to access all apps.
There are two major components to Celeste Shell: the top bar and the launcher on the left-hand side of the screen. In the top bar, you can view the currently-running application's name, the current user, the time, and a few status indicators for settings and exiting the desktop. The launcher on the left displays favorite apps and provides the main entry point to access all apps.

![Caberto Shell drawer](./images/caberto/drawer.png)
![Celeste Shell drawer](./images/celeste/drawer.png)

### Customizing the desktop

Click on the gear in the top bar to open the Settings pane for Caberto Shell. Currently, the only setting available in this panel is the wallpaper selection.
Click on the gear in the top bar to open the Settings pane for Celeste Shell. Currently, the only setting available in this panel is the wallpaper selection.

![Caberto Shell settings](./images/caberto/settings.png)
![Celeste Shell settings](./images/celeste/settings.png)

### Switching users

Expand All @@ -27,14 +27,14 @@ To switch the current user that's logged in to the system, click on the current

The App Manager app provides access to pinning apps. Open the App Manager app, click on the app you want to pin from the left side, and then check the box labeled "Pin to launcher", next to the launch button.

![App Manager](./images/caberto/appman.png)
![App Manager](./images/celeste/appman.png)

## Available methods for developers

Caberto Shell provides some static methods that developers can use to get information present in Caberto Shell easily:
Celeste Shell provides some static methods that developers can use to get information present in Celeste Shell easily:

- `CabertoShell.get_all_applications()` returns all of the classes and instanced apps available to Candella.
- `CabertoShell.wallpapers()` returns a list containing the names of the wallpapers available to Caberto Shell.
- `CabertoShell.current_time()` returns a string that represents the current time on the system.
- `CelesteShell.get_all_applications()` returns all of the classes and instanced apps available to Candella.
- `CelesteShell.wallpapers()` returns a list containing the names of the wallpapers available to Celeste Shell.
- `CelesteShell.current_time()` returns a string that represents the current time on the system.

[lomiri]: https://lomiri.com
2 changes: 1 addition & 1 deletion docs/04-observable.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Candella uses Observable in a few places:

- In **AppKit**, all apps inherit the `CAObservable` class and can emit signals to observers.
- In **ServiceKit**, core services inherit `CAObservable` and emit signals to observers.
- In **Caberto Shell**, the service listens for signal emissions and acts as an observer with a callback method.
- In **Celeste Shell**, the service listens for signal emissions and acts as an observer with a callback method.

## Logic

Expand Down
2 changes: 1 addition & 1 deletion docs/05-multiuser.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Multi-user support in Candella is provided by the Multiuser framework. This fram
A user is defined by a username and is represented as the `CAUser` data class. In most cases, developers will not need to create an instance of this class as core services and applications will provide this automatically.

- `CAUser.username` contains the username of the user. Usernames must be in lowercase with no spaces or special characters.
- `CAUser.display_name` contains the user-facing display name for the user. This display name is used by core services such as Caberto Shell to display the user's name. By default, this name defaults to the username.
- `CAUser.display_name` contains the user-facing display name for the user. This display name is used by core services such as Celeste Shell to display the user's name. By default, this name defaults to the username.

`CAUser` provides methods for checking equality and string representation.

Expand Down
2 changes: 1 addition & 1 deletion docs/09-glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ If no arguments are passed in `load_glossary`, the app will default to the built

## Overriding the default glossary

If you need to override the default glossary with your own, you can change the `default_glossary` property of the `glossary` instance. This may be used in scenarios where you want the Glossary app to open your default glossary when the user opens it in a launcher like Caberto Shell.
If you need to override the default glossary with your own, you can change the `default_glossary` property of the `glossary` instance. This may be used in scenarios where you want the Glossary app to open your default glossary when the user opens it in a launcher like Celeste Shell.

```py
glossary.default_glossary = "path/to/default_glossary.json"
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
13 changes: 7 additions & 6 deletions game/System/Applications/AppManager.aosapp/ASAppManager.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,24 @@

init 5 python:
class ASAppManager(CAApplication):

from store.CADeprecated import deprecated

def applicationWillLaunch(self):
renpy.show_screen("ASAppManagerView")
pass

@deprecated('21.02', renamed="CelesteShell.get_all_applications")
def gather_applications(self):
"""Returns a list of all of the gathered applications."""
clog.warn("ASAppManager.gather_applications is deprecated. Use CabertoShell.get_all_applications instead.")
return CabertoShell.get_all_applications()

return CelesteShell.get_all_applications()

def get_app_name(self, app):
if isinstance(app, CAApplication):
return app.get_name()
return app.bundleName

def _pin_to_shell_dock(self, app_id):
"""Prompt Caberto Shell to add/remove an app to/from the Dock."""
"""Prompt Celeste Shell to add/remove an app to/from the Dock."""
self.emit_signal("__appman_pin", app=app_id)

def __init__(self):
Expand Down
12 changes: 6 additions & 6 deletions game/System/Applications/AppManager.aosapp/ASAppManagerView.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ screen ASAppManagerView():
style_prefix "ASInterface"

python:
apps = CabertoShell.get_all_applications()
apps = CelesteShell.get_all_applications()

default currentAppView = None

Expand Down Expand Up @@ -67,17 +67,17 @@ screen ASAppManagerView():
style "ASAppManager_DetailedAppAuthor_text"
text "Version [currentAppView.bundleVersion] ([currentAppView.bundleId])"
null height 8

hbox:
spacing 8

textbutton "Launch" action Function(currentAppView.applicationWillLaunch):
style "ASInterfacePushButton"

vbox:
style_prefix "ASInterfaceCheckbox"
textbutton "Pin to launcher" action Function(appman._pin_to_shell_dock, app_id=currentAppView.bundleId):
selected caberto.app_exists_in_current_launcher(currentAppView.bundleId)
selected celeste.app_exists_in_current_launcher(currentAppView.bundleId)

null height 8

Expand Down Expand Up @@ -113,14 +113,14 @@ screen ASAppManagerView():
style "ASAppManager_text"
else:
text "This app doesn't require any permissions."

screen ASAppManagerDetailButton(app):
button action SetScreenVariable("currentAppView", app):
ymaximum 56
xsize 300
has hbox:
spacing 8

add app.icons[48]
vbox:
python:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# CabertoDE.rpy
# Caberto Desktop Shell
# CelesteDE.rpy
# Celeste Desktop Shell
#
# (C) 2021 Marquis Kurt. All rights reserved.
#
Expand All @@ -17,15 +17,15 @@ init python:
from os import listdir, path
from time import gmtime, strftime

class CabertoShell(CACoreService):
class CelesteShell(CACoreService):
_wallpaper = AS_LIBRARY_DIR + "Desktop Pictures/Candella.png"
_dock = []
_drawer_open = False
_current_app_name = "Caberto Desktop"
_current_app_name = "Celeste Desktop"
_acct_switcher_open = False

def __init__(self):
CACoreService.__init__(self, AS_CORESERVICES_DIR + "Caberto.aoscservice/")
CACoreService.__init__(self, AS_CORESERVICES_DIR + "Celeste.aoscservice/")
self._acct_mgr = CAAccountsService(self)

self.settings = ServiceStorage(self)
Expand All @@ -40,8 +40,8 @@ init python:
self.settings.commit()
self._wallpaper = self.settings.get_entry("wallpaper", raise_falsy=True)

apps = CabertoShell.get_all_applications()
for app in CabertoShell.get_all_applications():
apps = CelesteShell.get_all_applications()
for app in CelesteShell.get_all_applications():
if not isinstance(app, CAApplication):
clog.warn("%s cannot emit signals and will be ignored.", app.bundleName)
continue
Expand Down Expand Up @@ -87,13 +87,13 @@ init python:
if transient:
renpy.run(
ShowTransient(
"CabertoShellView", wallpaper=self._wallpaper,
"CelesteShellView", wallpaper=self._wallpaper,
apps=apps
)
)
else:
renpy.call_screen(
"CabertoShellView", wallpaper=self._wallpaper,
"CelesteShellView", wallpaper=self._wallpaper,
apps=apps
)
self.serviceDidLaunch()
Expand All @@ -105,7 +105,7 @@ init python:
Arguments:
app_id (str): The bundle ID of the app to launch.
"""
app_target = [app for app in CabertoShell.get_all_applications() if app.bundleId == app_id]
app_target = [app for app in CelesteShell.get_all_applications() if app.bundleId == app_id]
if not app_target:
clog.error("Failed to launch app '%s'", app_id)
app = app_target[0]
Expand All @@ -130,9 +130,9 @@ init python:
self._drawer_open = not self._drawer_open

if self._drawer_open:
renpy.run(ShowTransient("CabertoDrawer"))
renpy.run(ShowTransient("CelesteDrawer"))
else:
renpy.run(Hide("CabertoDrawer"))
renpy.run(Hide("CelesteDrawer"))

def start_acct_manager(self):
"""Call the account switcher dialog."""
Expand All @@ -146,7 +146,7 @@ init python:

self._acct_switcher_open = True
username = renpy.invoke_in_new_context(
renpy.call_screen, "CabertoAccountSwitcher", users=CAAccountsService.get_all_users()
renpy.call_screen, "CelesteAccountSwitcher", users=CAAccountsService.get_all_users()
)
self._acct_switcher_open = False

Expand All @@ -156,8 +156,8 @@ init python:

self._acct_mgr.change_current_user(username)

renpy.run([Hide("CabertoShellView"), Hide("CabertoLauncher")])
clog.debug("Reloading Caberto settings to current user.")
renpy.run([Hide("CelesteShellView"), Hide("CelesteLauncher")])
clog.debug("Reloading Celeste settings to current user.")

self._init_settings()
self.launch(transient=True)
Expand All @@ -184,7 +184,7 @@ init python:

def _get_dock_apps(self, apps):
"""Returns the list of app objects that is in the dock."""
return [app for app in CabertoShell.get_all_applications() if app.bundleId in apps]
return [app for app in CelesteShell.get_all_applications() if app.bundleId in apps]

def _set_wallpaper(self, name):
"""Set the wallpaper and save the preference."""
Expand All @@ -197,7 +197,7 @@ init python:
if "application_launched" in args:
self._current_app_name = kwargs["name"]
elif "application_terminated" in args:
self._current_app_name = "Caberto Desktop"
self._current_app_name = "Celeste Desktop"

# Handle app pinning from the App Manager.
elif "__appman_pin" in args:
Expand All @@ -209,6 +209,6 @@ init python:
self._dock.append(app_id)
self.settings.set_entry("apps_list", self._dock)
self.settings.commit()
renpy.run([Hide("CabertoShellView"), Function(self.launch, transient=True)])
renpy.run([Hide("CelesteShellView"), Function(self.launch, transient=True)])

caberto = CabertoShell()
celeste = CelesteShell()
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# CabertoDrawer.rpy
# Caberto Desktop Shell
# CelesteDrawer.rpy
# Celeste Desktop Shell
#
# (C) 2021 Marquis Kurt. All rights reserved.
#
Expand All @@ -9,11 +9,11 @@
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
#

init screen CabertoDrawer():
style_prefix "CabertoDrawer"
init screen CelesteDrawer():
style_prefix "CelesteDrawer"
modal False

$ all_apps = sorted(caberto.get_all_applications(), key=lambda app: app.get_name() if isinstance(app, CAApplication) else app.bundleName)
$ all_apps = sorted(celeste.get_all_applications(), key=lambda app: app.get_name() if isinstance(app, CAApplication) else app.bundleName)

frame:
xsize 700
Expand All @@ -36,7 +36,7 @@ init screen CabertoDrawer():
_app_name = _app_name[:34] + "..."

button action [
Function(caberto.drawer), Function(caberto.launch_app_bundle, app_bundle=app)
Function(celeste.drawer), Function(celeste.launch_app_bundle, app_bundle=app)
]:
xysize(96, 128)
sensitive True
Expand All @@ -45,21 +45,21 @@ init screen CabertoDrawer():
xfill True
yfill True

add AlphaMask(app.icons[64], caberto.get_app_mask(), xysize=(64, 64)):
add AlphaMask(app.icons[64], celeste.get_app_mask(), xysize=(64, 64)):
xalign 0.5
text "[_app_name]":
xalign 0.5
text_align 0.5



style CabertoDrawer_frame is frame:
style CelesteDrawer_frame is frame:
margin (0, 0)
top_margin 28
left_margin 72
padding(24, 16)
background "#080808EE"

style CabertoDrawer_text is text:
style CelesteDrawer_text is text:
font get_font("Ubuntu", "Regular")
size 16
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# CabertoLauncher.rpy
# Caberto Desktop Shell
# CelesteLauncher.rpy
# Celeste Desktop Shell
#
# (C) 2021 Marquis Kurt. All rights reserved.
#
Expand All @@ -9,10 +9,10 @@
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
#

screen CabertoLauncher(apps):
screen CelesteLauncher(apps):
tag desktop
modal False
style_prefix "CabertoLauncher"
style_prefix "CelesteLauncher"

frame:
yfill True
Expand All @@ -31,19 +31,19 @@ screen CabertoLauncher(apps):
_icon = app.get_app_icon(64) if isinstance(app, CAApplication) else app.icons[64]
_name = app.product_name if isinstance(app, CAApplication) else app.bundleName

button action Function(caberto.launch_app_bundle, app_bundle=app):
button action Function(celeste.launch_app_bundle, app_bundle=app):
xysize (72, 68)
add AlphaMask(_icon, caberto.get_app_mask(), xysize=(64, 64)):
add AlphaMask(_icon, celeste.get_app_mask(), xysize=(64, 64)):
size (60, 60)
xalign 0.5

button action Function(caberto.drawer):
button action Function(celeste.drawer):
ysize 72
add "#FC9856" # TODO: Replace this with the Caberto/Candella logo.
add caberto.bundleDir + "Resources/distributor_logo.png":
add "#FC9856" # TODO: Replace this with the Celeste/Candella logo.
add celeste.bundleDir + "Resources/distributor_logo.png":
align (0.5, 0.5)

style CabertoLauncher_frame is frame:
style CelesteLauncher_frame is frame:
margin (0, 0)
padding (0, 0)
background "#212121EE"
Loading

0 comments on commit 5cd9143

Please sign in to comment.