From b4ce4be870191616cb638c5df21042ed4cc1fc7b Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Wed, 2 Sep 2026 00:29:31 +0530 Subject: feat(office/calcurse): added configuration --- modules/office/calcurse/conf | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 modules/office/calcurse/conf (limited to 'modules/office/calcurse/conf') diff --git a/modules/office/calcurse/conf b/modules/office/calcurse/conf new file mode 100644 index 0000000..79e3189 --- /dev/null +++ b/modules/office/calcurse/conf @@ -0,0 +1,42 @@ +# Appearance +appearance.calendarview=monthly +appearance.compactpanels=no +appearance.defaultpanel=calendar +appearance.layout=1 +appearance.headerline=yes +appearance.eventseparator=yes +appearance.dayseparator=yes +appearance.emptyline=yes +appearance.emptyday=-- +appearance.notifybar=yes +appearance.sidebarwidth=0 +appearance.theme=green on black +appearance.todoview=hide-completed +appearance.headingpos=right-justified + +# Daemon +daemon.enable=no +daemon.log=no + +# Format +format.inputdate=1 +format.notifydate=%a %F +format.notifytime=%T +format.appointmenttime=%H:%M +format.outputdate=%D +format.dayheading=%B %e, %Y + +# General +general.autogc=no +general.autosave=yes +general.confirmdelete=yes +general.confirmquit=yes +general.firstdayofweek=monday +general.multipledays=yes +general.periodicsave=0 +general.systemevents=yes + +# Notification +notification.warning=300 +notification.command=printf '\a' +notification.notifyall=flagged-only -- cgit v1.2.3 From e61d4b9a561893ad1cc4220fa319b1d25287048a Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Wed, 2 Sep 2026 01:13:38 +0530 Subject: feat(office/calcurse): wrapped calcurse with PAGER=nvim, todos show completed - using nvim as the pager for calcurse, seems to work better - now completed todos also appear in the todos section just at the bottom --- modules/office/calcurse/conf | 2 +- modules/office/calcurse/default.nix | 22 ++++++++++++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) (limited to 'modules/office/calcurse/conf') diff --git a/modules/office/calcurse/conf b/modules/office/calcurse/conf index 79e3189..98aa9af 100644 --- a/modules/office/calcurse/conf +++ b/modules/office/calcurse/conf @@ -11,7 +11,7 @@ appearance.emptyday=-- appearance.notifybar=yes appearance.sidebarwidth=0 appearance.theme=green on black -appearance.todoview=hide-completed +appearance.todoview=show-completed appearance.headingpos=right-justified # Daemon diff --git a/modules/office/calcurse/default.nix b/modules/office/calcurse/default.nix index 619ee23..6de00cc 100644 --- a/modules/office/calcurse/default.nix +++ b/modules/office/calcurse/default.nix @@ -5,25 +5,39 @@ pkgs, ... }: +let + calcursePackage = + if config.development.nixvim.enable then + pkgs.symlinkJoin { + name = "calcurse-wrapped"; + paths = [ pkgs.calcurse ]; + nativeBuildInputs = [ pkgs.makeWrapper ]; + postBuild = '' + wrapProgram $out/bin/calcurse --set PAGER "nvim" + ''; + meta = pkgs.calcurse.meta // { + mainProgram = "calcurse"; + }; + } + else + pkgs.calcurse; +in { options.office.calcurse = { enable = lib.mkEnableOption "Enables calcurse."; package = lib.mkOption { type = lib.types.package; readOnly = true; - default = pkgs.calcurse; + default = calcursePackage; description = "The calcurse package to use."; }; }; - config = lib.mkIf config.office.calcurse.enable { home.packages = [ config.office.calcurse.package ]; - xdg.configFile."calcurse/conf" = { source = ./conf; force = true; }; - xdg.configFile."calcurse/keys" = { source = ./keys; force = true; -- cgit v1.2.3