File tree Expand file tree Collapse file tree 6 files changed +19
-7
lines changed Expand file tree Collapse file tree 6 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ import Data.Text ( Text )
29
29
descriptionForValidRebuildMode :: NixRebuildMode -> Maybe Text
30
30
descriptionForValidRebuildMode m = lookup m validRebuildModesWithDescription
31
31
32
+ -- | List of all valid rebuild modes with a description
32
33
validRebuildModesWithDescription :: [(NixRebuildMode , Text )]
33
34
validRebuildModesWithDescription =
34
35
[ ( NixRebuildSwitch
Original file line number Diff line number Diff line change @@ -20,10 +20,11 @@ import Data.Aeson ( FromJSON
20
20
, (.:)
21
21
)
22
22
23
+ -- | Metadata for a Nix package. This is a companion module to "NixManager.NixPackage"
23
24
data NixPackageMeta = NixPackageMeta {
24
- _npmName :: Text
25
- , _npmVersion :: Text
26
- , _npmDescription :: Text
25
+ _npmName :: Text -- ^ Package name
26
+ , _npmVersion :: Text -- ^ Package version
27
+ , _npmDescription :: Text -- ^ Package description
27
28
} deriving (Eq ,Show )
28
29
29
30
makeLenses ''NixPackageMeta
Original file line number Diff line number Diff line change
1
+ {-|
2
+ Description: Bash expressions for some POSIX tools
3
+
4
+ Bash expressions for some POSIX tools
5
+ -}
1
6
{-# LANGUAGE OverloadedStrings #-}
2
7
module NixManager.PosixTools
3
8
( mkdir
@@ -23,16 +28,20 @@ import Data.Text ( Text
23
28
)
24
29
import Data.List.NonEmpty ( NonEmpty )
25
30
31
+ -- | Wrapper for @mkdir@ (first parameter specifies recursion)
26
32
mkdir :: Bool -> NonEmpty FilePath -> Expr
27
33
mkdir recursive paths = Command
28
34
" mkdir"
29
35
(mwhen recursive [" -p" ] <> toList (LiteralArg . pack <$> paths))
30
36
37
+ -- | Wrapper for @cp@
31
38
cp :: FilePath -> FilePath -> Expr
32
39
cp from to = Command " cp" (LiteralArg <$> [pack from, pack to])
33
40
41
+ -- | Wrapper for @mv@
34
42
mv :: FilePath -> FilePath -> Expr
35
43
mv from to = Command " mv" (LiteralArg <$> [pack from, pack to])
36
44
45
+ -- | Wrapper for @kill@ (currently only @-9@)
37
46
kill :: Pid -> Expr
38
47
kill pid = Command " kill" [" -9" , RawArg (showText pid)]
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ import qualified Data.Text.Encoding as Encoding
44
44
-- | Since we’re working with 'Text' as much as possible, we’re using a text based error type instead of the customary 'Either String'
45
45
type TextualError = Either Text
46
46
47
- -- | Convert something showable to 'Text'. Notably 'String' and ' Exception' types.
47
+ -- | Convert something showable to 'Text'. Notably 'String' and @ Exception@ types.
48
48
fromShowableError :: Show ex => Either ex e -> TextualError e
49
49
fromShowableError = first showText
50
50
Original file line number Diff line number Diff line change @@ -53,10 +53,10 @@ data ComboBoxProperties = ComboBoxProperties {
53
53
54
54
makeLenses ''ComboBoxProperties
55
55
56
- -- ^ Triggered when the combobox changes its value to a new index
56
+ -- | Triggered when the combobox changes its value to a new index
57
57
newtype ComboBoxChangeEvent = ComboBoxChangeEvent Int
58
58
59
- -- ^ Build a Combobox from Gtk attributes and some user-defined ones
59
+ -- | Build a Combobox from Gtk attributes and some user-defined ones
60
60
comboBox
61
61
:: Vector (Attribute Gtk. ComboBoxText ComboBoxChangeEvent )
62
62
-> ComboBoxProperties
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import Data.ByteString ( ByteString )
10
10
import qualified GI.Gdk as Gdk
11
11
import qualified GI.Gtk as Gtk
12
12
13
-
13
+ -- | Global app Stylesheet
14
14
styles :: ByteString
15
15
styles = mconcat
16
16
[ " .package-row-installed { background-color: #cdffcd; }"
@@ -30,6 +30,7 @@ styles = mconcat
30
30
, " .nixos-manager-grey-background { background-color: #eeeeee; }"
31
31
]
32
32
33
+ -- | Initialize CSS stylesheets
33
34
initCss :: IO ()
34
35
initCss = do
35
36
cssProvider <- Gtk. cssProviderNew
You can’t perform that action at this time.
0 commit comments