Merge branch 'master' of github.com:IvanMalison/dotfiles
This commit is contained in:
commit
44cf16dab1
@ -36,6 +36,9 @@ I'm considering turning this snippet in to a package, so please let me know if
|
|||||||
that is something you are interested in.
|
that is something you are interested in.
|
||||||
*** Set Background Color Source Blocks
|
*** Set Background Color Source Blocks
|
||||||
For some reason, org-mode uses all of your currently active fontification when exporting EXCEPT for background color. [[Set Background Color of Source Blocks for Export][This]] modification fixes this.
|
For some reason, org-mode uses all of your currently active fontification when exporting EXCEPT for background color. [[Set Background Color of Source Blocks for Export][This]] modification fixes this.
|
||||||
|
** [[framecontrol][Frame control]]
|
||||||
|
My custom [[framecontrol][frame control]] stuff is built to integrate really nicely with xmonad. I
|
||||||
|
think its pretty awesome!
|
||||||
** [[Functions][My functions section]]
|
** [[Functions][My functions section]]
|
||||||
...has a bunch of generally useful functions:
|
...has a bunch of generally useful functions:
|
||||||
+ [[https://github.com/IvanMalison/emit/blob/2e4d788abd68bac538acb06443179b8d5885052e/emit.el#L104][emit-prefix-selector]] (SUPER USEFUL, moved to emit) See [[https://github.com/IvanMalison/emit#prefix-selector][README]] for explantion
|
+ [[https://github.com/IvanMalison/emit/blob/2e4d788abd68bac538acb06443179b8d5885052e/emit.el#L104][emit-prefix-selector]] (SUPER USEFUL, moved to emit) See [[https://github.com/IvanMalison/emit#prefix-selector][README]] for explantion
|
||||||
@ -1166,6 +1169,7 @@ programming mode.
|
|||||||
(select-window win)))))
|
(select-window win)))))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
*** display-buffer-alist
|
*** display-buffer-alist
|
||||||
|
<<framecontrol>>
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defvar imalison:use-frames-only nil)
|
(defvar imalison:use-frames-only nil)
|
||||||
|
|
||||||
@ -3653,6 +3657,9 @@ emr (emacs refactor) provides support for refactoring in many programming langua
|
|||||||
#+END_SRC
|
#+END_SRC
|
||||||
* Utility
|
* Utility
|
||||||
** term
|
** term
|
||||||
|
The main thing I do here is restore a bunch of keybindings that are eliminated
|
||||||
|
in term-mode. This makes term-mode 1000% more useful
|
||||||
|
(especially having M-x and C-y available).
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package term
|
(use-package term
|
||||||
:preface
|
:preface
|
||||||
|
@ -117,9 +117,11 @@ instance Transformer MyToggles Window where
|
|||||||
myToggles = [LIMIT, GAPS, MAGICFOCUS]
|
myToggles = [LIMIT, GAPS, MAGICFOCUS]
|
||||||
otherToggles = [NBFULL, MIRROR]
|
otherToggles = [NBFULL, MIRROR]
|
||||||
|
|
||||||
togglesMap = fmap M.fromList $ sequence $ map toggleTuple myToggles ++ map toggleTuple otherToggles
|
togglesMap = fmap M.fromList $ sequence $
|
||||||
|
map toggleTuple myToggles ++ map toggleTuple otherToggles
|
||||||
where
|
where
|
||||||
toggleTuple toggle = fmap (\str -> (str, Toggle toggle)) (toggleToStringWithState toggle)
|
toggleTuple toggle = fmap (\str -> (str, Toggle toggle))
|
||||||
|
(toggleToStringWithState toggle)
|
||||||
|
|
||||||
toggleStateToString s = case s of
|
toggleStateToString s = case s of
|
||||||
Just True -> "ON"
|
Just True -> "ON"
|
||||||
@ -127,7 +129,8 @@ toggleStateToString s = case s of
|
|||||||
Nothing -> "N/A"
|
Nothing -> "N/A"
|
||||||
|
|
||||||
toggleToStringWithState :: (Transformer t Window, Show t) => t -> X String
|
toggleToStringWithState :: (Transformer t Window, Show t) => t -> X String
|
||||||
toggleToStringWithState toggle = (printf "%s (%s)" (show toggle) . toggleStateToString) <$>
|
toggleToStringWithState toggle =
|
||||||
|
(printf "%s (%s)" (show toggle) . toggleStateToString) <$>
|
||||||
isToggleActive toggle
|
isToggleActive toggle
|
||||||
|
|
||||||
selectToggle = togglesMap >>= DM.menuMapArgs "rofi" ["-dmenu", "-i"] >>=
|
selectToggle = togglesMap >>= DM.menuMapArgs "rofi" ["-dmenu", "-i"] >>=
|
||||||
@ -140,7 +143,8 @@ whenB b a = do
|
|||||||
when b a
|
when b a
|
||||||
return b
|
return b
|
||||||
|
|
||||||
setToggleActive' toggle active = toggleInState toggle (Just active) >>=
|
setToggleActive' toggle active =
|
||||||
|
toggleInState toggle (Just active) >>=
|
||||||
flip whenB (sendMessage $ Toggle toggle)
|
flip whenB (sendMessage $ Toggle toggle)
|
||||||
|
|
||||||
-- Ambiguous type reference without signature
|
-- Ambiguous type reference without signature
|
||||||
@ -149,10 +153,13 @@ setToggleActive = (void .) . setToggleActive'
|
|||||||
|
|
||||||
deactivateFull = setToggleActive NBFULL False
|
deactivateFull = setToggleActive NBFULL False
|
||||||
|
|
||||||
toggleOr toggle toState action = setToggleActive' toggle toState >>= ((`when` action) . not)
|
toggleOr toggle toState action = setToggleActive' toggle toState >>=
|
||||||
|
((`when` action) . not)
|
||||||
|
|
||||||
deactivateFullOr = toggleOr NBFULL False
|
deactivateFullOr = toggleOr NBFULL False
|
||||||
deactivateFullAnd action = sequence_ [deactivateFull, action]
|
deactivateFullAnd action = sequence_ [deactivateFull, action]
|
||||||
|
|
||||||
|
andDeactivateFull action = sequence_ [action, deactivateFull]
|
||||||
|
|
||||||
-- Layout setup
|
-- Layout setup
|
||||||
|
|
||||||
@ -219,7 +226,8 @@ myBringWindow WindowBringerConfig{ menuCommand = cmd
|
|||||||
} =
|
} =
|
||||||
windowMap' titler >>= DM.menuMapArgs cmd args >>= flip whenJust action
|
windowMap' titler >>= DM.menuMapArgs cmd args >>= flip whenJust action
|
||||||
where action window = sequence_ [ maximizeWindow window
|
where action window = sequence_ [ maximizeWindow window
|
||||||
, windows $ W.focusWindow window . bringWindow window
|
, windows $ W.focusWindow window .
|
||||||
|
bringWindow window
|
||||||
]
|
]
|
||||||
|
|
||||||
-- Dynamic Workspace Renaming
|
-- Dynamic Workspace Renaming
|
||||||
@ -375,8 +383,10 @@ doScratchpad = deactivateFullAnd . namedScratchpadAction scratchpads
|
|||||||
|
|
||||||
-- Raise or spawn
|
-- Raise or spawn
|
||||||
|
|
||||||
myRaiseNextMaybe = (maybeUnminimizeClassAfter .) . raiseNextMaybeCustomFocus greedyFocusWindow
|
myRaiseNextMaybe = (maybeUnminimizeClassAfter .) .
|
||||||
myBringNextMaybe = (maybeUnminimizeAfter .) . raiseNextMaybeCustomFocus bringWindow
|
raiseNextMaybeCustomFocus greedyFocusWindow
|
||||||
|
myBringNextMaybe = (maybeUnminimizeAfter .) .
|
||||||
|
raiseNextMaybeCustomFocus bringWindow
|
||||||
|
|
||||||
bindBringAndRaise :: KeyMask -> KeySym -> X () -> Query Bool -> [((KeyMask, KeySym), X ())]
|
bindBringAndRaise :: KeyMask -> KeySym -> X () -> Query Bool -> [((KeyMask, KeySym), X ())]
|
||||||
bindBringAndRaise mask sym start query =
|
bindBringAndRaise mask sym start query =
|
||||||
@ -391,9 +401,9 @@ bindBringAndRaiseMany = concatMap (\(a, b, c, d) -> bindBringAndRaise a b c d)
|
|||||||
addKeys conf@XConfig {modMask = modm} =
|
addKeys conf@XConfig {modMask = modm} =
|
||||||
[ ((modm, xK_p), spawn "rofi -show drun")
|
[ ((modm, xK_p), spawn "rofi -show drun")
|
||||||
, ((modm .|. shiftMask, xK_p), spawn "rofi -show run")
|
, ((modm .|. shiftMask, xK_p), spawn "rofi -show run")
|
||||||
, ((modm, xK_g), maybeUnminimizeAfter $
|
, ((modm, xK_g), andDeactivateFull $ maybeUnminimizeAfter $
|
||||||
actionMenu myWindowBringerConfig greedyFocusWindow)
|
actionMenu myWindowBringerConfig greedyFocusWindow)
|
||||||
, ((modm, xK_b), myBringWindow myWindowBringerConfig)
|
, ((modm, xK_b), andDeactivateFull $ myBringWindow myWindowBringerConfig)
|
||||||
, ((modm .|. shiftMask, xK_b), swapMinimizeStateAfter $
|
, ((modm .|. shiftMask, xK_b), swapMinimizeStateAfter $
|
||||||
actionMenu myWindowBringerConfig swapFocusedWith)
|
actionMenu myWindowBringerConfig swapFocusedWith)
|
||||||
, ((modm .|. controlMask, xK_t), spawn
|
, ((modm .|. controlMask, xK_t), spawn
|
||||||
|
1289
index.html
1289
index.html
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user