packages feed

xmonad-vanessa 2.0.0.0 → 2.1.0.0

raw patch · 6 files changed

+30/−27 lines, 6 filesdep ~xmonad-contribPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: xmonad-contrib

API changes (from Hackage documentation)

- XMonad.Util.Keyboard: instance Data.Default.Class.Default XMonad.Util.Keyboard.KbLayout
- XMonad.Util.Keyboard: instance GHC.Show.Show XMonad.Util.Keyboard.KbLayout
+ XMonad.Util.Keyboard: defaultKbLayout :: KbLayout
+ XMonad.Util.Keyboard: xmobarKbLayout :: KbLayout -> String

Files

CHANGELOG.md view
@@ -1,5 +1,10 @@ # xmonad-vanessa +## 2.1.0.0++  * Remove `Show` instance for `KbLayout` and replace with `xmobarKbLayout`+  * Remove `Default` instance for `KbLayout` and replace with `defaultKbLayout`+ ## 2.0.0.0    * Move `XMonad.Util.Volume` to `xmonad-volume`
README.md view
@@ -2,10 +2,6 @@  `xmonad` with a custom configuration, in a project to be compiled with cabal. You can also use the library by itself. -## Requirements--Requires libxft-dev, amixer for volume, gnome-terminal or alacritty, and setxkbmap to switch keyboard layouts.--## Sugestions+## Suggestions  Use dmenu, libx11-dev, libxinerama, xmobar, and yeganesh as well.
app/Main.hs view
@@ -101,7 +101,7 @@              -- lock screen              , ((controlMask, xK_End), spawn "slock")              --switch keyboards-             , ((modm, xK_F1), setLang def)+             , ((modm, xK_F1), setLang defaultKbLayout)              , ((modm, xK_F2), setLang tibetan)              , ((modm, xK_F3), setLang accented)              , ((modm, xK_F4), setLang français)
cabal.project.local view
@@ -1,3 +1,1 @@ optimization: 2-allow-newer:-    base
src/XMonad/Util/Keyboard.hs view
@@ -2,6 +2,7 @@ -- Uses the command-line utility setxkbmap. module XMonad.Util.Keyboard ( KbLayout (..)                             , showKBLayout+                            , xmobarKbLayout                             , parseKB                             , setLang                             , tibetan@@ -10,37 +11,41 @@                             , deutsch                             , dansk                             , dzongkha+                            , defaultKbLayout                             ) where  import           Control.Composition import           System.Process import           XMonad-import           XMonad.Hooks.DynamicLog  -- | Datatype for a keyboard layout. data KbLayout = Simple String | Regional String String --- Æ æ ð Ð þ Þ--- TODO keybord w/ Ƿ/ƿ & Ȝ/ȝ+xmobarColor :: String -- ^ Foreground color+            -> String -- ^ Background color+            -> String -- ^ Contents of string+            -> String+xmobarColor fg bg contents = "<fc=" ++ fg ++ "," ++ bg ++ ">" ++ contents ++ "</fc>" -instance Show KbLayout where-    show (Simple "us") = "US"-    show (Simple "layout") = "US"-    show (Regional "cn" "tib") = xmobarColor "yellow" "black" "Tibetan"-    show (Simple "bt") = xmobarColor "yellow" "black" "Dzongkha"-    show (Regional "us" "altgr-intl") = "US Extended"-    show (Simple "fr") = "Fr"-    show (Simple "de") = "De"-    show (Simple "dk") = "Dk"-    show _ = xmobarColor "red" "black" "ERROR"+-- | Print a keyboard layout suitable for piping to XMobar.+xmobarKbLayout :: KbLayout -> String+xmobarKbLayout (Simple "us") = "US"+xmobarKbLayout (Simple "layout") = "US"+xmobarKbLayout (Regional "cn" "tib") = xmobarColor "yellow" "black" "Tibetan"+xmobarKbLayout (Simple "bt") = xmobarColor "yellow" "black" "Dzongkha"+xmobarKbLayout (Regional "us" "altgr-intl") = "US Extended"+xmobarKbLayout (Simple "fr") = "Fr"+xmobarKbLayout (Simple "de") = "De"+xmobarKbLayout (Simple "dk") = "Dk"+xmobarKbLayout _ = xmobarColor "red" "black" "ERROR" --- | Set default keyboard layout to vanilla "us"-instance Default KbLayout where-    def = Simple "us"+-- | Default keyboard layout is vanilla "us"+defaultKbLayout :: KbLayout+defaultKbLayout = Simple "us"  -- | Pretty-print current layout showKBLayout :: IO String-showKBLayout = show <$> parseKB+showKBLayout = xmobarKbLayout <$> parseKB  -- | Get current keyboard layout parseKB :: IO KbLayout
xmonad-vanessa.cabal view
@@ -1,6 +1,6 @@ cabal-version: >=1.10 name: xmonad-vanessa-version: 2.0.0.0+version: 2.1.0.0 license: BSD3 license-file: LICENSE copyright: 2017-2018 Vanessa McHale@@ -30,7 +30,6 @@     build-depends:         base >=4.8 && <5,         xmonad >=0.5,-        xmonad-contrib >=0.5,         composition-prelude -any,         containers -any,         process -any,