diff options
author | jao <jao@gnu.org> | 2022-02-06 15:58:03 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-02-07 03:56:44 +0000 |
commit | 5768a50352f2e0fc4e56b48faf09a71cc8b8e9fc (patch) | |
tree | d4200479e3502d6551adf0ab35a334d77282991d /src | |
parent | 25bdf1438f7d9f7a736e247f2984c27026ec5dce (diff) | |
download | xmobar-5768a50352f2e0fc4e56b48faf09a71cc8b8e9fc.tar.gz xmobar-5768a50352f2e0fc4e56b48faf09a71cc8b8e9fc.tar.bz2 |
swaybar-protocol: boxes working
Diffstat (limited to 'src')
-rw-r--r-- | src/Xmobar/Text/Swaybar.hs | 6 |
1 files changed, 5 insertions, 1 deletions
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) = |