From 844b4d4cf5ea6d8208539c56a6370b840540615f Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Wed, 4 Jan 2017 16:35:51 -0800 Subject: [PATCH 1/9] [XMonad] Add tabbed layout --- dotfiles/xmonad/xmonad.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dotfiles/xmonad/xmonad.hs b/dotfiles/xmonad/xmonad.hs index 8ce37004..69ba961a 100644 --- a/dotfiles/xmonad/xmonad.hs +++ b/dotfiles/xmonad/xmonad.hs @@ -47,6 +47,7 @@ import XMonad.Layout.MultiToggle.Instances import XMonad.Layout.NoBorders import qualified XMonad.Layout.Renamed as RN import XMonad.Layout.Spacing +import XMonad.Layout.Tabbed import qualified XMonad.StackSet as W import XMonad.Util.CustomKeys import qualified XMonad.Util.Dmenu as DM @@ -255,6 +256,9 @@ goFullscreen = sendMessage $ Toggle NBFULL -- Layout setup +myTabConfig = + def { activeBorderColor = "#66cccc" } + rename newName = RN.renamed [RN.Replace newName] layoutsStart layout = (layout, [Layout layout]) @@ -265,7 +269,9 @@ layoutInfo = layoutsStart (rename "Columns" $ multiCol [1, 1] 2 0.01 (-0.5)) |||! rename "Large Main" (Tall 1 (3 / 100) (3 / 4)) |||! rename "2 Columns" (Tall 1 (3 / 100) (1 / 2)) |||! - Accordion |||! simpleCross + Accordion |||! simpleCross |||! myTabbed + where + myTabbed = tabbed shrinkText myTabConfig layoutList = snd layoutInfo From 58d2604bda10342588ad902c7283c11efcbac818 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Wed, 11 Jan 2017 12:36:55 -0800 Subject: [PATCH 2/9] [XMonad] Add TODO to doScratchpad --- dotfiles/xmonad/xmonad.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/dotfiles/xmonad/xmonad.hs b/dotfiles/xmonad/xmonad.hs index 69ba961a..4d28bd29 100644 --- a/dotfiles/xmonad/xmonad.hs +++ b/dotfiles/xmonad/xmonad.hs @@ -578,6 +578,7 @@ scratchpads = , NS "volume" volumeCommand volumeSelector nonFloating ] +-- TODO: This doesnt work well with minimized windows doScratchpad = maybeUnminimizeAfter . deactivateFullAnd . namedScratchpadAction scratchpads From 5692dd3f010837ce3acbdf5d2d1c462b25e42006 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Wed, 11 Jan 2017 12:50:27 -0800 Subject: [PATCH 3/9] [Linux] Allow setting of profile for hangouts --- dotfiles/lib/bin/start_hangouts.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dotfiles/lib/bin/start_hangouts.sh b/dotfiles/lib/bin/start_hangouts.sh index 99e54684..d8d3cbde 100755 --- a/dotfiles/lib/bin/start_hangouts.sh +++ b/dotfiles/lib/bin/start_hangouts.sh @@ -1,3 +1,9 @@ #!/usr/bin/env sh -google-chrome-stable --profile-directory=Default --app-id=knipolnnllmklapflnccelgolnpehhpl +HANGOUTS_PROFILE="Default" + +[ -e $HOME/.hangouts_profile ] && HANGOUTS_PROFILE="$(cat $HOME/.hangouts_profile)" + +google-chrome-stable \ + --profile-directory="$HANGOUTS_PROFILE" \ + --app-id=knipolnnllmklapflnccelgolnpehhpl From b0386150a4f50edca4a9647f4fa5fe2b2690277d Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Wed, 11 Jan 2017 12:50:57 -0800 Subject: [PATCH 4/9] [Emacs] Reduce output from setting font size with hack --- 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 69c0cf44..017a3cb8 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -710,10 +710,15 @@ This was taken from [[http://emacs.stackexchange.com/questions/7583/transiently- #+BEGIN_SRC emacs-lisp (defvar imalison:default-font-size-pt (face-attribute 'default :height)) +(defmacro imalison:acceptable-default-font-size (value) + (and (< value 150) (> value 50))) + ;; XXX: hack to get proper default value when default is set to something crazy (defun imalison:set-default-font-size (&rest args) - (when (or (> imalison:default-font-size-pt 150) - (< imalison:default-font-size-pt 50)) + (when (and (imalison:acceptable-default-font-size + (face-attribute 'default :height)) + (not (imalison:acceptable-default-font-size + imalison:default-font-size-pt))) (message "default font size was set using hack") (setq imalison:default-font-size-pt (face-attribute 'default :height)))) From df777edbc20bc6590556f60917faa2549ec3f48d Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Wed, 11 Jan 2017 15:23:41 -0800 Subject: [PATCH 5/9] [Emacs] Move use system font setting to early --- 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 017a3cb8..7849df6c 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -357,6 +357,12 @@ executable [[http://emacs.stackexchange.com/questions/6010/can-emacs-detect-the- Update: It turns out that it is term-exec-1 that is causing this environment variable to be set to something strange. When I tried to disable it, it seemed to cause issues. Oh well... +** Don't use system font +#+BEGIN_SRC emacs-lisp +;; Let me control my own goddamn fonts +;; XXX: This doesn't seem to work +(setq font-use-system-font nil) +#+END_SRC * Functions ** Join Paths Works in the same way as os.path.join in python @@ -4872,10 +4878,6 @@ load-theme hook (See the heading below). #+BEGIN_SRC emacs-lisp (defvar imalison:linum-format) -;; Let me control my own goddamn fonts -;; XXX: This doesn't seem to work -(setq font-use-system-font nil) - (defun imalison:format-linum (line-text) (propertize (format imalison:linum-format line-text) 'face 'linum)) From 70ab3c0d23b49cff4eddb8a6b872cbfa534adbee Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Thu, 12 Jan 2017 15:27:29 -0800 Subject: [PATCH 6/9] [Emacs] Fixup fontsize hack --- dotfiles/emacs.d/README.org | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index 7849df6c..beb2e024 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -714,17 +714,18 @@ For composing functions with an apply so that they can be used with the ~:around ** 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 -(defvar imalison:default-font-size-pt (face-attribute 'default :height)) +(defvar imalison:default-font-size-pt nil) -(defmacro imalison:acceptable-default-font-size (value) - (and (< value 150) (> value 50))) +(defun imalison:acceptable-default-font-size (value) + (and (numberp value) (< value 150) (> value 50))) ;; XXX: hack to get proper default value when default is set to something crazy (defun imalison:set-default-font-size (&rest args) + (interactive) (when (and (imalison:acceptable-default-font-size (face-attribute 'default :height)) - (not (imalison:acceptable-default-font-size - imalison:default-font-size-pt))) + (not (imalison:acceptable-default-font-size + imalison:default-font-size-pt))) (message "default font size was set using hack") (setq imalison:default-font-size-pt (face-attribute 'default :height)))) From 2db965575f5f2251e26604be6954f43b48c284fd Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Thu, 12 Jan 2017 15:28:20 -0800 Subject: [PATCH 7/9] [Emacs] Remove custom functions to set highlight-indent-guides faces --- dotfiles/emacs.d/README.org | 53 ------------------------------------- 1 file changed, 53 deletions(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index beb2e024..e4ed9778 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -1634,63 +1634,10 @@ https://github.com/alpaker/Fill-Column-Indicator/issues/21 for more details :commands highlight-indent-guides-mode :preface (progn - (use-package hexrgb :demand t) - - (defun imalison:change-hsv-value-by (delta) - (lambda (h s v) - (list h s (+ v delta)))) - - (defun imalison:build-safe-change-hsv-value (delta) - (lambda (h s v) - (imalison:safe-change-hsv-value - h s v delta))) - - (defun imalison:new-hsv-value-safe (value) - (or (> value 1) (< value 0))) - - (defun imalison:safe-change-hsv-value (h s v delta) - (let ((new-value (+ v delta))) - (if (imalison:new-hsv-value-safe new-value) - (let ((other-direction (+ v (* delta -2)))) - (if (imalison:new-hsv-value-safe other-direction) - (user-error "delta %s is too large" delta) - (list h s other-direction))) - (list h s new-value)))) - - (defun imalison:modify-hsv (color fn) - (hexrgb-rgb-hex-to-rgb-hex - (apply 'hexrgb-hsv-to-hex (apply fn (hexrgb-hex-to-hsv color))) 2)) - - (defun imalison:modify-hsv-value-by (color delta) - (imalison:modify-hsv color (imalison:build-safe-change-hsv-value delta))) - - (defvar imalison:hsv-value-delta .03) - - (defun imalison:set-highlight-indent-guides-faces (&rest args) - (interactive) - (require 'highlight-indent-guides) - (let ((bg-color (face-background 'default))) - (when bg-color - (set-face-background 'highlight-indent-guides-odd-face - (imalison:modify-hsv - bg-color - (imalison:build-safe-change-hsv-value - (* -1 imalison:hsv-value-delta)))) - (set-face-background 'highlight-indent-guides-even-face - (imalison:modify-hsv - bg-color - (imalison:build-safe-change-hsv-value - imalison:hsv-value-delta)))))) - - (advice-add 'load-theme - :after 'imalison:set-highlight-indent-guides-faces) - (add-hook 'prog-mode-hook 'highlight-indent-guides-mode)) :config (progn (setq highlight-indent-guides-method 'fill))) - -(setq lexical-binding t) #+END_SRC * Keybindings ** god-mode From 3f8e51f8baf92189f8c513eb04fcdf67709e3e37 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Thu, 12 Jan 2017 15:28:55 -0800 Subject: [PATCH 8/9] [KeepassX] Update password generation preferences --- dotfiles/config/keepassxc/keepassxc.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dotfiles/config/keepassxc/keepassxc.ini b/dotfiles/config/keepassxc/keepassxc.ini index a78cc41b..3149535d 100644 --- a/dotfiles/config/keepassxc/keepassxc.ini +++ b/dotfiles/config/keepassxc/keepassxc.ini @@ -41,11 +41,11 @@ UnlockDatabase=true [generator] EnsureEvery=true -ExcludeAlike=true +ExcludeAlike=false Length=16 LowerCase=true Numbers=true -SpecialChars=false +SpecialChars=true UpperCase=true [security] From afd324ba72eb10b1a01442a267d54b4b954ea2ec Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Thu, 12 Jan 2017 15:29:10 -0800 Subject: [PATCH 9/9] [Emacs] Whitespace tweak --- 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 e4ed9778..2b836706 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -2465,6 +2465,7 @@ Reduce indentation for some functions :preface (progn (defvar eros-mode nil) + (defun eros-around-eval-last-sexp (fn &rest args) (let ((result (apply fn args))) (when eros-mode