ai: code blocks: update colorscheme along with other stuff

This commit is contained in:
end-4
2025-04-03 22:32:02 +02:00
parent cbfb8f6ddb
commit ac59f23ca4
5 changed files with 41 additions and 32 deletions
@@ -3,7 +3,6 @@ import App from 'resource:///com/github/Aylur/ags/app.js';
import * as Utils from 'resource:///com/github/Aylur/ags/utils.js';
const { execAsync, exec } = Utils;
import Todo from "../../services/todo.js";
import { darkMode } from '../.miscutils/system.js';
export function hasUnterminatedBackslash(inputString) {
// Use a regular expression to match a trailing odd number of backslashes
@@ -35,10 +34,10 @@ export function launchCustomCommand(command) {
execAsync([`bash`, `-c`, `${App.configDir}/scripts/color_generation/switchcolor.sh "${args[1]}"`, `&`]).catch(print);
}
else if (args[0] == '>light') { // Light mode
darkMode.value = false;
darkMode.setValue(false).catch(print);
}
else if (args[0] == '>dark') { // Dark mode
darkMode.value = true;
darkMode.setValue(true).catch(print);
}
else if (args[0] == '>badapple') { // Black and white
execAsync([`bash`, `-c`, `mkdir -p ${GLib.get_user_state_dir()}/ags/user && sed -i "3s/.*/monochrome/" ${GLib.get_user_state_dir()}/ags/user/colormode.txt`])