Skip to content

Commit

Permalink
tweak(window): cleanup irrelevant code
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Nov 18, 2023
1 parent 28f5f4f commit b39dfd2
Showing 1 changed file with 14 additions and 26 deletions.
40 changes: 14 additions & 26 deletions modules/me-window.el
Original file line number Diff line number Diff line change
Expand Up @@ -54,32 +54,20 @@
(reusable-frames . visible) ;;
(window-height . 0.3)))

(setq frame-title-format
'(""
(:eval
(if (and
(bound-and-true-p org-roam-directory)
(string-prefix-p
(expand-file-name org-roam-directory)
(expand-file-name (or buffer-file-name ""))))
(replace-regexp-in-string ".*/[0-9]*-?" ""
(subst-char-in-string ?_ ?\s buffer-file-name))
"%b"))
(:eval
(let ((proj
(ignore-errors
(cond
((featurep 'projectile)
(projectile-project-name))
(t
(or
(project-name (project-current))
(file-name-nondirectory
(string-trim-right (expand-file-name (vc-root-dir)) "/"))))))))
(concat
(if (buffer-modified-p) "" "")
(when (and proj (not (string= proj "-")))
(format " %s" proj)))))))
(setq
frame-title-format
'(""
(:eval
(let ((proj
(ignore-errors
(cond
((featurep 'projectile) (projectile-project-name))
(t (or
(project-name (project-current))
(file-name-nondirectory (string-trim-right (expand-file-name (vc-root-dir)) "/"))))))))
(concat
(if (buffer-modified-p) "" "")
(when (and proj (not (string= proj "-"))) (format " %s" proj)))))))

;; Adapted from: github.com/Phundrak/dotfiles/blob/master/org/config/emacs.org
(with-eval-after-load 'hydra
Expand Down

0 comments on commit b39dfd2

Please sign in to comment.