diff options
author | jao <jao@gnu.org> | 2022-06-26 15:22:32 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-06-26 15:22:32 +0100 |
commit | f6e5a0d06a684f44d29943003304d13f6eb14ec7 (patch) | |
tree | f4bddf487ee02bc15de1cd69b02ad6127275cc4a | |
parent | 9ba68215f2f03a6e202ebe16349d02b4aec8112d (diff) | |
download | xmonad-config-f6e5a0d06a684f44d29943003304d13f6eb14ec7.tar.gz xmonad-config-f6e5a0d06a684f44d29943003304d13f6eb14ec7.tar.bz2 |
ellipsis in window titles
-rw-r--r-- | xmonad.hs | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -227,23 +227,26 @@ mHook = MH.composeOne dlgs <+> composeAll (emf:cl) simplePP = SBP.def { SBP.ppLayout = const "" , SBP.ppHidden = const "" - , SBP.ppCurrent = SBP.xmobarColor "orangered4" "" - , SBP.ppTitle = take 25 + , SBP.ppCurrent = SBP.xmobarColor "gray40" "" + , SBP.ppTitle = ellipsis 25 , SBP.ppSep = " " , SBP.ppUrgent = const (SBP.xmobarColor "orangered3" "" "*") } + where ellipsis n s | length s > n = take (n - 3) s ++ " ..." + | otherwise = s + main = do scheme <- lookupEnv "JAO_COLOR_SCHEME" let dark = Just "dark" == scheme popCfg = if dark then darkPopConfig else lightPopConfig - defBorder = if dark then "grey80" else "grey70" - defFBorder = if dark then "grey85" else "grey20" + defBorder = if dark then "grey30" else "grey95" + defFBorder = if dark then "grey35" else "grey95" ehook = SM.serverModeEventHook <+> UH.trayerPaddingXmobarEventHook lyt = NB.smartBorders layouts localStartupHook = spawn "xmobars.sh" >> runOrRaiseEmacs - sb = SB.statusBarProp "xmobar" (pure simplePP) + sb = SB.withSB $ SB.statusBarProp "xmobar" (pure simplePP) uhook = U.withUrgencyHook U.NoUrgencyHook - xmonad . uhook . (SB.withSB sb) . MD.docks . Ewm.ewmh $ def { + xmonad . uhook . sb . MD.docks . Ewm.ewmh $ def { manageHook = scratchpad <+> mHook <+> manageHook def , handleEventHook = ehook , layoutHook = MD.avoidStruts lyt |