mirror of
https://github.com/Misterio77/Foundry.git
synced 2026-08-24 10:04:09 -05:00
feat(home/calendar): split import and viewer handlers
Add khal-import.desktop for interactive text/calendar imports. Associate pkgs.khal's existing khal.desktop, which launches ikhal, with x-scheme-handler/calendar and use that handler from Waybar. Assisted-by: pi (gpt-5.6-sol)
This commit is contained in:
@@ -226,7 +226,7 @@ in {
|
|||||||
};
|
};
|
||||||
on-click = mkScript {
|
on-click = mkScript {
|
||||||
deps = [pkgs.handlr-regex];
|
deps = [pkgs.handlr-regex];
|
||||||
script = "handlr launch text/calendar";
|
script = "handlr launch x-scheme-handler/calendar";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"custom/gpg-status" = {
|
"custom/gpg-status" = {
|
||||||
|
|||||||
@@ -1,11 +1,23 @@
|
|||||||
{
|
{
|
||||||
# Set as default calendar handler
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
# Import calendar files interactively in a terminal
|
||||||
|
xdg.desktopEntries.khal-import = {
|
||||||
|
name = "Import calendar event";
|
||||||
|
exec = "${lib.getExe' config.programs.khal.package "khal"} import %f";
|
||||||
|
terminal = true;
|
||||||
|
noDisplay = true;
|
||||||
|
mimeType = ["text/calendar"];
|
||||||
|
};
|
||||||
|
|
||||||
xdg.mimeApps = {
|
xdg.mimeApps = {
|
||||||
associations.added = {
|
# pkgs.khal's desktop entry launches ikhal but declares no MIME types
|
||||||
"text/calendar" = "khal.desktop";
|
associations.added."x-scheme-handler/calendar" = "khal.desktop";
|
||||||
};
|
|
||||||
defaultApplications = {
|
defaultApplications = {
|
||||||
"text/calendar" = "khal.desktop";
|
"text/calendar" = "khal-import.desktop";
|
||||||
|
"x-scheme-handler/calendar" = "khal.desktop";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user