tool bar icons
This commit is contained in:
@@ -220,7 +220,7 @@
|
||||
;;; Require
|
||||
(require 'cl-lib)
|
||||
(require 'subr-x)
|
||||
(require 'battery)
|
||||
;; (require 'battery) ;; moved inside `awesome-tray-module-battery-info' to reduce loading time ~0.03s
|
||||
(require 'timer)
|
||||
(require 'minibuffer)
|
||||
(require 'overlay)
|
||||
@@ -330,7 +330,8 @@ If nil, don't update the awesome-tray automatically."
|
||||
|
||||
(defcustom awesome-tray-active-modules
|
||||
'("location" "belong" "file-path" "mode-name" "battery" "date")
|
||||
"Default active modules."
|
||||
"Default active modules.
|
||||
See available modules in `awesome-tray-module-alist'."
|
||||
:type 'list
|
||||
:group 'awesome-tray)
|
||||
|
||||
@@ -772,6 +773,7 @@ Requires `anzu', also `evil-anzu' if using `evil-mode' for compatibility with
|
||||
""))
|
||||
|
||||
(defun awesome-tray-module-battery-info ()
|
||||
(require 'battery)
|
||||
(let ((current-seconds (awesome-tray-current-seconds)))
|
||||
(if (> (- current-seconds awesome-tray-battery-status-last-time) awesome-tray-battery-update-duration)
|
||||
(let* ((battery-info (funcall battery-status-function))
|
||||
@@ -1011,7 +1013,7 @@ Requires `anzu', also `evil-anzu' if using `evil-mode' for compatibility with
|
||||
(when (and (> (point) (treesit-node-start node))
|
||||
(< (point) (treesit-node-end node)))
|
||||
(throw 'found (treesit-node-text node))))
|
||||
(t
|
||||
(_ ;; replace t with _
|
||||
(when (and (> (point) (treesit-node-start (treesit-node-parent node)))
|
||||
(< (point) (treesit-node-end (treesit-node-parent node))))
|
||||
(throw 'found (treesit-node-text node)))))))
|
||||
@@ -1029,7 +1031,7 @@ Requires `anzu', also `evil-anzu' if using `evil-mode' for compatibility with
|
||||
(when (and (> (point) (treesit-node-start (treesit-node-parent node)))
|
||||
(< (point) (treesit-node-end (treesit-node-parent node))))
|
||||
(throw 'found (treesit-node-text node))))
|
||||
(t
|
||||
(_ ;; replace t with _
|
||||
(when (and (> (point) (treesit-node-start (treesit-node-parent node)))
|
||||
(< (point) (treesit-node-end (treesit-node-parent node))))
|
||||
(throw 'found (treesit-node-text node)))))))
|
||||
|
||||
Reference in New Issue
Block a user