From 1ea4a2a77e7cc352cc0fa1e709435d41d5a6f75e Mon Sep 17 00:00:00 2001 From: matt1432 Date: Fri, 8 Dec 2023 02:22:38 -0500 Subject: [PATCH] refactor(ags): smol changes --- .../wim/config/ags/js/bar/buttons/heart.js | 25 ++++++++----------- .../ags/js/bar/buttons/keyboard-layout.js | 3 ++- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/devices/wim/config/ags/js/bar/buttons/heart.js b/devices/wim/config/ags/js/bar/buttons/heart.js index 0571a7f..c4e25c9 100644 --- a/devices/wim/config/ags/js/bar/buttons/heart.js +++ b/devices/wim/config/ags/js/bar/buttons/heart.js @@ -1,4 +1,4 @@ -import { Box, Label } from 'resource:///com/github/Aylur/ags/widget.js'; +import { Label } from 'resource:///com/github/Aylur/ags/widget.js'; import Variable from 'resource:///com/github/Aylur/ags/variable.js'; @@ -16,18 +16,13 @@ Persist({ }); -export default () => { - return EventBox({ - onPrimaryClickRelease: () => { - HeartState.value = HeartState.value === '' ? '󰣐' : ''; - }, +export default () => EventBox({ + onPrimaryClickRelease: () => { + HeartState.value = HeartState.value === '' ? '󰣐' : ''; + }, - child: Box({ - className: 'heart-toggle', - - child: Label({ - binds: [['label', HeartState, 'value']], - }), - }), - }); -}; + child: Label({ + className: 'heart-toggle', + binds: [['label', HeartState, 'value']], + }), +}); diff --git a/devices/wim/config/ags/js/bar/buttons/keyboard-layout.js b/devices/wim/config/ags/js/bar/buttons/keyboard-layout.js index 90b9f03..d0ab356 100644 --- a/devices/wim/config/ags/js/bar/buttons/keyboard-layout.js +++ b/devices/wim/config/ags/js/bar/buttons/keyboard-layout.js @@ -5,6 +5,7 @@ import { Box, EventBox, Icon, Label, Revealer } from 'resource:///com/github/Ayl import Separator from '../../misc/separator.js'; const DEFAULT_KB = 'at-translated-set-2-keyboard'; +const SPACING = 4; export default () => { @@ -12,7 +13,7 @@ export default () => { transition: 'slide_right', child: Box({ children: [ - Separator(4), + Separator(SPACING), Label({ css: 'font-size: 20px;', connections: [[Hyprland, (self, _n, layout) => {