Compare commits

..

5 Commits

Author SHA1 Message Date
cb8917f6cf No need for 18.09 anymore 2019-05-23 12:26:31 +03:00
6c9bc7399a Dev tooling 2019-05-23 12:22:14 +03:00
f7b1d89755 asd 2019-05-23 12:21:57 +03:00
1639feed4c Don't hide unselected topic 2019-05-23 11:53:37 +03:00
3789e23cb9 Remove unused key binding 2019-05-23 11:45:16 +03:00
4 changed files with 20 additions and 9 deletions

View File

@ -9,8 +9,6 @@ before_script:
matrix:
include:
- env:
- NIXPKGS=https://github.com/NixOS/nixpkgs-channels/archive/nixos-18.09.tar.gz
- env:
- NIXPKGS=https://github.com/NixOS/nixpkgs-channels/archive/nixos-19.03.tar.gz
- env:

View File

@ -1,3 +1,13 @@
{ haskellPackages }:
{ lib, haskellPackages }:
haskellPackages.callCabal2nix "xmonad-masser" ./. {}
let
filtered = src: lib.sourceByRegex src [
"^src.*"
"Setup.hs"
".*cabal"
"LICENSE"
];
in
haskellPackages.callCabal2nix "xmonad-masser" (filtered ./.) {}

View File

@ -4,7 +4,6 @@ module XMonad.TopicSpace (topicKeys', addTopic, TopicAction(..)) where
import XMonad.Actions.TopicSpace
import XMonad
import qualified Data.Map as M
import XMonad.Actions.GridSelect
import XMonad.Actions.DynamicWorkspaces
import XMonad.TopicUtils
import XMonad.Util.EZConfig (mkNamedKeymap)
@ -42,7 +41,6 @@ myTopicConfig extraConfig =
topicKeys' :: ExtraConfig -> XConfig l -> [(String, NamedAction)]
topicKeys' extraConfig conf = [ ("M-y", addName "Change topic" $ visualSelect (myTopicConfig extraConfig))
, ("M-S-g", addName "Move window to topic" $ gridselectMove def)
, ("M-u", addName "Select window" $ gotoSelected' def{gs_colorizer = fromClassName})
, ("M-<Return>", addName "Open project action" $ currentTopicAction' (myTopicConfig extraConfig))
, ("M-w", modificationSubmaps' conf)]

View File

@ -26,9 +26,11 @@ safeRunInTerm dir Nothing = safeSpawn "urxvt" ["-cd", dir]
safeRunInTerm dir (Just command) = safeSpawn "urxvt" ["-cd", dir, "-e", command]
inactiveTags :: X [WorkspaceId]
inactiveTags = map W.tag . inactive' <$> gets windowset
inactiveTags = inactive' <$> gets windowset
where
inactive' s = W.hidden s ++ map W.workspace (filter (\w -> (W.tag . W.workspace . W.current) s /= (W.tag . W.workspace) w) (W.visible s))
inactive' s =
let current = W.currentTag s
in filter (current /=) . map W.tag $ W.hidden s <> map W.workspace (W.visible s)
gridselectMove :: GSConfig WorkspaceId -> X ()
gridselectMove conf = do
@ -48,7 +50,10 @@ gsConfig = def{gs_navigate = navNSearch, gs_colorizer = fromClassName}
-- - Takes a topicspace viewfunc
gridselectWorkspace :: GSConfig WorkspaceId -> (WorkspaceId -> X ()) -> X ()
gridselectWorkspace conf viewFunc = withWindowSet $ \ws -> do
let wss = map W.tag . W.hidden $ ws
let wss = filter (/= current) . map W.tag $ invisible <> visible
visible = fmap W.workspace (W.visible ws)
invisible = W.hidden ws
current = W.currentTag ws
gridselect conf (zip wss wss) >>= flip whenJust viewFunc
gotoSelected' :: GSConfig Window -> X ()