diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index 6e499d07..6570ce66 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -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. *** 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. +** [[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]] ...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 @@ -1166,6 +1169,7 @@ programming mode. (select-window win))))) #+END_SRC *** display-buffer-alist +<> #+BEGIN_SRC emacs-lisp (defvar imalison:use-frames-only nil) @@ -3653,6 +3657,9 @@ emr (emacs refactor) provides support for refactoring in many programming langua #+END_SRC * Utility ** 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 (use-package term :preface diff --git a/dotfiles/xmonad/xmonad.hs b/dotfiles/xmonad/xmonad.hs index b7b0ea94..3177ffaf 100644 --- a/dotfiles/xmonad/xmonad.hs +++ b/dotfiles/xmonad/xmonad.hs @@ -117,9 +117,11 @@ instance Transformer MyToggles Window where myToggles = [LIMIT, GAPS, MAGICFOCUS] 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 - toggleTuple toggle = fmap (\str -> (str, Toggle toggle)) (toggleToStringWithState toggle) + toggleTuple toggle = fmap (\str -> (str, Toggle toggle)) + (toggleToStringWithState toggle) toggleStateToString s = case s of Just True -> "ON" @@ -127,8 +129,9 @@ toggleStateToString s = case s of Nothing -> "N/A" toggleToStringWithState :: (Transformer t Window, Show t) => t -> X String -toggleToStringWithState toggle = (printf "%s (%s)" (show toggle) . toggleStateToString) <$> - isToggleActive toggle +toggleToStringWithState toggle = + (printf "%s (%s)" (show toggle) . toggleStateToString) <$> + isToggleActive toggle selectToggle = togglesMap >>= DM.menuMapArgs "rofi" ["-dmenu", "-i"] >>= flip whenJust sendMessage @@ -140,8 +143,9 @@ whenB b a = do when b a return b -setToggleActive' toggle active = toggleInState toggle (Just active) >>= - flip whenB (sendMessage $ Toggle toggle) +setToggleActive' toggle active = + toggleInState toggle (Just active) >>= + flip whenB (sendMessage $ Toggle toggle) -- Ambiguous type reference without signature setToggleActive :: (Transformer t Window) => t -> Bool -> X () @@ -149,10 +153,13 @@ setToggleActive = (void .) . setToggleActive' 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 deactivateFullAnd action = sequence_ [deactivateFull, action] + +andDeactivateFull action = sequence_ [action, deactivateFull] -- Layout setup @@ -219,7 +226,8 @@ myBringWindow WindowBringerConfig{ menuCommand = cmd } = windowMap' titler >>= DM.menuMapArgs cmd args >>= flip whenJust action where action window = sequence_ [ maximizeWindow window - , windows $ W.focusWindow window . bringWindow window + , windows $ W.focusWindow window . + bringWindow window ] -- Dynamic Workspace Renaming @@ -375,8 +383,10 @@ doScratchpad = deactivateFullAnd . namedScratchpadAction scratchpads -- Raise or spawn -myRaiseNextMaybe = (maybeUnminimizeClassAfter .) . raiseNextMaybeCustomFocus greedyFocusWindow -myBringNextMaybe = (maybeUnminimizeAfter .) . raiseNextMaybeCustomFocus bringWindow +myRaiseNextMaybe = (maybeUnminimizeClassAfter .) . + raiseNextMaybeCustomFocus greedyFocusWindow +myBringNextMaybe = (maybeUnminimizeAfter .) . + raiseNextMaybeCustomFocus bringWindow bindBringAndRaise :: KeyMask -> KeySym -> X () -> Query Bool -> [((KeyMask, KeySym), X ())] 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} = [ ((modm, xK_p), spawn "rofi -show drun") , ((modm .|. shiftMask, xK_p), spawn "rofi -show run") - , ((modm, xK_g), maybeUnminimizeAfter $ + , ((modm, xK_g), andDeactivateFull $ maybeUnminimizeAfter $ actionMenu myWindowBringerConfig greedyFocusWindow) - , ((modm, xK_b), myBringWindow myWindowBringerConfig) + , ((modm, xK_b), andDeactivateFull $ myBringWindow myWindowBringerConfig) , ((modm .|. shiftMask, xK_b), swapMinimizeStateAfter $ actionMenu myWindowBringerConfig swapFocusedWith) , ((modm .|. controlMask, xK_t), spawn diff --git a/index.html b/index.html index 8ac64e27..5aac7825 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + @@ -253,10 +253,11 @@ for the JavaScript code in this tag.
  • 2.1.4. Set Background Color Source Blocks
  • -
  • 2.2. My functions section
  • -
  • 2.3. Configuration of My Own Packages
  • -
  • 2.4. Programming Language Configurations
  • -
  • 2.5. org-mode
  • +
  • 2.2. Frame control
  • +
  • 2.3. My functions section
  • +
  • 2.4. Configuration of My Own Packages
  • +
  • 2.5. Programming Language Configurations
  • +
  • 2.6. org-mode
  • 3. HTML Headers
  • @@ -347,14 +348,15 @@ for the JavaScript code in this tag.
  • 5.31.1. Use projectile as default directory
  • -
  • 5.32. Other
  • -
  • 5.33. Keyboard Macros +
  • 5.32. Disable hooks
  • +
  • 5.33. Other
  • +
  • 5.34. Keyboard Macros @@ -487,32 +489,7 @@ for the JavaScript code in this tag.
  • 10.10. yasnippet
  • -
  • 11. Source Control - -
  • +
  • 11. flycheck
  • 12. Major Modes
  • -
  • 13. Programming +
  • 13. Source Control