Skip to content

Commit

Permalink
rust的emacs beacon已完成!
Browse files Browse the repository at this point in the history
  • Loading branch information
lynnux committed Apr 30, 2022
1 parent 5317700 commit 4e39e52
Showing 1 changed file with 23 additions and 19 deletions.
42 changes: 23 additions & 19 deletions settings/package_extra.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;; Time-stamp: <2022-04-29 17:52:30 lynnux>
;; Time-stamp: <2022-04-30 16:21:03 lynnux>
;; 非官方自带packages的设置
;; benchmark: 使用profiler-start和profiler-report来查看会影响emacs性能,如造成卡顿的命令等
;; 拖慢gui测试:C-x 3开两个窗口,打开不同的buffer,C-s搜索可能出现比较多的词,测试出doom modeline和tabbar ruler比较慢
Expand Down Expand Up @@ -1969,25 +1969,28 @@ _q_uit


(ignore-errors (module-load
"H:\\prj\\rust\\emacs-beacon\\target\\debug\\emacs_beacon.dll"
;; (expand-file-name "~/.emacs.d/bin/pop_select.dll")
(expand-file-name "~/.emacs.d/bin/emacs_beacon.dll")
))

(use-package beacon
:defer 1.5
:init
;; (setq beacon-blink-when-focused t)
:config
(beacon-mode 1)
(defun beacon-blink() (interactive)
(when (fboundp 'emacs-beacon/beacon)
(let ((p (window-absolute-pixel-position)))
(emacs-beacon/beacon (car p) (cdr p) 5000 1)
)
)
;; 打算弄个emacs module专门来画,这样低配机就不卡了
;; (message (format "%d"(car (window-absolute-pixel-position))))
)
(when (fboundp 'emacs-beacon/set-window-parameters)
;; 51afef
(emacs-beacon/set-window-parameters 300 20 #x51 #xaf #xef 50)
(use-package beacon
:defer 1.5
:init
(setq beacon-blink-when-focused t)
(setq beacon-blink-delay 0.01)
(setq beacon-blink-duration 0.2)
:config
(beacon-mode 1)

(defun beacon-blink() (interactive)
(when (fboundp 'emacs-beacon/beacon)
(let ((p (window-absolute-pixel-position)))
(emacs-beacon/beacon (car p) ; x
(cdr p) ; y
(truncate (* beacon-blink-duration 1000)) ; timer
(truncate (* beacon-blink-delay 1000)) ; delay
)))))
)

;; 好的theme特点:
Expand All @@ -2005,6 +2008,7 @@ _q_uit
(use-package all-the-icons
:load-path "~/.emacs.d/themes/all-the-icons.el-master"
:defer t

)
;; treemacs-icons-dired那个当设置doom-colors时有时不显示
(use-package all-the-icons-dired
Expand Down

0 comments on commit 4e39e52

Please sign in to comment.