From 8228d697032885c18f0040103679a3f8a73dde15 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Mon, 17 Oct 2016 15:03:07 -0700 Subject: [PATCH 01/29] [Emacs] Add font size hydra binding for + --- dotfiles/emacs.d/README.org | 1 + 1 file changed, 1 insertion(+) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index ac6e1c2f..a281de51 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -1272,6 +1272,7 @@ https://github.com/alpaker/Fill-Column-Indicator/issues/21 for more details "Resize Font" ("-" imalison:font-size-decr "Decrease") ("=" imalison:font-size-incr "Increase") + ("+" imalison:font-size-incr "Increase") ("d" imalison:font-size-decr "Decrease") ("i" imalison:font-size-incr "Increase") ("f" set-frame-font "Set Frame Font") From 7fe5c9a6cd47be0f13cf104777c6abbca0492ca5 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Mon, 17 Oct 2016 15:03:36 -0700 Subject: [PATCH 02/29] [Emacs] Improve imalison:appearance --- dotfiles/emacs.d/README.org | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index a281de51..2c669176 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -4153,10 +4153,12 @@ load-theme hook (See the heading below). (set-face-attribute 'default nil :height imalison:default-font-size-pt)) (progn - (load-theme 'source-code-pro t) - (message "not setting font"))) - (load-theme imalison:dark-theme t) - (imalison:remove-fringe-and-hl-line-mode)) + (load-theme 'source-code-pro t) + (message "not setting font"))) + (setq powerline-default-separator (if (display-graphic-p) 'wave 'utf-8)) + (load-theme imalison:dark-theme t) + (spaceline-compile) + (imalison:remove-fringe-and-hl-line-mode)) ;; This is needed because you can't set the font or theme at daemon start-up. ;; (when (display-graphic-p) (imalison:appearance)) From 0f7b18823bf7ff8399ce3651a0647ba339830d1d Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Mon, 17 Oct 2016 15:03:54 -0700 Subject: [PATCH 03/29] [Arch] Add tigervnc dependency --- tasks/arch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/arch.py b/tasks/arch.py index df1100c0..e2c1e069 100644 --- a/tasks/arch.py +++ b/tasks/arch.py @@ -27,13 +27,13 @@ PACKAGES = [ "festival-freebsoft-utils", "hsetroot", "imwheel", "remmina", "racket", "xorg-utils", "playerctl", "pasystray", "dunst", "otf-fira-code", "ttf-mac-fonts", "otf-hermit", "ttf-font-awesome", "ttf-monaco", "tcpdump", - "ngrep", "wireshark-gtk", "teamviewer", "mopidy-podcast", + "ngrep", "wireshark-gtk", "teamviewer", "mopidy-podcast", "tigervnc", "kdegraphics-okular", ] SERVICES = [ - "sshd.socket", "nvidia-persistenced.service", "NetworkManager.service", "teamviewerd.service", + "sshd.socket", "nvidia-persistenced.service", "NetworkManager.service", "teamviewerd.service", "--user vncserver@:1" ] From f390a011e7842f57b28a9a81312a7b7ecc8687bf Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 18 Oct 2016 02:26:44 -0700 Subject: [PATCH 04/29] [Linux] Move fonts.conf to non-deprecated place --- dotfiles/{ => config/fontconfig}/fonts.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename dotfiles/{ => config/fontconfig}/fonts.conf (88%) diff --git a/dotfiles/fonts.conf b/dotfiles/config/fontconfig/fonts.conf similarity index 88% rename from dotfiles/fonts.conf rename to dotfiles/config/fontconfig/fonts.conf index 23479d03..92d8d7b2 100644 --- a/dotfiles/fonts.conf +++ b/dotfiles/config/fontconfig/fonts.conf @@ -19,7 +19,7 @@ roboto mono - Ubuntu + Roboto ~/.fonts From f48ee3117bd49ff1d5f8e4165192c88d9dbc85b5 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 18 Oct 2016 02:46:16 -0700 Subject: [PATCH 05/29] [Linux] Use Roboto as default them in GTK --- dotfiles/config/gtk-3.0/settings.ini | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/dotfiles/config/gtk-3.0/settings.ini b/dotfiles/config/gtk-3.0/settings.ini index 98617029..18c522de 100644 --- a/dotfiles/config/gtk-3.0/settings.ini +++ b/dotfiles/config/gtk-3.0/settings.ini @@ -3,18 +3,17 @@ gtk-key-theme-name=Emacs gtk-application-prefer-dark-theme=false gtk-theme-name=Paper gtk-fallback-icon-theme=gnome -gtk-icon-theme-name=Numix +gtk-icon-theme-name=Paper gtk-font-name=Roboto 11 gtk-cursor-theme-name=Paper -gtk-cursor-theme-size=24 -gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ +gtk-cursor-theme-size=0 +gtk-toolbar-style=GTK_TOOLBAR_BOTH gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR -gtk-button-images=0 -gtk-menu-images=0 +gtk-button-images=1 +gtk-menu-images=1 gtk-enable-event-sounds=1 -gtk-enable-input-feedback-sounds=0 +gtk-enable-input-feedback-sounds=1 gtk-xft-antialias=1 gtk-xft-hinting=1 -gtk-xft-hintstyle=hintslight +gtk-xft-hintstyle=hintfull gtk-xft-rgba=rgb -gtk-modules=canberra-gtk-module From 44be3b56527800a1c3e141cfae95c4ee5ccc6607 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 18 Oct 2016 02:47:00 -0700 Subject: [PATCH 06/29] [Linux] Add some xsettingsd tweaks --- dotfiles/xsettingsd | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dotfiles/xsettingsd b/dotfiles/xsettingsd index 613abc81..3de22b7f 100644 --- a/dotfiles/xsettingsd +++ b/dotfiles/xsettingsd @@ -1,3 +1,7 @@ Gtk/KeyThemeName "Emacs" Xft/DPI 98304 Net/ThemeName "Paper" +Xft/Hinting 1 +Xft/RGBA "rgb" +Xft/HintStyle "hintslight" +Xft/Antialias 1 From a605d688642479b2ab9a7ce2b3e31037753aabcb Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 18 Oct 2016 12:11:41 -0700 Subject: [PATCH 07/29] [Emacs] Refactor font size functions --- dotfiles/emacs.d/README.org | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index 4847fa57..6e9ced73 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -605,25 +605,29 @@ This was taken from [[http://emacs.stackexchange.com/questions/7583/transiently- (cond ((eq system-type 'darwin) 120) ((eq system-type 'gnu/linux) 105))) -(cl-defun imalison:set-font-size (&optional (arg 10)) +(defvar imalison:huge-font-size 280) + +(defun imalison:current-font-size () + (plist-get (custom-face-attributes-get 'default nil) :height)) + +(defun imalison:set-font-size (size) + (set-face-attribute 'default nil :height size)) + +(cl-defun imalison:modify-font-size (&optional (arg 10)) (interactive "p") - (let ((current-height - (plist-get (custom-face-attributes-get 'default nil) :height))) - (set-face-attribute 'default nil :height - (+ current-height arg)))) + (imalison:set-font-size (+ (imalison:current-font-size) arg))) (defun imalison:font-size-incr () (interactive) - (imalison:set-font-size +10)) + (imalison:modify-font-size +10)) (defun imalison:font-size-decr () (interactive) - (imalison:set-font-size -10)) + (imalison:modify-font-size -10)) (defun imalison:font-size-reset () (interactive) - (set-face-attribute 'default nil - :height imalison:default-font-size-pt)) + (imalison:set-font-size imalison:default-font-size-pt)) #+END_SRC ** Message Result Builder This macro is useful when writing emacs-lisp. It creates a new interactive command that shows you the result of evaluating a function, with optionally provided arguments. @@ -1268,7 +1272,7 @@ https://github.com/alpaker/Fill-Column-Indicator/issues/21 for more details :config (progn (defhydra imalison:hydra-font-resize - nil + nil "Resize Font" ("-" imalison:font-size-decr "Decrease") ("=" imalison:font-size-incr "Increase") From 80a315e0d204a8ca32ccb023acd2e598c02a4861 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 18 Oct 2016 13:06:49 -0700 Subject: [PATCH 08/29] [Emacs] Add set huge font size to font hydra --- dotfiles/emacs.d/README.org | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index 6e9ced73..3689dd9b 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -601,7 +601,7 @@ the ~:around~ keyword of advice-add. ** Font Size This was taken from [[http://emacs.stackexchange.com/questions/7583/transiently-adjust-text-size-in-mode-line-and-minibuffer][here]] but it has diverged significantly from the original. #+BEGIN_SRC emacs-lisp -(setq imalison:default-font-size-pt +(defvar imalison:default-font-size-pt (cond ((eq system-type 'darwin) 120) ((eq system-type 'gnu/linux) 105))) @@ -611,8 +611,13 @@ This was taken from [[http://emacs.stackexchange.com/questions/7583/transiently- (plist-get (custom-face-attributes-get 'default nil) :height)) (defun imalison:set-font-size (size) + (interactive (list (string-to-number (read-string "Enter a font size: ")))) (set-face-attribute 'default nil :height size)) +(defun imalison:set-huge-font-size () + (interactive) + (imalison:set-font-size imalison:huge-font-size)) + (cl-defun imalison:modify-font-size (&optional (arg 10)) (interactive "p") (imalison:set-font-size (+ (imalison:current-font-size) arg))) @@ -1275,10 +1280,11 @@ https://github.com/alpaker/Fill-Column-Indicator/issues/21 for more details nil "Resize Font" ("-" imalison:font-size-decr "Decrease") + ("d" imalison:font-size-decr "Decrease") ("=" imalison:font-size-incr "Increase") ("+" imalison:font-size-incr "Increase") - ("d" imalison:font-size-decr "Decrease") ("i" imalison:font-size-incr "Increase") + ("h" imalison:set-huge-font-size "Huge") ("f" set-frame-font "Set Frame Font") ("0" imalison:font-size-reset "Reset to default size")) From 76f4fdf8d79bd5560724d3ba7cef2d0dc86b056b Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 18 Oct 2016 13:07:26 -0700 Subject: [PATCH 09/29] [Emacs] Require all-the-icons --- dotfiles/emacs.d/README.org | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index 3689dd9b..c1ce5537 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -4008,6 +4008,11 @@ Ensure all themes that I use are installed: (ensure-packages-installed packages-appearance) #+END_SRC +** all-the-icons +#+BEGIN_SRC emacs-lisp +(use-package all-the-icons + :demand t) +#+END_SRC ** spaceline *** Disable sRGB colorspace to make powerline separators work #+BEGIN_SRC emacs-lisp From d2364ef8bc9083f0e38d9de717d4384867f02849 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 18 Oct 2016 14:09:51 -0700 Subject: [PATCH 10/29] [Linux] Add screenshot shell command --- dotfiles/lib/bin/screenshot.sh | 3 +++ 1 file changed, 3 insertions(+) create mode 100755 dotfiles/lib/bin/screenshot.sh diff --git a/dotfiles/lib/bin/screenshot.sh b/dotfiles/lib/bin/screenshot.sh new file mode 100755 index 00000000..fe8bd9a0 --- /dev/null +++ b/dotfiles/lib/bin/screenshot.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +scrot "$(rofi -input /dev/null -dmenu)" From 8e1ecdb8b02d9881f22234e8df10a2e6a6540511 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 18 Oct 2016 14:10:02 -0700 Subject: [PATCH 11/29] [Linux] Add shell command script to run a shell --- dotfiles/lib/bin/shell_command.sh | 3 +++ 1 file changed, 3 insertions(+) create mode 100755 dotfiles/lib/bin/shell_command.sh diff --git a/dotfiles/lib/bin/shell_command.sh b/dotfiles/lib/bin/shell_command.sh new file mode 100755 index 00000000..6c53915e --- /dev/null +++ b/dotfiles/lib/bin/shell_command.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +bash -c "$(rofi -input /dev/null -dmenu)" From 5a9fad96c7e6900b9ec55f8f70286f0effff1219 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 18 Oct 2016 14:10:32 -0700 Subject: [PATCH 12/29] [XMonad] Add bindings for screenshot and shell --- dotfiles/xmonad/xmonad.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dotfiles/xmonad/xmonad.hs b/dotfiles/xmonad/xmonad.hs index 93535f12..7a78ed50 100644 --- a/dotfiles/xmonad/xmonad.hs +++ b/dotfiles/xmonad/xmonad.hs @@ -69,6 +69,8 @@ addKeys conf@XConfig {modMask = modm} = , ((mod3Mask .|. shiftMask, xK_e), shiftTo Next EmptyWS) , ((mod3Mask, xK_v), spawn "copyq_rofi.sh") , ((mod3Mask, xK_p), spawn "system_password.sh") + , ((mod3Mask, xK_s), spawn "screenshot.sh") + , ((mod3Mask, xK_c), spawn "shell_command.sh") -- playerctl , ((mod3Mask, xK_f), spawn "playerctl play-pause") From 3c403343b92bddc4c5d9b1cddc7f9e7755d68192 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 18 Oct 2016 14:16:14 -0700 Subject: [PATCH 13/29] [Linux] Switch back to numix icon theme --- dotfiles/config/gtk-3.0/settings.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotfiles/config/gtk-3.0/settings.ini b/dotfiles/config/gtk-3.0/settings.ini index 18c522de..0ff553c8 100644 --- a/dotfiles/config/gtk-3.0/settings.ini +++ b/dotfiles/config/gtk-3.0/settings.ini @@ -3,7 +3,7 @@ gtk-key-theme-name=Emacs gtk-application-prefer-dark-theme=false gtk-theme-name=Paper gtk-fallback-icon-theme=gnome -gtk-icon-theme-name=Paper +gtk-icon-theme-name=Numix gtk-font-name=Roboto 11 gtk-cursor-theme-name=Paper gtk-cursor-theme-size=0 From 85349867f9f6f8d2ec679619e8690c08d95e487b Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 18 Oct 2016 14:35:48 -0700 Subject: [PATCH 14/29] [Emacs] Remove empty Do When heading --- dotfiles/emacs.d/README.org | 1 - 1 file changed, 1 deletion(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index c1ce5537..6515f106 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -539,7 +539,6 @@ the ~:around~ keyword of advice-add. (imalison:named-builder imalison:compose-around-builder) #+END_SRC -*** Do When *** Measure Time #+BEGIN_SRC emacs-lisp (defmacro imalison:measure-time (&rest body) From 609c72cb030cfd86594a67ffb09952ddc0818b91 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 18 Oct 2016 14:36:43 -0700 Subject: [PATCH 15/29] [Emacs] Fix powerline separator resizing issues --- dotfiles/emacs.d/README.org | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index 6515f106..4e2c7e3d 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -4021,6 +4021,7 @@ Ensure all themes that I use are installed: #+BEGIN_SRC emacs-lisp (use-package spaceline-config :ensure spaceline + :commands spaceline-compile :preface (progn (defun spaceline-gh-notifier-disable-default-notifier-modeline (&rest args) @@ -4035,9 +4036,11 @@ Ensure all themes that I use are installed: (setq powerline-default-separator (random-choice '(butt slant wave))) (setq spaceline-workspace-numbers-unicode t spaceline-window-numbers-unicode t) + (if (display-graphic-p) (setq-default powerline-default-separator 'wave) (setq-default powerline-default-separator 'utf-8)) + (spaceline-define-segment imalison:muni "Display the number of minutes until the next muni train comes" (format "🚇%s" (imalison:get-cached-muni-time)) @@ -4048,7 +4051,14 @@ Ensure all themes that I use are installed: (format "✉%s" github-notifier-unread-count) :when (> github-notifier-unread-count 0)) - (setq powerline-height 25) + (advice-add 'pl/separator-height :around + (lambda (function &rest args) + (+ (apply function args) 10))) + + ;; This needs to be executed after setting the font because the separators + ;; need to get regenerated + (advice-add 'imalison:set-font-size :after 'spaceline-compile) + (spaceline-helm-mode) ;; 'spaceline-gh-notifier and 'imalison:muni disabled for now (spaceline-spacemacs-theme))) From dde3f2eb790e2418b47e1ba8689d84d89ad68bf8 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 18 Oct 2016 14:37:18 -0700 Subject: [PATCH 16/29] [Linux] Add mopidy systemd service --- dotfiles/config/systemd/user/mopidy.service | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 dotfiles/config/systemd/user/mopidy.service diff --git a/dotfiles/config/systemd/user/mopidy.service b/dotfiles/config/systemd/user/mopidy.service new file mode 100644 index 00000000..90889c17 --- /dev/null +++ b/dotfiles/config/systemd/user/mopidy.service @@ -0,0 +1,10 @@ +[Unit] +Description=mopidy + +[Service] +Type=simple +ExecStart=/usr/bin/env mopidy +ExecStop=/usr/bin/pkill mopidy + +[Install] +WantedBy=wm.target From bec8e289cebce9b520b05bb775b1520ef1b7796e Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 18 Oct 2016 14:45:21 -0700 Subject: [PATCH 17/29] [Emacs] Automatically sync kill ring with copyq --- dotfiles/emacs.d/README.org | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index 4e2c7e3d..114afaac 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -778,6 +778,22 @@ A macro for composing functions together to build an interactive command to copy (message "Setting lexical-binding to: %s" new-binding) (setq lexical-binding new-binding))) #+END_SRC +** Sync kill ring with copyq +#+BEGIN_SRC emacs-lisp +(defun imalison:copyq-get (i) + (imalison:shell-command-to-string (format "copyq eval read(%s)" i))) + +(defun imalison:copyq-sync () + (interactive) + (let ((missing-items (cl-loop for i from 0 to (string-to-number + (imalison:shell-command-to-string "copyq eval size()")) + for item = (imalison:copyq-get i) + when (not (member item kill-ring)) + collect item))) + (setq kill-ring (nconc kill-ring missing-items)))) + +(run-with-idle-timer 10 nil 'imalison:copyq-sync) +#+END_SRC ** Other The stuff in this section is pretty crusty. I don't think its used anywhere, but I keep it around just in case I need it. From 251ae7c60a64b5ba63c2bcbfcf87a280bb13d0cb Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 18 Oct 2016 14:46:59 -0700 Subject: [PATCH 18/29] [Emacs] Only sync copyq when command exists --- dotfiles/emacs.d/README.org | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index 114afaac..71e77468 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -792,7 +792,8 @@ A macro for composing functions together to build an interactive command to copy collect item))) (setq kill-ring (nconc kill-ring missing-items)))) -(run-with-idle-timer 10 nil 'imalison:copyq-sync) +(when (eshell-search-path "copyq") + (run-with-idle-timer 10 nil 'imalison:copyq-sync)) #+END_SRC ** Other The stuff in this section is pretty crusty. I don't think its used anywhere, but From d799d94edfe5396ce939403ececf1f1ec105f624 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 18 Oct 2016 14:48:12 -0700 Subject: [PATCH 19/29] [Emacs] Remove old copyq.el file --- dotfiles/emacs.d/load.d/copyq.el | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 dotfiles/emacs.d/load.d/copyq.el diff --git a/dotfiles/emacs.d/load.d/copyq.el b/dotfiles/emacs.d/load.d/copyq.el deleted file mode 100644 index e0809500..00000000 --- a/dotfiles/emacs.d/load.d/copyq.el +++ /dev/null @@ -1,11 +0,0 @@ -(defun imalison:copyq-get (i) - (imalison:shell-command-to-string (format "copyq eval read(%s)" i))) - -(defun imalison:copyq-sync () - (interactive) - (let ((missing-items (cl-loop for i from 0 to (string-to-int - (imalison:shell-command-to-string "copyq eval size()")) - for item = (imalison:copyq-get i) - when (not (member item kill-ring)) - collect item))) - (setq kill-ring (nconc kill-ring missing-items)))) From 6d8757c148a022dddd512ec24307790269fb2394 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 18 Oct 2016 16:13:56 -0700 Subject: [PATCH 20/29] [Emacs] Respace Non-Forking Shell Command --- dotfiles/emacs.d/README.org | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index 71e77468..7d4b8f2c 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -131,9 +131,13 @@ Sets environment variables by starting a shell. (exec-path-from-shell-initialize))))) #+END_SRC ** Non-Forking Shell Command To String -Emacs' built in ~shell-command-to-string~ function has the downside that it forks a new shell process every time it is executed. This means that any shell startup cost is incurred when this function is called. +Emacs' built in ~shell-command-to-string~ function has the downside that it +forks a new shell process every time it is executed. This means that any shell +startup cost is incurred when this function is called. -The following implementation uses eshell's ~eshell-search-path~ to find the binary (which is the only reason ~shell-comand-to-string~ is typically used anyway), but it avoids incurring any shell-startup cost. +The following implementation uses eshell's ~eshell-search-path~ to find the +binary (which is the only reason ~shell-comand-to-string~ is typically used +anyway), but it avoids incurring any shell-startup cost. This was originally inspired by [[https://github.com/bbatsov/projectile/issues/1044][this issue]]. #+BEGIN_SRC emacs-lisp From 97c3a81e4fefb98fe5cf45f1b6bc06b9ab338f49 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 18 Oct 2016 18:23:29 -0700 Subject: [PATCH 21/29] [Emacs] Move C# and racket modes to programming --- dotfiles/emacs.d/README.org | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index 7d4b8f2c..a7b757f7 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -2530,6 +2530,16 @@ Intero seems to be causing hangs, so it has been disabled ("M-," . pop-tag-mark))) (add-hook 'c-mode-common-hook 'imalison:cc-mode-hook))) #+END_SRC +*** C# +#+BEGIN_SRC emacs-lisp +(use-package csharp-mode + :mode "\\.cs\\'") +#+END_SRC +*** racket +#+BEGIN_SRC emacs-lisp +(use-package racket-mode + :mode "\\.rkt\\'") +#+END_SRC ** Data/Config/Protocol *** thrift #+BEGIN_SRC emacs-lisp @@ -3170,16 +3180,6 @@ This mode seems to be better maintained than plantuml-mode (use-package jq-mode :mode "\\.jq\\'") #+END_SRC -*** C# -#+BEGIN_SRC emacs-lisp -(use-package csharp-mode - :mode "\\.cs\\'") -#+END_SRC -*** racket -#+BEGIN_SRC emacs-lisp -(use-package racket-mode - :mode "\\.rkt\\'") -#+END_SRC * Programming ** realgud realgud provides debugging support with many external debuggers in emacs From 45d75def6866ba2fa35d99c0446f724b4de71aaf Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 18 Oct 2016 18:24:10 -0700 Subject: [PATCH 22/29] [Emacs] Add binding for crux-open-with --- dotfiles/emacs.d/README.org | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index a7b757f7..f2337e63 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -3313,7 +3313,8 @@ crux-reopen-as-root-mode makes it so that any file owned by root will automatica (use-package crux :demand t :bind (("C-c C-s" . crux-sudo-edit) - ("C-c C-r" . crux-eval-and-replace)) + ("C-c C-r" . crux-eval-and-replace) + ("C-c o" . crux-open-with)) :config (progn (crux-reopen-as-root-mode))) From efd8e14a024b261dac349648bb2e41f8b842c921 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 18 Oct 2016 18:25:11 -0700 Subject: [PATCH 23/29] [Emacs] Swap eshell-search-path to executable-find --- dotfiles/emacs.d/README.org | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index f2337e63..5827f564 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -135,15 +135,12 @@ Emacs' built in ~shell-command-to-string~ function has the downside that it forks a new shell process every time it is executed. This means that any shell startup cost is incurred when this function is called. -The following implementation uses eshell's ~eshell-search-path~ to find the +The following implementation uses eshell's ~executable-find~ to find the binary (which is the only reason ~shell-comand-to-string~ is typically used anyway), but it avoids incurring any shell-startup cost. This was originally inspired by [[https://github.com/bbatsov/projectile/issues/1044][this issue]]. #+BEGIN_SRC emacs-lisp -;; We use `eshell-search-path' for this hack -(require 'eshell) - (defun imalison:call-process-to-string (program &rest args) (with-temp-buffer (apply 'call-process program nil (current-buffer) nil args) @@ -152,7 +149,7 @@ This was originally inspired by [[https://github.com/bbatsov/projectile/issues/1 (defun imalison:get-call-process-args-from-shell-command (command) (cl-destructuring-bind (the-command . args) (split-string command " ") - (let ((binary-path (eshell-search-path the-command))) + (let ((binary-path (executable-find the-command))) (when binary-path (cons binary-path args))))) @@ -770,7 +767,7 @@ A macro for composing functions together to build an interactive command to copy (defun imalison:edit-script () (interactive) - (find-file (eshell-search-path + (find-file (executable-find (ido-completing-read "Select a script to edit: " (imalison:get-executables-on-path))))) #+END_SRC @@ -796,7 +793,7 @@ A macro for composing functions together to build an interactive command to copy collect item))) (setq kill-ring (nconc kill-ring missing-items)))) -(when (eshell-search-path "copyq") +(when (executable-find "copyq") (run-with-idle-timer 10 nil 'imalison:copyq-sync)) #+END_SRC ** Other @@ -1815,7 +1812,7 @@ I don't use auto-complete at all, so I have set up a hook to automatically disab *** magithub #+BEGIN_SRC emacs-lisp (use-package magithub - :if (eshell-search-path "hub") + :if (executable-find "hub") :after magit :disabled t) #+END_SRC From 6dd4a74f88031272e7a0704c71850e4d9a64c5c5 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 18 Oct 2016 18:27:00 -0700 Subject: [PATCH 24/29] [Linux] Add settings to gtkrc-2.0 --- dotfiles/gtkrc-2.0 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/dotfiles/gtkrc-2.0 b/dotfiles/gtkrc-2.0 index eb5cddb1..5f9060a7 100644 --- a/dotfiles/gtkrc-2.0 +++ b/dotfiles/gtkrc-2.0 @@ -2,3 +2,19 @@ binding "gtk-emacs-text-entry" { bind "BackSpace" { "delete-from-cursor" (word-ends, -1) } } + +gtk-theme-name="Paper" +gtk-icon-theme-name="Paper" +gtk-font-name="Roboto 11" +gtk-cursor-theme-name="Paper" +gtk-cursor-theme-size=0 +gtk-toolbar-style=GTK_TOOLBAR_BOTH +gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR +gtk-button-images=1 +gtk-menu-images=1 +gtk-enable-event-sounds=1 +gtk-enable-input-feedback-sounds=1 +gtk-xft-antialias=1 +gtk-xft-hinting=1 +gtk-xft-hintstyle="hintfull" + From dbc4eff77436a2422c0e526ddc5548c1553c6bf3 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 18 Oct 2016 18:27:16 -0700 Subject: [PATCH 25/29] [Arch] Add pandoc --- tasks/arch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/arch.py b/tasks/arch.py index e2c1e069..8127778c 100644 --- a/tasks/arch.py +++ b/tasks/arch.py @@ -28,7 +28,7 @@ PACKAGES = [ "xorg-utils", "playerctl", "pasystray", "dunst", "otf-fira-code", "ttf-mac-fonts", "otf-hermit", "ttf-font-awesome", "ttf-monaco", "tcpdump", "ngrep", "wireshark-gtk", "teamviewer", "mopidy-podcast", "tigervnc", - "kdegraphics-okular", + "kdegraphics-okular", "pandoc", ] From 726e8ab11aa8a4c6ee207154a8573d4e39fdb6c6 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 18 Oct 2016 18:27:35 -0700 Subject: [PATCH 26/29] [macOS] Add pandoc as default dependency --- tasks/brewfiles/additional | 1 - tasks/brewfiles/default | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/tasks/brewfiles/additional b/tasks/brewfiles/additional index ea7150fd..40ab9c4d 100644 --- a/tasks/brewfiles/additional +++ b/tasks/brewfiles/additional @@ -55,7 +55,6 @@ brew 'nmap' brew 'offline-imap' brew 'openssl' brew 'ossp-uuid' -brew 'pandoc' brew 'pango' brew 'pcre' brew 'pixman' diff --git a/tasks/brewfiles/default b/tasks/brewfiles/default index 01e203db..bf34a3a1 100644 --- a/tasks/brewfiles/default +++ b/tasks/brewfiles/default @@ -27,7 +27,7 @@ brew 'ngrep' brew 'nmap' brew 'node' brew 'openssl' -brew 'pyenv' +brew 'pandoc' brew 'pyenv' brew 'pypy' brew 'python' From b10472d559a1f5ec23996ab02cdf3ee2315d625d Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 18 Oct 2016 18:28:02 -0700 Subject: [PATCH 27/29] [Emacs] Add ham-mode config --- dotfiles/emacs.d/README.org | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index 5827f564..6aabc101 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -3720,7 +3720,15 @@ Not really sure what this is ** gmail-message-mode This is useful with server mode when editing gmail messages. I think that it is not currently working, or it may need to be manually enabled. #+BEGIN_SRC emacs-lisp -(use-package gmail-message-mode) +(use-package gmail-message-mode + :demand t) +#+END_SRC +** ham-mode +#+BEGIN_SRC emacs-lisp +(use-package ham-mode + :config + (progn + (setq ham-mode-html-to-markdown-command '("pandoc" "--from" "html" "--to" "markdown" file)))) #+END_SRC ** alert #+BEGIN_SRC emacs-lisp From 2eed65cd0542439d980e10a6253a3bfd3d8044b2 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 18 Oct 2016 18:28:14 -0700 Subject: [PATCH 28/29] Ignore Pocorn-Time directory --- dotfiles/config/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/dotfiles/config/.gitignore b/dotfiles/config/.gitignore index e9eec419..a224078a 100644 --- a/dotfiles/config/.gitignore +++ b/dotfiles/config/.gitignore @@ -37,3 +37,4 @@ /user-dirs.locale /vlc/ /xfce4/ +/Popcorn-Time/ From 106c060ff443610f876981d7132aee787e4f4c93 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 18 Oct 2016 20:48:09 -0700 Subject: [PATCH 29/29] [Emacs] Update about text --- dotfiles/emacs.d/README.org | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index 6aabc101..4beb2e85 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -9,8 +9,13 @@ #+HTML_HEAD: * About -This README is a literate version of my emacs configuration, but it -also serves as the README for my dotfiles. +This is my emacs configuration in literate form. It aspires to be like the +incredibly well commented literate configurations of [[http://pages.sachachua.com/.emacs.d/Sacha.html][Sacha Chua]] and [[http://doc.rix.si/cce/cce.html][Ryan Rix]], +but I haven't quite gotten around to polishing it to the point where nearly +every section has commentary explaining why it is there, as those two have. + +Still, there are definitely a few sections of which I am quite proud, and that +others may find to be useful. * Early The configurations in this section need to occur early in emacs startup for some reason or another. ** Lexical Binding