[Emacs] Rename font hydra

This commit is contained in:
Ivan Malison 2016-10-25 17:48:32 -07:00
parent 5244936a1c
commit fdee42e6a8
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8
2 changed files with 26 additions and 8 deletions

View File

@ -1410,24 +1410,25 @@ https://github.com/alpaker/Fill-Column-Indicator/issues/21 for more details
#+BEGIN_SRC emacs-lisp
(use-package hydra
:demand t
:bind (("C-c f" . imalison:hydra-font-resize/body)
:bind (("C-c f" . imalison:hydra-font/body)
("C-c y" . imalison:hydra-yank/body)
("C-c 6" . imalison:compile/body))
:config
(progn
#+END_SRC
*** Font Size
*** Font Settings
<<fontsizehydra>>
#+BEGIN_SRC emacs-lisp
(defhydra imalison:hydra-font-resize
(defhydra imalison:hydra-font
nil
"Resize Font"
"Font Settings"
("-" imalison:font-size-decr "Decrease")
("d" imalison:font-size-decr "Decrease")
("=" imalison:font-size-incr "Increase")
("+" imalison:font-size-incr "Increase")
("i" imalison:font-size-incr "Increase")
("h" imalison:set-huge-font-size "Huge")
("a" imalison:appearance "Set Default Appearance")
("f" set-frame-font "Set Frame Font")
("0" imalison:font-size-reset "Reset to default size"))
#+END_SRC

View File

@ -63,14 +63,31 @@ main = xmonad $ ewmh $ pagerHints def
, workspaces = ["Main", "Chat", "Music", "Sports", "Podcast", "Minimize", "7", "8", "9"]
, manageHook = manageDocks <+> manageHook def
, layoutHook = myLayoutHook
, logHook = myLogHook
, handleEventHook = docksEventHook <+> fullscreenEventHook
, startupHook = myStartup
, logHook = myLogHook +++ ewmhWorkspaceNamesLogHook
, handleEventHook = docksEventHook <+> fullscreenEventHook +++ ewmhWorkspaceNamesEventHook
, startupHook = myStartup +++ ewmhWorkspaceNamesLogHook
, keys = customKeys (const []) addKeys
}
} where
x +++ y = mappend y x
myLogHook = fadeInactiveLogHook 0.9
enableCustomWorkspaceNames = True
ewmhWorkspaceNamesLogHook = do
WorkspaceNames namesMap <- XS.get
ewmhDesktopsLogHookCustom $ map (addWorkspaceNamesToTag namesMap)
ewmhWorkspaceNamesEventHook e = do
WorkspaceNames namesMap <- XS.get
ewmhDesktopsEventHookCustom (map $ addWorkspaceNamesToTag namesMap) e
addWorkspaceNamesToTag namesMap ws@W.Workspace { W.tag = currentTag } =
if enableCustomWorkspaceNames then
let currentName = M.findWithDefault "" (W.tag ws) namesMap in
ws { W.tag = printf "%s: %s" currentTag currentName }
else
ws
setWorkspaceNameToFocusedWindow workspace = do
namedWindows <- mapM getClass $ W.integrate' $ W.stack workspace
renamedWindows <- remapNames namedWindows