style(ags osk): clarify code a bit
This commit is contained in:
parent
8bb4bcbc2f
commit
23e50efee0
1 changed files with 10 additions and 6 deletions
|
@ -1,7 +1,11 @@
|
||||||
import { Separator, EventBox } from '../common.js';
|
const { Box, Label } = ags.Widget;
|
||||||
|
const { subprocess, exec } = ags.Utils;
|
||||||
|
const deflisten = subprocess;
|
||||||
|
|
||||||
ags.Utils.subprocess(
|
import { EventBox } from '../common.js';
|
||||||
['bash', '-c', '/home/matt/.nix/config/ags/scripts/osk-toggle.sh getState'],
|
|
||||||
|
deflisten(
|
||||||
|
['bash', '-c', '/home/matt/.nix/config/ags/bin/osk-toggle.sh getState'],
|
||||||
(output) => {
|
(output) => {
|
||||||
if (output == 'Running') {
|
if (output == 'Running') {
|
||||||
OskToggle.toggleClassName('toggle-on', true);
|
OskToggle.toggleClassName('toggle-on', true);
|
||||||
|
@ -13,7 +17,7 @@ ags.Utils.subprocess(
|
||||||
export const OskToggle = EventBox({
|
export const OskToggle = EventBox({
|
||||||
className: 'toggle-off',
|
className: 'toggle-off',
|
||||||
onPrimaryClickRelease: function() {
|
onPrimaryClickRelease: function() {
|
||||||
ags.Utils.subprocess(
|
subprocess(
|
||||||
['bash', '-c', '/home/matt/.nix/config/ags/bin/osk-toggle.sh toggle'],
|
['bash', '-c', '/home/matt/.nix/config/ags/bin/osk-toggle.sh toggle'],
|
||||||
(output) => {
|
(output) => {
|
||||||
if (output == 'Running') {
|
if (output == 'Running') {
|
||||||
|
@ -24,12 +28,12 @@ export const OskToggle = EventBox({
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
child: ags.Widget.Box({
|
child: Box({
|
||||||
className: 'osk-toggle',
|
className: 'osk-toggle',
|
||||||
vertical: false,
|
vertical: false,
|
||||||
|
|
||||||
children: [
|
children: [
|
||||||
ags.Widget.Label({
|
Label({
|
||||||
label: " ",
|
label: " ",
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue