Compare commits

...

2 Commits

Author SHA1 Message Date
Sameer Rahmani f913e3fedb
Add the exwm unit and view
ci/woodpecker/push/build Pipeline was successful Details
2023-06-30 19:33:01 +01:00
Sameer Rahmani 534eddec2e
Add the simple location bar 2023-06-30 17:50:21 +01:00
5 changed files with 55 additions and 3 deletions

1
Eldev
View File

@ -1,4 +1,5 @@
; -*- mode: emacs-lisp; lexical-binding: t -*-
(eldev-use-package-archive 'melpa)
(eldev-use-package-archive 'gnu-elpa)
(eldev-add-extra-dependencies 'emacs 'projectile)
(eldev-add-extra-dependencies 'emacs 'all-the-icons)

View File

@ -193,6 +193,34 @@ Emacs knowing."
:var 'noether--git-branch
:fn #'noether--format-git-branch)
;; ============================================================================
;; Exwm input mode
;; ============================================================================
(defvar noether--exwm-input-mode nil)
(defun noether--set-exwm-input-mode ()
"Set the EXWM input mode for the current buffer."
(message "AA %s" exwm--input-mode)
(setq noether--exwm-input-mode (format "%s" exwm--input-mode)))
(defun noether--format-exwm-input-mode (_ v _ _)
"Just return the input mode name V."
v)
(noether-defunit exwm-input-mode-unit
"Show the input mode of EXWM for the current buffer."
:label "I:"
:len 4
:init (lambda ()
(when (featurep 'exwm)
(add-hook 'noether-on-buffer-change-hook #'noether--set-exwm-input-mode)))
:deinit (lambda ()
(when (featurep 'exwm)
(remove-hook 'noether-on-buffer-change-hook #'noether--set-exwm-input-mode)))
:var 'noether--exwm-input-mode
:fn #'noether--format-exwm-input-mode)
(provide 'noether-units)
;;; noether-units.el ends here

View File

@ -71,5 +71,28 @@ Appears on the center of the current window."
(line-unit :label "")))
(noether-defview noether-minimal-exwm
"A super simple bar containing the line number and column number that
Appears on the center of the current window."
:managed? t
:buffer "*exwm-status*"
:binding (kbd "C-c 3")
:separator "|"
:frame
(list
;; Such a big numbers for X and Y will cause the frame to appear on the
;; bottom right corner and covering the minibuffer
:position '(10000 . 10000)
:border-width 0
:timeout 5
:border-color "#bd93f9")
:units
(list
(exwm-input-mode-unit :label "")
(buffer-name-unit :label "")
(time-unit :label "")))
(provide 'noether-views)
;;; noether-views.el ends here

View File

@ -334,8 +334,8 @@ It removes any possible watch function."
(defun noether--disable ()
"Disable noether and clean up after it."
(delete 'window-buffer-change-functions #'noether--buffer-focus-change-runner)
(delete 'window-selection-change-functions #'noether--buffer-focus-change-runner)
(delete #'noether--buffer-focus-change-runner window-buffer-change-functions)
(delete #'noether--buffer-focus-change-runner window-selection-change-functions)
(mapc #'noether--teardown-views noether-views))

View File

@ -74,7 +74,7 @@
:group 'noether)
(setq noether-views (list noether-minimal-mode-line))
(setq noether-views (list noether-minimal-mode-line noether-minimal-location noether-minimal-exwm))
(add-hook
'noether-global-mode-hook