summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-06-26 15:22:32 +0100
committerjao <jao@gnu.org>2022-06-26 15:22:32 +0100
commitf6e5a0d06a684f44d29943003304d13f6eb14ec7 (patch)
treef4bddf487ee02bc15de1cd69b02ad6127275cc4a
parent9ba68215f2f03a6e202ebe16349d02b4aec8112d (diff)
downloadxmonad-config-f6e5a0d06a684f44d29943003304d13f6eb14ec7.tar.gz
xmonad-config-f6e5a0d06a684f44d29943003304d13f6eb14ec7.tar.bz2
ellipsis in window titles
-rw-r--r--xmonad.hs15
1 files changed, 9 insertions, 6 deletions
diff --git a/xmonad.hs b/xmonad.hs
index b531530..b041c79 100644
--- a/xmonad.hs
+++ b/xmonad.hs
@@ -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