mirror of
https://github.com/srid/nixos-config.git
synced 2026-01-10 10:12:37 +08:00
rm unused
This commit is contained in:
parent
a605b108d4
commit
646d51332a
1 changed files with 1 additions and 47 deletions
|
|
@ -50,50 +50,4 @@ main = do
|
|||
-- Window borders
|
||||
(Border 10 10 10 10)
|
||||
-- Enable window border?
|
||||
True
|
||||
|
||||
{- old status bar; remove after configuring taffybar
|
||||
|
||||
myStatusBar =
|
||||
statusBar dzenCli pp toggleStrutsKey
|
||||
where
|
||||
-- -dock is necessary for https://github.com/xmonad/xmonad/issues/21
|
||||
-- https://github.com/xmonad/xmonad-contrib/pull/203
|
||||
dzenCli = "dzen2 -dock -fn CascadiaCode:pixelsize=26"
|
||||
pp =
|
||||
dzenPP
|
||||
{ -- ppSep = "🔥", Neither unicode, nor emoji work with dzen2
|
||||
ppTitleSanitize =
|
||||
shorten 15 . dzenEscape,
|
||||
ppExtras =
|
||||
[ padL $ pure $ Just "|",
|
||||
battery,
|
||||
padL $ pure $ Just "|",
|
||||
moment
|
||||
]
|
||||
}
|
||||
toggleStrutsKey :: XConfig t -> (KeyMask, KeySym)
|
||||
toggleStrutsKey XConfig {modMask = modm} = (modm, xK_b)
|
||||
|
||||
moment :: Logger
|
||||
moment = do
|
||||
now <- liftIO getZonedTime
|
||||
pure $ do
|
||||
pure $ formatTime defaultTimeLocale "%d/%a %R" now
|
||||
|
||||
battery :: Logger
|
||||
battery = do
|
||||
s <-
|
||||
fmap trim . liftIO . readFile $
|
||||
"/sys/class/power_supply/BAT0/capacity"
|
||||
pure $ do
|
||||
pct <- readMaybe @Int s
|
||||
let fmt
|
||||
| pct < 33 = dzenColor "white" "red"
|
||||
| pct < 66 = dzenColor "white" "orange"
|
||||
| otherwise = id
|
||||
pure $ fmt $ show pct <> "%"
|
||||
where
|
||||
trim = T.unpack . T.strip . T.pack
|
||||
|
||||
-}
|
||||
True
|
||||
Loading…
Add table
Add a link
Reference in a new issue