Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different colors for different calendar org files? #115

Open
fgilbert68 opened this issue Oct 18, 2018 · 3 comments
Open

Different colors for different calendar org files? #115

fgilbert68 opened this issue Oct 18, 2018 · 3 comments

Comments

@fgilbert68
Copy link

Hi,

Not really an issue, rather a request for advice for something tricky I want to do.

I fetch my google calendars with org-gcal, resulting in ~10 files named something like google-calendar-xxx.org.
I would like each calendar to appear with a different color.
I found some code in calfw-org.el like cfw:org-create-source using a color argument, or defaulting to the SeaGreen4 default color.

Ideally I would like to call cfw:org-create-source with a different color value for each file, but inserting here some switch along file names looks ugly. Or maybe doing it where cfw:org-create-source is called, but I was not able to find where that happens, and that would be rather ugly too.

Any idea how to do that in some clean manner, preferably by adding code to .emacs rather than patching calfw-org.el ?

@azzamsa
Copy link

azzamsa commented Jun 6, 2019

You mean "I would like each calendar to appear with a different color."?

Here is mine:

(defun my-calendar ()
    (interactive)
    (cfw:open-calendar-buffer
     :contents-sources
     (list
      (cfw:org-create-source "#e0a899")  ; orgmode source
      (cfw:cal-create-source "#ffffba")
      (cfw:org-create-file-source "Success" my-success-cal "#baffc9")
      (cfw:org-create-file-source "Success Atom" my-success-atom-cal "#E3FFE9")
      (cfw:org-create-file-source "Moment" my-moment-cal "#bae1ff")
      (cfw:org-create-file-source "Target" my-target-cal "#40e0d0")
      (cfw:org-create-file-source "Hevent" my-hevent-cal "#ffb3ba"))))

@Ypot
Copy link

Ypot commented Sep 27, 2019

You mean "I would like each calendar to appear with a different color."?

Here is mine:

(defun my-calendar ()
    (interactive)
    (cfw:open-calendar-buffer
     :contents-sources
     (list
      (cfw:org-create-source "#e0a899")  ; orgmode source
      (cfw:cal-create-source "#ffffba")
      (cfw:org-create-file-source "Success" my-success-cal "#baffc9")
      (cfw:org-create-file-source "Success Atom" my-success-atom-cal "#E3FFE9")
      (cfw:org-create-file-source "Moment" my-moment-cal "#bae1ff")
      (cfw:org-create-file-source "Target" my-target-cal "#40e0d0")
      (cfw:org-create-file-source "Hevent" my-hevent-cal "#ffb3ba"))))

Hi.
What do these lines mean?


 (cfw:org-create-source "yellow")  ; orgmode source
      (cfw:cal-create-source "yellow")

I have tried to add them to my .emacs, to see if I can achieve this but I can't :s (newbie as hell here I am):

(defun my-calendar ()
    (interactive)
    (cfw:open-calendar-buffer
     :contents-sources
     (list
      (cfw:org-create-source "yellow")  ; orgmode source
      (cfw:cal-create-source "yellow")
     )))

@azzamsa
Copy link

azzamsa commented Sep 30, 2019

This is my calfw config for now.

my-sucess-cal, my-moment-cal, etc. are just the variable which value is a path to my org files

e.g

(defvar my-moment-cal "cal/moment-cal.org")
(defvar my-success-cal "success-cal.org")
(defvar my-success-atom-cal "success-atom-cal.org")

You can put the path to your org files directly:

 (cfw:org-create-file-source "Success" "my-success-cal.org" "#baffc9")
 (cfw:org-create-file-source "Success Atom" "my-success-atom-cal.org" "#E3FFE9")

Feel free to ask if something wrong with your calwf config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants