diff options
| author | srdusr <trevorgray@srdusr.com> | 2025-08-30 19:22:59 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2025-08-30 19:22:59 +0200 |
| commit | 19120d4f9761c67d99ed1ce3da6084b83f5a49c9 (patch) | |
| tree | f234cad1bdad88114a63c9702144da487024967a /.config/ags/lib/hyprland.ts | |
| parent | 5928998af5404ae2be84c6cecc10ebf84bd3f3ed (diff) | |
| download | dotfiles-19120d4f9761c67d99ed1ce3da6084b83f5a49c9.tar.gz dotfiles-19120d4f9761c67d99ed1ce3da6084b83f5a49c9.zip | |
Linux-specific dotfiles
Diffstat (limited to '.config/ags/lib/hyprland.ts')
| -rw-r--r-- | .config/ags/lib/hyprland.ts | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/.config/ags/lib/hyprland.ts b/.config/ags/lib/hyprland.ts deleted file mode 100644 index 7f6a68c..0000000 --- a/.config/ags/lib/hyprland.ts +++ /dev/null @@ -1,80 +0,0 @@ -import options from "options" -const { messageAsync } = await Service.import("hyprland") - -const { - hyprland, - theme: { - spacing, - radius, - border: { width }, - blur, - shadows, - dark: { - primary: { bg: darkActive }, - }, - light: { - primary: { bg: lightActive }, - }, - scheme, - }, -} = options - -const deps = [ - "hyprland", - spacing.id, - radius.id, - blur.id, - width.id, - shadows.id, - darkActive.id, - lightActive.id, - scheme.id, -] - -function activeBorder() { - const color = scheme.value === "dark" - ? darkActive.value - : lightActive.value - - return color.replace("#", "") -} - -function sendBatch(batch: string[]) { - const cmd = batch - .filter(x => !!x) - .map(x => `keyword ${x}`) - .join("; ") - - return messageAsync(`[[BATCH]]/${cmd}`) -} - -async function setupHyprland() { - const wm_gaps = Math.floor(hyprland.gaps.value * spacing.value) - - //sendBatch([ - // `general:border_size ${width}`, - // `general:gaps_out ${wm_gaps}`, - // `general:gaps_in ${Math.floor(wm_gaps / 2)}`, - // `general:col.active_border rgba(${activeBorder()}ff)`, - // `general:col.inactive_border rgba(${hyprland.inactiveBorder.value})`, - // `decoration:rounding ${radius}`, - // `decoration:drop_shadow ${shadows.value ? "yes" : "no"}`, - // `dwindle:no_gaps_when_only ${hyprland.gapsWhenOnly.value ? 0 : 1}`, - // `master:no_gaps_when_only ${hyprland.gapsWhenOnly.value ? 0 : 1}`, - //]) - - //await sendBatch(App.windows.map(({ name }) => `layerrule unset, ${name}`)) - - if (blur.value > 0) { - sendBatch(App.windows.flatMap(({ name }) => [ - `layerrule unset, ${name}`, - `layerrule blur, ${name}`, - `layerrule ignorealpha ${/* based on shadow color */.29}, ${name}`, - ])) - } -} - -export default function init() { - options.handler(deps, setupHyprland) - setupHyprland() -} |
