Fix xmonad not generating the right bar file

This commit is contained in:
elkowar 2022-09-12 10:47:34 +02:00
parent cf19c78688
commit 87520d4dc8
No known key found for this signature in database
GPG key ID: E321AD71B1D1F27F

View file

@ -93,10 +93,12 @@ import qualified XMonad.Actions.Sift as Sift
-- Values -------------------- {{{ -- Values -------------------- {{{
verticalMonitorIndex = 0 :: Int
myModMask = mod4Mask myModMask = mod4Mask
myLauncher = Rofi.asCommand def ["-show run"] myLauncher = Rofi.asCommand def ["-show run"]
myTerminal = "alacritty" myTerminal = "alacritty"
screenIndexMain = 0
screenIndexVert = 1
screenIndexTop = 2
{-| adds the scripts-directory path to the filename of a script |-} {-| adds the scripts-directory path to the filename of a script |-}
scriptFile :: String -> String scriptFile :: String -> String
@ -294,9 +296,6 @@ removedKeys :: [String]
removedKeys = ["M-<Tab>", "M-S-c", "M-S-q", "M-h", "M-l", "M-j", "M-k", "M-S-<Return>", "M-S-j", "M-S-k"] removedKeys = ["M-<Tab>", "M-S-c", "M-S-q", "M-h", "M-l", "M-j", "M-k", "M-S-<Return>", "M-S-j", "M-S-k"]
++ [key ++ show n | key <- ["M-", "M-S-", "M-C-"], n <- [1..9 :: Int]] ++ [key ++ show n | key <- ["M-", "M-S-", "M-C-"], n <- [1..9 :: Int]]
screenIndexMain = 0
screenIndexVert = 1
screenIndexTop = 2
myKeys :: [(String, X ())] myKeys :: [(String, X ())]
myKeys = concat [ zoomRowBindings, tabbedBindings, multiMonitorBindings, programLaunchBindings, miscBindings, windowControlBindings, workspaceBindings ] myKeys = concat [ zoomRowBindings, tabbedBindings, multiMonitorBindings, programLaunchBindings, miscBindings, windowControlBindings, workspaceBindings ]
@ -523,7 +522,7 @@ main = do
currentScreenCount :: Int <- IS.countScreens currentScreenCount :: Int <- IS.countScreens
-- set up the fifo for polybar -- set up the fifo for polybar
safeSpawn "mkfifo" ["/tmp/xmonad-state-bar" ++ show verticalMonitorIndex] safeSpawn "mkfifo" ["/tmp/xmonad-state-bar" ++ show (fi screenIndexVert)]
let myConfig = flip additionalKeysP myKeys let myConfig = flip additionalKeysP myKeys
$ flip removeKeysP removedKeys $ flip removeKeysP removedKeys
@ -533,7 +532,7 @@ main = do
, modMask = myModMask , modMask = myModMask
, borderWidth = 0 , borderWidth = 0
, layoutHook = myLayout , layoutHook = myLayout
, logHook = mconcat [ polybarLogHook verticalMonitorIndex , logHook = mconcat [ polybarLogHook (fi screenIndexVert)
, ewwLogHook , ewwLogHook
--, Ewmh.ewmhDesktopsLogHook --, Ewmh.ewmhDesktopsLogHook
, logHook Desktop.desktopConfig , logHook Desktop.desktopConfig