--- /dev/null
+;; Copyright (C) 2018 Thomas Balzer
+
+;; This file is part of tomd.
+
+;; tomd is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; tomd is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with tomd. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (tomd job)
+ #:use-module (srfi srfi-9)
+ #:export (create-job make-job
+ job-command-line
+ job-args
+ job-start-trigger
+ job-end-trigger))
+
+;;; records
+(define-record-type <job>
+ (make-job command-line args start-trigger end-trigger)
+ job?
+ (command-line job-command-line)
+ (args job-args)
+ (start-trigger job-start-trigger)
+ (end-trigger job-end-trigger))
+
+;;; functions
+(define (get-keyword-value args keyword default)
+ (let ((keyword-value (memq keyword args)))
+ (if (and keyword-value (>= (length keyword-value) 2))
+ (cadr keyword-value)
+ default)))
+
+(define (create-job . rest)
+ (let ((command-line (get-keyword-value rest #:command-line #f))
+ (args (get-keyword-value rest #:args (list)))
+ (start-trigger (get-keyword-value rest #:start-trigger 'login))
+ (end-trigger (get-keyword-value rest #:end-trigger #f)))
+ ;; do thing with keyword-ed variables
+ (display "settings:") (newline)
+ (format (current-output-port)
+ "command-line:~a" command-line)
+ (newline)
+ (format (current-output-port)
+ "args:~a" args)
+ (newline)
+ (format (current-output-port)
+ "start-trigger:~a" start-trigger)
+ (newline)
+ (format (current-output-port)
+ "end-trigger:~a" end-trigger)
+ (newline)
+
+ ;; create a new object that represents the args given.
+ (make-job command-line
+ args
+ start-trigger
+ end-trigger)
+ ))
--- /dev/null
+;; Copyright (C) 2018 Thomas Balzer
+
+;; This file is part of tomd.
+
+;; tomd is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; tomd is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with tomd. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (tomd)
+ ;; #:use-modules (thing)
+ )
--- /dev/null
+/* Copyright (C) 2018 Thomas Balzer */
+
+/* This file is part of tomd. */
+
+/* tomd is free software: you can redistribute it and/or modify */
+/* it under the terms of the GNU General Public License as published by */
+/* the Free Software Foundation, either version 3 of the License, or */
+/* (at your option) any later version. */
+
+/* tomd is distributed in the hope that it will be useful, */
+/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
+/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
+/* GNU General Public License for more details. */
+
+/* You should have received a copy of the GNU General Public License */
+/* along with tomd. If not, see <http://www.gnu.org/licenses/>. */
+
+void load
--- /dev/null
+/* Copyright (C) 2018 Thomas Balzer */
+
+/* This file is part of tomd. */
+
+/* tomd is free software: you can redistribute it and/or modify */
+/* it under the terms of the GNU General Public License as published by */
+/* the Free Software Foundation, either version 3 of the License, or */
+/* (at your option) any later version. */
+
+/* tomd is distributed in the hope that it will be useful, */
+/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
+/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
+/* GNU General Public License for more details. */
+
+/* You should have received a copy of the GNU General Public License */
+/* along with tomd. If not, see <http://www.gnu.org/licenses/>. */
+
+#define DEFAULT_INIT_DIR "~/.config/tomd/init
+
+static void run_init(void)
+{
+ /* load all recognized files in the init directory */
+ /* check for a manifest (defines run order) */
+ /* loop through the manifest */
+}
--- /dev/null
+/* Copyright (C) 2018 Thomas Balzer */
+
+/* This file is part of tomd. */
+
+/* tomd is free software: you can redistribute it and/or modify */
+/* it under the terms of the GNU General Public License as published by */
+/* the Free Software Foundation, either version 3 of the License, or */
+/* (at your option) any later version. */
+
+/* tomd is distributed in the hope that it will be useful, */
+/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
+/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
+/* GNU General Public License for more details. */
+
+/* You should have received a copy of the GNU General Public License */
+/* along with tomd. If not, see <http://www.gnu.org/licenses/>. */
+
+
+
+static void load_manifest(const char const *manifest_path)
+{
+
+}