user config round 1 (#271)

This commit is contained in:
end-4
2024-03-01 23:18:56 +07:00
parent 7ecbf9b24b
commit e1bb1c9790
20 changed files with 170 additions and 224 deletions
@@ -1,7 +1,7 @@
// We're going to use ydotool
// See /usr/include/linux/input-event-codes.h for keycodes
export const defaultOskLayout = "qwerty_full"
export const DEFAULT_OSK_LAYOUT = "qwerty_full"
export const oskLayouts = {
qwerty_full: {
name: "QWERTY - Full",
@@ -6,10 +6,10 @@ import * as Utils from 'resource:///com/github/Aylur/ags/utils.js';
const { Box, EventBox, Button, Revealer } = Widget;
const { execAsync } = Utils;
import { MaterialIcon } from '../.commonwidgets/materialicon.js';
import { defaultOskLayout, oskLayouts } from './data_keyboardlayouts.js';
import { DEFAULT_OSK_LAYOUT, oskLayouts } from './data_keyboardlayouts.js';
import { setupCursorHoverGrab } from '../.widgetutils/cursorhover.js';
const keyboardLayout = defaultOskLayout;
const keyboardLayout = oskLayouts[userOptions.onScreenKeyboard.layout] ? userOptions.onScreenKeyboard.layout : DEFAULT_OSK_LAYOUT;
const keyboardJson = oskLayouts[keyboardLayout];
execAsync(`ydotoold`).catch(print); // Start ydotool daemon