Fixed genWorkspaces, got it to compile!

This commit is contained in:
Trey Blancher 2023-02-09 19:40:59 -05:00
parent 7fcdd496d3
commit a4df5a3df2
1 changed files with 6 additions and 4 deletions

View File

@ -1,12 +1,10 @@
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# OPTIONS_GHC -Wno-deprecations #-}
import XMonad
import XMonad.Config.Desktop
-- Actions
import XMonad.Actions.CycleWS
import XMonad.Actions.DynamicWorkspaces as DW
import XMonad.Actions.DynamicWorkspaceGroups as DWG
import XMonad.Actions.GridSelect
import XMonad.Actions.OnScreen
import XMonad.Actions.SpawnOn
@ -86,6 +84,10 @@ instance ExtensionClass RightScreen where
initialValue = RightScreen []
extensionType = PersistentExtension
genWorkspaces :: ScreenId -> [IS.PhysicalWorkspace]
genWorkspaces sc = if sc == 3
then IS.withScreen 0 ["pindrop"] ++ IS.withScreen 1 ["qb"] ++ IS.withScreen 2 ["shell", "VM"]
else IS.withScreens sc ["shell", "qb", "pindrop", "VM"]
-- End DynamicWorkspaces code (keybindings are below) --
getTopBar :: Int -> String
@ -291,7 +293,7 @@ main = do sc <- IS.countScreens
dzenTennessineBar <- spawnPipe (getTennessineBar sc)
dzenBlancherBar <- spawnPipe (getBlancherBar sc)
xmonad $ desktopConfig {
workspaces = ["shell","qb","pindrop","VM"]
workspaces = genWorkspaces (S sc)
, terminal = myTerminal
, focusFollowsMouse = True
, manageHook = manageDocks <+> myManageHook -- <+> manageHook desktopConfig
@ -320,7 +322,7 @@ myStartup = do
spawn "trayer --edge top --align right --widthtype request --margin 318 --expand false --SetDockType true --SetPartialStrut false --tint 0x282828 --transparent true --alpha 0 --height 24 --monitor 'primary'"
--spawn "gnome-gmail-notifier"
--spawn "xautolock -secure -time 10 -locker 'i3lock -c 000000 -i /home/trey/images/black.png'"
else if sc == 3
then do
spawn "trayer --edge top --align right --widthtype request --margin 318 --expand false --SetDockType true --SetPartialStrut false --tint 0x282828 --transparent true --alpha 0 --height 24 --monitor 2"