feat: customize ags more

This commit is contained in:
2024-01-07 18:33:36 +01:00
parent ee757cb6ed
commit e5796d4d6e
14 changed files with 223 additions and 84 deletions

View File

@@ -45,20 +45,10 @@ export async function setupHyprland() {
const border_width = options.border.width.value;
const radii = options.radii.value;
const drop_shadow = options.desktop.drop_shadow.value;
const bar_style = options.bar.style.value;
const bar_pos = options.bar.position.value;
const inactive_border = options.hypr.inactive_border.value;
const accent = getColor(options.theme.accent.accent.value);
const batch = [];
JSON.parse(await Hyprland.sendMessage("j/monitors")).forEach(({ name }) => {
const v = bar_pos === "top" ? `-${wm_gaps},0,0,0` : `0,-${wm_gaps},0,0`;
if (bar_style !== "normal") batch.push(`monitor ${name},addreserved,${v}`);
else batch.push(`monitor ${name},addreserved,0,0,0,0`);
});
batch.push(
sendBatch([
`general:border_size ${border_width}`,
`general:gaps_out ${wm_gaps}`,
`general:gaps_in ${Math.floor(wm_gaps / 2)}`,
@@ -66,7 +56,5 @@ export async function setupHyprland() {
`general:col.inactive_border ${inactive_border}`,
`decoration:rounding ${radii}`,
`decoration:drop_shadow ${drop_shadow ? "yes" : "no"}`,
);
sendBatch(batch);
]);
}