From 311beb9cac83f10e9cfeeff285b8df33cb59faa0 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Tue, 2 Jun 2020 15:37:58 +0200 Subject: Revert "Switch back to vim for note taking" This reverts commit fdf74ed8fe1c494c49d0b0a61024ccfb04ca63b5. --- gui/conf/init.el | 37 +++++++++++++++++++++++++++++++++++++ gui/conf/xmonad.hs | 6 +++--- gui/default.nix | 1 + gui/emacs.nix | 20 ++++++++++++++++++++ 4 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 gui/conf/init.el create mode 100644 gui/emacs.nix (limited to 'gui') diff --git a/gui/conf/init.el b/gui/conf/init.el new file mode 100644 index 0000000..27d5f8f --- /dev/null +++ b/gui/conf/init.el @@ -0,0 +1,37 @@ +(setq inhibit-startup-message t) +(setq initial-scratch-message nil) + +(setq backup-directory-alist `(("." . "~/.emacs.d/backup"))) + +(require 'package) +(package-initialize) +(eval-when-compile (require 'use-package)) + +(load-theme 'leuven) +(set-frame-font "Iosevka 11" nil t) +(menu-bar-mode -1) +(toggle-scroll-bar -1) +(tool-bar-mode -1) +(global-visual-line-mode t) + +(use-package org) + +(setq org-agenda-files (list "~/org/org.org")) + +(use-package evil) +(use-package evil-leader) +(use-package evil-org) + +(global-evil-leader-mode) +(evil-leader/set-leader ",") +(evil-mode 1) + +(add-hook 'org-mode-hook 'evil-org-mode) +(evil-org-set-key-theme '(navigation insert textobjects additional todo)) + +(setq org-fontify-whole-heading-line t) +(setq org-adapt-indentation nil) + +(evil-define-key 'normal org-mode-map + "J" 'org-next-visible-heading + "K" 'org-previous-visible-heading) diff --git a/gui/conf/xmonad.hs b/gui/conf/xmonad.hs index 31fb636..f5e8893 100644 --- a/gui/conf/xmonad.hs +++ b/gui/conf/xmonad.hs @@ -118,8 +118,8 @@ scratchpads host = (customFloating $ hideScreenBorder host sideBarLeft) , NS "messaging" "telegram-desktop" ((className =? "TelegramDesktop") <&&> (title /=? "Media viewer")) (customFloating $ hideScreenBorder host sideBarRight) - , NS "scratch" "kitty --class=scratch" (className =? "scratch") - (customFloating $ hideScreenBorder host dropDown) + , NS "notes" "emacs --title=notemacs ~/org/org.org" (title =? "notemacs") + (customFloating $ hideScreenBorder host dropDownLarge) ] hudMonitor host = monitor @@ -205,7 +205,7 @@ commonKeybindings host = , ("M-z" , namedScratchpadAction (scratchpads host) "literature") , ("M-r" , namedScratchpadAction (scratchpads host) "calculator") , ("M-m" , namedScratchpadAction (scratchpads host) "messaging") - , ("M-n" , namedScratchpadAction (scratchpads host) "scratch") ] ++ + , ("M-n" , namedScratchpadAction (scratchpads host) "notes") ] ++ -- workspace selection [ (p ++ [k] , windows $ f i) | (i, k) <- zip Main.workspaces ['1' .. '9'] diff --git a/gui/default.nix b/gui/default.nix index 59c12f9..8640143 100644 --- a/gui/default.nix +++ b/gui/default.nix @@ -8,6 +8,7 @@ in { ./xmonad.nix ./kitty.nix ./vim.nix + ./emacs.nix ./zathura.nix ./pass.nix # applications grouped by purpose diff --git a/gui/emacs.nix b/gui/emacs.nix new file mode 100644 index 0000000..e2773f0 --- /dev/null +++ b/gui/emacs.nix @@ -0,0 +1,20 @@ +{ config, pkgs, ... }: + +{ + programs.emacs = { + enable = true; + + extraPackages = (epkgs: (with epkgs.melpaStablePackages; [ + use-package + leuven-theme + ]) ++ (with epkgs.melpaPackages; [ + evil + evil-leader + evil-org + ]) ++ (with epkgs.elpaPackages; [ + org + ])); + }; + + home.file.".emacs.d/init.el".source = ./conf/init.el; +} -- cgit v1.2.3