More eww styling

This commit is contained in:
2024-05-12 23:05:31 +02:00
parent acfeed782e
commit 517b4499e1
3 changed files with 82 additions and 48 deletions

View File

@ -1,9 +1,9 @@
$text: #f6daa8; $text: #e0c1c1;
$highlight1: #4e8172; $highlight1: #fdab70;
$highlight2: #679a8b; $highlight2: white;
$background: #23231b; $background: #0f0f0f;
$lowlight2: #272727;
$lowlight1: black; $lowlight1: black;
$lowlight2: #1d1f21;
$transparent: rgba(#000000, 0.0); $transparent: rgba(#000000, 0.0);
*{ *{
@ -13,19 +13,24 @@ $transparent: rgba(#000000, 0.0);
} }
window { window {
background: rgba($background, 0.85); }
border-radius: 15px;
.sidebar {
margin-top: 10px;
margin-left: 5px;
background: rgba($background, 1.0);
border-radius: 30px;
margin-bottom: 10px;
} }
.workspace { .workspace {
font-size: 18px; font-size: 18px;
font-weight: 300; font-weight: 400;
border: solid $highlight1 1px; border: dashed $highlight1 1px;
background: $lowlight1; background: $lowlight1;
border-radius: 30px; border-radius: 30px;
padding-top: 3px; padding-top: 3px;
padding-bottom: 5px; padding-bottom: 5px;
margin: 8px;
margin-top: 3px; margin-top: 3px;
margin-bottom: 3px; margin-bottom: 3px;
box-shadow: 0 0px 5px 1px #06060b; box-shadow: 0 0px 5px 1px #06060b;
@ -42,22 +47,22 @@ window {
} }
.bottom { .bottom {
background-image: linear-gradient(to right, $transparent 40%, $highlight1 40%, $highlight1 60%, $transparent 60% ); //background-image: linear-gradient(to right, $transparent 40%, $highlight1 40%, $highlight1 60%, $transparent 60% );
margin-bottom: 2px; margin-bottom: 2px;
} }
.thingy { .thingy {
border: solid $highlight1 2px; //border: solid $highlight1 2px;
border-top: solid $highlight1 1px; //border-top: solid $highlight1 1px;
border-bottom: solid $highlight2 3px; //border-bottom: solid $highlight2 3px;
//border-bottom: dotted $highlight1 6px; //border-bottom: dotted $highlight1 6px;
color: $highlight1; //color: $highlight1;
background: $lowlight1; //background: $lowlight1;
border-radius: 30px; //border-radius: 30px;
padding-top: 0.5em; padding-top: 0.5em;
padding-bottom: 0.4em; padding-bottom: 0.5em;
margin-top: 10px;
min-height: 20px; min-height: 20px;
border-top: solid $highlight1 2px;
} }
scale trough { scale trough {
@ -89,16 +94,15 @@ scale trough {
.vpn { .vpn {
font-size: 40px; font-size: 40px;
color: $highlight1;
border-color: green;
margin: 2px; margin: 2px;
margin-top: -10px; margin-top: -10px;
transition: all 0.2s;
} }
.vpn label { .vpn label {
margin-top: -5px; margin-top: -5px;
margin-bottom: -5px; margin-bottom: -5px;
transition: color 0.5s;
color: green;
} }
.vpn:hover { .vpn:hover {
@ -109,35 +113,48 @@ scale trough {
background-color: $highlight1; background-color: $highlight1;
} }
.vpn.connecting { .vpn.connecting label {
border-color: orange; color: orange;
} }
.vpn.disconnected { .vpn.disconnected label {
border-color: red; color: red;
} }
.calendar { .calendar {
background: $lowlight2; background: $lowlight2;
} }
.date { .clickable {
transition: all 0.2s; transition: background-color 0.2s;
} }
.date:hover { .clickable:hover {
background-color: $lowlight2; background-color: $lowlight2;
} }
.date:active { .clickable:active {
background-color: $highlight1; background-color: $highlight1;
} }
.date {
transition: all 0.2s;
}
.clock { .clock {
font-size: 30px; font-size: 25px;
font-weight: 400; font-weight: 400;
color: $highlight1; color: $highlight1;
margin-bottom: -1px; margin-bottom: -1px;
padding-top: 18px;
} }
.clock label { .clock label {
padding: 0; padding: 0;
margin-top: -11px; margin-top: -8px;
}
.pwrbtn {
font-size: 35px;
font-weight: 400;
border-bottom-left-radius: 30px;
border-bottom-right-radius: 30px;
margin-bottom: -2px;
} }

View File

@ -1,13 +1,11 @@
(defwindow bar0 (defwindow bar0
:monitor 0 :monitor 0
:geometry (geometry :y "0%" :geometry (geometry :height "100%"
:x "3px" :width "40px"
:height "90%"
:width "50px"
:anchor "center left") :anchor "center left")
:stacking "fg" :stacking "fg"
:exclusive true :exclusive true
(centerbox :orientation "v" (centerbox :orientation "v" :active true :class "sidebar"
(workspaces) (workspaces)
(middle) (middle)
(bottom) (bottom)
@ -15,15 +13,14 @@
(defwindow bar1 (defwindow bar1
:monitor 1 :monitor 1
:geometry (geometry :y "0%" :geometry (geometry :height "100%"
:x "3px"
:height "90%"
:width "50px" :width "50px"
:anchor "center left") :anchor "center left")
:stacking "fg" :stacking "fg"
:exclusive true :exclusive true
(box :orientation "v" :space-evenly: false (centerbox :orientation "v" :active true :class "sidebar"
(workspaces) (workspaces)
(middle)
(bottom) (bottom)
)) ))
@ -45,6 +42,7 @@
(box :class "thingy" (systray :orientation "v")) (box :class "thingy" (systray :orientation "v"))
(date) (date)
(clock) (clock)
(pwr)
)) ))
(defwidget workspaces [] (defwidget workspaces []
@ -111,7 +109,7 @@
(calendar :class "calendar") (calendar :class "calendar")
(button :onclick "ba gnome-calendar" (button :onclick "ba gnome-calendar"
:hexpand true :hexpand true
:class "thingy date" :class "thingy date clickable"
(box :orientation "v" (box :orientation "v"
(label :text current_month) (label :text current_month)
(label :text current_day) (label :text current_day)
@ -125,7 +123,32 @@
(label :text current_minute) (label :text current_minute)
)) ))
(defwidget pwr []
(button :orientation "v"
:valign "end"
:class "thingy pwrbtn clickable"
:onclick "${EWW_CMD} open --toggle pwrctl"
(label :text "⏻")
))
(defwindow pwrctl
:monitor 0
:geometry (geometry :y "5%"
:x "20px"
:height "200px"
:width "300px"
:anchor "bottom left")
:stacking "fg"
;:exclusive true
(box :orientation "v"
:valign "end"
:class "thingy"
(label :text "SLEEP")
(label :text "OFF")
))
(defvar show_volume false) (defvar show_volume false)
(defpoll workspaces_json :interval "1s" "eww-workspaces") (defpoll workspaces_json :interval "1s" "eww-workspaces")
(defpoll volume_out :interval "1s" "pamixer --get-volume") (defpoll volume_out :interval "1s" "pamixer --get-volume")
(defpoll vpn_status :interval "1s" "mullvad-status") (defpoll vpn_status :interval "1s" "mullvad-status")

View File

@ -59,13 +59,7 @@ general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more # See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 5 gaps_in = 5
{% if hostname == "sputnik" %}
gaps_out = 10
{% elif hostname == "buran" %}
gaps_out = 5 gaps_out = 5
{% else %}
gaps_out = 20
{% end %}
border_size = 2 border_size = 2
col.active_border = rgba(f5deb3ff) rgba(f5deb3ee) 45deg col.active_border = rgba(f5deb3ff) rgba(f5deb3ee) 45deg
col.inactive_border = rgba(595959aa) col.inactive_border = rgba(595959aa)