[Emacs] Rename font hydra
This commit is contained in:
parent
5244936a1c
commit
fdee42e6a8
@ -1410,24 +1410,25 @@ https://github.com/alpaker/Fill-Column-Indicator/issues/21 for more details
|
|||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package hydra
|
(use-package hydra
|
||||||
:demand t
|
: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 y" . imalison:hydra-yank/body)
|
||||||
("C-c 6" . imalison:compile/body))
|
("C-c 6" . imalison:compile/body))
|
||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
*** Font Size
|
*** Font Settings
|
||||||
<<fontsizehydra>>
|
<<fontsizehydra>>
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defhydra imalison:hydra-font-resize
|
(defhydra imalison:hydra-font
|
||||||
nil
|
nil
|
||||||
"Resize Font"
|
"Font Settings"
|
||||||
("-" imalison:font-size-decr "Decrease")
|
("-" imalison:font-size-decr "Decrease")
|
||||||
("d" imalison:font-size-decr "Decrease")
|
("d" imalison:font-size-decr "Decrease")
|
||||||
("=" imalison:font-size-incr "Increase")
|
("=" imalison:font-size-incr "Increase")
|
||||||
("+" imalison:font-size-incr "Increase")
|
("+" imalison:font-size-incr "Increase")
|
||||||
("i" imalison:font-size-incr "Increase")
|
("i" imalison:font-size-incr "Increase")
|
||||||
("h" imalison:set-huge-font-size "Huge")
|
("h" imalison:set-huge-font-size "Huge")
|
||||||
|
("a" imalison:appearance "Set Default Appearance")
|
||||||
("f" set-frame-font "Set Frame Font")
|
("f" set-frame-font "Set Frame Font")
|
||||||
("0" imalison:font-size-reset "Reset to default size"))
|
("0" imalison:font-size-reset "Reset to default size"))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
@ -63,14 +63,31 @@ main = xmonad $ ewmh $ pagerHints def
|
|||||||
, workspaces = ["Main", "Chat", "Music", "Sports", "Podcast", "Minimize", "7", "8", "9"]
|
, workspaces = ["Main", "Chat", "Music", "Sports", "Podcast", "Minimize", "7", "8", "9"]
|
||||||
, manageHook = manageDocks <+> manageHook def
|
, manageHook = manageDocks <+> manageHook def
|
||||||
, layoutHook = myLayoutHook
|
, layoutHook = myLayoutHook
|
||||||
, logHook = myLogHook
|
, logHook = myLogHook +++ ewmhWorkspaceNamesLogHook
|
||||||
, handleEventHook = docksEventHook <+> fullscreenEventHook
|
, handleEventHook = docksEventHook <+> fullscreenEventHook +++ ewmhWorkspaceNamesEventHook
|
||||||
, startupHook = myStartup
|
, startupHook = myStartup +++ ewmhWorkspaceNamesLogHook
|
||||||
, keys = customKeys (const []) addKeys
|
, keys = customKeys (const []) addKeys
|
||||||
}
|
} where
|
||||||
|
x +++ y = mappend y x
|
||||||
|
|
||||||
myLogHook = fadeInactiveLogHook 0.9
|
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
|
setWorkspaceNameToFocusedWindow workspace = do
|
||||||
namedWindows <- mapM getClass $ W.integrate' $ W.stack workspace
|
namedWindows <- mapM getClass $ W.integrate' $ W.stack workspace
|
||||||
renamedWindows <- remapNames namedWindows
|
renamedWindows <- remapNames namedWindows
|
||||||
|
Loading…
Reference in New Issue
Block a user