From 5768a50352f2e0fc4e56b48faf09a71cc8b8e9fc Mon Sep 17 00:00:00 2001 From: jao Date: Sun, 6 Feb 2022 15:58:03 +0000 Subject: swaybar-protocol: boxes working --- src/Xmobar/Text/Swaybar.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Xmobar/Text/Swaybar.hs b/src/Xmobar/Text/Swaybar.hs index b97cc15..73ca75c 100644 --- a/src/Xmobar/Text/Swaybar.hs +++ b/src/Xmobar/Text/Swaybar.hs @@ -81,7 +81,7 @@ instance ToJSON Block where instance ToJSON Preamble withBox :: Box -> Block -> Block -withBox (Box b _ n c _) bl = +withBox (Box b _ n c _) block = (case b of BBFull -> bl { border_right = w, border_left = w , border_bottom = w, border_top = w } @@ -94,6 +94,10 @@ withBox (Box b _ n c _) bl = ) { border = bc } where w = Just (fromIntegral n) bc = if null c then Nothing else Just c + j0 = Just 0 + bl = block { border_right = j0, border_left = j0 + , border_bottom = j0, border_top = j0 } + formatSwaybar' :: Config -> Segment -> Block formatSwaybar' conf (Text txt, info, _, as) = -- cgit v1.2.3