xmonad-vanessa 0.1.1.2 → 0.1.1.4
raw patch · 6 files changed
+123/−87 lines, 6 filesdep +compositiondep ~xmonad-contribPVP ok
version bump matches the API change (PVP)
Dependencies added: composition
Dependency ranges changed: xmonad-contrib
API changes (from Hackage documentation)
Files
- src/XMonad/Config/Vanessa.hs +34/−31
- src/XMonad/Util/Brightness.hs +1/−1
- src/XMonad/Util/Keyboard.hs +9/−8
- src/XMonad/Util/MediaKeys.hs +9/−9
- stack.yaml +65/−35
- xmonad-vanessa.cabal +5/−3
src/XMonad/Config/Vanessa.hs view
@@ -1,23 +1,24 @@--- | Configuration with defaults I like and brightness adjustable for my computer and appropriate +-- | Configuration with defaults I like and brightness adjustable for my computer and appropriate module XMonad.Config.Vanessa (vConfig) where --XMonad modules-import XMonad hiding (workspaces)-import XMonad.Hooks.DynamicLog-import XMonad.Layout.Spiral-import XMonad.Layout.Reflect-import XMonad.Util.Run-import XMonad.Util.Volume-import XMonad.Util.Brightness-import XMonad.Util.Keyboard-import XMonad.Util.MediaKeys-import XMonad.Util.NamedWindows-import XMonad.StackSet hiding (filter)-import XMonad.Hooks.ManageDocks+import XMonad hiding (workspaces)+import XMonad.Hooks.DynamicLog+import XMonad.Hooks.ManageDocks+import XMonad.Layout.Reflect+import XMonad.Layout.Spiral+import XMonad.StackSet hiding (filter)+import XMonad.Util.Brightness+import XMonad.Util.Keyboard+import XMonad.Util.MediaKeys+import XMonad.Util.NamedWindows+import XMonad.Util.Run+import XMonad.Util.Volume --Monads etc.-import qualified Data.Map as M-import Data.Maybe-import Data.Monoid+import qualified Data.Map as M+import Data.Maybe+import Data.Monoid+import XMonad.Layout.Hidden -- | IO action of the whole thing vConfig :: IO ()@@ -36,7 +37,7 @@ musicString = do winset <- gets windowset {-- let p = (== "5") . fst --}- wt <- maybe (pure "") (fmap show . getName) . (fmap snd) . listToMaybe {--. filter p--} $ zip (((map tag . workspaces)) winset) (allWindows winset) + wt <- maybe (pure "") (fmap show . getName) . (fmap snd) . listToMaybe {--. filter p--} $ zip (((map tag . workspaces)) winset) (allWindows winset) pure . (xmobarColor "green" "black") . take 40 $ wt -- | Provides custom hooks to xmonad. This disables printing the window title/connects xmobar and xmonad.@@ -47,7 +48,7 @@ , ppHidden = (xmobarColor "darkorange" "black") -- . (\x -> if x == "5" then "Spotify" else x) , ppVisible = (xmobarColor "yellow" "black") }- + -- | Doesn't work on spotify myManageHook :: Query (Endo WindowSet) myManageHook = composeAll [ className =? "Gimp-2.8" --> doFloat@@ -63,7 +64,7 @@ , className =? "xviewer" --> doFloat ] --- | Custom keymaps to adjust volume, brightness, and +-- | Custom keymaps to adjust volume, brightness, and myKeys :: XConfig t -> M.Map (KeyMask, KeySym) (X ()) myKeys conf@(XConfig {XMonad.modMask = modm}) = mediaKeys . M.fromList $ [ --volume control@@ -71,15 +72,16 @@ , ((modm, xK_Down), lowerVolume 5) , ((modm, xK_F8), toggleMute) --personal (extra) media keys- , ((modm, xK_End), audioNext)- , ((modm, xK_Page_Down), audioPrev)+ --, ((modm, xK_End), audioNext)+ , ((modm, xK_Page_Down), audioNext)+ , ((modm, xK_Page_Up), audioPrev) , ((modm, xK_Home), audioPlayPause) --brightness , ((modm, xK_Left), brighten (-100)) , ((modm, xK_Right), brighten 100) --program shortcuts- , ((modm, xK_q), spawn "spotify") - , ((modm .|. controlMask, xK_Return), spawn "gnome-terminal") + , ((modm, xK_q), spawn "spotify")+ , ((modm .|. controlMask, xK_Return), spawn "gnome-terminal") --open signal , ((modm .|. shiftMask, xK_n), spawn "google-chrome --profile-directory=Default --app-id=bikioccmkafdpakkkcpdbppfkghcmihk") --launch bar@@ -87,11 +89,11 @@ -- bash command execution bar , ((modm .|. shiftMask, xK_l), spawn "launcher") --screenshots- , ((0, xK_Print), spawn "cd ~/.screenshots && scrot")+ , ((0, xK_Print), spawn "cd ~/.screenshots && scrot") -- TODO figure out how to surpress window size information --shutdown etc. , ((modm .|. shiftMask, xK_End), spawn "shutdown now") -- lock screen- , ((modm, xK_End), spawn "slock")+ , ((controlMask, xK_End), spawn "slock") --switch keyboards , ((modm, xK_F1), setLang def) , ((modm, xK_F2), setLang tibetan)@@ -101,12 +103,13 @@ , ((modm, xK_F6), setLang anglisc) , ((modm, xK_F7), setLang dansk) , ((modm, xK_F9), setLang dzongkha)- -- bad idea; use ctrl + shift + enter to open gnome terminal instead- -- , ((shiftMask, xK_F11), spawn "cargo install --git https://github.com/jwilm/alacritty.git --force")+ -- hide windows+ , ((modm .|. shiftMask, xK_h), withFocused hide >> withFocused hideWindow)+ , ((modm, xK_u), popNewestHiddenWindow >> withFocused reveal) ]- --alt + h and alt+l should go over by one?- --idea: "browse" workspaces but multiple of them/autospawn in a new one?- --overambition:vim-like window management+ {-- ++ [((m .|. modMask, k), windows $ f i)+ | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]+ , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]] --} -- | Function giving keybindings to undo keysToRemove :: XConfig Layout -> M.Map (KeyMask, KeySym) (X ())@@ -114,7 +117,7 @@ [ ((modm, xK_p), pure ()) ] -- | Gives a better ratio for the master pane and lets us spiral windows-myLayout = avoidStruts $ normalPanes ||| reflectHoriz normalPanes ||| Full ||| spiral (16/9)+myLayout = avoidStruts . hiddenWindows $ normalPanes ||| (reflectHoriz normalPanes) ||| Full ||| (spiral (16/9)) where normalPanes = Tall 1 (3/100) (3/7) -- | Make new key layout from a given keyboard layout
src/XMonad/Util/Brightness.hs view
@@ -1,7 +1,7 @@ -- | Module to control screen brightness within the `X` Monad. module XMonad.Util.Brightness (brighten) where -import XMonad+import XMonad -- | Brighten screen -- also consider splitting off once this has been generalized
src/XMonad/Util/Keyboard.hs view
@@ -1,5 +1,5 @@--- | Allows to switch keyboard layouts --- Uses the command-line utility setxkbmap. +-- | Allows to switch keyboard layouts+-- Uses the command-line utility setxkbmap. module XMonad.Util.Keyboard ( KbLayout (..) , showKBLayout , parseKB@@ -13,9 +13,10 @@ , dzongkha ) where -import XMonad-import XMonad.Hooks.DynamicLog-import System.Process hiding (spawn)+import Data.Composition+import System.Process hiding (spawn)+import XMonad+import XMonad.Hooks.DynamicLog -- | Datatype for a keyboard layout. data KbLayout = Simple String | Regional String String@@ -43,8 +44,8 @@ parseKB :: IO KbLayout parseKB = do out <- lines <$> readCreateProcess (shell "setxkbmap -query") ""- let strip i = (dropWhile (==' ')) . (drop 1) . (dropWhile (/=':')) . (!!i)- let line = flip strip out+ let strip = dropWhile (==' ') . (drop 1) . (dropWhile (/=':')) .* (!!)+ let line = strip out if length out == 3 then pure (Simple (line 2)) else@@ -66,7 +67,7 @@ dansk :: KbLayout dansk = Simple "dk" --- | Icelandic keyboard; also good for typesetting Old English. +-- | Icelandic keyboard; also good for typesetting Old English. anglisc :: KbLayout anglisc = Simple "is"
src/XMonad/Util/MediaKeys.hs view
@@ -1,5 +1,5 @@ -- | Bind media keys using dbus--- Requires amixer to control volume. +-- Requires amixer to control volume. module XMonad.Util.MediaKeys (-- * default keybindings mediaKeys -- * media control in the 'X' monad@@ -8,14 +8,14 @@ , audioPlayPause) where --gives us media keys-import Graphics.X11.ExtraTypes.XF86-import Graphics.X11.Types+import Graphics.X11.ExtraTypes.XF86+import Graphics.X11.Types --XMonad stuff-import XMonad.Core-import XMonad.Util.Volume+import XMonad.Core+import XMonad.Util.Volume --monads and all that-import qualified Data.Map as M-import Data.Monoid+import qualified Data.Map as M+import Data.Monoid -- | Given your keymaps, add the media keybindings mediaKeys :: M.Map (KeyMask, KeySym) (X ()) -> M.Map (KeyMask, KeySym) (X ())@@ -26,8 +26,8 @@ , ((0, xF86XK_AudioPrev), audioPrev) , ((0, xF86XK_AudioPlay), audioPlayPause) , ((0, xF86XK_AudioMute), toggleMute)- , ((0, xF86XK_AudioLowerVolume), lowerVolume 5) --module elsewhere? - , ((0, xF86XK_AudioRaiseVolume), raiseVolume 5) + , ((0, xF86XK_AudioLowerVolume), lowerVolume 5) --module elsewhere?+ , ((0, xF86XK_AudioRaiseVolume), raiseVolume 5) ] -- | Helper function for use with dbus
stack.yaml view
@@ -1,36 +1,66 @@-resolver: lts-8.17+# This file was automatically generated by 'stack init'+#+# Some commonly used options have been documented as comments in this file.+# For advanced use and comprehensive documentation of the format, please see:+# https://docs.haskellstack.org/en/stable/yaml_configuration/++# Resolver to choose a 'specific' stackage snapshot or a compiler version.+# A snapshot resolver dictates the compiler version and the set of packages+# to be used for project dependencies. For example:+#+# resolver: lts-3.5+# resolver: nightly-2015-09-21+# resolver: ghc-7.10.2+# resolver: ghcjs-0.1.0_ghc-7.10.2+# resolver:+# name: custom-snapshot+# location: "./custom-snapshot.yaml"+resolver: lts-9.0++# User packages to be built.+# Various formats can be used as shown in the example below.+#+# packages:+# - some-directory+# - https://example.com/foo/bar/baz-0.0.2.tar.gz+# - location:+# git: https://github.com/commercialhaskell/stack.git+# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a+# - location: https://github.com/commercialhaskell/stack/commit/e7b331f14bcffb8367cd58fbfc8b40ec7642100a+# extra-dep: true+# subdirs:+# - auto-update+# - wai+#+# A package marked 'extra-dep: true' will only be built if demanded by a+# non-dependency (i.e. a user package), and its test suites and benchmarks+# will not be run. This is useful for tweaking upstream packages. packages:- - .- - extra-dep: true- location:- git: https://github.com/haskell/deepseq- commit: 0b22c9825ef79c1ee41d2f19e7c997f5cdc93494- - extra-dep: true- location:- git: https://github.com/acid-state/acid-state.git- commit: f44beb3a3fb96bf2c00b928c89ad5f9f5ce4b3cf- - extra-dep: true- location:- git: https://github.com/ekmett/semigroupoids.git- commit: c3297f970658ae874db098190327ec742044a2e6- - extra-dep: true- location:- git: http://github.com/ekmett/lens.git- commit: 7031e00f62a704a86c3149c75c1e2afc059af022-allow-newer: true-flags:- xmonad-vanessa:- library: False-compiler: ghc-8.2.0.20170507-compiler-check: match-exact-setup-info:- ghc:- linux64:- 8.2.0.20170507:- url: https://downloads.haskell.org/~ghc/8.2.1-rc2/ghc-8.2.0.20170507-x86_64-deb8-linux.tar.xz- macosx:- 8.2.0.20170507:- url: https://downloads.haskell.org/~ghc/8.2.1-rc2/ghc-8.2.0.20170507-x86_64-apple-darwin.tar.xz- windows64:- 8.2.0.20170507:- url: https://downloads.haskell.org/~ghc/8.2.1-rc2/ghc-8.2.0.20170507-x86_64-unknown-mingw32.tar.xz+- .+# Dependency packages to be pulled from upstream that are not in the resolver+# (e.g., acme-missiles-0.3)+extra-deps: []++# Override default flag values for local packages and extra-deps+flags: {}++# Extra package databases containing global packages+extra-package-dbs: []++# Control whether we use the GHC we find on the path+# system-ghc: true+#+# Require a specific version of stack, using version ranges+# require-stack-version: -any # Default+# require-stack-version: ">=1.5"+#+# Override the architecture used by stack, especially useful on Windows+# arch: i386+# arch: x86_64+#+# Extra directories used by stack for building+# extra-include-dirs: [/path/to/dir]+# extra-lib-dirs: [/path/to/dir]+#+# Allow a newer minor version of GHC than the snapshot specifies+# compiler-check: newer-minor
xmonad-vanessa.cabal view
@@ -1,5 +1,5 @@ name: xmonad-vanessa-version: 0.1.1.2+version: 0.1.1.4 synopsis: Custom xmonad, which builds with stack or cabal. description: Please see README.md homepage: https://hub.darcs.net/vmchale/xmonad-vanessa@@ -30,9 +30,10 @@ , XMonad.Util.Keyboard , XMonad.Util.Volume , XMonad.Util.MediaKeys- build-depends: base >= 4.7 && < 5+ build-depends: base >= 4.8 && < 5 , xmonad >= 0.13- , xmonad-contrib+ , xmonad-contrib >= 0.13+ , composition , containers , process , X11@@ -82,6 +83,7 @@ , hspec , xmonad ghc-options: -threaded -rtsopts -with-rtsopts=-N + default-language: Haskell2010 source-repository head type: darcs