aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorAdrian Kummerlaender2020-06-02 15:37:58 +0200
committerAdrian Kummerlaender2020-06-02 15:37:58 +0200
commit311beb9cac83f10e9cfeeff285b8df33cb59faa0 (patch)
tree3629eeb976a885b5c23dce4568f69fa4bef38883 /gui
parenta556b03ec74f8270d19f1ac17d402fc29c5fd57f (diff)
downloadnixos_home-311beb9cac83f10e9cfeeff285b8df33cb59faa0.tar
nixos_home-311beb9cac83f10e9cfeeff285b8df33cb59faa0.tar.gz
nixos_home-311beb9cac83f10e9cfeeff285b8df33cb59faa0.tar.bz2
nixos_home-311beb9cac83f10e9cfeeff285b8df33cb59faa0.tar.lz
nixos_home-311beb9cac83f10e9cfeeff285b8df33cb59faa0.tar.xz
nixos_home-311beb9cac83f10e9cfeeff285b8df33cb59faa0.tar.zst
nixos_home-311beb9cac83f10e9cfeeff285b8df33cb59faa0.zip
Revert "Switch back to vim for note taking"
This reverts commit fdf74ed8fe1c494c49d0b0a61024ccfb04ca63b5.
Diffstat (limited to 'gui')
-rw-r--r--gui/conf/init.el37
-rw-r--r--gui/conf/xmonad.hs6
-rw-r--r--gui/default.nix1
-rw-r--r--gui/emacs.nix20
4 files changed, 61 insertions, 3 deletions
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;
+}