raw input: input:accel_profile instead of input:force_no_accel, as advised by hl wiki

This commit is contained in:
end-4
2024-03-11 15:56:09 +07:00
parent bbe11ab43f
commit 56898f5035
3 changed files with 43 additions and 3 deletions
+10 -1
View File
@@ -13,7 +13,16 @@ export function hasUnterminatedBackslash(inputString) {
export function launchCustomCommand(command) {
const args = command.split(' ');
if (args[0] == '>raw') { // Mouse raw input
execAsync([`bash`, `-c`, `hyprctl keyword input:force_no_accel $(( 1 - $(hyprctl getoption input:force_no_accel -j | gojq ".int") ))`, `&`]).catch(print);
Utils.execAsync('hyprctl -j getoption input:accel_profile')
.then((output) => {
const value = JSON.parse(output)["str"].trim();
if (value != "[[EMPTY]]" && value != "") {
execAsync(['bash', '-c', `hyprctl keyword input:accel_profile '[[EMPTY]]'`]).catch(print);
}
else {
execAsync(['bash', '-c', `hyprctl keyword input:accel_profile flat`]).catch(print);
}
})
}
else if (args[0] == '>img') { // Change wallpaper
execAsync([`bash`, `-c`, `${App.configDir}/scripts/color_generation/switchwall.sh`, `&`]).catch(print);