You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
726 B
EmacsLisp

(if (string-equal system-type "android")
(load-file "/storage/emulated/0/Documents/admin/emacs/daysoff.el")
(load-file "~/Documents/drive/admin/emacs/daysoff.el"))
(defcustom workday nil
"Returns true on working days"
:type 'boolean)
(if (equal (format-time-string "%a") "Sat")
(setq workday nil)
(if (equal (format-time-string "%a") "Sun")
(setq workday nil)
(if (member (format-time-string "%Y-%m-%d") daysoff)
(setq workday nil)
(setq workday t))))
(defcustom workhours nil
"Returns true during working hours"
:type 'boolean)
(if workday
(if (< (string-to-number (format-time-string "%H")) 19)
(if (> (string-to-number (format-time-string "%H")) 7)
(setq workhours t))))