From 96842c662b2e2ab8cbf71ba564e010ead8b3724a Mon Sep 17 00:00:00 2001 From: octaspire Date: Sun, 10 Jan 2021 21:30:04 +0200 Subject: [PATCH] Add APMD config, bind keys for saving/restoring desktop on GNU/Emacs --- README.org | 16 ++++++++++++++++ emacs/.config/emacs/init.el | 5 +++++ 2 files changed, 21 insertions(+) diff --git a/README.org b/README.org index d3cd143..da59d27 100644 --- a/README.org +++ b/README.org @@ -68,3 +68,19 @@ permit nopass octaspire as root cmd sh args /etc/netstart iwm0 permit nopass octaspire as root cmd syspatch args permit nopass octaspire as root cmd pkg_add args -ui #+end_src + +**** Advanced Power Management Daemon (APMD) + +Before doing this, command ~dmesg | grep cpu0~ +should be used to verify that the processor +supports frequency scaling. + +If it does (listing shows for example for Intel processor +~Enhanced SpeedStep~ speeds), the following commands can +be used to turn =APMD= on. + +#+begin_src shell +rcctl enable apmd +rcctl set apmd flags -A +rcctl start apmd +#+end_src diff --git a/emacs/.config/emacs/init.el b/emacs/.config/emacs/init.el index 5f39081..3b31349 100644 --- a/emacs/.config/emacs/init.el +++ b/emacs/.config/emacs/init.el @@ -47,6 +47,9 @@ (setq octaspire/elisp-dir (concat octaspire/root-dir (file-name-as-directory "elisp"))) +(setq octaspire/desktop-dir (concat octaspire/root-dir + (file-name-as-directory "desktop"))) + (setq octaspire/submodule-dir (concat octaspire/root-dir (file-name-as-directory "submodules"))) @@ -502,6 +505,8 @@ adding it to the kill ring as a new kill." (global-set-key (kbd "s-u") 'up-list) (global-set-key (kbd "C-x M-f") 'counsel-file-jump) ; or find-name-dired, counsel-fzf (global-set-key (kbd "C-c M-f") 'counsel-git-grep) +(global-set-key (kbd "C-c d") (lambda () (interactive) (desktop-save octaspire/desktop-dir))) +(global-set-key (kbd "C-c M-d") (lambda () (interactive) (desktop-read octaspire/desktop-dir))) (put 'narrow-to-region 'disabled nil) -- 2.30.1