laptop: bink

This commit is contained in:
Vivian 2022-08-28 23:47:34 +02:00
parent 07941251b5
commit f1650b1e85
4 changed files with 66 additions and 188 deletions

View file

@ -1,23 +1,42 @@
$base: #44465c;
$blue: #3fc6de;
$surface0: #44465c;
$surface1: #44465c;
$text: #d9e0ee;
$overlay0: #6e738d;
$red: #ec6a88;
$peach: #efb993;
$yellow: #efb993;
$mauve: #b072d1;
$green: #3fdaa4;
$mantle: #292a37;
$crust: #2e303e;
$light-gray: #9699b7;
$rosewater: #f2d5cf;
$flamingo: #eebebe;
$pink: #f4b8e4;
$mauve: #ca9ee6;
$red: #e78284;
$maroon: #ea999c;
$peach: #ef9f76;
$yellow: #e5c890;
$green: #a6d189;
$teal: #81c8be;
$sky: #99d1db;
$sapphire: #85c1dc;
$blue: #8caaee;
$lavender: #babbf1;
$text: #c6d0f5;
$subtext1: #b5bfe2;
$subtext0: #a5adce;
$overlay2: #949cbb;
$overlay1: #838ba7;
$overlay0: #737994;
$surface2: #626880;
$surface1: #51576d;
$surface0: #414559;
$base: #303446;
$mantle: #292c3c;
$crust: #232634;
* {
all: unset; //Unsets everything so you can style everything from scratch
font-family: "JetBrainsMono"
}
tooltip {
background-color: $base;
border-radius: 5px
}
.icon {
font-family: monospace;
font-size: 1.4rem;
@ -28,7 +47,7 @@ button {
}
.active {
color: $green;
color: $pink;
font-size: 1.4rem;
}
@ -48,7 +67,7 @@ button {
.wifi {
font-size: 2rem;
color: $blue;
color: $mauve;
}
.clock {
@ -63,6 +82,7 @@ button {
.date {
font-size: 1.5rem;
color: $text;
}
.reg-btn {
@ -71,110 +91,15 @@ button {
border-radius: 10px;
}
.powerbutton {
color: $red;
}
.powerbutton:hover {
background-color: $base;
}
.powerbutton:active {
background-color: $red;
color: $mantle;
}
.battery {
font-size: 1.5rem;
color: $green;
color: $teal;
}
.volume {
font-size: 1.5rem;
color: $blue;
}
// Credits AlphaTechnolog
.powermenu-box {
padding: 0 2px;
margin: 7px 7px 7px 0px;
background: inherit;
.dispatcher {
border-radius: 15px;
background: $base;
color: $red;
font-size: 14px;
padding: 0 14px 0 10px;
&:hover {
background-color: $surface0;
}
&:active {
background-color: $surface1;
}
}
}
// powermenu
.powermenu-container {
background: $crust;
color: $text;
padding: 10px;
font-size: 55px;
border-radius: 5px;
transition: all 200ms cubic-bezier(.1, -0.00, .0, 1.49);
.btn {
margin: 1rem;
}
// shutdown
.shutdown-btn-box .btn {
color: $red;
border-radius: 15px;
background-color: $mantle;
&:hover {
background-color: $base;
}
&:active {
background-color: $surface1;
}
}
// reboot
.reboot-btn-box .btn {
color: $mauve;
border-radius: 15px;
background-color: $mantle;
&:hover {
background-color: $base;
}
&:active {
background-color: $surface1;
}
}
// exit
.exit-btn-box .btn {
color: $yellow;
border-radius: 15px;
background-color: $mantle;
&:hover {
background-color: $base;
}
&:active {
background-color: $surface1;
}
}
color: $mauve;
}
// battery menu
@ -249,4 +174,4 @@ calendar.highlight {
calendar:indeterminate {
color: $text;
}
}

View file

@ -1,7 +1,6 @@
(defwidget bar []
(centerbox :orientation "v" :hexpand false
(box :valign "start" :hexpand false :vexpand true :orientation "v" :space-evenly false
(powerbutton)
)
(workspaces :halign "center" :vexpand true :hexpand false :orientation "v")
@ -36,22 +35,21 @@
;; ━━━ BATTERY ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
(defwidget battery []
(eventbox :onclick "eww open batterywindow --toggle"
(label :text `${
EWW_BATTERY.BAT0.status == "Charging" ? "" :
EWW_BATTERY.BAT0.capacity < 10 ? "" :
EWW_BATTERY.BAT0.capacity < 20 ? "" :
EWW_BATTERY.BAT0.capacity < 30 ? "" :
EWW_BATTERY.BAT0.capacity < 40 ? "" :
EWW_BATTERY.BAT0.capacity < 50 ? "" :
EWW_BATTERY.BAT0.capacity < 60 ? "" :
EWW_BATTERY.BAT0.capacity < 70 ? "" :
EWW_BATTERY.BAT0.capacity < 80 ? "" :
EWW_BATTERY.BAT0.capacity < 90 ? "" : ""
}`
:limit-width 10
:tooltip "${EWW_BATTERY.BAT0.status}: ${EWW_BATTERY.BAT0.capacity}%"
:class "battery"
))
(label :text `${
EWW_BATTERY.BAT0.status == "Charging" ? "" :
EWW_BATTERY.BAT0.capacity < 10 ? "" :
EWW_BATTERY.BAT0.capacity < 20 ? "" :
EWW_BATTERY.BAT0.capacity < 30 ? "" :
EWW_BATTERY.BAT0.capacity < 40 ? "" :
EWW_BATTERY.BAT0.capacity < 50 ? "" :
EWW_BATTERY.BAT0.capacity < 60 ? "" :
EWW_BATTERY.BAT0.capacity < 70 ? "" :
EWW_BATTERY.BAT0.capacity < 80 ? "" :
EWW_BATTERY.BAT0.capacity < 90 ? "" : ""
}`
:limit-width 10
:class "battery"
))
)
(defwidget batterymenu []
@ -121,51 +119,6 @@
:height "60px")
(cal))
;; powermenu
(defwidget powerbutton []
(eventbox :cursor "hand"
(button :class "reg-btn powerbutton"
:onclick "eww open powermenu --toggle &" "")
)
)
(defwidget powermenucontent []
(box :orientation "h"
:class "powermenu-container"
(box :class "shutdown-btn-box"
:orientation "h"
(button :class "btn"
:tooltip "Shutdown"
:onclick "eww close powermenu && shutdown now"
"⏻")
)
(box :class "reboot-btn-box"
:orientation "h"
(button :class "btn"
:tooltip "Reboot"
:onclick "eww close powermenu && reboot"
"")
)
(box :class "exit-btn-box"
:orientation "h"
(button :class "btn"
:tooltip "Suspend"
:onclick "systemctl suspend"
"⏾")
)
)
)
(defwindow powermenu
:monitor 0
:geometry (geometry :x "0%"
:y "0%"
:width "30%"
:height "15%"
:anchor "center center")
:wm-ignore true
(powermenucontent))
(deflisten workspaces_listen "./scripts/workspaces.sh")
(defwidget workspaces []
(literal :content workspaces_listen))