summaryrefslogtreecommitdiffhomepage
path: root/init.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-01-23 04:30:16 +0000
committerjao <jao@gnu.org>2022-01-23 04:30:16 +0000
commitc2c3423ae00dc2425cfb9d19b6249a2b0cf33df5 (patch)
tree85790c2af8596620547d1c4f596e555a8b7c7088 /init.org
parent7ce5ab066c39c98b6f385e37c22231569564818b (diff)
downloadelibs-c2c3423ae00dc2425cfb9d19b6249a2b0cf33df5.tar.gz
elibs-c2c3423ae00dc2425cfb9d19b6249a2b0cf33df5.tar.bz2
clean-ups for transients
Diffstat (limited to 'init.org')
-rw-r--r--init.org110
1 files changed, 64 insertions, 46 deletions
diff --git a/init.org b/init.org
index 3ea9614..5d5be7d 100644
--- a/init.org
+++ b/init.org
@@ -473,10 +473,11 @@
jao-exwm-enable~, which calls the function below enabling it. This
function, in turn, loads exwm's configuration from [[./exwm.org][exwm.org]].
#+begin_src emacs-lisp
- (defvar jao-exwm-enabled-p nil)
+ (defvar jao-exwm-enabled nil)
+ (defun jao-exwm-enabled-p () jao-exwm-enabled)
(defun jao-exwm-enable ()
(jao-load-org "exwm.org")
- (setq jao-exwm-enabled-p t)
+ (setq jao-exwm-enabled t)
(display-time-mode -1)
(exwm-enable)
(jao-trisect t))
@@ -1225,7 +1226,7 @@
(jao-afio-setup 'jao-afio--goto-scratch-1 t)
(defun jao-current--frame-id ()
- (propertize (if (and jao-exwm-enabled-p
+ (propertize (if (and (jao-exwm-enabled-p)
(not (bound-and-true-p jao-exwm--use-afio)))
(format "F%s" exwm-workspace-current-index)
(format "%s" (jao-afio-current-no)))
@@ -1493,7 +1494,7 @@
(let ((url (or (car url) (jao-url-around-point))))
(if (not url)
(message "No URL at point")
- (when (and jao-exwm-enabled-p (fboundp 'jao-exwm-firefox))
+ (when (and (jao-exwm-enabled-p) (fboundp 'jao-exwm-firefox))
(jao-exwm-firefox))
(when (and jao-sway-enabled-p (fboundp 'jao-sway-firefox))
(jao-sway-firefox))
@@ -1853,6 +1854,8 @@
(jao-def-exec-in-term "aptitude" "aptitude" (jao-afio--goto-scratch))
(jao-def-exec-in-term "htop" "htop" (jao-afio--goto-scratch))
+ (jao-def-exec-in-term "spt" "spt" (jao-afio--goto-scratch))
+ (jao-def-exec-in-term "ncmpcpp" "ncmpcpp" (jao-afio--goto-scratch))
#+end_src
*** eshell
***** Basic custom
@@ -2091,7 +2094,7 @@
magit-repository-directories
'(("/home/jao/usr/bigml" . 2)
("/home/jao/usr/jao" . 2)
- ("/home/jao/lib" . 2)
+ ("/home/jao/lib/elisp" . 1)
("/usr/local/src" . 1))
magit-save-repository-buffers 'dontask
magit-status-buffer-switch-function 'switch-to-buffer
@@ -2866,14 +2869,20 @@
(interactive)
(jao-buffer-same-mode '(telega-root-mode telega-chat-mode)))
+ (add-to-list 'mct-completion-passlist #'jao-chats-telega)
+
(defun jao-chats-slack ()
(interactive)
(jao-buffer-same-mode 'slack-message-buffer-mode))
+ (add-to-list 'mct-completion-passlist #'jao-chats-slack)
+
(defun jao-chats-irc ()
(interactive)
(jao-buffer-same-mode '(circe-channel-mode circe-query-mode erc-mode)))
+ (add-to-list 'mct-completion-passlist #'jao-chats-irc)
+
#+end_src
* Multimedia
*** mixer
@@ -2943,7 +2952,7 @@
:config
(defun jao-mpris-setup-aliases ()
(setq espotify-play-uri-function #'espotify-play-uri-with-dbus)
- (defalias 'jao-spotify-list 'jao-exwm-ncmpcpp)
+ (defalias 'jao-spotify-list #'jao-term-ncmpcpp)
(defalias 'jao-spotify-lyrics 'jao-show-lyrics)
(defalias 'jao-spotify-toggle #'jao-mpris-play-pause)
(defalias 'jao-spotify-next #'jao-mpris-next)
@@ -2962,8 +2971,8 @@
:config
(defun jao-spt-setup-aliases ()
(setq espotify-play-uri-function #'jao-spt-play-uri)
- (defalias 'jao-spotify-list 'jao-exwm-spt)
- (defalias 'jao-spotify-lyrics 'jao-spt-show-lyrics)
+ (defalias 'jao-spotify-list #'jao-term-spt)
+ (defalias 'jao-spotify-lyrics #'jao-spt-show-lyrics)
(defalias 'jao-spotify-toggle #'jao-spt-toggle)
(defalias 'jao-spotify-next #'jao-spt-next)
(defalias 'jao-spotify-prev #'jao-spt-previous)
@@ -3057,7 +3066,7 @@
(transient-define-prefix jao-transient-spotify ()
[:description
- (lambda () (format "Spotify using %s" (if jao-spt-on "spt" "MPRIS")))
+ (lambda () (format "Spotify using %s\n" (if jao-spt-on "spt" "MPRIS")))
["Search"
("a" "album" jao-spotify-album)
("A" "artist" jao-spotify-artist)
@@ -3071,7 +3080,7 @@
("f" "seek fwd" jao-spotify-seek :transient t)
("F" "seek bwd" jao-spotify-seek-back :transient t)]
["Volume"
- ("u" "" "up" jao-spotify-volume :transient t)
+ ("u" "up" jao-spotify-volume :transient t)
("d" "down" jao-spotify-volume-down :transient t)]
["Browse"
("l" "playing list" jao-spotify-list)
@@ -3110,7 +3119,52 @@
(concat (if jao-random-album-p "dis" "en") "able random album"))
jao-random-album-toggle)]])
+ (global-set-key (kbd "s-m") #'jao-transient-media)
+
#+end_src
+* General transients
+ #+begin_src emacs-lisp
+ (defun jao-list-packages ()
+ (interactive)
+ (jao-afio--goto-scratch-1)
+ (package-list-packages))
+
+ (transient-define-prefix jao-transient-utils ()
+ "Global operations in X11."
+ [["Notes"
+ ("n" "capture note" jao-org-notes-open-or-create)
+ ("/" "search notes" jao-org-notes-open)
+ ("\\" "grep notes" jao-org-notes-grep)]
+ ["Documents" :if window-system
+ ("d" "go to doc" jao-select-pdf)
+ ("D" "open to doc" jao-open-doc)]
+ ["Packages"
+ ("a" "aptitude" jao-term-aptitude)
+ ("l" "packages" jao-list-packages)]
+ ["Monitors"
+ ("p" "htop" jao-term-htop)
+ ("v" "vpn status" jao-mullvad-status)
+ ("T" "telegram rooster" telega)]
+ ["Network"
+ ("S" "ssh" jao-ssh)
+ ("b" "bluetooth" bluetooth-list-devices)
+ ("c" "connect chats" jao-all-chats)]
+ ["Chats"
+ ("t" "telegram" jao-chats-telega)
+ ("s" "slack" jao-chats-slack)
+ ("i" "irc" jao-chats-irc)]
+ ["Windows" :if window-system
+ ("w" "set wallpaper" jao-set-wallpaper)
+ ("W" "set radom wallpaper" jao-set-random-wallpaper)]
+ ["Helpers"
+ ("r" "org reveal" org-reveal)
+ ("k" (lambda () (concat "keyboard" (when (jao-kb-toggled-p) "*")))
+ jao-kb-toggle :if window-system)
+ ("M" (lambda () (concat "minibuffer" (when jao-minibuffer-mode "*")))
+ jao-minibuffer-mode)]])
+
+ (global-set-key (kbd "s-w") #'jao-transient-utils)
+ #+end_src
* Key bindings
#+begin_src emacs-lisp
(global-set-key "\C-cj" #'join-line)
@@ -3119,42 +3173,6 @@
(global-set-key "\C-c\C-z" #'comment-or-uncomment-region)
(global-set-key "\C-z" #'comment-or-uncomment-region)
#+end_src
-*** x11
- #+begin_src emacs-lisp
- (transient-define-prefix jao-transient-x-utils ()
- "Global operations in X11."
- [["Notes"
- ("n" "capture note" jao-org-notes-open-or-create)
- ("/" "search notes" jao-org-notes-open)
- ("\\" "grep notes" jao-org-notes-grep)]
- ["Documents"
- ("d" "go to doc" jao-select-pdf)
- ("D" "open to doc" jao-open-doc)]
- ["Packages"
- ("a" "aptitude" jao-term-aptitude)
- ("l" "packages" list-packages)]
- ["Monitors"
- ("p" "htop" jao-term-htop)
- ("v" "vpn status" jao-mullvad-status)
- ("T" "telegram rooster" telega)]
- ["Network"
- ("S" "ssh" jao-ssh)
- ("b" "bluetooth" bluetooth-list-devices)
- ("c" "connect chats" jao-all-chats)]
- ["Chats"
- ("t" "telegram" jao-chats-telega)
- ("s" "slack" jao-chats-slack)
- ("i" "irc" jao-chats-irc)]
- ["Windows"
- ("w" "set wallpaper" jao-set-wallpaper)
- ("W" "set radom wallpaper" jao-set-random-wallpaper)]
- ["Helpers"
- ("r" "org reveal" org-reveal)
- ("k" (lambda () (concat "keyboard" (when (jao-kb-toggled-p) "*")))
- jao-kb-toggle)
- ("M" (lambda () (concat "minibuffer" (when jao-minibuffer-enabled-p "*")))
- jao-minibuffer-toggle)]])
- #+end_src
* Last minute (post.el)
#+begin_src emacs-lisp
(jao-load-site-el "post")