formalconf 2.0.12 → 2.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/formalconf.js +72 -44
- package/package.json +2 -2
package/dist/formalconf.js
CHANGED
|
@@ -467,8 +467,8 @@ function StatusIndicator({
|
|
|
467
467
|
// package.json
|
|
468
468
|
var package_default = {
|
|
469
469
|
name: "formalconf",
|
|
470
|
-
version: "2.0.
|
|
471
|
-
description: "Dotfiles management TUI for macOS - config management, package sync, and theme switching",
|
|
470
|
+
version: "2.0.14",
|
|
471
|
+
description: "Dotfiles management TUI for macOS and Linux - config management, package sync, and theme switching",
|
|
472
472
|
type: "module",
|
|
473
473
|
main: "./dist/formalconf.js",
|
|
474
474
|
bin: {
|
|
@@ -4828,8 +4828,7 @@ function darken(hex, percent) {
|
|
|
4828
4828
|
}
|
|
4829
4829
|
function createColloidPalette(palette, mode) {
|
|
4830
4830
|
const isDark = mode === "dark";
|
|
4831
|
-
const
|
|
4832
|
-
const orderedGrey = isDark ? grey : [...grey].reverse();
|
|
4831
|
+
const orderedGrey = isDark ? interpolateGreyscale(palette.foreground, palette.background) : interpolateGreyscale(palette.background, palette.foreground);
|
|
4833
4832
|
const accentBase = palette.accent || palette.color4;
|
|
4834
4833
|
return {
|
|
4835
4834
|
grey: orderedGrey,
|
|
@@ -4867,6 +4866,8 @@ function createColloidPalette(palette, mode) {
|
|
|
4867
4866
|
}
|
|
4868
4867
|
function generateColloidScss(palette, mode) {
|
|
4869
4868
|
const colloid = createColloidPalette(palette, mode);
|
|
4869
|
+
const orange = interpolateColor(palette.color1, palette.color3, 0.5);
|
|
4870
|
+
const pink = interpolateColor(palette.color1, palette.color5, 0.4);
|
|
4870
4871
|
const greyNames = [
|
|
4871
4872
|
"050",
|
|
4872
4873
|
"100",
|
|
@@ -4891,41 +4892,62 @@ function generateColloidScss(palette, mode) {
|
|
|
4891
4892
|
let scss = `// FormalConf Generated Color Palette
|
|
4892
4893
|
// Auto-generated - do not edit manually
|
|
4893
4894
|
|
|
4894
|
-
//
|
|
4895
|
+
// Red
|
|
4896
|
+
$red-light: ${colloid.red.light};
|
|
4897
|
+
$red-dark: ${colloid.red.dark};
|
|
4898
|
+
|
|
4899
|
+
// Pink
|
|
4900
|
+
$pink-light: ${lighten(pink, 10)};
|
|
4901
|
+
$pink-dark: ${darken(pink, 10)};
|
|
4902
|
+
|
|
4903
|
+
// Purple
|
|
4904
|
+
$purple-light: ${colloid.purple.light};
|
|
4905
|
+
$purple-dark: ${colloid.purple.dark};
|
|
4906
|
+
|
|
4907
|
+
// Blue
|
|
4908
|
+
$blue-light: ${colloid.blue.light};
|
|
4909
|
+
$blue-dark: ${colloid.blue.dark};
|
|
4910
|
+
|
|
4911
|
+
// Teal
|
|
4912
|
+
$teal-light: ${colloid.teal.light};
|
|
4913
|
+
$teal-dark: ${colloid.teal.dark};
|
|
4914
|
+
|
|
4915
|
+
// Green
|
|
4916
|
+
$green-light: ${colloid.green.light};
|
|
4917
|
+
$green-dark: ${colloid.green.dark};
|
|
4918
|
+
|
|
4919
|
+
// Yellow
|
|
4920
|
+
$yellow-light: ${colloid.yellow.light};
|
|
4921
|
+
$yellow-dark: ${colloid.yellow.dark};
|
|
4922
|
+
|
|
4923
|
+
// Orange
|
|
4924
|
+
$orange-light: ${lighten(orange, 10)};
|
|
4925
|
+
$orange-dark: ${darken(orange, 10)};
|
|
4926
|
+
|
|
4927
|
+
// Grey
|
|
4895
4928
|
`;
|
|
4896
4929
|
for (let i = 0;i < greyNames.length; i++) {
|
|
4897
4930
|
scss += `$grey-${greyNames[i]}: ${colloid.grey[i]};
|
|
4898
4931
|
`;
|
|
4899
4932
|
}
|
|
4900
4933
|
scss += `
|
|
4901
|
-
//
|
|
4902
|
-
$black: ${colloid.black};
|
|
4934
|
+
// White
|
|
4903
4935
|
$white: ${colloid.white};
|
|
4904
4936
|
|
|
4905
|
-
//
|
|
4906
|
-
$
|
|
4907
|
-
$green-dark: ${colloid.green.dark};
|
|
4908
|
-
$yellow-dark: ${colloid.yellow.dark};
|
|
4909
|
-
$blue-dark: ${colloid.blue.dark};
|
|
4910
|
-
$purple-dark: ${colloid.purple.dark};
|
|
4911
|
-
$teal-dark: ${colloid.teal.dark};
|
|
4937
|
+
// Black
|
|
4938
|
+
$black: ${colloid.black};
|
|
4912
4939
|
|
|
4913
|
-
//
|
|
4914
|
-
$
|
|
4915
|
-
$
|
|
4916
|
-
$
|
|
4917
|
-
$blue-light: ${colloid.blue.light};
|
|
4918
|
-
$purple-light: ${colloid.purple.light};
|
|
4919
|
-
$teal-light: ${colloid.teal.light};
|
|
4940
|
+
// Button (window controls)
|
|
4941
|
+
$button-close: ${palette.color1};
|
|
4942
|
+
$button-max: ${palette.color2};
|
|
4943
|
+
$button-min: ${palette.color3};
|
|
4920
4944
|
|
|
4921
|
-
//
|
|
4922
|
-
$default-dark: ${colloid.accent.dark};
|
|
4923
|
-
$default-light: ${colloid.accent.light};
|
|
4945
|
+
// Link
|
|
4924
4946
|
$links: ${palette.accent || palette.color4};
|
|
4925
4947
|
|
|
4926
|
-
//
|
|
4927
|
-
$
|
|
4928
|
-
$
|
|
4948
|
+
// Theme (accent color)
|
|
4949
|
+
$default-light: ${colloid.accent.light};
|
|
4950
|
+
$default-dark: ${colloid.accent.dark};
|
|
4929
4951
|
`;
|
|
4930
4952
|
return scss;
|
|
4931
4953
|
}
|
|
@@ -4987,6 +5009,7 @@ async function cloneColloidRepo() {
|
|
|
4987
5009
|
return result.success;
|
|
4988
5010
|
}
|
|
4989
5011
|
async function updateColloidRepo() {
|
|
5012
|
+
await exec(["git", "checkout", "--", "src/sass/_color-palette-default.scss"], COLLOID_DIR);
|
|
4990
5013
|
const result = await exec(["git", "pull", "--rebase"], COLLOID_DIR);
|
|
4991
5014
|
return result.success;
|
|
4992
5015
|
}
|
|
@@ -4998,21 +5021,9 @@ async function ensureColloidRepo() {
|
|
|
4998
5021
|
}
|
|
4999
5022
|
async function writeCustomPalette(palette, mode) {
|
|
5000
5023
|
const scss = generateColloidScss(palette, mode);
|
|
5001
|
-
const palettePath = join6(COLLOID_DIR, "src", "sass", "_color-palette-
|
|
5024
|
+
const palettePath = join6(COLLOID_DIR, "src", "sass", "_color-palette-default.scss");
|
|
5002
5025
|
await writeFile(palettePath, scss);
|
|
5003
5026
|
}
|
|
5004
|
-
async function patchTweaksFile(themeName) {
|
|
5005
|
-
const tweaksContent = `// FormalConf theme: ${themeName}
|
|
5006
|
-
// Auto-patched to use custom color palette
|
|
5007
|
-
|
|
5008
|
-
@import 'color-palette-formalconf';
|
|
5009
|
-
|
|
5010
|
-
$tweaks: true;
|
|
5011
|
-
$colorscheme: true;
|
|
5012
|
-
`;
|
|
5013
|
-
const tweaksPath = join6(COLLOID_DIR, "src", "sass", "_tweaks-temp.scss");
|
|
5014
|
-
await writeFile(tweaksPath, tweaksContent);
|
|
5015
|
-
}
|
|
5016
5027
|
async function runColloidInstall(options) {
|
|
5017
5028
|
const args = [
|
|
5018
5029
|
"./install.sh",
|
|
@@ -5024,14 +5035,15 @@ async function runColloidInstall(options) {
|
|
|
5024
5035
|
if (options.installLibadwaita !== false) {
|
|
5025
5036
|
args.push("-l");
|
|
5026
5037
|
}
|
|
5027
|
-
|
|
5028
|
-
|
|
5038
|
+
if (options.mode === "dark") {
|
|
5039
|
+
args.push("--tweaks", "black");
|
|
5040
|
+
}
|
|
5029
5041
|
const result = await exec(args, COLLOID_DIR);
|
|
5030
5042
|
return result.exitCode;
|
|
5031
5043
|
}
|
|
5032
5044
|
function getGtkThemeName(themeName, mode) {
|
|
5033
5045
|
const modeCapitalized = mode === "dark" ? "Dark" : "Light";
|
|
5034
|
-
return `
|
|
5046
|
+
return `formalconf-${themeName}-${modeCapitalized}`;
|
|
5035
5047
|
}
|
|
5036
5048
|
async function applyGtkTheme(theme, mode) {
|
|
5037
5049
|
if (getOS() !== "linux") {
|
|
@@ -5070,7 +5082,6 @@ ${instructions}`
|
|
|
5070
5082
|
};
|
|
5071
5083
|
}
|
|
5072
5084
|
await writeCustomPalette(palette, mode);
|
|
5073
|
-
await patchTweaksFile(themeName);
|
|
5074
5085
|
const gtkConfig = theme.gtk || {};
|
|
5075
5086
|
const options = {
|
|
5076
5087
|
themeName,
|
|
@@ -5088,6 +5099,23 @@ ${instructions}`
|
|
|
5088
5099
|
};
|
|
5089
5100
|
}
|
|
5090
5101
|
const installedThemeName = getGtkThemeName(themeName, mode);
|
|
5102
|
+
const hasGsettings = await commandExists("gsettings");
|
|
5103
|
+
if (hasGsettings) {
|
|
5104
|
+
await exec([
|
|
5105
|
+
"gsettings",
|
|
5106
|
+
"set",
|
|
5107
|
+
"org.gnome.desktop.interface",
|
|
5108
|
+
"gtk-theme",
|
|
5109
|
+
installedThemeName
|
|
5110
|
+
]);
|
|
5111
|
+
await exec([
|
|
5112
|
+
"gsettings",
|
|
5113
|
+
"set",
|
|
5114
|
+
"org.gnome.desktop.interface",
|
|
5115
|
+
"color-scheme",
|
|
5116
|
+
`prefer-${mode}`
|
|
5117
|
+
]);
|
|
5118
|
+
}
|
|
5091
5119
|
return {
|
|
5092
5120
|
success: true,
|
|
5093
5121
|
themeName: installedThemeName
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "formalconf",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "Dotfiles management TUI for macOS - config management, package sync, and theme switching",
|
|
3
|
+
"version": "2.0.14",
|
|
4
|
+
"description": "Dotfiles management TUI for macOS and Linux - config management, package sync, and theme switching",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/formalconf.js",
|
|
7
7
|
"bin": {
|