From 21f49b47388f78a027f8e883abe9835b1ca6e6c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tr=C3=A9meur?= Date: Mon, 13 Jun 2022 22:35:19 +0100 Subject: [PATCH] Add atwork variable --- init.el | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/init.el b/init.el index b2228ba..b8d380d 100644 --- a/init.el +++ b/init.el @@ -23,6 +23,11 @@ (string-equal system-type "darwin") ) +(defun atwork () + "Return true if at work" + (string-equal user-login-name "3055822") + ) + ;; it's not 1986 (prefer-coding-system 'utf-8) @@ -298,7 +303,7 @@ cfw:display-calendar-holidays nil calendar-week-start-day 1)) -(when (islin) +(unless (atwork) (defun org-journal-file-header-func (time) (concat "<" (format-time-string "%Y-%m-%d %a") ">\n\n")) (use-package org-journal @@ -334,12 +339,14 @@ (setq calendar-week-start-day 1) (setq org-agenda-start-on-weekday nil) -(when (islin) +(unless (atwork) (setq org-agenda-files (list "~/Documents/drive/org/calendar" "~/Documents/drive/org/period.org" "~/Documents/drive/org/habit.org"))) -(when (iswin) - (setq org-agenda-files '("~/Documents/drive/org/calendar"))) +(when (atwork) + (setq org-agenda-files (list "~/Documents/drive/org/calendar" + "~/Documents/drive/org/period.org" + "~/Documents/drive/org/acwri.org"))) (setq org-agenda-prefix-format '((todo . "%-2c %b") (tags . "%-2c %b") @@ -472,16 +479,7 @@ (setq initial-major-mode 'org-mode) -(unless (iswin) -(setq initial-scratch-message "\ -# otta nei gen emacs - -")) - -(when (iswin) -(setq initial-scratch-message "\ -# obma emacs war microsoft beistry - -")) +(setq initial-scratch-message + (concat "# emacs " (number-to-string emacs-major-version) " on " (symbol-name system-type) "\n\n")) (org-reload)