refactor: cleaned up syntax

This commit is contained in:
matt1432 2023-06-04 01:41:14 -04:00
parent 23547fc6df
commit bdc1c4daa2
2 changed files with 29 additions and 16 deletions

View file

@ -44,7 +44,8 @@
(sysblock :icon "${network_icon}"
:onclick "~/.config/eww/scripts/network.sh toggle"
:active "${network_status == 'Connected' ? true : false}"
:label "${network_ssid}")
:label "${network_ssid}"
)
)
(box :halign "center"
:orientation "h"
@ -52,7 +53,8 @@
(sysblock :icon "${bluetooth_state == 'on' ? '' : ''}"
:onclick "~/.config/eww/scripts/bluetooth toggle"
:active "${bluetooth_state == 'on' ? true : false}"
:label "Bluetooth")
:label "Bluetooth"
)
)
(box :halign "end"
:orientation "h"
@ -60,7 +62,8 @@
(sysblock :icon "${network_radio == 'on' ? '' : ''}"
:onclick "~/.config/eww/scripts/network.sh toggle-radio"
:active "${network_radio == 'on' ? false : true}"
:label "Airplane")
:label "Airplane"
)
)
)
(box :class "lastrow"
@ -72,7 +75,8 @@
(sysblock :icon "${redshift_state == 'on' ? '' : ''}"
:onclick "~/.config/eww/scripts/redshift toggle"
:active "${redshift_state == 'on' ? true : false}"
:label "Night Light")
:label "Night Light"
)
)
(box :halign "center"
:orientation "h"
@ -80,7 +84,8 @@
(sysblock :icon "${volume_icon}"
:onclick "~/.config/eww/scripts/volume.sh toggle-muted"
:active "${is_muted == 'yes' ? false : true}"
:label "Volume")
:label "Volume"
)
)
(box :halign "end"
:orientation "h"
@ -88,7 +93,8 @@
(sysblock :icon "${mic_status == 'yes' ? '' : ''}"
:onclick "~/.config/eww/scripts/mic toggle"
:active "${mic_status == 'yes' ? true : false}"
:label "Micro")
:label "Micro"
)
)
)
)
@ -108,7 +114,8 @@
(scale :value volume_value
:onchange "~/.config/eww/scripts/volume.sh set {}"
:min 0
:max 101)
:max 101
)
)
(box :orientation "h"
:space-evenly "false"
@ -119,7 +126,8 @@
(scale :value br
:onchange "~/.config/eww/scripts/brightness.sh set {}"
:min 0
:max 101)
:max 101
)
)
)
)
@ -148,7 +156,8 @@
:valign "center"
:hexpand true
(box :class "pfp"
:style "background-image: url('${pfp}');")
:style "background-image: url('${pfp}');"
)
)
)
)
@ -198,8 +207,9 @@
:height "10px" ; automatically generated by eww.
:anchor "top right")
(revealer
:transition "crossfade"
:reveal actions-visible
:duration "550ms"
(actions)))
(revealer :transition "crossfade"
:reveal actions-visible
:duration "550ms"
(actions)
)
)

View file

@ -33,7 +33,8 @@
:height "100%"
:anchor "center")
:wm-ignore true
(powermenu-clickhandler))
(powermenu-clickhandler)
)
(defvar powermenu-visible false)
@ -49,4 +50,6 @@
:transition "crossfade"
:reveal powermenu-visible
:duration "550ms"
(powermenu)))
(powermenu)
)
)