Compare commits
No commits in common. "cb8917f6cf506f9a241cb1e0d5fe07a432f9c89b" and "7c27571ca76de99cb394c52919766c02c3a6b642" have entirely different histories.
cb8917f6cf
...
7c27571ca7
@ -9,6 +9,8 @@ before_script:
|
|||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
- env:
|
||||||
|
- NIXPKGS=https://github.com/NixOS/nixpkgs-channels/archive/nixos-18.09.tar.gz
|
||||||
- env:
|
- env:
|
||||||
- NIXPKGS=https://github.com/NixOS/nixpkgs-channels/archive/nixos-19.03.tar.gz
|
- NIXPKGS=https://github.com/NixOS/nixpkgs-channels/archive/nixos-19.03.tar.gz
|
||||||
- env:
|
- env:
|
||||||
|
14
default.nix
14
default.nix
@ -1,13 +1,3 @@
|
|||||||
{ lib, haskellPackages }:
|
{ haskellPackages }:
|
||||||
|
|
||||||
let
|
haskellPackages.callCabal2nix "xmonad-masser" ./. {}
|
||||||
filtered = src: lib.sourceByRegex src [
|
|
||||||
"^src.*"
|
|
||||||
"Setup.hs"
|
|
||||||
".*cabal"
|
|
||||||
"LICENSE"
|
|
||||||
];
|
|
||||||
|
|
||||||
in
|
|
||||||
|
|
||||||
haskellPackages.callCabal2nix "xmonad-masser" (filtered ./.) {}
|
|
||||||
|
@ -4,6 +4,7 @@ module XMonad.TopicSpace (topicKeys', addTopic, TopicAction(..)) where
|
|||||||
import XMonad.Actions.TopicSpace
|
import XMonad.Actions.TopicSpace
|
||||||
import XMonad
|
import XMonad
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
|
import XMonad.Actions.GridSelect
|
||||||
import XMonad.Actions.DynamicWorkspaces
|
import XMonad.Actions.DynamicWorkspaces
|
||||||
import XMonad.TopicUtils
|
import XMonad.TopicUtils
|
||||||
import XMonad.Util.EZConfig (mkNamedKeymap)
|
import XMonad.Util.EZConfig (mkNamedKeymap)
|
||||||
@ -41,6 +42,7 @@ myTopicConfig extraConfig =
|
|||||||
topicKeys' :: ExtraConfig -> XConfig l -> [(String, NamedAction)]
|
topicKeys' :: ExtraConfig -> XConfig l -> [(String, NamedAction)]
|
||||||
topicKeys' extraConfig conf = [ ("M-y", addName "Change topic" $ visualSelect (myTopicConfig extraConfig))
|
topicKeys' extraConfig conf = [ ("M-y", addName "Change topic" $ visualSelect (myTopicConfig extraConfig))
|
||||||
, ("M-S-g", addName "Move window to topic" $ gridselectMove def)
|
, ("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-<Return>", addName "Open project action" $ currentTopicAction' (myTopicConfig extraConfig))
|
||||||
, ("M-w", modificationSubmaps' conf)]
|
, ("M-w", modificationSubmaps' conf)]
|
||||||
|
|
||||||
|
@ -26,11 +26,9 @@ safeRunInTerm dir Nothing = safeSpawn "urxvt" ["-cd", dir]
|
|||||||
safeRunInTerm dir (Just command) = safeSpawn "urxvt" ["-cd", dir, "-e", command]
|
safeRunInTerm dir (Just command) = safeSpawn "urxvt" ["-cd", dir, "-e", command]
|
||||||
|
|
||||||
inactiveTags :: X [WorkspaceId]
|
inactiveTags :: X [WorkspaceId]
|
||||||
inactiveTags = inactive' <$> gets windowset
|
inactiveTags = map W.tag . inactive' <$> gets windowset
|
||||||
where
|
where
|
||||||
inactive' s =
|
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))
|
||||||
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 :: GSConfig WorkspaceId -> X ()
|
||||||
gridselectMove conf = do
|
gridselectMove conf = do
|
||||||
@ -50,10 +48,7 @@ gsConfig = def{gs_navigate = navNSearch, gs_colorizer = fromClassName}
|
|||||||
-- - Takes a topicspace viewfunc
|
-- - Takes a topicspace viewfunc
|
||||||
gridselectWorkspace :: GSConfig WorkspaceId -> (WorkspaceId -> X ()) -> X ()
|
gridselectWorkspace :: GSConfig WorkspaceId -> (WorkspaceId -> X ()) -> X ()
|
||||||
gridselectWorkspace conf viewFunc = withWindowSet $ \ws -> do
|
gridselectWorkspace conf viewFunc = withWindowSet $ \ws -> do
|
||||||
let wss = filter (/= current) . map W.tag $ invisible <> visible
|
let wss = map W.tag . W.hidden $ ws
|
||||||
visible = fmap W.workspace (W.visible ws)
|
|
||||||
invisible = W.hidden ws
|
|
||||||
current = W.currentTag ws
|
|
||||||
gridselect conf (zip wss wss) >>= flip whenJust viewFunc
|
gridselect conf (zip wss wss) >>= flip whenJust viewFunc
|
||||||
|
|
||||||
gotoSelected' :: GSConfig Window -> X ()
|
gotoSelected' :: GSConfig Window -> X ()
|
||||||
|
Loading…
Reference in New Issue
Block a user