From ce03294eed7b4f2886cfc595d22671e09de25f84 Mon Sep 17 00:00:00 2001 From: Jeremy Kaplan Date: Wed, 6 Jul 2016 16:45:11 -0400 Subject: [PATCH 1/9] Quiet bspwm startup --- bspwm/bspwmrc | 6 +++--- bspwm/external_rules | 11 ----------- 2 files changed, 3 insertions(+), 14 deletions(-) delete mode 100644 bspwm/external_rules diff --git a/bspwm/bspwmrc b/bspwm/bspwmrc index 99377a6..716d89c 100755 --- a/bspwm/bspwmrc +++ b/bspwm/bspwmrc @@ -15,11 +15,11 @@ bspc config remove_unplugged_monitors true bspc monitor -d 1 2 3 4 5 6 7 8 9 10 +bspc rule -r *:* bspc rule -a Gimp state=floating bspc rule -a Slack desktop='^8' -bspc config external_rules_command "$XDG_CONFIG_HOME/bspwm/external_rules" pulseaudio --check || pulseaudio -ps -u jdkaplan | grep -o xss-lock || xss-lock -- i3lock -e -i ~/images/lockscreen.png & +ps -u jdkaplan | grep -oq xss-lock || xss-lock -- i3lock -e -i ~/images/lockscreen.png & nitrogen --restore & -ps -u jdkaplan | grep -o panel && pkill panel; $XDG_CONFIG_HOME/panel/panel & +ps -u jdkaplan | grep -oq panel && pkill panel; $XDG_CONFIG_HOME/panel/panel & diff --git a/bspwm/external_rules b/bspwm/external_rules deleted file mode 100644 index ff8c21b..0000000 --- a/bspwm/external_rules +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -wid=$1 -class=$2 -instance=$3 - -echo "$wid|$class|$instance" >> ~/tmp/rules.log - -if [ "$instance" = Mutt ] ; then - echo 'desktop=^9' -fi From 0ef677e18ab11989311b68f3a496d07b9b5800a6 Mon Sep 17 00:00:00 2001 From: Jeremy Kaplan Date: Wed, 6 Jul 2016 16:46:23 -0400 Subject: [PATCH 2/9] Add pentadactyl passthrough for soundcloud --- pentadactyl/.pentadactylrc | 1 + 1 file changed, 1 insertion(+) diff --git a/pentadactyl/.pentadactylrc b/pentadactyl/.pentadactylrc index 608bff0..f4ad7c5 100644 --- a/pentadactyl/.pentadactylrc +++ b/pentadactyl/.pentadactylrc @@ -6,6 +6,7 @@ set passkeys+=feedly.com:jkJK set passkeys+=pandora.com: set passkeys+=reddit.com:jkJKazxXcC=-[]1234567890 set passkeys+=youtube.com:k +set passkeys+=soundcloud.com:lLMPRS1234567890 nmap J gt nmap K gT From e457c040faed6b9b9f9fa4beed1a96e9e6b299a0 Mon Sep 17 00:00:00 2001 From: Jeremy Kaplan Date: Wed, 6 Jul 2016 17:35:26 -0400 Subject: [PATCH 3/9] Clean up emacs init --- emacs/init.el | 47 +++++++++-------------------------------------- 1 file changed, 9 insertions(+), 38 deletions(-) diff --git a/emacs/init.el b/emacs/init.el index 3f6366d..41f8b64 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -14,11 +14,11 @@ go-mode goto-chg haskell-mode - jinja2-mode + jsx-mode + js2-mode markdown-mode php-mode scala-mode - tuareg typescript-mode undo-tree web-mode @@ -98,7 +98,7 @@ ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. - '(tuareg-font-lock-operator-face ((t (:inherit font-lock-keyword-face))))) + ) (require 'autopair) (autopair-global-mode) @@ -119,19 +119,6 @@ ;; prettify symbols (global-prettify-symbols-mode 1) -(setq coq-symbols - '( - ("forall" ?∀) - ("->" ?→) - ("exists" ?∃) - ("=>" ?⇒) - )) - -(add-hook 'coq-mode-hook - (lambda () - (dolist (binding coq-symbols) - (push binding prettify-symbols-alist)))) - (put 'narrow-to-region 'disabled nil) (global-hl-line-mode 1) @@ -176,7 +163,6 @@ (require 'php-mode) - (require 'markdown-mode) (add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode)) @@ -201,9 +187,6 @@ ;; delete trailing whitespace on save (add-hook 'prog-mode-hook (lambda () (add-to-list 'write-file-functions 'delete-trailing-whitespace))) -(require 'jinja2-mode) -(add-to-list 'auto-mode-alist '("\\.jinja2\\'" . jinja2-mode)) - ;; found at https://gist.github.com/NFicano/1356280 ;; modified for 24.3 @@ -252,13 +235,10 @@ they line up with the line containing the corresponding opening bracket." (add-hook 'haskell-mode-hook 'turn-on-haskell-indent) (require 'web-mode) -(add-to-list 'auto-mode-alist '("\\.phtml\\'" . web-mode)) -(add-to-list 'auto-mode-alist '("\\.tpl\\.php\\'" . web-mode)) -(add-to-list 'auto-mode-alist '("\\.[agj]sp\\'" . web-mode)) -(add-to-list 'auto-mode-alist '("\\.as[cp]x\\'" . web-mode)) -(add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode)) -(add-to-list 'auto-mode-alist '("\\.mustache\\'" . web-mode)) -(add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode)) +(add-to-list 'auto-mode-alist '("\\.php\\'" . web-mode)) +(add-to-list 'auto-mode-alist '("\\.jsx?\\'" . web-mode)) +(add-to-list 'auto-mode-alist '("\\.scss\\'" . web-mode)) +(add-to-list 'auto-mode-alist '("\\.html\\'" . web-mode)) (add-hook 'web-mode-hook (lambda () @@ -271,11 +251,6 @@ they line up with the line containing the corresponding opening bracket." (setq web-mode-enable-html-colorization t) (setq web-mode-enable-css-colorization t) - (set-face-attribute 'web-mode-html-attr-name-face nil :foreground "#3387cc") - (set-face-attribute 'web-mode-html-attr-equal-face nil :foreground "gray60") - (set-face-attribute 'web-mode-html-tag-bracket-face nil :foreground "gray60") - (set-face-attribute 'web-mode-html-tag-face nil :foreground "#e9c062") - (define-key web-mode-map (kbd "C-c /") 'web-mode-element-close))) (require 'go-mode-autoloads) @@ -284,9 +259,5 @@ they line up with the line containing the corresponding opening bracket." (load-theme 'jdkaplan t) ;; (load-theme 'jdkaplan-light t) -;; sup -(add-to-list 'auto-mode-alist '("/sup.*eml$" . message-mode)) -(add-hook 'message-mode-hook - (lambda () - (auto-fill-mode 1) - (search-forward-regexp "^$"))) +(require 'jsx-mode) +(require 'js2-mode) From a648f2d37a48aa2d1b65d91e93ce1495912fcc84 Mon Sep 17 00:00:00 2001 From: Jeremy Kaplan Date: Wed, 6 Jul 2016 17:57:22 -0400 Subject: [PATCH 4/9] New emacs theme --- emacs/themes/jdkaplan-theme.el | 84 ++++++++++++++++++++++++---------- 1 file changed, 61 insertions(+), 23 deletions(-) diff --git a/emacs/themes/jdkaplan-theme.el b/emacs/themes/jdkaplan-theme.el index c4b5237..c90ad01 100644 --- a/emacs/themes/jdkaplan-theme.el +++ b/emacs/themes/jdkaplan-theme.el @@ -1,27 +1,65 @@ (deftheme jdkaplan "jdkaplan's theme") -(custom-theme-set-faces - 'jdkaplan - '(default ((t (:foreground "#e4e4e4" :background "#262626" )))) - '(cursor ((t (:background "#eeeeee" )))) - '(fringe ((t (:background "#262626" )))) - '(mode-line ((t (:foreground "#eeeeee" :background "#444444" )))) - '(mode-line-inactive ((t (:foreground "#444444" :background "#1e1e1e" )))) - '(vertical-border ((t (:foreground "#444444" :background "#262626" )))) - '(region ((t (:background "#3a3a3a" )))) - '(secondary-selection ((t (:background "#1e1e1e" )))) - '(font-lock-builtin-face ((t (:foreground "#f67f4e" )))) - '(font-lock-comment-face ((t (:foreground "#aaaaaa" )))) - '(font-lock-function-name-face ((t (:foreground "#00c7ff" )))) - '(font-lock-keyword-face ((t (:foreground "#3cc93a" )))) - '(font-lock-string-face ((t (:foreground "#a87f00" )))) - '(font-lock-type-face ((t (:foreground "#e8cf0e" )))) - '(font-lock-constant-face ((t (:foreground "#b987ff" )))) - '(font-lock-variable-name-face ((t (:foreground "#00c7ff" )))) - '(minibuffer-prompt ((t (:foreground "#c7c7c7" :bold t )))) - '(font-lock-warning-face ((t (:foreground "red" :bold t )))) - '(hl-line ((t (:background "black")))) - '(show-paren-match-face ((t (:foreground "orange" :background "black")))) - ) +(let ( + (black "#1e1e1e") + (lightblack "#262626") + (darkgray "#3a3a3a") + (gray "#444444") + (lightgray "#c7c7c7") + (lightergray "#aaaaaa") + (darkwhite "#e4e4e4") + (white "#eeeeee") + (red "#ab4642") + (lightorange "#dc9656") + (orange "#f67f4e") + (goldenrod "#ccac62") + (paleyellow "#f7ca88") + (yellow "#e0d000") + (lime "#38ce35") + (palegreen "#a1d06c") + (green "#0cc91c") + (seagreen "#04d4a0") + (teal "#3ecae0") + (brightblue "#00c7ff") + (paleblue "#66C4FF") + (bluegray "#8bcef0") + (purple "#b98fff") + (tan "#d49804") + (brown "#a87f00") + (neutralbrown "#c78f6b") + ) + + (custom-theme-set-faces + 'jdkaplan + `(default ((t (:foreground ,darkwhite :background ,lightblack )))) + `(cursor ((t (:background ,white )))) + `(fringe ((t (:background ,lightblack )))) + `(mode-line ((t (:foreground ,white :background ,gray )))) + `(mode-line-inactive ((t (:foreground ,gray :background ,black )))) + `(vertical-border ((t (:foreground ,gray :background ,lightblack )))) + `(region ((t (:background ,darkgray )))) + `(secondary-selection ((t (:background ,black )))) + `(font-lock-builtin-face ((t (:foreground ,lightorange )))) + `(font-lock-comment-face ((t (:foreground ,lightergray )))) + `(font-lock-function-name-face ((t (:foreground ,paleblue )))) + `(font-lock-keyword-face ((t (:foreground ,lime )))) + `(font-lock-string-face ((t (:foreground ,goldenrod )))) + `(font-lock-type-face ((t (:foreground ,yellow )))) + `(font-lock-constant-face ((t (:foreground ,purple )))) + `(font-lock-variable-name-face ((t (:foreground ,paleblue )))) + `(minibuffer-prompt ((t (:foreground ,lightgray :bold t )))) + `(font-lock-warning-face ((t (:foreground ,red :bold t )))) + `(hl-line ((t (:background "black")))) + + `(web-mode-html-attr-name-face ((t (:foreground ,palegreen )))) + `(web-mode-html-attr-equal-face ((t (:foreground "gray60" )))) + `(web-mode-html-tag-bracket-face ((t (:foreground "gray60" )))) + `(web-mode-html-tag-face ((t (:foreground ,bluegray )))) + `(web-mode-block-delimiter-face ((t (:foreground ,orange )))) + + `(show-paren-match-face ((t (:foreground ,white :background ,brown :bold t )))) + ) + + ) (provide-theme 'jdkaplan) From ec35e1fd7611ad504a9c3f4a16236553f2eaf6b5 Mon Sep 17 00:00:00 2001 From: Jeremy Kaplan Date: Thu, 7 Jul 2016 12:11:13 -0400 Subject: [PATCH 5/9] Fix emacs paren-match colors --- emacs/themes/jdkaplan-theme.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs/themes/jdkaplan-theme.el b/emacs/themes/jdkaplan-theme.el index c90ad01..4a2045f 100644 --- a/emacs/themes/jdkaplan-theme.el +++ b/emacs/themes/jdkaplan-theme.el @@ -58,7 +58,7 @@ `(web-mode-html-tag-face ((t (:foreground ,bluegray )))) `(web-mode-block-delimiter-face ((t (:foreground ,orange )))) - `(show-paren-match-face ((t (:foreground ,white :background ,brown :bold t )))) + `(show-paren-match-face ((t (:foreground ,teal :bold t )))) ) ) From 081bc797ea1c6119afa18f9109bb55913dd0143d Mon Sep 17 00:00:00 2001 From: Jeremy Kaplan Date: Thu, 7 Jul 2016 13:08:02 -0400 Subject: [PATCH 6/9] Change js indent offset in web-mode --- emacs/init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs/init.el b/emacs/init.el index 41f8b64..2628d23 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -244,7 +244,7 @@ they line up with the line containing the corresponding opening bracket." (lambda () (setq web-mode-markup-indent-offset 2) (setq web-mode-css-indent-offset 2) - (setq web-mode-code-indent-offset 2) + (setq web-mode-code-indent-offset 4) (setq web-mode-enable-auto-pairing t) (setq web-mode-enable-auto-expanding t) From dda0144dd4b2ddd5ce236da27b11f7edc70a729f Mon Sep 17 00:00:00 2001 From: Jeremy Kaplan Date: Thu, 7 Jul 2016 13:11:10 -0400 Subject: [PATCH 7/9] Add local install paths to zsh --- zsh/.zshenv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh/.zshenv b/zsh/.zshenv index 934ebdb..79384de 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -1,4 +1,4 @@ -export PATH=$PATH:$HOME/bin +export PATH=$PATH:$HOME/bin:$HOME/.local/bin export EDITOR='emacs' export VISUAL=$EDITOR From 88fc38c1b33a96647b1662057fc65d4b2a75843c Mon Sep 17 00:00:00 2001 From: Jeremy Kaplan Date: Thu, 7 Jul 2016 13:11:40 -0400 Subject: [PATCH 8/9] Ignore whatever vim's .netrwhist is --- vim/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 vim/.gitignore diff --git a/vim/.gitignore b/vim/.gitignore new file mode 100644 index 0000000..a0e76af --- /dev/null +++ b/vim/.gitignore @@ -0,0 +1 @@ +.netrwhist From 14140c6dc70e696ed31a115949305975a53c5c39 Mon Sep 17 00:00:00 2001 From: Jeremy Kaplan Date: Fri, 8 Jul 2016 10:15:38 -0400 Subject: [PATCH 9/9] Update panel_bar for new netctl-auto version --- panel/panel_bar.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/panel/panel_bar.py b/panel/panel_bar.py index 7f1a8f8..1667545 100755 --- a/panel/panel_bar.py +++ b/panel/panel_bar.py @@ -77,10 +77,11 @@ def volume_update(_): return 'volume', color_string("Vol: %d%s" % (volume, mute_icon), **kwargs) def wifi_update(_): - info = subprocess.check_output(['netctl-auto', 'current']) - info = info[:-1].decode('utf-8') - if info: - interface, network = info.split('-', 1) + info = subprocess.check_output(['netctl-auto', 'list']) + active = [line for line in info.splitlines() if line[0] == '*'] + + if active: + interface, network = active[0].split('-', 1) else: interface, network = 'wlp2s0', '-' return 'wifi', color_string('{}: {}'.format(interface, network))