feat: add sub rows on quick settings

This commit is contained in:
matt1432 2023-08-06 23:01:18 -04:00
parent 54233a6690
commit 117899ed59
6 changed files with 65 additions and 4 deletions

View file

@ -53,6 +53,21 @@
min-width: 50px; min-width: 50px;
} }
.sub-label {
font-size: 14px;
margin-top: -10px;
margin-left: -10px;
margin-bottom: 10px;
padding: 6px;
border: 2px solid $contrastbg;
border-top-right-radius: 20px;
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 20px;
min-width: 90px;
background: #1b1b1b;
}
.grid-chev { .grid-chev {
margin-left: 0px; margin-left: 0px;

View file

@ -71,7 +71,7 @@
:width 0 :width 0
:height 0 :height 0
:halign "center" :halign "center"
:space-evenly true :space-evenly false
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Row ONE ;; Row ONE
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -93,7 +93,6 @@
(eventbox :class "left-part" (eventbox :class "left-part"
:cursor "pointer" :cursor "pointer"
:onclick "rfkill toggle wlan" :onclick "rfkill toggle wlan"
(label :text " 󰖩 " (label :text " 󰖩 "
:class "grid-label" :class "grid-label"
) )
@ -153,6 +152,38 @@
) )
) )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; SUB ROW
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(box :orientation "h"
:space-evenly true
:spacing 54
:width 0
:height 0
:halign "center"
(label :text "${network_ssid}"
:class "sub-label"
:width 0
:height 0
:limit-width 10
)
(label :text "todo"
:class "sub-label"
:width 0
:height 0
:limit-width 10
)
(label :text ""
:class ""
:width 0
:height 0
:limit-width 10
)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Row TWO ;; Row TWO
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(box :class "button-row" (box :class "button-row"

11
config/eww/scripts/network.sh Executable file
View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
get_ssid() {
if nmcli -t -f NAME c show --active | grep -v lo; then
true
else
echo "Disconnected"
fi
}
[[ "$1" == "ssid" ]] && get_ssid

View file

@ -2,6 +2,9 @@
(deflisten heart_icon "tail -f $HOME/.config/.heart") (deflisten heart_icon "tail -f $HOME/.config/.heart")
(deflisten mic_icon "$EWW_PATH/mic.sh icon") (deflisten mic_icon "$EWW_PATH/mic.sh icon")
(deflisten network_ssid "zscroll -l 10 -u true \"$EWW_PATH/network.sh ssid\"")
(deflisten volume_icon "$EWW_PATH/volume.sh icon") (deflisten volume_icon "$EWW_PATH/volume.sh icon")
(defpoll volume :interval "1s" "$EWW_PATH/volume.sh percentage") (defpoll volume :interval "1s" "$EWW_PATH/volume.sh percentage")
(defpoll volume_value :interval "1s" "$EWW_PATH/volume.sh vol") (defpoll volume_value :interval "1s" "$EWW_PATH/volume.sh vol")

View file

@ -28,9 +28,9 @@ exec-once = eww open quick-settings-toggle
exec-once = $HYPR_PATH/osk-toggle.sh getState exec-once = $HYPR_PATH/osk-toggle.sh getState
# sometimes waybar starts after and stops me from pressing eww buttons # sometimes waybar starts after and stops me from pressing eww buttons
exec-once = bash -c "sleep 0.5; eww reload" exec-once = bash -c "sleep 0.8; eww reload"
exec-once = bash -c "grep -q 󰣐 $HOME/.config/.heart && sleep 0.6 && eww open heart && eww update heart-ts=true" exec-once = bash -c "grep -q 󰣐 $HOME/.config/.heart && sleep 0.9 && eww open heart && eww update heart-ts=true"
exec-once = gnome-keyring-daemon --start --components=secrets exec-once = gnome-keyring-daemon --start --components=secrets
exec-once = squeekboard exec-once = squeekboard

View file

@ -81,6 +81,7 @@
qt5.qtwayland qt5.qtwayland
qt6.qtwayland qt6.qtwayland
bottles-unwrapped bottles-unwrapped
zscroll
httrack httrack
lisgd lisgd
zeal zeal