From bdc1c4daa291b653e7d415d186915666072579bb Mon Sep 17 00:00:00 2001 From: matt1432 Date: Sun, 4 Jun 2023 01:41:14 -0400 Subject: [PATCH] refactor: cleaned up syntax --- eww/actions/actions.yuck | 38 +++++++++++++++++++++++------------- eww/powermenu/powermenu.yuck | 7 +++++-- 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/eww/actions/actions.yuck b/eww/actions/actions.yuck index 90ee3426..dac9c6d2 100644 --- a/eww/actions/actions.yuck +++ b/eww/actions/actions.yuck @@ -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) + ) +) diff --git a/eww/powermenu/powermenu.yuck b/eww/powermenu/powermenu.yuck index 24bc8554..d72d3e78 100644 --- a/eww/powermenu/powermenu.yuck +++ b/eww/powermenu/powermenu.yuck @@ -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) + ) +)