refactor: remove unnecessary label widgets in EWW bar
This commit is contained in:
parent
e3228bb1ef
commit
2981dca288
2 changed files with 15 additions and 20 deletions
|
|
@ -200,17 +200,12 @@ scale trough {
|
||||||
.bar-internet {
|
.bar-internet {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
margin-right: 9px;
|
margin-right: 9px;
|
||||||
font-family: "JetBrains Mono";
|
font-size: 15px;
|
||||||
color: #bb9af7;
|
color: #bb9af7;
|
||||||
font-size: 12px;
|
|
||||||
|
|
||||||
&.disabled {
|
&.disabled {
|
||||||
color: $disabled;
|
color: $disabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
.symbol {
|
|
||||||
font-size: 15px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.bar-bluetooth {
|
.bar-bluetooth {
|
||||||
|
|
|
||||||
|
|
@ -32,9 +32,9 @@
|
||||||
} ${workspace.windows > 0 ? "occupied" : "empty"
|
} ${workspace.windows > 0 ? "occupied" : "empty"
|
||||||
} ${workspace.previous > 0 ? "previous-occupied" : "previous-empty"
|
} ${workspace.previous > 0 ? "previous-occupied" : "previous-empty"
|
||||||
} ${workspace.next > 0 ? "next-occupied" : "next-empty"}"
|
} ${workspace.next > 0 ? "next-occupied" : "next-empty"}"
|
||||||
(label :text {workspace.id}))
|
{workspace.id})
|
||||||
(box :visible {workspace.id == current_workspace}
|
(box :visible {workspace.id == current_workspace}
|
||||||
(label :text {workspace.id})))))
|
{workspace.id}))))
|
||||||
|
|
||||||
(defwidget bar_workspaces []
|
(defwidget bar_workspaces []
|
||||||
(eventbox :onscroll "scripts/change-active-workspace {} ${current_workspace}"
|
(eventbox :onscroll "scripts/change-active-workspace {} ${current_workspace}"
|
||||||
|
|
@ -104,9 +104,10 @@
|
||||||
:halign "start"
|
:halign "start"
|
||||||
:limit-width title-limit
|
:limit-width title-limit
|
||||||
:text {mpris.title ?: ""}))))))
|
:text {mpris.title ?: ""}))))))
|
||||||
;; Scales (Volume + Brightness)
|
|
||||||
|
|
||||||
|
|
||||||
|
;; Scales (Volume + Brightness)
|
||||||
|
|
||||||
(defwidget bar_scale [?class reveal-name reveal value symbol onchange ?onclick]
|
(defwidget bar_scale [?class reveal-name reveal value symbol onchange ?onclick]
|
||||||
(eventbox :onhover "${EWW_CMD} update ${reveal-name}=true"
|
(eventbox :onhover "${EWW_CMD} update ${reveal-name}=true"
|
||||||
:onhoverlost "${EWW_CMD} update ${reveal-name}=false"
|
:onhoverlost "${EWW_CMD} update ${reveal-name}=false"
|
||||||
|
|
@ -224,12 +225,11 @@
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
:tooltip {ethernet != "{}" ? "${ethernet.name} (${ethernet.device})" :
|
:tooltip {ethernet != "{}" ? "${ethernet.name} (${ethernet.device})" :
|
||||||
wifi != "{}" ? "${wifi.name} (${wifi.device})" : ""}
|
wifi != "{}" ? "${wifi.name} (${wifi.device})" : ""}
|
||||||
(label :class "symbol"
|
{wifi != "{}" ? "" : ethernet != "{}" ? "" : ""}))
|
||||||
:text {wifi != "{}" ? "" : ethernet != "{}" ? "" : ""})))
|
|
||||||
|
|
||||||
(defwidget bar_bluetooth []
|
(defwidget bar_bluetooth []
|
||||||
(box :class "bar-bluetooth ${bluetooth == "{}" ? "disabled" : ""}"
|
(box :class "bar-bluetooth ${bluetooth == "{}" ? "disabled" : ""}"
|
||||||
(label :text {bluetooth != "{}" ? "" : ""})))
|
{bluetooth != "{}" ? "" : ""}))
|
||||||
|
|
||||||
;; Power Menu
|
;; Power Menu
|
||||||
|
|
||||||
|
|
@ -240,7 +240,7 @@
|
||||||
(eventbox :onclick "${EWW_CMD} active-windows | grep -q power \
|
(eventbox :onclick "${EWW_CMD} active-windows | grep -q power \
|
||||||
&& ${EWW_CMD} close power || ${EWW_CMD} open power"
|
&& ${EWW_CMD} close power || ${EWW_CMD} open power"
|
||||||
(box :class "bar-power"
|
(box :class "bar-power"
|
||||||
(label :text "⏻"))))
|
"⏻")))
|
||||||
|
|
||||||
(defwindow power
|
(defwindow power
|
||||||
:monitor 0
|
:monitor 0
|
||||||
|
|
@ -259,23 +259,23 @@
|
||||||
(button :onclick "systemctl suspend"
|
(button :onclick "systemctl suspend"
|
||||||
:tooltip "Sleep"
|
:tooltip "Sleep"
|
||||||
(box :style "color: #9aa5ce;"
|
(box :style "color: #9aa5ce;"
|
||||||
(label :text "")))
|
""))
|
||||||
(button :onclick "hyprlock --immediate &"
|
(button :onclick "hyprlock --immediate &"
|
||||||
:tooltip "Lock"
|
:tooltip "Lock"
|
||||||
(box :style "color: #cfc9c2;"
|
(box :style "color: #cfc9c2;"
|
||||||
(label :text "")))
|
""))
|
||||||
(button :onclick "hyprctl dispatch exit"
|
(button :onclick "hyprctl dispatch exit"
|
||||||
:tooltip "Log Out"
|
:tooltip "Log Out"
|
||||||
(box :style "color: #7dcfff; padding-left: 0.3ex;"
|
(box :style "color: #7dcfff; padding-left: 0.3ex;"
|
||||||
(label :text "")))
|
""))
|
||||||
(button :onclick "reboot"
|
(button :onclick "reboot"
|
||||||
:tooltip "Reboot"
|
:tooltip "Reboot"
|
||||||
(box :style "color: #e0af68;"
|
(box :style "color: #e0af68;"
|
||||||
(label :text "")))
|
""))
|
||||||
(button :onclick "poweroff"
|
(button :onclick "poweroff"
|
||||||
:tooltip "Shutdown"
|
:tooltip "Shutdown"
|
||||||
(box :style "color: #f7768e; font-size: 1.35em; padding-bottom: 0.15ex;"
|
(box :style "color: #f7768e; font-size: 1.35em; padding-bottom: 0.15ex;"
|
||||||
(label :text "⏼"))))
|
"⏼")))
|
||||||
(box
|
(box
|
||||||
:orientation "h"
|
:orientation "h"
|
||||||
(box) (box) (box) (box)
|
(box) (box) (box) (box)
|
||||||
|
|
@ -284,7 +284,7 @@
|
||||||
(box :style "padding-right: 0.5ex; ${idleinhibit > 0 ?
|
(box :style "padding-right: 0.5ex; ${idleinhibit > 0 ?
|
||||||
"color: #ff9e64" :
|
"color: #ff9e64" :
|
||||||
"color: #565f89; padding-top: 0.3ex;"}"
|
"color: #565f89; padding-top: 0.3ex;"}"
|
||||||
(label :text {idleinhibit > 0 ? "" : ""})))))))
|
{idleinhibit > 0 ? "" : ""}))))))
|
||||||
|
|
||||||
|
|
||||||
;; Separator
|
;; Separator
|
||||||
|
|
@ -293,7 +293,7 @@
|
||||||
(box :class "bar-sep"
|
(box :class "bar-sep"
|
||||||
:hexpand false
|
:hexpand false
|
||||||
:vexpand false
|
:vexpand false
|
||||||
(label :text "|")))
|
"|"))
|
||||||
|
|
||||||
|
|
||||||
;; Bar Layout
|
;; Bar Layout
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue