From 7a4d3a35752c686605c7a24c646d07958eb8056e Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sat, 29 Oct 2016 10:16:41 -0700 Subject: [PATCH] [XMonad] Make stack build actually work --- dotfiles/xmonad/imalison-xmonad.cabal | 18 ++++++++++-------- dotfiles/xmonad/stack.yaml | 9 ++++++--- dotfiles/xmonad/xmonad.hs | 6 ++++-- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/dotfiles/xmonad/imalison-xmonad.cabal b/dotfiles/xmonad/imalison-xmonad.cabal index 4a6b3bd8..b0dec41b 100644 --- a/dotfiles/xmonad/imalison-xmonad.cabal +++ b/dotfiles/xmonad/imalison-xmonad.cabal @@ -1,16 +1,11 @@ --- Initial imalison-xmonad.cabal generated by cabal init. For further --- documentation, see http://haskell.org/cabal/users-guide/ - name: imalison-xmonad version: 0.1.0.0 synopsis: Ivan Malison's xmonad configuration. --- description: homepage: https://github.com/IvanMalison/dotfiles/tree/master/dotfiles/xmonad license: GPL-3 license-file: LICENSE author: Ivan Malison maintainer: IvanMalison@gmail.com --- copyright: category: System build-type: Simple extra-source-files: ChangeLog.md @@ -18,12 +13,19 @@ cabal-version: >=1.10 executable imalison-xmonad main-is: xmonad.hs - -- other-modules: - -- other-extensions: build-depends: base >=4.9 && <4.10, + -- I use a custom version xmonad-contrib>=0.12, X11>=1.6.1.2, + gtk-traymanager>=0.1.6, xmonad>=0.12, - taffybar>=0.4.6 + -- I use a custom version + taffybar>=0.4.6, + transformers>=0.5.2.0, + aeson>=0.11.2.1, + bytestring>=0.10.8.1, + containers>=0.5.7.1, + directory>=1.2.6.2, + filepath>=1.4.1.0 hs-source-dirs: . default-language: Haskell2010 diff --git a/dotfiles/xmonad/stack.yaml b/dotfiles/xmonad/stack.yaml index 62a893b9..6ffd059f 100644 --- a/dotfiles/xmonad/stack.yaml +++ b/dotfiles/xmonad/stack.yaml @@ -2,9 +2,13 @@ flags: {} extra-package-dbs: [] packages: - '.' +- location: + git: git@github.com:IvanMalison/xmonad-contrib.git + commit: e43579f80fc189eacabf73cbec7db61eab681219 +- location: + git: git@github.com:IvanMalison/taffybar.git + commit: 39e3a95e9c2eae37ff8b67eaa31bbd18503859b1 extra-deps: - - xmonad-contrib-0.12 - - taffybar-0.4.6 - gtk-traymanager-0.1.6 resolver: lts-7.0 # For advanced use and comprehensive documentation of the format, please see: @@ -13,7 +17,6 @@ resolver: lts-7.0 # 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 diff --git a/dotfiles/xmonad/xmonad.hs b/dotfiles/xmonad/xmonad.hs index 303fe986..2043d3e9 100644 --- a/dotfiles/xmonad/xmonad.hs +++ b/dotfiles/xmonad/xmonad.hs @@ -1,4 +1,6 @@ {-# LANGUAGE TypeSynonymInstances, MultiParamTypeClasses #-} +module Main where + import Control.Monad import Control.Monad.Trans.Maybe import Data.Aeson @@ -36,6 +38,7 @@ import XMonad.Util.CustomKeys import qualified XMonad.Util.ExtensibleState as XS import XMonad.Util.NamedWindows (getName) + main = xmonad $ def { modMask = mod4Mask , terminal = "urxvt" @@ -183,8 +186,7 @@ toggleFadingForActiveWindow = withWindowSet $ \windowSet -> do greedyFocusWindow w ws = W.focusWindow w $ W.greedyView (fromMaybe (W.currentTag ws) $ W.findTag w ws) ws -shiftToEmptyAndView = doTo Next EmptyWS DWO.getSortByOrder - (windows . shiftThenView) +shiftToEmptyAndView = doTo Next EmptyWS DWO.getSortByOrder (windows . shiftThenView) myRaiseNextMaybe = raiseNextMaybeCustomFocus greedyFocusWindow myBringNextMaybe = raiseNextMaybeCustomFocus bringWindow