forked from colonelpanic/dotfiles
Merge branch 'master' of github.com:IvanMalison/dotfiles
This commit is contained in:
commit
d49eb65e7e
@ -41,11 +41,11 @@ UnlockDatabase=true
|
|||||||
|
|
||||||
[generator]
|
[generator]
|
||||||
EnsureEvery=true
|
EnsureEvery=true
|
||||||
ExcludeAlike=true
|
ExcludeAlike=false
|
||||||
Length=16
|
Length=16
|
||||||
LowerCase=true
|
LowerCase=true
|
||||||
Numbers=true
|
Numbers=true
|
||||||
SpecialChars=false
|
SpecialChars=true
|
||||||
UpperCase=true
|
UpperCase=true
|
||||||
|
|
||||||
[security]
|
[security]
|
||||||
|
@ -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
|
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
|
variable to be set to something strange. When I tried to disable it, it seemed
|
||||||
to cause issues. Oh well...
|
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
|
* Functions
|
||||||
** Join Paths
|
** Join Paths
|
||||||
Works in the same way as os.path.join in python
|
Works in the same way as os.path.join in python
|
||||||
@ -708,12 +714,18 @@ For composing functions with an apply so that they can be used with the ~:around
|
|||||||
** Font Size
|
** 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.
|
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
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defvar imalison:default-font-size-pt (face-attribute 'default :height))
|
(defvar imalison:default-font-size-pt nil)
|
||||||
|
|
||||||
|
(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
|
;; XXX: hack to get proper default value when default is set to something crazy
|
||||||
(defun imalison:set-default-font-size (&rest args)
|
(defun imalison:set-default-font-size (&rest args)
|
||||||
(when (or (> imalison:default-font-size-pt 150)
|
(interactive)
|
||||||
(< 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")
|
(message "default font size was set using hack")
|
||||||
(setq imalison:default-font-size-pt (face-attribute 'default :height))))
|
(setq imalison:default-font-size-pt (face-attribute 'default :height))))
|
||||||
|
|
||||||
@ -1622,63 +1634,10 @@ https://github.com/alpaker/Fill-Column-Indicator/issues/21 for more details
|
|||||||
:commands highlight-indent-guides-mode
|
:commands highlight-indent-guides-mode
|
||||||
:preface
|
:preface
|
||||||
(progn
|
(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))
|
(add-hook 'prog-mode-hook 'highlight-indent-guides-mode))
|
||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
(setq highlight-indent-guides-method 'fill)))
|
(setq highlight-indent-guides-method 'fill)))
|
||||||
|
|
||||||
(setq lexical-binding t)
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
* Keybindings
|
* Keybindings
|
||||||
** god-mode
|
** god-mode
|
||||||
@ -2506,6 +2465,7 @@ Reduce indentation for some functions
|
|||||||
:preface
|
:preface
|
||||||
(progn
|
(progn
|
||||||
(defvar eros-mode nil)
|
(defvar eros-mode nil)
|
||||||
|
|
||||||
(defun eros-around-eval-last-sexp (fn &rest args)
|
(defun eros-around-eval-last-sexp (fn &rest args)
|
||||||
(let ((result (apply fn args)))
|
(let ((result (apply fn args)))
|
||||||
(when eros-mode
|
(when eros-mode
|
||||||
@ -4869,10 +4829,6 @@ load-theme hook (See the heading below).
|
|||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defvar imalison:linum-format)
|
(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)
|
(defun imalison:format-linum (line-text)
|
||||||
(propertize (format imalison:linum-format line-text) 'face 'linum))
|
(propertize (format imalison:linum-format line-text) 'face 'linum))
|
||||||
|
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
#!/usr/bin/env sh
|
#!/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
|
||||||
|
@ -47,6 +47,7 @@ import XMonad.Layout.MultiToggle.Instances
|
|||||||
import XMonad.Layout.NoBorders
|
import XMonad.Layout.NoBorders
|
||||||
import qualified XMonad.Layout.Renamed as RN
|
import qualified XMonad.Layout.Renamed as RN
|
||||||
import XMonad.Layout.Spacing
|
import XMonad.Layout.Spacing
|
||||||
|
import XMonad.Layout.Tabbed
|
||||||
import qualified XMonad.StackSet as W
|
import qualified XMonad.StackSet as W
|
||||||
import XMonad.Util.CustomKeys
|
import XMonad.Util.CustomKeys
|
||||||
import qualified XMonad.Util.Dmenu as DM
|
import qualified XMonad.Util.Dmenu as DM
|
||||||
@ -255,6 +256,9 @@ goFullscreen = sendMessage $ Toggle NBFULL
|
|||||||
|
|
||||||
-- Layout setup
|
-- Layout setup
|
||||||
|
|
||||||
|
myTabConfig =
|
||||||
|
def { activeBorderColor = "#66cccc" }
|
||||||
|
|
||||||
rename newName = RN.renamed [RN.Replace newName]
|
rename newName = RN.renamed [RN.Replace newName]
|
||||||
|
|
||||||
layoutsStart layout = (layout, [Layout layout])
|
layoutsStart layout = (layout, [Layout layout])
|
||||||
@ -265,7 +269,9 @@ layoutInfo =
|
|||||||
layoutsStart (rename "Columns" $ multiCol [1, 1] 2 0.01 (-0.5)) |||!
|
layoutsStart (rename "Columns" $ multiCol [1, 1] 2 0.01 (-0.5)) |||!
|
||||||
rename "Large Main" (Tall 1 (3 / 100) (3 / 4)) |||!
|
rename "Large Main" (Tall 1 (3 / 100) (3 / 4)) |||!
|
||||||
rename "2 Columns" (Tall 1 (3 / 100) (1 / 2)) |||!
|
rename "2 Columns" (Tall 1 (3 / 100) (1 / 2)) |||!
|
||||||
Accordion |||! simpleCross
|
Accordion |||! simpleCross |||! myTabbed
|
||||||
|
where
|
||||||
|
myTabbed = tabbed shrinkText myTabConfig
|
||||||
|
|
||||||
layoutList = snd layoutInfo
|
layoutList = snd layoutInfo
|
||||||
|
|
||||||
@ -572,6 +578,7 @@ scratchpads =
|
|||||||
, NS "volume" volumeCommand volumeSelector nonFloating
|
, NS "volume" volumeCommand volumeSelector nonFloating
|
||||||
]
|
]
|
||||||
|
|
||||||
|
-- TODO: This doesnt work well with minimized windows
|
||||||
doScratchpad =
|
doScratchpad =
|
||||||
maybeUnminimizeAfter . deactivateFullAnd . namedScratchpadAction scratchpads
|
maybeUnminimizeAfter . deactivateFullAnd . namedScratchpadAction scratchpads
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user