From 020c7289bbc77ccd86bc77c0cd55788737bf5149 Mon Sep 17 00:00:00 2001 From: JezerM Date: Mon, 2 Aug 2021 17:02:57 -0600 Subject: [PATCH] Added brightness and battery control to Dracula theme. HiDPI problems fixed. --- themes/dracula/css/style.css | 45 +++++++++++++++++++++++++-------- themes/dracula/index.html | 7 +++++ themes/dracula/js/battery.js | 37 +++++++++++++++++++++++++++ themes/dracula/js/brightness.js | 28 ++++++++++++++++++++ themes/dracula/js/index.js | 6 +++-- themes/gruvbox/css/style.css | 29 ++++++++++++++------- themes/gruvbox/js/battery.js | 6 ----- 7 files changed, 131 insertions(+), 27 deletions(-) create mode 100644 themes/dracula/js/battery.js create mode 100644 themes/dracula/js/brightness.js diff --git a/themes/dracula/css/style.css b/themes/dracula/css/style.css index 4550db9..ef2f6e5 100644 --- a/themes/dracula/css/style.css +++ b/themes/dracula/css/style.css @@ -21,12 +21,14 @@ --yellow: #F1FA8C; --animation-duration: 300ms; + + --base-font-size: 16px; } /* High DPI */ @media screen and (min-width: 3000px) and (min-height: 1200px) { - html { + #screen { zoom: 2.0; } } @@ -34,23 +36,27 @@ /* Basic */ html { - height: 100vh; - width: 100vw; - background-color: black; - font-size: 16px; + color: var(--fg0); + background-color: var(--bg0); + font-family: system-ui; + + min-height: 100%; + position: relative; + + font-size: var(--base-font-size); text-rendering: optimizeSpeed; image-rendering: pixelated; } html * { font-family: system-ui; - font-size: 16px; + font-size: inherit; transition: var(--animation-duration); color: var(--fg0); } body { - height: 100vh; - width: 100vw; + display: flex; + min-height: 100vh; margin: 0; overflow-x: hidden; background-color: var(--bg0); @@ -101,8 +107,7 @@ body { } #screen { - height: 100vh; - width: 100vw; + width: 100%; position: relative; display: flex; align-items: center; @@ -539,6 +544,26 @@ button { overflow-y: hidden; } +/* system-bar */ +#system-bar { + display: flex; + position: fixed; + bottom: 0; + width: -webkit-fill-available; + height: 1.5em; + padding: 5px; + + justify-content: flex-end; + align-items: center; + + background-color: var(--bg1); +} +#system-bar > * { + font-weight: bold; + margin: 2px; + cursor: default; +} + /* Animations */ @keyframes shake { diff --git a/themes/dracula/index.html b/themes/dracula/index.html index 79e4310..f99c4ea 100644 --- a/themes/dracula/index.html +++ b/themes/dracula/index.html @@ -106,6 +106,11 @@ +
+
+
+
+