packages feed

xmonad-vanessa 1.0.0.0 → 2.0.0.0

raw patch · 6 files changed

+18/−88 lines, 6 filesdep +alsa-mixerdep +xmonad-spotifydep +xmonad-volumePVP ok

version bump matches the API change (PVP)

Dependencies added: alsa-mixer, xmonad-spotify, xmonad-volume

API changes (from Hackage documentation)

- XMonad.Util.MediaKeys: audioNext :: X ()
- XMonad.Util.MediaKeys: audioPlayPause :: X ()
- XMonad.Util.MediaKeys: audioPrev :: X ()
- XMonad.Util.MediaKeys: mediaKeys :: Map (KeyMask, KeySym) (X ()) -> Map (KeyMask, KeySym) (X ())
- XMonad.Util.Volume: lowerVolume :: (Integral a, Show a) => a -> X ()
- XMonad.Util.Volume: raiseVolume :: (Integral a, Show a) => a -> X ()
- XMonad.Util.Volume: toggleMute :: X ()

Files

+ CHANGELOG.md view
@@ -0,0 +1,6 @@+# xmonad-vanessa++## 2.0.0.0++  * Move `XMonad.Util.Volume` to `xmonad-volume`+  * Move `XMonad.Util.MediaKeys` to `xmonad-spotify`
app/Main.hs view
@@ -17,11 +17,11 @@ import           XMonad.Layout.Reflect import           XMonad.Layout.Spiral import           XMonad.StackSet           hiding (float)+import           XMonad.Util.ALSA import           XMonad.Util.Keyboard-import           XMonad.Util.MediaKeys import           XMonad.Util.NamedWindows import           XMonad.Util.Run-import           XMonad.Util.Volume+import           XMonad.Util.Spotify  -- TODO wallpaper? @@ -74,10 +74,10 @@  -- | Custom keymaps to adjust volume, brightness, and myKeys :: XConfig t -> M.Map (KeyMask, KeySym) (X ())-myKeys XConfig { XMonad.modMask = modm } = mediaKeys . M.fromList $+myKeys XConfig { XMonad.modMask = modm } = mediaKeys . volumeKeys . M.fromList $              [ --volume control-               ((modm, xK_Up), raiseVolume (5 :: Word))-             , ((modm, xK_Down), lowerVolume (5 :: Word))+               ((modm, xK_Up), raiseVolume 5)+             , ((modm, xK_Down), lowerVolume 5)              , ((modm, xK_BackSpace), toggleMute)              --personal (extra) media keys              , ((modm, xK_Page_Down), audioNext)@@ -87,8 +87,7 @@              --program shortcuts              , ((modm, xK_q), spawn "spotify")              , ((modm .|. shiftMask, xK_t), spawn "thunderbird")-             , ((modm .|. shiftMask, xK_n), spawn "firefox")-             , ((modm .|. controlMask, xK_Return), spawn "gnome-terminal")+             , ((modm .|. shiftMask, xK_f), spawn "firefox")              --launch bar              , ((modm, xK_p), spawn "$(yeganesh -x)")              --screenshots
src/XMonad/Util/Keyboard.hs view
@@ -30,7 +30,6 @@     show (Simple "bt") = xmobarColor "yellow" "black" "Dzongkha"     show (Regional "us" "altgr-intl") = "US Extended"     show (Simple "fr") = "Fr"-    show (Simple "is") = "Ænglisc"     show (Simple "de") = "De"     show (Simple "dk") = "Dk"     show _ = xmobarColor "red" "black" "ERROR"
− src/XMonad/Util/MediaKeys.hs
@@ -1,53 +0,0 @@-{-# LANGUAGE TupleSections #-}---- | Bind media keys using dbus--- Requires amixer to control volume.-module XMonad.Util.MediaKeys (-- * default keybindings-                               mediaKeys-                             -- * media control in the 'X' monad-                             , audioPrev-                             , audioNext-                             , audioPlayPause-                             ) where--import           Control.Arrow                (first)-import qualified Data.Map                     as M-import           Graphics.X11.ExtraTypes.XF86-import           Graphics.X11.Types-import           XMonad.Core-import           XMonad.Util.Volume---- | Given your keymaps, add the media keybindings. Currently they are set up--- for Spotify.-mediaKeys :: M.Map (KeyMask, KeySym) (X ()) -> M.Map (KeyMask, KeySym) (X ())-mediaKeys = M.union mediaKeyMap-    where mediaKeyMap = M.fromList mediaKeyList--mediaKeyList :: [((KeyMask, KeySym), X ())]-mediaKeyList = go <$> [ (xF86XK_AudioNext, audioNext)-                      , (xF86XK_AudioPrev, audioPrev)-                      , (xF86XK_AudioPlay, audioPlayPause)-                      , (xF86XK_AudioMute, toggleMute)-                      , (xF86XK_AudioLowerVolume, lowerVolume five)-                      , (xF86XK_AudioRaiseVolume, raiseVolume five)-                      ]--    where go = first (0 ,)-          five :: Word-          five = 5---- | Helper function for use with dbus-sp :: String -> X ()-sp = spawn . (++) "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player."---- | Action in the 'X' monad to go to next-audioNext :: X ()-audioNext = sp "Next"---- | Action in the 'X' monad to go the previous-audioPrev :: X ()-audioPrev = sp "Previous"---- | Action in the 'X' monad to play/pause-audioPlayPause :: X ()-audioPlayPause = sp "PlayPause"
− src/XMonad/Util/Volume.hs
@@ -1,22 +0,0 @@--- | Utils to use to control volume via amixer-module XMonad.Util.Volume ( toggleMute-                          , raiseVolume-                          , lowerVolume-                          ) where--import           XMonad--vol :: String -> X ()-vol = spawn . (++) "amixer -D pulse sset Master "---- | Mute/unmute within the `X` Monad.-toggleMute :: X ()-toggleMute = vol "toggle"---- | Raise volume-raiseVolume :: (Integral a, Show a) => a -> X ()-raiseVolume n = vol $ show n ++ "%+"---- | Lower volume-lowerVolume :: (Integral a, Show a) => a -> X ()-lowerVolume n = vol $ show n ++ "%-"
xmonad-vanessa.cabal view
@@ -1,6 +1,6 @@ cabal-version: >=1.10 name: xmonad-vanessa-version: 1.0.0.0+version: 2.0.0.0 license: BSD3 license-file: LICENSE copyright: 2017-2018 Vanessa McHale@@ -14,6 +14,7 @@ build-type: Simple extra-source-files:     README.md+    CHANGELOG.md     cabal.project.local  source-repository head@@ -23,11 +24,8 @@ library     exposed-modules:         XMonad.Util.Keyboard-        XMonad.Util.Volume-        XMonad.Util.MediaKeys     hs-source-dirs: src     default-language: Haskell98-    other-extensions: TupleSections     ghc-options: -Wall     build-depends:         base >=4.8 && <5,@@ -36,7 +34,8 @@         composition-prelude -any,         containers -any,         process -any,-        X11 -any+        X11 -any,+        alsa-mixer -any  executable xmonad     main-is: Main.hs@@ -48,6 +47,8 @@         xmonad-vanessa -any,         xmonad -any,         xmonad-contrib -any,+        xmonad-spotify -any,+        xmonad-volume -any,         containers -any  executable getkb