change user option name for cheatsheet keybind path

This commit is contained in:
end-4
2024-06-16 21:43:24 +07:00
parent 1c2ec63ae9
commit 728e00c382
2 changed files with 6 additions and 4 deletions
@@ -56,8 +56,10 @@ let configOptions = {
'default': "auto",
},
},
'configPaths': {
'keybinds': "", //custom path to keybinds.conf for the cheatsheet
'cheatsheet': {
'keybinds': {
'configPath': "" // Path to hyprland keybind config file. Leave empty for default (~/.config/hypr/hyprland/keybinds.conf)
}
},
'gaming': {
'crosshair': {
+2 -2
View File
@@ -5,8 +5,8 @@ import Widget from "resource:///com/github/Aylur/ags/widget.js";
import { IconTabContainer } from "../.commonwidgets/tabcontainer.js";
const { Box, Label, Scrollable } = Widget;
const HYPRLAND_KEYBIND_CONFIG_FILE = userOptions.configPaths.keybinds ?
userOptions.configPaths.keybinds : `${GLib.get_user_config_dir()}/hypr/hyprland/keybinds.conf`;
const HYPRLAND_KEYBIND_CONFIG_FILE = userOptions.cheatsheet.keybinds.configPath ?
userOptions.cheatsheet.keybinds.configPath : `${GLib.get_user_config_dir()}/hypr/hyprland/keybinds.conf`;
const KEYBIND_SECTIONS_PER_PAGE = 3;
const getKeybindList = () => {
let data = Utils.exec(`${App.configDir}/scripts/hyprland/get_keybinds.py --path ${HYPRLAND_KEYBIND_CONFIG_FILE}`);