zaxtax / xmonad-sessions

A session management module for xmonad
18 stars 3 forks source link

xmonad 0.17.1 seems not working #4

Open Eiko-Tokura opened 7 months ago

Eiko-Tokura commented 7 months ago

[eiko@EikoLG16 ~]$ xmonad --recompile XMonad will use ghc to recompile, because neither "/home/eiko/.xmonad/build" nor "/home/eiko/.xmonad/stack.yaml" exists. XMonad recompiling (forced). Errors detected while compiling xmonad config: /home/eiko/.xmonad/xmonad.hs $ ghc --make xmonad.hs -i -ilib -fforce-recomp -main-is main -dynamic -v0 -outputdir /home/eiko/.xmonad/build-x86_64-linux -o /home/eiko/.xmonad/xmonad-x86_64-linux

lib/ViewDoc.hs:109:60: error: • Couldn't match type ‘[Char]’ with ‘Char’ Expected: ComplFunction Actual: [String] -> IO [String] • In the third argument of ‘inputPromptWithCompl’, namely ‘loadStates’ In the first argument of ‘(?+)’, namely ‘inputPromptWithCompl def ("Session " ++ parens curState) loadStates’ In a stmt of a 'do' block: inputPromptWithCompl def ("Session " ++ parens curState) loadStates ?+ (io . changeSession) | 109 | inputPromptWithCompl def ("Session " ++ parens curState) loadStates ?+ (io . changeSession) | ^^^^^^^^^^

lib/ViewDoc.hs:113:11: error: • Couldn't match expected type: IO b with actual type: String -> IO [String] • Probable cause: ‘mkComplFunFromList'’ is applied to too few arguments In a stmt of a 'do' block: mkComplFunFromList' states s In the expression: do home <- getHomeDirectory states <- getDirectoryContents (home </> histdir) mkComplFunFromList' states s In an equation for ‘loadStates’: loadStates s = do home <- getHomeDirectory states <- getDirectoryContents (home </> histdir) mkComplFunFromList' states s • Relevant bindings include loadStates :: [String] -> IO b (bound at lib/ViewDoc.hs:110:9) | 113 | mkComplFunFromList' states s | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

lib/ViewDoc.hs:113:31: error: • Couldn't match expected type ‘XPConfig’ with actual type ‘[FilePath]’ • In the first argument of ‘mkComplFunFromList'’, namely ‘states’ In a stmt of a 'do' block: mkComplFunFromList' states s In the expression: do home <- getHomeDirectory states <- getDirectoryContents (home </> histdir) mkComplFunFromList' states s | 113 | mkComplFunFromList' states s | ^^^^^^

Please check the file for errors.

not sure what have changed in the new versions, it seems that the code in ViewDoc.hs won't compile? I'm using xmonad 0.17.1

zaxtax commented 7 months ago

The api must have changed. I'll investigate!

zaxtax commented 7 months ago

Pushed a change. Does that fixes things?

Eiko-Tokura commented 7 months ago

Thank you for your idea and helping. I forked your code and solved these problems myself, fixed some problems (for example arguments can have more than one word, so we can use data structures to hold them, and adding per workspace launch etc)

it works great for saving pdf viewers!

zaxtax commented 7 months ago

PRs always welcome :)

On Tue, 23 Jan 2024, 19:29 Eiko chan, @.***> wrote:

Thank you for your idea and helping. I forked your code and solved these problems myself, fixed some problems (for example arguments can have more than one word, so we can use data structures to hold them, and adding per workspace launch etc)

it works great for saving pdf viewers!

— Reply to this email directly, view it on GitHub https://github.com/zaxtax/xmonad-sessions/issues/4#issuecomment-1906673065, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAACCUL5Z33SSJNBQZEWDP3YP76RHAVCNFSM6AAAAABCF3IQECVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBWGY3TGMBWGU . You are receiving this because you commented.Message ID: @.***>