feat: Simplification and time display
This commit is contained in:
parent
664e5ed27a
commit
9b2bd7ad99
|
@ -23,9 +23,9 @@ $status_bg: rgba(0, 0, 0, 0.3);
|
|||
$tray_bg: rgba(204, 204, 204, 0.1);
|
||||
$tray: #c9cbff;
|
||||
$keyboard: #f2cdcd;
|
||||
$language: #e8a2af;
|
||||
$idle_inhibitor: #f28fad;
|
||||
$audio: #fae3b0;
|
||||
$volume: #fae3b0;
|
||||
$microphone: #e8a2af;
|
||||
$network: #f8bd96;
|
||||
$backlight: #bd93f9;
|
||||
$cpu_bg: #333333;
|
||||
|
@ -136,15 +136,25 @@ box .weather {
|
|||
color: mix($weather_end, $weather, 100%);
|
||||
}
|
||||
}
|
||||
.audio {
|
||||
.volume {
|
||||
background-color: transparent;
|
||||
.icon {
|
||||
color: $audio;
|
||||
}
|
||||
color: $audio;
|
||||
border-left: 2px solid $audio;
|
||||
color: $volume;
|
||||
border-left: 2px solid $volume;
|
||||
margin-bottom: 1px;
|
||||
margin-top: 1px;
|
||||
highlight {
|
||||
background-color: $volume;
|
||||
}
|
||||
}
|
||||
.microphone {
|
||||
background-color: transparent;
|
||||
color: $microphone;
|
||||
border-left: 2px solid $microphone;
|
||||
margin-bottom: 1px;
|
||||
margin-top: 1px;
|
||||
highlight {
|
||||
background-color: $microphone;
|
||||
}
|
||||
}
|
||||
|
||||
.media {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
(defvar eww-flags "--config $HOME/.config/eww/bar")
|
||||
(defvar amixer "amixer -D pulse")
|
||||
|
||||
(defwindow vbar
|
||||
|
@ -97,11 +96,11 @@
|
|||
|
||||
(defwidget widget-volume []
|
||||
(eventbox
|
||||
:onhover "${EWW_EXECUTABLE} ${eww-flags} update show-volume=true"
|
||||
:onhoverlost "${EWW_EXECUTABLE} ${eww-flags} update show-volume=false"
|
||||
:onhover "${EWW_CMD} update show-volume=true"
|
||||
:onhoverlost "${EWW_CMD} update show-volume=false"
|
||||
:onclick "${amixer} sset Master toggle"
|
||||
(box
|
||||
:class "audio"
|
||||
:class "volume"
|
||||
:orientation "v"
|
||||
:space-evenly "false"
|
||||
:spacing "2"
|
||||
|
@ -121,14 +120,14 @@
|
|||
:width 20 :height 20
|
||||
:xalign 0.5 :yalign 0.5
|
||||
:noindent true
|
||||
:text { current-volume-state == "off" ? "" : (current-volume > 80 ? "" : "") }))))
|
||||
:text { current-volume-state == "off" ? "" : (current-volume > 50 ? "" : "") }))))
|
||||
(defwidget widget-microphone []
|
||||
(eventbox
|
||||
:onhover "${EWW_EXECUTABLE} ${eww-flags} update show-microphone=true"
|
||||
:onhoverlost "${EWW_EXECUTABLE} ${eww-flags} update show-microphone=false"
|
||||
:onhover "${EWW_CMD} update show-microphone=true"
|
||||
:onhoverlost "${EWW_CMD} update show-microphone=false"
|
||||
:onclick "${amixer} sset Capture toggle"
|
||||
(box
|
||||
:class "audio"
|
||||
:class "microphone"
|
||||
:orientation "v"
|
||||
:space-evenly "false"
|
||||
:spacing "2"
|
||||
|
@ -149,10 +148,10 @@
|
|||
:xalign 0.5 :yalign 0.5
|
||||
:noindent true
|
||||
:text { current-microphone-state == "off" ? "" : "" }))))
|
||||
(defpoll current-volume :interval "1s" "amixer -D pulse sget Master | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%'")
|
||||
(defpoll current-volume-state :interval "1s" "amixer -D pulse sget Master | grep 'Left:' | awk -F'[][]' '{ print $4 }'")
|
||||
(defpoll current-microphone :interval "1s" "amixer -D pulse sget Capture | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%'")
|
||||
(defpoll current-microphone-state :interval "1s" "amixer -D pulse sget Capture | grep 'Left:' | awk -F'[][]' '{ print $4 }'")
|
||||
(defpoll current-volume :interval "1s" "amixer sget Master | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%'")
|
||||
(defpoll current-volume-state :interval "1s" "amixer sget Master | grep 'Left:' | awk -F'[][]' '{ print $4 }'")
|
||||
(defpoll current-microphone :interval "1s" "amixer sget Capture | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%'")
|
||||
(defpoll current-microphone-state :interval "1s" "amixer sget Capture | grep 'Left:' | awk -F'[][]' '{ print $4 }'")
|
||||
(defvar show-volume false)
|
||||
(defvar show-microphone false)
|
||||
|
||||
|
@ -204,6 +203,7 @@
|
|||
:valign "end"
|
||||
:spacing 1
|
||||
:width 20
|
||||
:tooltip {formattime(EWW_TIME, "%F (%a) %T [%Z]")}
|
||||
;(box :class "icon" "")
|
||||
"${clock.m}" "${clock.d}"
|
||||
(box :class "icon" "")
|
||||
|
|
|
@ -10,7 +10,6 @@ monitor=,preferred,auto,auto
|
|||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
|
||||
# waybar is executed after eww to have the intersection effect at top left
|
||||
exec-once = hyprpaper & swaync & fcitx5 & flameshot & eww --config ~/.config/eww/bar open vbar
|
||||
|
||||
# Source a file (multi-file configs)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
exec /usr/share/swayfx/scripts/inactive-windows-transparency --opacity 0.8
|
||||
exec_always eww --config ~/.config/eww/bar open bar
|
||||
bar {
|
||||
position top
|
||||
swaybar_command waybar
|
||||
}
|
||||
exec_always eww --config ~/.config/eww/bar open vbar
|
||||
#bar {
|
||||
# position top
|
||||
# swaybar_command waybar
|
||||
#}
|
||||
exec_always multibg-sway ~/.config/sway/wallpapers
|
||||
exec swaync
|
||||
exec fcitx5
|
||||
|
|
Loading…
Reference in New Issue