[taffybar] Small fixes for ToggleMonitor
This commit is contained in:
parent
8d3e6e27fa
commit
7350a36597
@ -11,10 +11,7 @@ import Control.Monad.Trans
|
|||||||
import Control.Monad.Trans.Maybe
|
import Control.Monad.Trans.Maybe
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
import Data.Maybe
|
import Data.Maybe
|
||||||
import Data.String
|
|
||||||
import qualified Data.Text.Internal.Lazy as T
|
|
||||||
import qualified Graphics.UI.Gtk as Gtk
|
import qualified Graphics.UI.Gtk as Gtk
|
||||||
import Graphics.UI.Gtk.Gdk.DrawWindow
|
|
||||||
import Graphics.UI.Gtk.Gdk.Screen
|
import Graphics.UI.Gtk.Gdk.Screen
|
||||||
import System.Taffybar
|
import System.Taffybar
|
||||||
import Text.Read hiding (get, lift)
|
import Text.Read hiding (get, lift)
|
||||||
@ -42,8 +39,7 @@ handleToggleRequests enabledVar refreshTaffyWindows = do
|
|||||||
refreshTaffyWindows
|
refreshTaffyWindows
|
||||||
toggleTaffy = do
|
toggleTaffy = do
|
||||||
num <- liftIO $ runMaybeT getActiveScreenNumber
|
num <- liftIO $ runMaybeT getActiveScreenNumber
|
||||||
let monitorNumber = fromMaybe 0 num
|
liftIO $ toggleTaffyOnMon not $ fromMaybe 0 num
|
||||||
liftIO $ toggleTaffyOnMon not $ monitorNumber
|
|
||||||
runScotty =
|
runScotty =
|
||||||
scotty 3000 $ do
|
scotty 3000 $ do
|
||||||
get "/toggle/:monNum" $ do
|
get "/toggle/:monNum" $ do
|
||||||
|
Loading…
Reference in New Issue
Block a user