updates to bindings and stuff

This commit is contained in:
Matt Nish-Lapidus 2023-06-02 12:04:53 -04:00
parent c537b41a9e
commit 42ec7345d3
4 changed files with 48 additions and 33 deletions

View file

@ -35,8 +35,18 @@
;; set default frame size on launch
(setq default-frame-alist '( (left . 0) (top . 0) (height . 48) (width . 160) ))
;; fixing compat issue for corfu in emacs28
;; (defalias 'compat-string-width 'string-width)
(defun mnl/frame-center ()
"Center the current frame."
(interactive)
(let* ((dw (display-pixel-width))
(dh (display-pixel-height))
(f (selected-frame))
(fw (frame-pixel-width f))
(fh (frame-pixel-height f))
(x (- (/ dw 2) (/ fw 2)))
(y (- (/ dh 2) (/ fh 2))))
(message (format "dw %d dh %d fw %d fh %d x %d y %d" dw dh fw fh x y))
(set-frame-position f x y)))
;; some global settings
(setq tab-always-indent t) ; don't autocomplete with tab
@ -69,8 +79,9 @@
;; import all my customized keybindings based on doom evil mode, but without evil.
(load! "bindings.el")
(setq treemacs-follow-mode t)
(setq treemacs-project-follow-mode t)
(after! treemacs
(setq treemacs-follow-mode t)
(setq treemacs-project-follow-mode t))
;; smart tabs set modes
(after! smart-tabs-mode
@ -163,4 +174,10 @@
;; tidal cycles!
(setq tidal-boot-script-path "~/.cabal/share/aarch64-osx-ghc-9.4.2/tidal-1.9.3/BootTidal.hs")
(defvar company-backends '())
(load! "obsidian-config.el")
(add-hook 'window-setup-hook #'mnl/frame-center)
(server-start)