mirror of
https://github.com/librephoenix/nixos-config
synced 2025-07-05 22:44:34 +05:30
Added emacs eaf to my flake!
This commit is contained in:
parent
ae90cd0d8a
commit
8b3fb0123c
8 changed files with 106 additions and 10 deletions
|
@ -935,3 +935,31 @@ https://github.com/magit/magit/issues/460 (@cpitclaudel)."
|
|||
(add-to-list 'focus-mode-to-thing '(lisp-mode . paragraph))
|
||||
|
||||
;(add-hook 'org-mode-hook #'focus-mode)
|
||||
|
||||
;;;-- Load emacs application framework;;;--
|
||||
(use-package! eaf
|
||||
:load-path "~/.emacs.d/eaf/"
|
||||
:init
|
||||
:custom
|
||||
(eaf-browser-continue-where-left-off t)
|
||||
(eaf-browser-enable-adblocker t)
|
||||
(browse-url-browser-function 'eaf-open-browser) ;; Make EAF Browser my default browser
|
||||
:config
|
||||
(defalias 'browse-web #'eaf-open-browser)
|
||||
|
||||
(require 'eaf-browser)
|
||||
|
||||
(require 'eaf-evil)
|
||||
(define-key key-translation-map (kbd "SPC")
|
||||
(lambda (prompt)
|
||||
(if (derived-mode-p 'eaf-mode)
|
||||
(pcase eaf--buffer-app-name
|
||||
("browser" (if (string= (eaf-call-sync "eval_function" eaf--buffer-id "is_focus") "True")
|
||||
(kbd "SPC")
|
||||
(kbd eaf-evil-leader-key)))
|
||||
(_ (kbd "SPC")))
|
||||
(kbd "SPC")))))
|
||||
|
||||
(map! :leader
|
||||
:desc "Open web browser"
|
||||
"o w" #'eaf-open-browser-with-history)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, pkgs, eaf, eaf-browser, ... }:
|
||||
|
||||
{
|
||||
programs.doom-emacs = {
|
||||
|
@ -9,4 +9,31 @@
|
|||
template = builtins.readFile ./themes/doom-stylix-theme.el.mustache;
|
||||
extension = ".el";
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
git
|
||||
nodejs
|
||||
wmctrl
|
||||
jshon
|
||||
aria
|
||||
(python3.withPackages (p: with p; [
|
||||
pandas
|
||||
requests
|
||||
pyqt6 sip qtpy qt6.qtwebengine epc lxml pyqt6-webengine
|
||||
pysocks
|
||||
pymupdf
|
||||
markdown
|
||||
]))];
|
||||
home.file.".emacs.d/eaf" = {
|
||||
source = "${eaf}";
|
||||
recursive = true;
|
||||
};
|
||||
home.file.".emacs.d/eaf/app/browser" = {
|
||||
source = "${eaf-browser}";
|
||||
recursive = true;
|
||||
onChange = "
|
||||
pushd ~/.emacs.d/eaf/app/browser;
|
||||
npm install darkreader @mozilla/readability;
|
||||
popd;
|
||||
";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1303,10 +1303,10 @@ I don't have this active right now since I'm exploring tab-bar mode instead!
|
|||
|
||||
#+END_SRC
|
||||
** EAF
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
#+BEGIN_SRC emacs-lisp :tangle config.el
|
||||
;;;-- Load emacs application framework;;;--
|
||||
(use-package! eaf
|
||||
:load-path "~/.local/bin/emacs-application-framework/"
|
||||
:load-path "~/.emacs.d/eaf/"
|
||||
:init
|
||||
:custom
|
||||
(eaf-browser-continue-where-left-off t)
|
||||
|
@ -1315,7 +1315,6 @@ I don't have this active right now since I'm exploring tab-bar mode instead!
|
|||
:config
|
||||
(defalias 'browse-web #'eaf-open-browser)
|
||||
|
||||
(require 'eaf-pdf-viewer)
|
||||
(require 'eaf-browser)
|
||||
|
||||
(require 'eaf-evil)
|
||||
|
@ -1326,8 +1325,6 @@ I don't have this active right now since I'm exploring tab-bar mode instead!
|
|||
("browser" (if (string= (eaf-call-sync "eval_function" eaf--buffer-id "is_focus") "True")
|
||||
(kbd "SPC")
|
||||
(kbd eaf-evil-leader-key)))
|
||||
("pdf-viewer" (kbd eaf-evil-leader-key))
|
||||
("image-viewer" (kbd eaf-evil-leader-key))
|
||||
(_ (kbd "SPC")))
|
||||
(kbd "SPC")))))
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
./app/games/games.nix # Various videogame apps
|
||||
./style/stylix.nix # Styling and themes for my apps
|
||||
./lang/cc/cc.nix # C and C++ tools
|
||||
./lang/python/python.nix # Python
|
||||
#./lang/python/python.nix # Python
|
||||
#./lang/python/python-packages.nix # Extra Python packages I want
|
||||
./lang/haskell/haskell.nix # Haskell tools
|
||||
#./lang/android/android.nix # Android developement
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
{
|
||||
# Python packages
|
||||
home.packages = with pkgs.python310Packages; [
|
||||
home.packages = with pkgs.python3Packages; [
|
||||
cffi
|
||||
dbus-python
|
||||
wheel
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{
|
||||
home.packages = with pkgs; [
|
||||
# Python setup
|
||||
python310Full
|
||||
python3Full
|
||||
imath
|
||||
pystring
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue