From 9a52b6966c161486e2de94d480ed1dbf27f761b7 Mon Sep 17 00:00:00 2001 From: SqrtMinusOne Date: Wed, 9 Aug 2023 14:23:58 +0500 Subject: [PATCH] feat(desktop): proper alpha & regenerate function --- .config/guix/manifests/emacs.scm | 1 + .emacs.d/desktop.el | 3 ++- .emacs.d/init.el | 19 ++++++++++++++---- .tridactylrc | 34 ++++++++++++++++++++++++++++++++ Desktop.org | 5 ++++- Emacs.org | 11 ++++++++--- 6 files changed, 64 insertions(+), 9 deletions(-) create mode 100644 .tridactylrc diff --git a/.config/guix/manifests/emacs.scm b/.config/guix/manifests/emacs.scm index caa93c8..191e922 100644 --- a/.config/guix/manifests/emacs.scm +++ b/.config/guix/manifests/emacs.scm @@ -1,5 +1,6 @@ (specifications->manifest '("emacs" + "texinfo" "the-silver-searcher" "ripgrep" "emacs-vterm" diff --git a/.emacs.d/desktop.el b/.emacs.d/desktop.el index c9489a8..3c06ce3 100644 --- a/.emacs.d/desktop.el +++ b/.emacs.d/desktop.el @@ -589,7 +589,8 @@ _d_: Discord (defun my/exwm-set-alpha (alpha) (setf (alist-get 'alpha default-frame-alist) `(,alpha . ,alpha)) - (set-frame-parameter (selected-frame) 'alpha `(,alpha . ,alpha))) + (cl-loop for frame being the frames + do (set-frame-parameter frame 'alpha `(,alpha . ,alpha)))) (use-package exwm :straight t diff --git a/.emacs.d/init.el b/.emacs.d/init.el index cd3d71d..c9f589e 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -1031,7 +1031,9 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." if (not (or (eq enabled-theme 'my-theme-1) (eq enabled-theme theme))) do (disable-theme enabled-theme)) - (load-theme theme t)) + (load-theme theme t) + (when current-prefix-arg + (my/regenerate-desktop))) (use-package auto-dim-other-buffers :straight t @@ -2355,7 +2357,7 @@ Returns ( . ) or nil." (interactive "aFunction symbol: ") (advice-mapc (lambda (advice _props) (advice-remove sym advice)) sym)) -(add-hook 'inferior-emacs-lisp-mode-hook #'lispy-mode) +(add-hook 'inferior-emacs-lisp-mode-hook #'smartparens-mode) (use-package slime :straight t @@ -4268,7 +4270,12 @@ With ARG, repeats or can move backward if negative." (org-babel-tangle-file "/home/pavel/Console.org") (call-process "xrdb" nil nil nil "-load" "/home/pavel/.Xresources") (call-process "~/bin/polybar.sh") - (call-process "pkill" nil nil nil "dunst")) + (call-process "pkill" nil nil nil "dunst") + (call-process "herd" nil nil nil "restart" "xsettingsd") + (when (fboundp #'my/exwm-set-alpha) + (if (my/light-p) + (my/exwm-set-alpha 100) + (my/exwm-set-alpha 90)))) (let ((folders-file (expand-file-name "folders.el" user-emacs-directory))) (when (file-exists-p folders-file) @@ -6494,7 +6501,11 @@ base toot." (general-define-key :states '(normal) :keymaps 'Info-mode-map - (kbd "RET") 'Info-follow-nearest-node + (kbd "RET") #'Info-follow-nearest-node + "H" #'Info-history-back + "L" #'Info-history-forward + "n" #'Info-search-next + "b" #'Info-search-backward "f" #'ace-link-info) (defun my/man-fix-width (&rest _) diff --git a/.tridactylrc b/.tridactylrc new file mode 100644 index 0000000..32f6dfe --- /dev/null +++ b/.tridactylrc @@ -0,0 +1,34 @@ +sanitize tridactyllocal tridactylsync + +bind gn tabnew +bind gN tabclose + +bind O fillcmdline tabopen + +bind n findnext 1 +bind N findnext -1 +bind F hint -t + +unbind + +set smoothscroll false +set findcase sensitive +colorscheme emacs + +bind j scrollline 3 +bind k scrollline -3 +bind --mode=normal mode ignore +bind --mode=ignore mode normal + +guiset_quiet gui full +guiset_quiet statuspanel left +guiset_quiet navbar none +guiset_quiet tabs always + +set searchurls.g https://google.com/search?q= + +set newtab about:blank + +command fixamo_quiet jsb tri.excmds.setpref("privacy.resistFingerprinting.block_mozAddonManager", "true").then(tri.excmds.setpref("extensions.webextensions.restrictedDomains", '""')) +command fixamo js tri.excmds.setpref("privacy.resistFingerprinting.block_mozAddonManager", "true").then(tri.excmds.setpref("extensions.webextensions.restrictedDomains", '""').then(tri.excmds.fillcmdline_tmp(3000, "Permissions added to user.js. Please restart Firefox to make them take affect."))) +fixamo_quiet diff --git a/Desktop.org b/Desktop.org index eb91263..5c73169 100644 --- a/Desktop.org +++ b/Desktop.org @@ -1196,7 +1196,8 @@ And the EXWM config itself. (defun my/exwm-set-alpha (alpha) (setf (alist-get 'alpha default-frame-alist) `(,alpha . ,alpha)) - (set-frame-parameter (selected-frame) 'alpha `(,alpha . ,alpha))) + (cl-loop for frame being the frames + do (set-frame-parameter frame 'alpha `(,alpha . ,alpha)))) (use-package exwm :straight t @@ -3206,6 +3207,8 @@ colorscheme emacs bind j scrollline 3 bind k scrollline -3 +bind --mode=normal mode ignore +bind --mode=ignore mode normal guiset_quiet gui full guiset_quiet statuspanel left diff --git a/Emacs.org b/Emacs.org index f76f117..13f7be8 100644 --- a/Emacs.org +++ b/Emacs.org @@ -6077,7 +6077,7 @@ Somewhat similar to the previous one... Occasinally I want to re-tangle all desk (call-process "xrdb" nil nil nil "-load" "/home/pavel/.Xresources") (call-process "~/bin/polybar.sh") (call-process "pkill" nil nil nil "dunst") - (call-process "herd" nil nil nil "") + (call-process "herd" nil nil nil "restart" "xsettingsd") (when (fboundp #'my/exwm-set-alpha) (if (my/light-p) (my/exwm-set-alpha 100) @@ -9027,7 +9027,11 @@ Of course, Emacs can also display man and info pages. (general-define-key :states '(normal) :keymaps 'Info-mode-map - (kbd "RET") 'Info-follow-nearest-node + (kbd "RET") #'Info-follow-nearest-node + "H" #'Info-history-back + "L" #'Info-history-forward + "n" #'Info-search-next + "b" #'Info-search-backward "f" #'ace-link-info) (defun my/man-fix-width (&rest _) @@ -9641,9 +9645,10 @@ I thought about making something like a [[https://github.com/magit/transient][tr * Guix settings | Guix dependency | Description | |---------------------+-------------------------------| -| emacs-vterm | The vterm package | +| emacs-vterm | The vterm package | | ripgrep | A recursive search tool | | the-silver-searcher | Another recursive search tool | +| texinfo | | #+NAME: packages #+begin_src emacs-lisp :tangle no