✨ eww: better user experience with volume menu and control center
This commit is contained in:
@@ -5,8 +5,7 @@ print_workspaces_literal() {
|
|||||||
existing_workspaces=$(hyprctl -j workspaces | jq .[].id | xargs)
|
existing_workspaces=$(hyprctl -j workspaces | jq .[].id | xargs)
|
||||||
|
|
||||||
output="
|
output="
|
||||||
(box :class \"workspaces\"
|
(box :space-evenly false
|
||||||
:space-evenly false
|
|
||||||
:orientation \"horizontal\""
|
:orientation \"horizontal\""
|
||||||
|
|
||||||
for i in {1..10}; do
|
for i in {1..10}; do
|
||||||
|
|||||||
+1
-1
@@ -38,7 +38,7 @@
|
|||||||
padding: 2px 0px;
|
padding: 2px 0px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
|
||||||
& > button {
|
& button {
|
||||||
$padding-block: 5px;
|
$padding-block: 5px;
|
||||||
|
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
|
|||||||
@@ -136,11 +136,14 @@ box.cc {
|
|||||||
& > box {
|
& > box {
|
||||||
background: darken($color: $color2, $amount: 15);
|
background: darken($color: $color2, $amount: 15);
|
||||||
}
|
}
|
||||||
|
&:checked > box {
|
||||||
|
background: $color3;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&:checked {
|
&:checked {
|
||||||
& > box {
|
& > box {
|
||||||
background: darken($color: $color3, $amount: 12);
|
background: darken($color: $color3, $amount: 5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,14 +158,26 @@ box.cc {
|
|||||||
margin-left: -16px; // This covers the checkbox space, hiding the check thing
|
margin-left: -16px; // This covers the checkbox space, hiding the check thing
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
font-size: 14px;
|
font-size: 15px;
|
||||||
padding-right: 5px;
|
padding-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
font-size: 12px;
|
font-size: 12.6px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
& .network {
|
||||||
|
.icon {
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
& .dnd {
|
||||||
|
.icon {
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,19 +62,19 @@ box.vertical.button-row {
|
|||||||
}
|
}
|
||||||
|
|
||||||
button,
|
button,
|
||||||
.button {
|
.button > box {
|
||||||
padding: 6px 10px;
|
padding: 6px 10px;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
background: none;
|
background: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
button:hover,
|
button:hover,
|
||||||
.button:hover {
|
.button:hover > box {
|
||||||
background: darken($color: $color2, $amount: 5);
|
background: darken($color: $color2, $amount: 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
button:active,
|
button:active,
|
||||||
.button:active {
|
.button:active > box {
|
||||||
background: darken($color: $color3, $amount: 10);
|
background: darken($color: $color3, $amount: 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
|
|
||||||
trough {
|
trough {
|
||||||
background: rgba(lighten($color: $background, $amount: 8), .4);
|
background: rgba(lighten($color: $background, $amount: 25), .5);
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
|
(defvar hover_workspaces false)
|
||||||
|
|
||||||
(defwidget workspaces []
|
(defwidget workspaces []
|
||||||
(eventbox :onscroll "[[ {} == up ]] && hyprctl dispatch workspace e+1 >> /dev/null || hyprctl dispatch workspace e-1 >> /dev/null"
|
(eventbox :onscroll "[[ {} == up ]] && hyprctl dispatch workspace e+1 >> /dev/null || hyprctl dispatch workspace e-1 >> /dev/null"
|
||||||
|
:class "workspaces-eventbox"
|
||||||
|
:onhover "${EWW_CMD} update hover_workspaces=true"
|
||||||
|
:onhoverlost "${EWW_CMD} update hover_workspaces=false"
|
||||||
|
(box :class "workspaces"
|
||||||
(literal :content literal_workspaces)
|
(literal :content literal_workspaces)
|
||||||
)
|
)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
(box :class "big-media ${ show-album-bg ? 'album-bg' : '' } ${ show-album-image ? 'album-image' : '' }"
|
(box :class "big-media ${ show-album-bg ? 'album-bg' : '' } ${ show-album-image ? 'album-image' : '' }"
|
||||||
:style "${ show-album-bg ? 'background-image: image(url(\"${json_media.artUrl}\"))' : '' } ${
|
:style "${ show-album-bg ? 'background-image: image(url(\"${json_media.artUrl}\"))' : '' } ${
|
||||||
style-background-color != '' ? 'background-color: ${style-background-color}' : '' }"
|
style-background-color != '' ? 'background-color: ${style-background-color}' : '' }"
|
||||||
:visible { visible ? true : false}
|
:visible { visible == "" ? true : "${ visible ? true : false }" }
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
:orientation "vertical"
|
:orientation "vertical"
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,8 @@
|
|||||||
:enabled { notification_modes =~ "dnd" ? true : false }
|
:enabled { notification_modes =~ "dnd" ? true : false }
|
||||||
:onenable "makoctl mode -a dnd"
|
:onenable "makoctl mode -a dnd"
|
||||||
:ondisable "makoctl mode -r dnd"
|
:ondisable "makoctl mode -r dnd"
|
||||||
:visible true)
|
:visible true
|
||||||
|
:class "dnd")
|
||||||
)
|
)
|
||||||
(box :class "toggles toggles2"
|
(box :class "toggles toggles2"
|
||||||
:visible false
|
:visible false
|
||||||
@@ -39,7 +40,7 @@
|
|||||||
(checkbox :onchecked "${onenable}"
|
(checkbox :onchecked "${onenable}"
|
||||||
:onunchecked "${ondisable}"
|
:onunchecked "${ondisable}"
|
||||||
:checked { enabled == true ? true : false }
|
:checked { enabled == true ? true : false }
|
||||||
:class "toggle-checkbox"
|
:class "toggle-checkbox ${class}"
|
||||||
|
|
||||||
(box :class "toggle"
|
(box :class "toggle"
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
|
|||||||
@@ -9,7 +9,8 @@
|
|||||||
:orientation "horizontal"
|
:orientation "horizontal"
|
||||||
:draw-value false
|
:draw-value false
|
||||||
:flipped false
|
:flipped false
|
||||||
:onchange "wpctl set-volume @DEFAULT_AUDIO_SINK@ $(awk -v n={} 'BEGIN { print (n / 100) }')")
|
:onchange "wpctl set-volume @DEFAULT_AUDIO_SINK@ $(awk -v n={} 'BEGIN { print (n / 100) }')"
|
||||||
|
:tooltip "${json_volume.output}")
|
||||||
|
|
||||||
(label :text ""
|
(label :text ""
|
||||||
:xalign 0)
|
:xalign 0)
|
||||||
|
|||||||
@@ -10,7 +10,8 @@
|
|||||||
:draw-value false
|
:draw-value false
|
||||||
:flipped false
|
:flipped false
|
||||||
:onchange "wpctl set-volume @DEFAULT_AUDIO_SOURCE@ $(awk -v n={} 'BEGIN { print (n / 100) }')"
|
:onchange "wpctl set-volume @DEFAULT_AUDIO_SOURCE@ $(awk -v n={} 'BEGIN { print (n / 100) }')"
|
||||||
:class "output-volume-slider")
|
:class "output-volume-slider"
|
||||||
|
:tooltip "${json_volume.source}")
|
||||||
|
|
||||||
(label :text ""
|
(label :text ""
|
||||||
:xalign 0)
|
:xalign 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user