0

When I remove xmobar I want the top gap to be incremented to make it equal to the bottom gap. On the other hand when I add the bar I want the top gap to be reduced to make it as it was on start.

I have a key binding set to toggle xmobar: , ("M-w" , spawn "exec $HOME/.config/xmobar/bartoggle.sh")

What i'm trying to achieve is something like this: , ("M-w" , sequence_ (spawn "exec $HOME/.config/xmobar/bartoggle.sh", toggleGap)) where toggleGap is a function that should toggle 2 commands such as: sendMessage $ DecGap 20 U and sendMessage $ IncGap 20 U

I thought about using global variables, and I tried with ExtensibleState and IORef modules. However I wasn't able to make them work. If you have any idea or alternatives on how to do this please let me know.

0 Answers0