From 6aee69aefee256df59edd1572fdff41d9ccf65a5 Mon Sep 17 00:00:00 2001 From: jeschli Date: Fri, 26 Oct 2018 11:53:19 +0200 Subject: j emacs: enable ido completion --- jeschli/2configs/emacs.nix | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'jeschli/2configs') diff --git a/jeschli/2configs/emacs.nix b/jeschli/2configs/emacs.nix index 5fc8874..896d383 100644 --- a/jeschli/2configs/emacs.nix +++ b/jeschli/2configs/emacs.nix @@ -25,6 +25,10 @@ let ;; (require 'evil-org-agenda) ;; (evil-org-agenda-set-keys) ''; + ido = '' + (require 'ido) + (ido-mode t) + ''; windowCosmetics = '' (menu-bar-mode -1) (tool-bar-mode -1) ; Disable the button bar atop screen @@ -58,6 +62,7 @@ let ''; dotEmacs = pkgs.writeText "dot-emacs" '' ${evilMode} + ${ido} ${packageRepos} ${orgMode} ${recentFiles} -- cgit v1.2.3 From 15ef48c90946b02e8e921c01be70141c3295234d Mon Sep 17 00:00:00 2001 From: jeschli Date: Fri, 26 Oct 2018 11:55:06 +0200 Subject: j emacs: shortcuts for global org link creation --- jeschli/2configs/emacs.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'jeschli/2configs') diff --git a/jeschli/2configs/emacs.nix b/jeschli/2configs/emacs.nix index 896d383..096d23d 100644 --- a/jeschli/2configs/emacs.nix +++ b/jeschli/2configs/emacs.nix @@ -46,6 +46,8 @@ let (global-set-key "\C-cl" 'org-store-link) (global-set-key "\C-ca" 'org-agenda) (global-set-key "\C-cb" 'org-iswitchb) + (global-set-key "\C-c L" 'org-insert-link-global) + (global-set-key "\C-c o" 'org-open-at-point-global) (setq org-link-frame-setup '((file . find-file))) ; open link in same frame. (if (boundp 'org-user-agenda-files) (setq org-agenda-files org-user-agenda-files) -- cgit v1.2.3 From 03a9490c074ffc995130651b5648e383dfddda54 Mon Sep 17 00:00:00 2001 From: jeschli Date: Fri, 26 Oct 2018 11:56:28 +0200 Subject: j emacs: load monokai-alt without asking --- jeschli/2configs/emacs.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'jeschli/2configs') diff --git a/jeschli/2configs/emacs.nix b/jeschli/2configs/emacs.nix index 096d23d..6197f95 100644 --- a/jeschli/2configs/emacs.nix +++ b/jeschli/2configs/emacs.nix @@ -55,7 +55,7 @@ let ) ''; theme = '' - (load-theme 'monokai-alt) + (load-theme 'monokai-alt t) ''; recentFiles = '' (recentf-mode 1) -- cgit v1.2.3 From 10964d4ccec6ede88ddf3c5bf19891d436f88213 Mon Sep 17 00:00:00 2001 From: jeschli Date: Fri, 26 Oct 2018 12:17:28 +0200 Subject: j emacs: add haskell-mode --- jeschli/2configs/emacs.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'jeschli/2configs') diff --git a/jeschli/2configs/emacs.nix b/jeschli/2configs/emacs.nix index 6197f95..1c92f60 100644 --- a/jeschli/2configs/emacs.nix +++ b/jeschli/2configs/emacs.nix @@ -76,6 +76,7 @@ let epkgs.melpaStablePackages.magit epkgs.melpaPackages.nix-mode epkgs.melpaPackages.go-mode + epkgs.melpaPackages.haskell-mode epkgs.melpaPackages.google-this epkgs.melpaPackages.monokai-alt-theme ]); -- cgit v1.2.3 From 1f9483ecbe639096e4b154f14fbb14f0173400b7 Mon Sep 17 00:00:00 2001 From: jeschli Date: Fri, 2 Nov 2018 09:41:47 +0100 Subject: j emacs: modify go-mode --- jeschli/2configs/emacs.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'jeschli/2configs') diff --git a/jeschli/2configs/emacs.nix b/jeschli/2configs/emacs.nix index 1c92f60..636c8da 100644 --- a/jeschli/2configs/emacs.nix +++ b/jeschli/2configs/emacs.nix @@ -25,10 +25,22 @@ let ;; (require 'evil-org-agenda) ;; (evil-org-agenda-set-keys) ''; + + goMode = '' + (add-to-list 'exec-path "~/go/bin") + (add-hook 'go-mode-hook + (lambda () + (setq-default) + (setq tab-width 2) + (setq standard-indent 2) + (setq indent-tabs-mode nil))) + ''; + ido = '' (require 'ido) (ido-mode t) ''; + windowCosmetics = '' (menu-bar-mode -1) (tool-bar-mode -1) ; Disable the button bar atop screen @@ -54,16 +66,20 @@ let (setq org-agenda-files (quote ("~/projects/notes"))) ) ''; + theme = '' (load-theme 'monokai-alt t) ''; + recentFiles = '' (recentf-mode 1) (setq recentf-max-menu-items 25) (global-set-key "\C-x\ \C-r" 'recentf-open-files) ''; + dotEmacs = pkgs.writeText "dot-emacs" '' ${evilMode} + ${goMode} ${ido} ${packageRepos} ${orgMode} -- cgit v1.2.3 From f19988849d05eba2cc248793266ac00db66ce6f0 Mon Sep 17 00:00:00 2001 From: jeschli Date: Fri, 2 Nov 2018 09:43:08 +0100 Subject: j emacs: add newlines --- jeschli/2configs/emacs.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'jeschli/2configs') diff --git a/jeschli/2configs/emacs.nix b/jeschli/2configs/emacs.nix index 636c8da..ace6b0f 100644 --- a/jeschli/2configs/emacs.nix +++ b/jeschli/2configs/emacs.nix @@ -15,6 +15,7 @@ let (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/"))) (package-initialize) ''; + evilMode = '' ;; Evil Mode (require 'evil) @@ -53,6 +54,7 @@ let (setq visible-bell nil) ; Disable annoying visual bell graphic (setq ring-bell-function 'ignore) ; Disable super annoying audio bell ''; + orgMode = '' (add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . org-mode)) (global-set-key "\C-cl" 'org-store-link) -- cgit v1.2.3 From ebe6108a41748ae3f746ea3125216668542bcd4b Mon Sep 17 00:00:00 2001 From: jeschli Date: Fri, 2 Nov 2018 09:43:47 +0100 Subject: j emacs: add ag, rust-mode and emacs-as-daemon --- jeschli/2configs/emacs.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'jeschli/2configs') diff --git a/jeschli/2configs/emacs.nix b/jeschli/2configs/emacs.nix index ace6b0f..4f5b690 100644 --- a/jeschli/2configs/emacs.nix +++ b/jeschli/2configs/emacs.nix @@ -89,7 +89,9 @@ let ${theme} ${windowCosmetics} ''; + emacsWithCustomPackages = (pkgs.emacsPackagesNgGen pkgs.emacs).emacsWithPackages (epkgs: [ + epkgs.melpaPackages.ag epkgs.melpaPackages.evil epkgs.melpaStablePackages.magit epkgs.melpaPackages.nix-mode @@ -97,12 +99,23 @@ let epkgs.melpaPackages.haskell-mode epkgs.melpaPackages.google-this epkgs.melpaPackages.monokai-alt-theme + epkgs.melpaPackages.rust-mode ]); + myEmacs = pkgs.writeDashBin "my-emacs" '' exec ${emacsWithCustomPackages}/bin/emacs -q -l ${dotEmacs} "$@" ''; + + myEmacsWithDaemon = pkgs.writeDashBin "my-emacs-daemon" '' + exec ${emacsWithCustomPackages}/bin/emacs -q -l ${dotEmacs} --daemon + ''; + + myEmacsClient = pkgs.writeDashBin "meclient" '' + exec ${emacsWithCustomPackages}/bin/emacsclient --create-frame + ''; + in { environment.systemPackages = [ - myEmacs + myEmacs myEmacsWithDaemon myEmacsClient ]; } -- cgit v1.2.3 From 868ddda602c9b31dbdac1aace9b902f757ac6c7d Mon Sep 17 00:00:00 2001 From: jeschli Date: Tue, 5 Feb 2019 19:20:17 +0100 Subject: j xserver: add dbus magic for xserver (xserver/default.nix not working currently) --- jeschli/2configs/xserver/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'jeschli/2configs') diff --git a/jeschli/2configs/xserver/default.nix b/jeschli/2configs/xserver/default.nix index ec3977c..44c35ca 100644 --- a/jeschli/2configs/xserver/default.nix +++ b/jeschli/2configs/xserver/default.nix @@ -51,6 +51,12 @@ in { ${pkgs.xorg.xmodmap}/bin/xmodmap ${import ./Xmodmap.nix args} & ${pkgs.xorg.xrdb}/bin/xrdb ${import ./Xresources.nix args} & ${pkgs.xorg.xsetroot}/bin/xsetroot -solid '#1c1c1c' & + ${config.services.xserver.displayManager.sessionCommands} + if test -z "$DBUS_SESSION_BUS_ADDRESS"; then + exec ${pkgs.dbus.dbus-launch} --exit-with-session "$0" "" + fi + export DBUS_SESSION_BUS_ADDRESS + ${config.systemd.package}/bin/systemctl --user import-environment DISPLAY DBUS_SESSION_BUS_ADDRESS wait ''; -- cgit v1.2.3