Skip to content

Commit

Permalink
Add terminal blur and opacity settings
Browse files Browse the repository at this point in the history
  • Loading branch information
excalith committed Dec 25, 2023
1 parent 790086b commit b231183
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
11 changes: 10 additions & 1 deletion src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,16 @@ export default function Home() {
// Set Terminal
documentStyle.setProperty("--glow-color", settings.theme.glowColor)
documentStyle.setProperty("--background-color", settings.theme.backgroundColor)
documentStyle.setProperty("--window-color", settings.theme.windowColor)

if (settings.terminal.blur > 0) {
documentStyle.setProperty("--window-color", "transparent")
documentStyle.setProperty("--window-opacity", 1)
documentStyle.setProperty("--window-blur", settings.terminal.blur + "px")
} else {
documentStyle.setProperty("--window-color", settings.theme.windowColor)
documentStyle.setProperty("--window-opacity", settings.terminal.opacity)
documentStyle.setProperty("--window-blur", 0 + "px")
}

// Set Prompt Selection Color
documentStyle.setProperty("--selection-fg", "var(--" + settings.prompt.selectionFg + ")")
Expand Down
11 changes: 9 additions & 2 deletions src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

:root {
--background-color: #121317;
--window-color: #1e212b;
--glow-color: transparent;

--window-opacity: 1;
--window-color: #1e212b;
--window-blur: 0px;

--white: #e2e2e2;
--gray: #97989d;
--black: #16161e;
Expand Down Expand Up @@ -81,6 +83,11 @@ a:hover {
text-shadow: 0px 0px 10px;
}

.bg-window-color {
opacity: var(--window-opacity);
backdrop-filter: blur(var(--window-blur));
}

.selected {
background-color: var(--selection-bg);
color: var(--selection-fg) !important;
Expand Down
4 changes: 3 additions & 1 deletion startpage.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ const defaultConfig = {
terminal: {
fixedHeight: true,
windowGlow: true,
textGlow: false
textGlow: false,
opacity: 1,
blur: 0
},
prompt: {
ctrlC: true,
Expand Down

1 comment on commit b231183

@vercel
Copy link

@vercel vercel bot commented on b231183 Dec 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

start-page – ./

start-page-git-main-excalith.vercel.app
excalith-start-page.vercel.app
start-page-excalith.vercel.app

Please sign in to comment.