forked from Shinonome/dots-hyprland
changes from main n stuff
This commit is contained in:
@@ -148,14 +148,12 @@ Singleton {
|
||||
const brightnessValue = Math.max(monitor.multipliedBrightness, 0);
|
||||
if (isDdc) {
|
||||
const rawValueRounded = Math.max(Math.floor(brightnessValue * monitor.rawMaxBrightness), 1);
|
||||
setProc.command = ["ddcutil", "-b", busNum, "setvcp", "10", rawValueRounded];
|
||||
setProc.startDetached();
|
||||
setProc.exec(["ddcutil", "-b", busNum, "setvcp", "10", rawValueRounded]);
|
||||
} else {
|
||||
const valuePercentNumber = Math.floor(brightnessValue * 100);
|
||||
let valuePercent = `${valuePercentNumber}%`;
|
||||
if (valuePercentNumber == 0) valuePercent = "1"; // Prevent fully black
|
||||
setProc.command = ["brightnessctl", "--class", "backlight", "s", valuePercent, "--quiet"];
|
||||
setProc.startDetached();
|
||||
setProc.exec(["brightnessctl", "--class", "backlight", "s", valuePercent, "--quiet"])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,9 +43,9 @@ Singleton {
|
||||
const actionName = fileName.replace(/\.[^/.]+$/, ""); // strip extension
|
||||
actions.push({
|
||||
action: actionName,
|
||||
execute: ((path) => (args) => {
|
||||
Quickshell.execDetached([path, ...(args ? args.split(" ") : [])]);
|
||||
})(FileUtils.trimFileProtocol(filePath.toString()))
|
||||
execute: (path => args => {
|
||||
Quickshell.execDetached([path, ...(args ? args.split(" ") : [])]);
|
||||
})(FileUtils.trimFileProtocol(filePath.toString()))
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -250,8 +250,8 @@ Singleton {
|
||||
if (!entry.runInTerminal)
|
||||
entry.execute();
|
||||
else {
|
||||
// Probably needs more proper escaping, but this will do for now
|
||||
Quickshell.execDetached(["bash", '-c', `${Config.options.apps.terminal} -e '${StringUtils.shellSingleQuoteEscape(entry.command.join(' '))}'`]);
|
||||
print([...Config.options.apps.terminal, "-e", ...entry.command])
|
||||
Quickshell.execDetached([...Config.options.apps.terminal, "-e", ...entry.command]);
|
||||
}
|
||||
},
|
||||
comment: entry.comment,
|
||||
@@ -267,7 +267,7 @@ Singleton {
|
||||
if (!action.runInTerminal)
|
||||
action.execute();
|
||||
else {
|
||||
Quickshell.execDetached(["bash", '-c', `${Config.options.apps.terminal} -e '${StringUtils.shellSingleQuoteEscape(action.command.join(' '))}'`]);
|
||||
Quickshell.execDetached([...Config.options.apps.terminal, "-e", ...action.command]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user