mirror of
https://github.com/danieljharvey/tmux-mate.git
synced 2024-10-26 17:35:04 +03:00
Remove paneTitle
This commit is contained in:
parent
75b65acd09
commit
8e4d38ffa5
@ -28,7 +28,6 @@ library:
|
||||
- process
|
||||
- text
|
||||
- dhall
|
||||
- validation
|
||||
|
||||
executables:
|
||||
tmux-mate-exe:
|
||||
|
@ -43,19 +43,19 @@ testSession =
|
||||
[ Window
|
||||
{ windowTitle = WindowName "first-window",
|
||||
windowPanes =
|
||||
[ Pane (PaneCommand "yes 'Pane 1'") (PaneTitle "One"),
|
||||
Pane (PaneCommand "yes 'Pane 2'") (PaneTitle "Two"),
|
||||
Pane (PaneCommand "yes 'Pane 3'") (PaneTitle "Three"),
|
||||
Pane (PaneCommand "yes 'Pane 4'") (PaneTitle "Four")
|
||||
[ Pane (PaneCommand "yes 'Pane 1'"),
|
||||
Pane (PaneCommand "yes 'Pane 2'"),
|
||||
Pane (PaneCommand "yes 'Pane 3'"),
|
||||
Pane (PaneCommand "yes 'Pane 4'")
|
||||
]
|
||||
},
|
||||
Window
|
||||
{ windowTitle = WindowName "second-window",
|
||||
windowPanes =
|
||||
[ Pane (PaneCommand "yes 'Second Window - Pane 1'") (PaneTitle "2One"),
|
||||
Pane (PaneCommand "yes 'Second Window - Pane 2'") (PaneTitle "2Two"),
|
||||
Pane (PaneCommand "yes 'Second Window - Pane 3'") (PaneTitle "2Three"),
|
||||
Pane (PaneCommand "yes 'Second Window - Pane 4'") (PaneTitle "2Four")
|
||||
[ Pane (PaneCommand "yes 'Second Window - Pane 1'"),
|
||||
Pane (PaneCommand "yes 'Second Window - Pane 2'"),
|
||||
Pane (PaneCommand "yes 'Second Window - Pane 3'"),
|
||||
Pane (PaneCommand "yes 'Second Window - Pane 4'")
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@ -45,15 +45,9 @@ newtype PaneCommand
|
||||
deriving stock (Eq, Ord, Generic)
|
||||
deriving newtype (Show, ToDhall, FromDhall)
|
||||
|
||||
newtype PaneTitle
|
||||
= PaneTitle {getPaneTitle :: String}
|
||||
deriving stock (Eq, Ord, Generic)
|
||||
deriving newtype (Show, ToDhall, FromDhall)
|
||||
|
||||
data Pane
|
||||
= Pane
|
||||
{ paneCommand :: PaneCommand,
|
||||
paneTitle :: PaneTitle
|
||||
{ paneCommand :: PaneCommand
|
||||
}
|
||||
deriving (Eq, Ord, Show, Generic, FromDhall, ToDhall)
|
||||
|
||||
|
@ -79,7 +79,7 @@ spec = do
|
||||
[]
|
||||
( VWindow
|
||||
(VWindowName (NE.fromList "window"))
|
||||
$ NE.fromList [Pane (PaneCommand "go") undefined]
|
||||
$ NE.fromList [Pane (PaneCommand "go")]
|
||||
)
|
||||
`shouldBe` [ CreatePane
|
||||
(VSessionName $ NE.fromList "horses")
|
||||
@ -97,7 +97,7 @@ spec = do
|
||||
]
|
||||
( VWindow
|
||||
(VWindowName (NE.fromList "window"))
|
||||
$ NE.fromList [Pane (PaneCommand "go") undefined]
|
||||
$ NE.fromList [Pane (PaneCommand "go")]
|
||||
)
|
||||
`shouldBe` [ CreatePane
|
||||
(VSessionName $ NE.fromList "horses")
|
||||
@ -115,7 +115,7 @@ spec = do
|
||||
]
|
||||
( VWindow
|
||||
(VWindowName (NE.fromList "window"))
|
||||
$ NE.fromList [Pane (PaneCommand "go") undefined]
|
||||
$ NE.fromList [Pane (PaneCommand "go")]
|
||||
)
|
||||
`shouldBe` []
|
||||
describe "removeWindowPanes" $ do
|
||||
@ -126,7 +126,7 @@ spec = do
|
||||
( NE.fromList
|
||||
[ ( VWindow
|
||||
(VWindowName (NE.fromList "window"))
|
||||
$ NE.fromList [Pane (PaneCommand "go") undefined]
|
||||
$ NE.fromList [Pane (PaneCommand "go")]
|
||||
)
|
||||
]
|
||||
)
|
||||
@ -143,7 +143,7 @@ spec = do
|
||||
( NE.fromList
|
||||
[ ( VWindow
|
||||
(VWindowName (NE.fromList "window"))
|
||||
$ NE.fromList [Pane (PaneCommand "go") undefined]
|
||||
$ NE.fromList [Pane (PaneCommand "go")]
|
||||
)
|
||||
]
|
||||
)
|
||||
@ -160,7 +160,7 @@ spec = do
|
||||
( NE.fromList
|
||||
[ ( VWindow
|
||||
(VWindowName (NE.fromList "window"))
|
||||
$ NE.fromList [Pane (PaneCommand "whoa-no") undefined]
|
||||
$ NE.fromList [Pane (PaneCommand "whoa-no")]
|
||||
)
|
||||
]
|
||||
)
|
||||
@ -173,7 +173,7 @@ spec = do
|
||||
( NE.fromList
|
||||
[ ( VWindow
|
||||
(VWindowName (NE.fromList "window"))
|
||||
$ NE.fromList [Pane (PaneCommand "go") undefined]
|
||||
$ NE.fromList [Pane (PaneCommand "go")]
|
||||
)
|
||||
]
|
||||
)
|
||||
@ -191,7 +191,7 @@ spec = do
|
||||
[ ( VWindow
|
||||
(VWindowName (NE.fromList "window"))
|
||||
$ NE.fromList
|
||||
[Pane (PaneCommand "go") undefined]
|
||||
[Pane (PaneCommand "go")]
|
||||
)
|
||||
]
|
||||
)
|
||||
|
@ -41,8 +41,5 @@ instance Arbitrary SessionName where
|
||||
instance Arbitrary Pane where
|
||||
arbitrary = genericArbitrary
|
||||
|
||||
instance Arbitrary PaneTitle where
|
||||
arbitrary = oneof [pure (PaneTitle "pane-title")]
|
||||
|
||||
instance Arbitrary PaneCommand where
|
||||
arbitrary = oneof [pure (PaneCommand "pane-command")]
|
||||
|
@ -21,7 +21,7 @@ spec = do
|
||||
sessionWindows =
|
||||
[ Window
|
||||
{ windowTitle = WindowName "OK",
|
||||
windowPanes = [Pane {paneCommand = PaneCommand "", paneTitle = PaneTitle ""}]
|
||||
windowPanes = [Pane {paneCommand = PaneCommand ""}]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -40,7 +40,7 @@ spec = do
|
||||
sessionWindows =
|
||||
[ Window
|
||||
{ windowTitle = WindowName "",
|
||||
windowPanes = [Pane {paneCommand = PaneCommand "", paneTitle = PaneTitle ""}]
|
||||
windowPanes = [Pane {paneCommand = PaneCommand ""}]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1,6 +1,4 @@
|
||||
{ sessionTitle = "foo"
|
||||
, sessionPanes =
|
||||
[ { paneCommand = "yes 'Pane 1'", paneTitle = "One" }
|
||||
, { paneCommand = "yes 'Pane 2'", paneTitle = "Two" }
|
||||
]
|
||||
[ { paneCommand = "yes 'Pane 1'" }, { paneCommand = "yes 'Pane 2'" } ]
|
||||
}
|
||||
|
@ -2,7 +2,5 @@
|
||||
let sample1 = ./Sample1.dhall
|
||||
|
||||
in { sessionTitle = sample1.sessionTitle
|
||||
, sessionPanes =
|
||||
sample1.sessionPanes
|
||||
# [ { paneCommand = "yes 'Pane 3'", paneTitle = "Three" } ]
|
||||
, sessionPanes = sample1.sessionPanes # [ { paneCommand = "yes 'Pane 3'" } ]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user