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 diff --git a/emacs/init.el b/emacs/init.el index 4aa99af..2628d23 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 @@ -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,30 +235,22 @@ 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 () (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) (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) @@ -283,3 +258,6 @@ they line up with the line containing the corresponding opening bracket." (add-to-list 'custom-theme-load-path "~/.emacs.d/themes") (load-theme 'jdkaplan t) ;; (load-theme 'jdkaplan-light t) + +(require 'jsx-mode) +(require 'js2-mode) diff --git a/emacs/themes/jdkaplan-theme.el b/emacs/themes/jdkaplan-theme.el index c4b5237..4a2045f 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 ,teal :bold t )))) + ) + + ) (provide-theme 'jdkaplan) 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)) 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 diff --git a/vim/.gitignore b/vim/.gitignore new file mode 100644 index 0000000..a0e76af --- /dev/null +++ b/vim/.gitignore @@ -0,0 +1 @@ +.netrwhist 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