;;; config-frame-title.el --- Generated package (no.9) from my config -*- lexical-binding: t; -*- ;; ;; Copyright (C) 2024 TEC ;; ;; Author: TEC <https://code.tecosaur.net/tec> ;; Maintainer: TEC <contact@tecosaur.net> ;; Created: June 26, 2024 ;; Modified: June 26, 2024 ;; Version: 2024.06.26 ;; Homepage: https://code.tecosaur.net/tec/emacs-config ;; Package-Requires: ((emacs "29.1")) ;; ;; This file is not part of GNU Emacs. ;; ;;; Commentary: ;; ;; Generated package (no.9) from my config. ;; ;; During generation, dependency on other aspects of my configuration and ;; packages is inferred via (regexp-based) static analysis. While this seems ;; to do a good job, this method is imperfect. This code likely depends on ;; utilities provided by Doom, and if you try to run it in isolation you may ;; discover the code makes more assumptions. ;; ;; That said, I've found pretty good results so far. ;; ;;; Code: (setq frame-title-format '("" (:eval (if (string-match-p (regexp-quote (or (bound-and-true-p org-roam-directory) "\u0000")) (or buffer-file-name "")) (replace-regexp-in-string ".*/[0-9]*-?" "☰ " (subst-char-in-string ?_ ?\s buffer-file-name)) "%b")) (:eval (when-let ((project-name (and (featurep 'projectile) (projectile-project-name)))) (unless (string= "-" project-name) (format (if (buffer-modified-p) " ◉ %s" " ● %s") project-name)))))) (provide 'config-frame-title) ;;; config-frame-title.el ends here