mirror of
https://github.com/Misterio77/Foundry.git
synced 2026-08-24 02:14:13 -05:00
refactor(projects/gtkhal): rename khora to gtkhal
Assisted-by: pi (gpt-5.6-sol)
This commit is contained in:
+1
-1
@@ -7,7 +7,7 @@
|
||||
jellysearch = pkgs.callPackage ./jellysearch {};
|
||||
website = pkgs.callPackage ../projects/website {};
|
||||
runelite-mcp = pkgs.callPackage ../projects/runelite-mcp {};
|
||||
khora = pkgs.callPackage ../projects/khora {};
|
||||
gtkhal = pkgs.callPackage ../projects/gtkhal {};
|
||||
runescape = pkgs.callPackage ./runescape {};
|
||||
|
||||
# Personal scripts
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
use flake .#gtkhal
|
||||
@@ -1,13 +1,13 @@
|
||||
# Khora
|
||||
# gtkhal
|
||||
|
||||
Khora is a graphical calendar for local
|
||||
gtkhal is a graphical calendar for local
|
||||
[vdirs](https://vdirsyncer.pimutils.org/). It uses khal for configuration,
|
||||
indexing, recurrence expansion, and iCalendar semantics; vdirsyncer remains in
|
||||
charge of talking to CalDAV servers.
|
||||
|
||||
## Status
|
||||
|
||||
Khora is an early, read-only prototype. It currently provides:
|
||||
gtkhal is an early, read-only prototype. It currently provides:
|
||||
|
||||
- a native GTK 4/libadwaita interface;
|
||||
- calendar discovery from the existing khal configuration;
|
||||
@@ -18,7 +18,7 @@ Khora is an early, read-only prototype. It currently provides:
|
||||
- explicit refreshes of khal's local index.
|
||||
|
||||
Event creation and editing come next. The khal dependency is isolated in
|
||||
`khora.khal_adapter` so its internal API can change without leaking through the
|
||||
`gtkhal.khal_adapter` so its internal API can change without leaking through the
|
||||
application.
|
||||
|
||||
## Development
|
||||
@@ -26,18 +26,18 @@ application.
|
||||
Build and run it from the Foundry root:
|
||||
|
||||
```sh
|
||||
nix build .#khora
|
||||
nix run .#khora
|
||||
nix build .#gtkhal
|
||||
nix run .#gtkhal
|
||||
```
|
||||
|
||||
For a faster development loop, enter `projects/khora` and let direnv load its
|
||||
Khora development shell, then run the source tree directly:
|
||||
For a faster development loop, enter `projects/gtkhal` and let direnv load its
|
||||
gtkhal development shell, then run the source tree directly:
|
||||
|
||||
```sh
|
||||
python -m khora
|
||||
python -m gtkhal
|
||||
```
|
||||
|
||||
Khora reads the same XDG configuration and vdirs as khal. It does not configure
|
||||
gtkhal reads the same XDG configuration and vdirs as khal. It does not configure
|
||||
accounts or perform network synchronization.
|
||||
|
||||
## Keyboard shortcuts
|
||||
@@ -1,4 +1,4 @@
|
||||
# Khora roadmap
|
||||
# gtkhal roadmap
|
||||
|
||||
Planned improvements, ordered roughly from least to most implementation complexity.
|
||||
The order reflects engineering dependencies rather than product priority.
|
||||
@@ -30,4 +30,4 @@ The order reflects engineering dependencies rather than product priority.
|
||||
13. **Advanced recurrence editor** — expose richer RFC 5545 recurrence rules,
|
||||
exceptions, and occurrence-level changes.
|
||||
14. **Optional synchronization actions** — run vdirsyncer explicitly and show
|
||||
progress/errors without making network synchronization Khora's default job.
|
||||
progress/errors without making network synchronization gtkhal's default job.
|
||||
@@ -1,8 +1,8 @@
|
||||
[Desktop Entry]
|
||||
Name=Khora
|
||||
Name=gtkhal
|
||||
Comment=View calendars stored in local vdirs
|
||||
Exec=khora
|
||||
Icon=rs.m7.Khora
|
||||
Exec=gtkhal
|
||||
Icon=rs.m7.Gtkhal
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Office;Calendar;
|
||||
|
Before Width: | Height: | Size: 541 B After Width: | Height: | Size: 541 B |
@@ -9,7 +9,7 @@
|
||||
wrapGAppsHook4,
|
||||
}:
|
||||
python3Packages.buildPythonApplication {
|
||||
pname = "khora";
|
||||
pname = "gtkhal";
|
||||
version = "0.1.0";
|
||||
pyproject = true;
|
||||
|
||||
@@ -19,7 +19,7 @@ python3Packages.buildPythonApplication {
|
||||
./data
|
||||
./README.md
|
||||
./pyproject.toml
|
||||
./khora
|
||||
./gtkhal
|
||||
./tests
|
||||
];
|
||||
};
|
||||
@@ -45,17 +45,17 @@ python3Packages.buildPythonApplication {
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
install -Dm644 data/rs.m7.Khora.desktop \
|
||||
$out/share/applications/rs.m7.Khora.desktop
|
||||
install -Dm644 data/rs.m7.Khora.svg \
|
||||
$out/share/icons/hicolor/scalable/apps/rs.m7.Khora.svg
|
||||
install -Dm644 data/rs.m7.Gtkhal.desktop \
|
||||
$out/share/applications/rs.m7.Gtkhal.desktop
|
||||
install -Dm644 data/rs.m7.Gtkhal.svg \
|
||||
$out/share/icons/hicolor/scalable/apps/rs.m7.Gtkhal.svg
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Graphical calendar for local vdirs";
|
||||
homepage = "https://github.com/misterio77/Foundry/tree/main/projects/khora";
|
||||
homepage = "https://github.com/misterio77/Foundry/tree/main/projects/gtkhal";
|
||||
license = lib.licenses.bsd2;
|
||||
mainProgram = "khora";
|
||||
mainProgram = "gtkhal";
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
"""gtkhal, a graphical calendar for local vdirs."""
|
||||
|
||||
__version__ = "0.1.0"
|
||||
@@ -10,12 +10,12 @@ gi.require_version("Gtk", "4.0")
|
||||
from gi.repository import Adw, Gdk, Gio, GLib, Gtk
|
||||
|
||||
from .khal_adapter import KhalRepository
|
||||
from .window import KhoraWindow
|
||||
from .window import GtkhalWindow
|
||||
|
||||
|
||||
class KhoraApplication(Adw.Application):
|
||||
class GtkhalApplication(Adw.Application):
|
||||
def __init__(self) -> None:
|
||||
super().__init__(application_id="rs.m7.Khora", flags=Gio.ApplicationFlags.DEFAULT_FLAGS)
|
||||
super().__init__(application_id="rs.m7.Gtkhal", flags=Gio.ApplicationFlags.DEFAULT_FLAGS)
|
||||
self._interface_settings: Gio.Settings | None = None
|
||||
self._appearance_source = 0
|
||||
self._gtk_css_monitor: Gio.FileMonitor | None = None
|
||||
@@ -250,9 +250,9 @@ class KhoraApplication(Adw.Application):
|
||||
except Exception as caught:
|
||||
repository = None
|
||||
error = str(caught)
|
||||
window = KhoraWindow(self, repository, error)
|
||||
window = GtkhalWindow(self, repository, error)
|
||||
window.present()
|
||||
|
||||
|
||||
def main() -> int:
|
||||
return KhoraApplication().run(sys.argv)
|
||||
return GtkhalApplication().run(sys.argv)
|
||||
@@ -18,7 +18,7 @@ class UiState:
|
||||
class StateStore:
|
||||
def __init__(self, path: Path | None = None) -> None:
|
||||
state_home = Path(os.environ.get("XDG_STATE_HOME", Path.home() / ".local/state"))
|
||||
self.path = path or state_home / "khora" / "state.json"
|
||||
self.path = path or state_home / "gtkhal" / "state.json"
|
||||
|
||||
def load(self) -> UiState:
|
||||
try:
|
||||
@@ -65,7 +65,7 @@ class EventLayer(Gtk.Fixed):
|
||||
return GLib.SOURCE_CONTINUE
|
||||
|
||||
|
||||
class KhoraWindow(Adw.ApplicationWindow):
|
||||
class GtkhalWindow(Adw.ApplicationWindow):
|
||||
def __init__(
|
||||
self,
|
||||
application: Adw.Application,
|
||||
@@ -73,7 +73,7 @@ class KhoraWindow(Adw.ApplicationWindow):
|
||||
error: str | None = None,
|
||||
state_store: StateStore | None = None,
|
||||
) -> None:
|
||||
super().__init__(application=application, title="Khora")
|
||||
super().__init__(application=application, title="gtkhal")
|
||||
self.set_default_size(1280, 800)
|
||||
self._repository = repository
|
||||
self._state_store = state_store or StateStore()
|
||||
@@ -3,7 +3,7 @@ requires = ["setuptools>=77"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "khora-calendar"
|
||||
name = "gtkhal"
|
||||
version = "0.1.0"
|
||||
description = "A graphical calendar for local vdirs"
|
||||
readme = "README.md"
|
||||
@@ -15,10 +15,10 @@ dependencies = [
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
khora = "khora.application:main"
|
||||
gtkhal = "gtkhal.application:main"
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
include = ["khora*"]
|
||||
include = ["gtkhal*"]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = ["tests"]
|
||||
@@ -1,4 +1,4 @@
|
||||
from khora.colors import contrasting_foreground, display_color
|
||||
from gtkhal.colors import contrasting_foreground, display_color
|
||||
|
||||
|
||||
def test_preserves_html_colors() -> None:
|
||||
+1
-1
@@ -2,7 +2,7 @@ import datetime as dt
|
||||
from pathlib import Path
|
||||
from types import SimpleNamespace
|
||||
|
||||
from khora.khal_adapter import KhalRepository
|
||||
from gtkhal.khal_adapter import KhalRepository
|
||||
|
||||
|
||||
def test_calendar_accounts_come_from_their_parent_directory() -> None:
|
||||
@@ -1,6 +1,6 @@
|
||||
import datetime as dt
|
||||
|
||||
from khora.model import (
|
||||
from gtkhal.model import (
|
||||
Event,
|
||||
event_slot_range,
|
||||
layout_event_lanes,
|
||||
@@ -1,4 +1,4 @@
|
||||
from khora.state import StateStore, UiState
|
||||
from gtkhal.state import StateStore, UiState
|
||||
|
||||
|
||||
def test_round_trips_ui_state(tmp_path) -> None:
|
||||
@@ -1 +0,0 @@
|
||||
use flake .#khora
|
||||
@@ -1,3 +0,0 @@
|
||||
"""Khora, a graphical calendar for local vdirs."""
|
||||
|
||||
__version__ = "0.1.0"
|
||||
Reference in New Issue
Block a user