(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 12.2' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 20119, 560] NotebookOptionsPosition[ 16391, 464] NotebookOutlinePosition[ 18145, 515] CellTagsIndexPosition[ 18102, 512] WindowTitle->ShowGitStatus | Example Notebook WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell[TextData[{ "Basic Examples", "\[NonBreakingSpace]", Cell["(2)", "ExampleCount"], "\[NonBreakingSpace]" }], "Subsection", TaggingRules->{}, CellID->462042388], Cell["Check if a directory is a git repo:", "Text", TaggingRules->{}, CellChangeTimes->{{3.818969762012723*^9, 3.818969798674951*^9}, { 3.81897090737409*^9, 3.8189709076198587`*^9}}, CellID->2137449059], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"SetDirectory", "[", "\"\<~/Documents/rd\>\"", "]"}], ";"}], "\n", RowBox[{ InterpretationBox[ TagBox[ FrameBox[ PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.65 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["\<\"ShowGitStatus\"\>", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->0.9 Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], Background->RGBColor[0.968627, 0.976471, 0.984314], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 1}}, FrameStyle->RGBColor[0.831373, 0.847059, 0.85098], RoundingRadius->4], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"ShowGitStatus\""}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["ShowGitStatus"], BoxID -> "ShowGitStatus", Selectable->False], "[", "]"}]}], "Input", TaggingRules->{}, CellChangeTimes->{{3.818968154545897*^9, 3.818968176700186*^9}, 3.818968672160101*^9, {3.818969291746179*^9, 3.81896930905373*^9}, { 3.818969372147068*^9, 3.818969372908121*^9}, {3.81896960506284*^9, 3.818969606124071*^9}, 3.818969758062484*^9, {3.819735996205909*^9, 3.819736002595461*^9}, 3.8215493328398533`*^9}, CellLabel->"In[74]:=", CellID->1313814570], Cell[BoxData[ StyleBox["\<\"Untracked files present\"\>", StripOnInput->False, FontColor->RGBColor[1, 0, 0], $CellContext`LineColor -> RGBColor[1, 0, 0], $CellContext`FrontFaceColor -> RGBColor[1, 0, 0], $CellContext`GraphicsColor -> RGBColor[1, 0, 0], $CellContext`BackFaceColor -> RGBColor[1, 0, 0]]], "Output", TaggingRules->{}, CellChangeTimes->{3.820682496831326*^9, 3.821549367537163*^9}, CellLabel->"Out[75]=", CellID->907156243] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[Cell["\t", "ExampleDelimiter"], $Line = 0; Null]], "ExampleDelimiter", TaggingRules->{}, CellID->1741968895], Cell["Visualize the git status of any path:", "Text", TaggingRules->{}, CellChangeTimes->{{3.818969762012723*^9, 3.8189697691730213`*^9}, { 3.8189698042187443`*^9, 3.818969804634328*^9}, {3.8189709187660923`*^9, 3.818970933647847*^9}}, CellID->626658714], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ FrameBox[ PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.65 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["\<\"ShowGitStatus\"\>", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->0.9 Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], Background->RGBColor[0.968627, 0.976471, 0.984314], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 1}}, FrameStyle->RGBColor[0.831373, 0.847059, 0.85098], RoundingRadius->4], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"ShowGitStatus\""}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["ShowGitStatus"], BoxID -> "ShowGitStatus", Selectable->False], "[", "\"\<~/Downloads/rd\>\"", "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{ 3.8189676652779207`*^9, {3.818967853386023*^9, 3.818967861215953*^9}, { 3.818967978660084*^9, 3.8189679836336517`*^9}, {3.8189681466706448`*^9, 3.818968146794052*^9}, {3.818969341958024*^9, 3.818969342116837*^9}, 3.8189698127065783`*^9, 3.82154933451184*^9}, CellID->836153427], Cell[BoxData[ StyleBox["\<\"Unstaged changes\"\>", StripOnInput->False, FontColor->RGBColor[1., 0.5, 0.], $CellContext`LineColor -> RGBColor[1., 0.5, 0.], $CellContext`FrontFaceColor -> RGBColor[1., 0.5, 0.], $CellContext`GraphicsColor -> RGBColor[1., 0.5, 0.], $CellContext`BackFaceColor -> RGBColor[1., 0.5, 0.]]], "Output", TaggingRules->{}, CellChangeTimes->{ 3.818969813147057*^9, {3.81897039307001*^9, 3.818970418971813*^9}}, CellLabel->"Out[148]=", CellID->770729767] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ FrameBox[ PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.65 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["\<\"ShowGitStatus\"\>", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->0.9 Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], Background->RGBColor[0.968627, 0.976471, 0.984314], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 1}}, FrameStyle->RGBColor[0.831373, 0.847059, 0.85098], RoundingRadius->4], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"ShowGitStatus\""}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["ShowGitStatus"], BoxID -> "ShowGitStatus", Selectable->False], "[", "\"\<~/Documents/dsblog\>\"", "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{ 3.8189676652779207`*^9, {3.818967853386023*^9, 3.818967861215953*^9}, { 3.818967978660084*^9, 3.8189679836336517`*^9}, {3.8189681466706448`*^9, 3.818968146794052*^9}, {3.818969341958024*^9, 3.818969342116837*^9}, 3.8189698127065783`*^9, {3.818969882741589*^9, 3.818969909062622*^9}, { 3.818970216973514*^9, 3.818970217413844*^9}, {3.8189702586053677`*^9, 3.818970278871674*^9}, {3.818970440732177*^9, 3.8189704512939377`*^9}, { 3.818970571972088*^9, 3.818970572135335*^9}, {3.818970614003088*^9, 3.818970614793366*^9}, 3.821549335651907*^9}, CellID->1244368903], Cell[BoxData[ StyleBox["\<\"Unpushed commits\"\>", StripOnInput->False, FontColor->Hue[0.55, 1., 1], $CellContext`LineColor -> Hue[0.55, 1., 1], $CellContext`FrontFaceColor -> Hue[0.55, 1., 1], $CellContext`GraphicsColor -> Hue[0.55, 1., 1], $CellContext`BackFaceColor -> Hue[0.55, 1., 1]]], "Output", TaggingRules->{}, CellChangeTimes->{ 3.818969813147057*^9, {3.8189698993019114`*^9, 3.8189699094003572`*^9}, { 3.818970208539754*^9, 3.818970217729535*^9}, {3.818970254302546*^9, 3.818970266036722*^9}, 3.81897045153574*^9, 3.818970567652525*^9, { 3.818970610156843*^9, 3.8189706300063267`*^9}}, CellLabel->"Out[179]=", CellID->60642095] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ FrameBox[ PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.65 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["\<\"ShowGitStatus\"\>", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->0.9 Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], Background->RGBColor[0.968627, 0.976471, 0.984314], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 1}}, FrameStyle->RGBColor[0.831373, 0.847059, 0.85098], RoundingRadius->4], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"ShowGitStatus\""}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["ShowGitStatus"], BoxID -> "ShowGitStatus", Selectable->False], "[", "\"\<~/repos/torch\>\"", "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{ 3.8189676652779207`*^9, {3.818967853386023*^9, 3.818967861215953*^9}, { 3.818967978660084*^9, 3.8189679836336517`*^9}, {3.8189681466706448`*^9, 3.818968146794052*^9}, {3.818969341958024*^9, 3.818969342116837*^9}, 3.8189698127065783`*^9, {3.818969882741589*^9, 3.818969909062622*^9}, { 3.818970216973514*^9, 3.818970217413844*^9}, {3.8189702586053677`*^9, 3.818970278871674*^9}, {3.818970440732177*^9, 3.8189704512939377`*^9}, { 3.818970575706695*^9, 3.8189705809807453`*^9}, 3.8215493369998903`*^9}, CellID->667128027], Cell[BoxData[ StyleBox["\<\"Working directory clean\"\>", StripOnInput->False, FontColor->Hue[0.39, 0.972, 0.87], $CellContext`LineColor -> Hue[0.39, 0.972, 0.87], $CellContext`FrontFaceColor -> Hue[0.39, 0.972, 0.87], $CellContext`GraphicsColor -> Hue[0.39, 0.972, 0.87], $CellContext`BackFaceColor -> Hue[0.39, 0.972, 0.87]]], "Output", TaggingRules->{}, CellChangeTimes->{ 3.818969813147057*^9, {3.8189698993019114`*^9, 3.8189699094003572`*^9}, { 3.818970208539754*^9, 3.818970217729535*^9}, {3.818970254302546*^9, 3.818970266036722*^9}, 3.81897045153574*^9}, CellLabel->"Out[158]=", CellID->408628802] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ "Options", "\[NonBreakingSpace]", Cell["(1)", "ExampleCount"], "\[NonBreakingSpace]" }], "Subsection", TaggingRules->{}, CellID->776923543], Cell["Change the appearance of the returned status:", "Text", TaggingRules->{}, CellChangeTimes->{{3.8189709374914007`*^9, 3.81897094659064*^9}, { 3.818970982141*^9, 3.818970993023267*^9}}, CellID->2071985871], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{ InterpretationBox[ TagBox[ FrameBox[ PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.65 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["\<\"ShowGitStatus\"\>", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->0.9 Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], Background->RGBColor[0.968627, 0.976471, 0.984314], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 1}}, FrameStyle->RGBColor[0.831373, 0.847059, 0.85098], RoundingRadius->4], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"ShowGitStatus\""}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["ShowGitStatus"], BoxID -> "ShowGitStatus", Selectable->False], "[", RowBox[{"\"\<~/Downloads/rd\>\"", ",", RowBox[{"Appearance", "\[Rule]", "#"}]}], "]"}], "&"}], "/@", RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}]], "Input", TaggingRules->{}, CellChangeTimes->{ 3.8189676652779207`*^9, {3.818967853386023*^9, 3.818967861215953*^9}, { 3.818967978660084*^9, 3.8189679836336517`*^9}, {3.8189681466706448`*^9, 3.818968146794052*^9}, {3.818968728326685*^9, 3.818968751388307*^9}, { 3.8189706794293633`*^9, 3.8189706911167107`*^9}, 3.821549340070569*^9}, CellID->1457541534], Cell[BoxData[ RowBox[{"{", RowBox[{ TagBox[ TooltipBox[ StyleBox["\<\"\[FilledCircle]\"\>", StripOnInput->False, FontColor->RGBColor[1., 0.5, 0.], $CellContext`LineColor -> RGBColor[1., 0.5, 0.], $CellContext`FrontFaceColor -> RGBColor[1., 0.5, 0.], $CellContext`GraphicsColor -> RGBColor[1., 0.5, 0.], $CellContext`BackFaceColor -> RGBColor[1., 0.5, 0.]], "\"Unstaged changes\"", TooltipStyle->"TextStyling"], Annotation[#, "Unstaged changes", "Tooltip"]& ], ",", StyleBox["\<\"Unstaged changes\"\>", StripOnInput->False, FontColor->RGBColor[1., 0.5, 0.], $CellContext`LineColor -> RGBColor[1., 0.5, 0.], $CellContext`FrontFaceColor -> RGBColor[1., 0.5, 0.], $CellContext`GraphicsColor -> RGBColor[1., 0.5, 0.], $CellContext`BackFaceColor -> RGBColor[1., 0.5, 0.]], ",", "\<\"Unstaged changes\"\>"}], "}"}]], "Output", TaggingRules->{}, CellChangeTimes->{3.819736302309423*^9}, CellLabel->"Out[310]=", CellID->325005156] }, Open ]] }, Closed]] }, WindowSize->Automatic, WindowMargins->Automatic, WindowTitle->"ShowGitStatus | Example Notebook", FrontEndVersion->"12.2 for Linux x86 (64-bit) (November 16, 2020)", StyleDefinitions->Notebook[{ Cell[ StyleData[ StyleDefinitions -> FrontEnd`FileName[{"Wolfram"}, "Reference.nb", CharacterEncoding -> "UTF-8"]]], Cell[ StyleData[All, "Working"], Editable -> True, DockedCells -> {}], Cell[ StyleData["Notebook"], Editable -> True, DockedCells -> {}, ScrollingOptions -> {"VerticalScrollRange" -> Automatic}], Cell[ StyleData[ "Section", StyleDefinitions -> StyleData["PrimaryExamplesSection"]], Editable -> True, ShowGroupOpener -> "Inline", WholeCellGroupOpener -> True], Cell[ StyleData["Subsection", StyleDefinitions -> StyleData["ExampleSection"]], Editable -> True, ShowGroupOpener -> "Inline", WholeCellGroupOpener -> True], Cell[ StyleData[ "Subsubsection", StyleDefinitions -> StyleData["ExampleSubsection"]], Editable -> True, ShowGroupOpener -> "Inline", WholeCellGroupOpener -> True], Cell[ StyleData[ "Subsubsubsection", StyleDefinitions -> StyleData["ExampleSubsubsection"]], Editable -> True, ShowGroupOpener -> "Inline", WholeCellGroupOpener -> True], Cell[ StyleData["Text", StyleDefinitions -> StyleData["ExampleText"]], Editable -> True]}, Visible -> False, FrontEndVersion -> "12.2 for Linux x86 (64-bit) (November 16, 2020)", StyleDefinitions -> "PrivateStylesheetFormatting.nb"], $CellContext`ClosingSaveDialog -> False ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[626, 23, 168, 7, 70, "Subsection",ExpressionUUID->"9d550131-5773-422a-bd41-5c3aa1221ad5", CellID->462042388], Cell[797, 32, 207, 4, 70, "Text",ExpressionUUID->"c31c011f-55cc-4316-aa4b-d15933c96fbe", CellID->2137449059], Cell[CellGroupData[{ Cell[1029, 40, 2134, 55, 70, "Input",ExpressionUUID->"44347d90-c076-4649-adf1-8d4953bbbb54", CellID->1313814570], Cell[3166, 97, 453, 11, 70, "Output",ExpressionUUID->"66b41b94-693d-4b43-8e87-a92e66648a6c", CellID->907156243] }, Open ]], Cell[CellGroupData[{ Cell[3656, 113, 145, 4, 70, "ExampleDelimiter",ExpressionUUID->"7b39dd42-3f7d-4c7d-b309-4ddf022f8c41", CellID->1741968895], Cell[3804, 119, 262, 5, 70, "Text",ExpressionUUID->"7b8ae1b2-a878-47ff-8e4e-f7a5ee878c31", CellID->626658714], Cell[CellGroupData[{ Cell[4091, 128, 2005, 52, 70, "Input",ExpressionUUID->"b603893f-f500-4f47-b190-dfc227fa50e6", CellID->836153427], Cell[6099, 182, 493, 12, 70, "Output",ExpressionUUID->"4ea0767b-7587-4fe0-ba07-ed92f76ab47b", CellID->770729767] }, Open ]], Cell[CellGroupData[{ Cell[6629, 199, 2307, 56, 70, "Input",ExpressionUUID->"8622bf61-e1c0-4c3e-8667-b36cea2515a5", CellID->1244368903], Cell[8939, 257, 667, 15, 70, "Output",ExpressionUUID->"43dab766-b460-4d31-923f-eb37eae6d2b3", CellID->60642095] }, Open ]], Cell[CellGroupData[{ Cell[9643, 277, 2255, 55, 70, "Input",ExpressionUUID->"7756c8cd-bbf4-4e30-9fb5-422ac18b29af", CellID->667128027], Cell[11901, 334, 631, 14, 70, "Output",ExpressionUUID->"578707ec-66b7-4cde-84b0-4fc9adfe04c5", CellID->408628802] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[12593, 355, 161, 7, 70, "Subsection",ExpressionUUID->"54bc70a5-fec7-4a48-9779-cd96ccd2f02e", CellID->776923543], Cell[12757, 364, 214, 4, 70, "Text",ExpressionUUID->"55bbadb4-5d10-4b94-a651-c5d2484b0789", CellID->2071985871], Cell[CellGroupData[{ Cell[12996, 372, 2341, 60, 70, "Input",ExpressionUUID->"29990212-d4c7-4af0-aacf-8ad124c53092", CellID->1457541534], Cell[15340, 434, 1023, 26, 70, "Output",ExpressionUUID->"f32d1c8b-3a23-4661-aaef-29c2b59d908e", CellID->325005156] }, Open ]] }, Closed]] } ] *) (* End of internal cache information *)