diff --git a/src/XMonad/Config/MasseR.hs b/src/XMonad/Config/MasseR.hs index 10ba0e6..7c2b6da 100644 --- a/src/XMonad/Config/MasseR.hs +++ b/src/XMonad/Config/MasseR.hs @@ -59,9 +59,9 @@ import XMonad.Hooks.DynamicLog (statusBar) import qualified Data.Set as S -spotify :: XConfig l -> NamedAction -spotify conf = submapName . mkNamedKeymap conf $ - [ ("M-p", addName "Play" $ spawn "sp play") ] +spotify :: ExtraConfig -> XConfig l -> NamedAction +spotify extraConf conf = submapName . mkNamedKeymap conf $ + [ ("M-p", addName "Play" $ spawn (musicToggle . applications $ extraConf)) ] scratchpads :: [NamedScratchpad] scratchpads = [ @@ -178,9 +178,8 @@ myKeys extraConfig conf = , ("", addName "Decrease volume" $ spawn "amixer set Master 2%-") , ("M-", addName "Increase volume" $ spawn "amixer set Master 2+") , ("M-", addName "Decrease volume" $ spawn "amixer set Master 2-") - -- , ("", addName "Play/pause spotify" $ spawn "/home/masse/.local/bin/sp play") , ("", addName "Play/pause mopidy" $ spawn "mpc toggle") - , ("M-m", spotify conf) + , ("M-m", spotify extraConfig conf) , ("M-S-", addName "Swap screens" swapNextScreen) , ("M-", addName "Kill window" kill) -- scrot requires `unGrab` diff --git a/src/XMonad/Config/MasseR/ExtraConfig.hs b/src/XMonad/Config/MasseR/ExtraConfig.hs index 1cf300c..fffb0e8 100644 --- a/src/XMonad/Config/MasseR/ExtraConfig.hs +++ b/src/XMonad/Config/MasseR/ExtraConfig.hs @@ -10,6 +10,7 @@ data Applications = , prompt :: FilePath , screenshot :: FilePath , urxvt :: FilePath + , musicToggle :: FilePath } deriving (Show, Generic) data TopicRule =