Skip to content

Commit

Permalink
Merge pull request #217 from alecmev/vcs
Browse files Browse the repository at this point in the history
Add VCS-based sidebar label coloring
  • Loading branch information
FichteFoll authored Aug 24, 2024
2 parents 8d4a59d + 8fa0a05 commit 2be59dc
Show file tree
Hide file tree
Showing 9 changed files with 1,053 additions and 41 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,24 @@ Tabs width:
"spacegray_fileicons": true,
```

![image](screenshots/spacegray-fileicons.png)

#### Enable VS Code style sidebar VCS coloring

```json
"spacegray_sidebar_vcs_label": true,
```

![image](screenshots/spacegray-vcs.png)

To also color expanded folders:

```json
"spacegray_sidebar_vcs_expanded": true,
```

Originally implemented in [Toxin](https://github.com/p3lim/sublime-toxin) by [@p3lim](https://github.com/p3lim).

#### Disable custom OSX Title Bar in Sublime Text 3

Useful if you're using native OSX tabs since the custom Title Bar breaks the native tabs
Expand Down
212 changes: 204 additions & 8 deletions Spacegray Eighties.sublime-theme
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
{
"variables":
{
"base00": "#2d2d2d",
"base01": "#393939",
"base02": "#515151",
"base03": "#747369",
"base04": "#a09f93",
"base05": "#d3d0c8",
"base06": "#e8e6df",
"base07": "#f2f0ec",
"base08": "#f2777a",
"base09": "#f99157",
"base0A": "#ffcc66",
"base0B": "#99cc99",
"base0C": "#66cccc",
"base0D": "#6699cc",
"base0E": "#cc99cc",
"base0F": "#d27b53"
},
"rules":
[

//
Expand Down Expand Up @@ -544,11 +565,190 @@
"settings": ["bold_folder_labels"],
"font.bold": true
},
// Sidebar entry selected

//
// SIDEBAR - VCS
//

// Decolor default VCS badges

{
"class": "vcs_status_badge",
"settings": ["spacegray_sidebar_vcs_label"],
"layer0.tint": "var(base02)"
},

// File not tracked by VCS

{
"class": "sidebar_label",
"parents": [{"class": "tree_row","attributes": ["selected"]}],
"color": [232, 230, 223] // 06
"parents": [
{ "class": "tree_row", "attributes": ["!expanded"] },
{ "class": "file_system_entry", "attributes": ["untracked"] }
],
"settings": ["spacegray_sidebar_vcs_label"],
"color": "color(var(base0B) a(0.75))"
},
{
"class": "sidebar_label",
"parents": [
{ "class": "tree_row", "attributes": ["!expanded", "hover"] },
{ "class": "file_system_entry", "attributes": ["untracked"] }
],
"settings": ["spacegray_sidebar_vcs_label"],
"color": "color(var(base0B) l(80%))"
},
{
"class": "sidebar_label",
"parents": [
{ "class": "file_system_entry", "attributes": ["untracked"] }
],
"settings": ["spacegray_sidebar_vcs_label", "spacegray_sidebar_vcs_expanded"],
"color": "color(var(base0B) a(0.75))"
},
{
"class": "sidebar_label",
"parents": [
{ "class": "tree_row", "attributes": ["hover"] },
{ "class": "file_system_entry", "attributes": ["untracked"] }
],
"settings": ["spacegray_sidebar_vcs_label", "spacegray_sidebar_vcs_expanded"],
"color": "color(var(base0B) l(80%))"
},

// File added to VCS (when a new file is staged)

{
"class": "sidebar_label",
"parents": [
{ "class": "tree_row", "attributes": ["!expanded"] },
{ "class": "file_system_entry", "attributes": ["added"] }
],
"settings": ["spacegray_sidebar_vcs_label"],
"color": "color(var(base0B) a(0.75))"
},
{
"class": "sidebar_label",
"parents": [
{ "class": "tree_row", "attributes": ["!expanded", "hover"] },
{ "class": "file_system_entry", "attributes": ["added"] }
],
"settings": ["spacegray_sidebar_vcs_label"],
"color": "color(var(base0B) l(80%))"
},
{
"class": "sidebar_label",
"parents": [
{ "class": "file_system_entry", "attributes": ["added"] }
],
"settings": ["spacegray_sidebar_vcs_label", "spacegray_sidebar_vcs_expanded"],
"color": "color(var(base0B) a(0.75))"
},
{
"class": "sidebar_label",
"parents": [
{ "class": "tree_row", "attributes": ["hover"] },
{ "class": "file_system_entry", "attributes": ["added"] }
],
"settings": ["spacegray_sidebar_vcs_label", "spacegray_sidebar_vcs_expanded"],
"color": "color(var(base0B) l(80%))"
},

// File modified in VCS

{
"class": "sidebar_label",
"parents": [
{ "class": "tree_row", "attributes": ["!expanded"] },
{ "class": "file_system_entry", "attributes": ["modified"] }
],
"settings": ["spacegray_sidebar_vcs_label"],
"color": "color(var(base0E) a(0.75))"
},
{
"class": "sidebar_label",
"parents": [
{ "class": "tree_row", "attributes": ["!expanded", "hover"] },
{ "class": "file_system_entry", "attributes": ["modified"] }
],
"settings": ["spacegray_sidebar_vcs_label"],
"color": "color(var(base0E) l(80%))"
},
{
"class": "sidebar_label",
"parents": [
{ "class": "file_system_entry", "attributes": ["modified"] }
],
"settings": ["spacegray_sidebar_vcs_label", "spacegray_sidebar_vcs_expanded"],
"color": "color(var(base0E) a(0.75))"
},
{
"class": "sidebar_label",
"parents": [
{ "class": "tree_row", "attributes": ["hover"] },
{ "class": "file_system_entry", "attributes": ["modified"] }
],
"settings": ["spacegray_sidebar_vcs_label", "spacegray_sidebar_vcs_expanded"],
"color": "color(var(base0E) l(80%))"
},

// File staged to VCS (without further modifications)

{
"class": "sidebar_label",
"parents": [
{ "class": "tree_row", "attributes": ["!expanded"] },
{ "class": "file_system_entry", "attributes": ["staged", "!modified"] }
],
"settings": ["spacegray_sidebar_vcs_label"],
"color": "color(var(base0E) a(0.75))"
},
{
"class": "sidebar_label",
"parents": [
{ "class": "tree_row", "attributes": ["!expanded", "hover"] },
{ "class": "file_system_entry", "attributes": ["staged", "!modified"] }
],
"settings": ["spacegray_sidebar_vcs_label"],
"color": "color(var(base0E) l(80%))"
},
{
"class": "sidebar_label",
"parents": [
{ "class": "file_system_entry", "attributes": ["staged", "!modified"] }
],
"settings": ["spacegray_sidebar_vcs_label", "spacegray_sidebar_vcs_expanded"],
"color": "color(var(base0E) a(0.75))"
},
{
"class": "sidebar_label",
"parents": [
{ "class": "tree_row", "attributes": ["hover"] },
{ "class": "file_system_entry", "attributes": ["staged", "!modified"] }
],
"settings": ["spacegray_sidebar_vcs_label", "spacegray_sidebar_vcs_expanded"],
"color": "color(var(base0E) l(80%))"
},

// File ignored by VCS

{
"class": "sidebar_label",
"parents": [
{ "class": "file_system_entry", "attributes": ["ignored", "!staged"]
}],
"settings": ["spacegray_sidebar_vcs_label"],
"font.italic": true
},

// Sidebar entry selected (must come after VSC rules)

{
"class": "sidebar_label",
"parents": [
{ "class": "tree_row", "attributes": ["selected"] }
],
"color": "var(base06)"
},

//
Expand Down Expand Up @@ -727,11 +927,6 @@
"layer0.opacity": 1.0
},
//spacegray_fileicons setting
{
"class": "sidebar_tree",
"settings": ["spacegray_fileicons"],
"indent_offset": 1
},
{
"class": "disclosure_button_control",
"settings": ["spacegray_fileicons"],
Expand Down Expand Up @@ -1182,3 +1377,4 @@
}

]
}
Loading

0 comments on commit 2be59dc

Please sign in to comment.