<commit_before>;;; feature-workspaces.el --- Workspaces

;;; Commentary:
;; Your very own workspace.

;;; Code:
;; base.el vars
(defvar my-cache-dir nil)

;;;
;; Packages
(use-package persp-mode :demand t
  :commands (persp-mode persp-switch)
  :init
  (setq-default persp-keymap-prefix (kbd "C-c W"))
  :config
  (setq persp-autokill-buffer-on-remove 'kill-weak
        persp-nil-name "main"
        persp-nil-hidden t
        persp-auto-save-fname "autosave"
        persp-save-dir (concat my-cache-dir "workspaces/")
        persp-remove-buffers-from-nil-persp-behaviour nil
        ;; Auto-load on startup
        persp-auto-resume-time (if (daemonp) 3.0 -1)
        ;; Auto-save on kill
        persp-auto-save-opt (daemonp))

  ;; Don't shorten perspective name
  (setq persp-lighter
        '(:eval
          (format
           (propertize
            " #%s"
            'face (let ((persp (get-current-persp)))
                    (if persp
                        (if (persp-contain-buffer-p (current-buffer) persp)
                            'persp-face-lighter-default
                          'persp-face-lighter-buffer-not-in-persp)
                      'persp-face-lighter-nil-persp)))
           (safe-persp-name (get-current-persp)))))

  (add-hook 'after-init-hook
            #'(lambda ()
                (if (or (display-graphic-p) (daemonp))
                    (persp-mode +1)
                  (add-hook 'after-make-frame-functions #'persp-mode)))))<commit_msg>feature: fix workspaces auto-save config<commit_after>;;; feature-workspaces.el --- Workspaces

;;; Commentary:
;; Your very own workspace.

;;; Code:
;; base.el vars
(defvar my-cache-dir nil)

;;;
;; Packages
(use-package persp-mode :demand t
  :commands (persp-mode persp-switch)
  :init
  (setq-default persp-keymap-prefix (kbd "C-c W"))
  :config
  (setq persp-autokill-buffer-on-remove 'kill-weak
        persp-nil-name "main"
        persp-nil-hidden t
        persp-auto-save-fname "autosave"
        persp-save-dir (concat my-cache-dir "workspaces/")
        persp-remove-buffers-from-nil-persp-behaviour nil
        ;; Auto-load on startup
        persp-auto-resume-time (if (daemonp) 3.0 -1)
        ;; Auto-save on kill
        persp-auto-save-opt (if (daemonp) 1 0))

  ;; Don't shorten perspective name
  (setq persp-lighter
        '(:eval
          (format
           (propertize
            " #%s"
            'face (let ((persp (get-current-persp)))
                    (if persp
                        (if (persp-contain-buffer-p (current-buffer) persp)
                            'persp-face-lighter-default
                          'persp-face-lighter-buffer-not-in-persp)
                      'persp-face-lighter-nil-persp)))
           (safe-persp-name (get-current-persp)))))

  (add-hook 'after-init-hook
            #'(lambda ()
                (if (or (display-graphic-p) (daemonp))
                    (persp-mode +1)
                  (add-hook 'after-make-frame-functions #'persp-mode)))))
{'fraction_non_alphanumeric': 0.14162234042553193, 'fraction_numerical': 0.003324468085106383, 'mean_word_length': 1.7990697674418605, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1178280', 'n_tokens_mistral': 1043, 'n_tokens_neox': 1005, 'n_words': 194}