Skip to content

Commit

Permalink
Ability to hide notifications, tab title, or icons
Browse files Browse the repository at this point in the history
  • Loading branch information
ng-hai committed Jun 15, 2021
1 parent e82395c commit ba4fcd2
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 7 deletions.
30 changes: 30 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ const defaultConfig = {
light: PaletteNames.Dawn,
},
hideControls: false,
hideNotifications: false,
hideTabTitle: true,
hideTabIcons: false,
}

const transformPaletteToConfig = (palette, hyperRosePine) => {
Expand Down Expand Up @@ -168,6 +171,7 @@ const transformPaletteToConfig = (palette, hyperRosePine) => {
.xterm-viewport::-webkit-scrollbar-thumb {
background: ${palette.OverlayHighlight} !important;
}
.xterm-viewport::-webkit-scrollbar-thumb:window-inactive {
background: ${palette.OverlayHighlight} !important;
}
Expand All @@ -187,6 +191,32 @@ const transformPaletteToConfig = (palette, hyperRosePine) => {
.rose-pine-title > svg {
width: 14px;
margin-right: 8px;
display: ${hyperRosePine.hideTabIcons ? "none" : "block"};
}
.tabs_title .rose-pine-title > span {
display: ${hyperRosePine.hideTabTitle ? "none" : "block"};
}
@keyframes fade-out {
0% {
opacity: 1;
transform:translate(0);
}
90% {
opacity: 0;
transform:translate(0);
}
100% {
opacity: 0;
transform:translate(9999px);
}
}
.notifications_view {
animation: ${
hyperRosePine.hideNotifications ? "fade-out 5s ease-out both" : "none"
};
}
`,
}
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hyper-rose-pine-next",
"version": "1.0.5",
"version": "1.0.6",
"description": "All natural pine, faux fur and a bit of soho vibes for the classy minimalist.",
"author": "Hai Nguyen <github@ng-hai.dev>",
"repository": {
Expand All @@ -23,5 +23,8 @@
"subtle",
"minimalist",
"minimal"
]
],
"scripts": {
"release": "npx np --no-publish"
}
}
20 changes: 15 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,37 @@ module.exports = {
}
```

## Enable Dark Mode
## Configuration

Caution: Dark Mode only works with **Hyper 3.1.0-canary.4**, you can download it **[here](https://github.com/vercel/hyper/actions/runs/824537347#artifacts)**.

(Optional) Theme configuration for supporting Dark Mode
There are 3 variants in this theme. You can these values in the config files:
- rose-pine (Dark)
- rose-pine-moon (Dark, but dimmed)
- rose-pine-dawn (Light)

```js
// ~/.hyper.js
module.exports = {
config: {
hyperRosePine: {
// Default is "rose-pine", this property only works for Hyper 3.0.2
// Set theme variant for Hyper 3.0.2. Default is "rose-pine"
palette: "rose-pine-moon",
// Hyper Canary
// Dark mode settings (Hyper Canary only)
appearance: {
// Default is "rose-pine"
dark: "rose-pine-moon",
light: "rose-pine-dawn",
},
// Default is false
// Hide the window controls (traffic buttons) on Mac. Default is false
hideControls: true,
// Hide in-app notification after 5 seconds. Default is false
// I add this because there is no way to dismiss new version notification
hideNotifications: true,
// Hide tab title when there is only 1 tab opening. Default is true
hideTabTitle: true,
// Hide SVG Rose icons for all tabs. Default is false
hideTabIcons: false,
},
},
}
Expand Down

0 comments on commit ba4fcd2

Please sign in to comment.