mirror of
https://github.com/zephrynis/nix-flake.git
synced 2026-02-18 20:21:53 +00:00
feat: make AGS colorshell configuration fully declarative
- Add complete colorshell v2.0.3 configuration to home/ags-config/ - Disable runner plugin and NightLight tile (incompatible with NixOS) - Customize SCSS with full opacity (no transparency) - Add dark pale blue color scheme in home/pywal-colors/ - Configure Papirus-Dark icon theme via home-manager - Make ~/.config/ags/ immutable and managed by Nix store - Auto-deploy pywal colors to ~/.cache/wal/colors.json All AGS configuration is now reproducible and version controlled.
This commit is contained in:
48
home/ags-config/widget/Separator.tsx
Normal file
48
home/ags-config/widget/Separator.tsx
Normal file
@@ -0,0 +1,48 @@
|
||||
import { Accessor } from "ags";
|
||||
import { Gtk } from "ags/gtk4";
|
||||
|
||||
|
||||
export interface SeparatorProps {
|
||||
class?: string;
|
||||
alpha?: number;
|
||||
cssColor?: string;
|
||||
orientation?: Gtk.Orientation;
|
||||
size?: number;
|
||||
spacing?: number;
|
||||
margin?: number;
|
||||
visible?: boolean | Accessor<boolean>;
|
||||
}
|
||||
|
||||
export function Separator(props: SeparatorProps = {
|
||||
orientation: Gtk.Orientation.HORIZONTAL
|
||||
}) {
|
||||
props.alpha = props.alpha ?
|
||||
(props.alpha > 1 ?
|
||||
props.alpha / 100
|
||||
: props.alpha)
|
||||
: 1;
|
||||
|
||||
props.orientation = props.orientation ?? Gtk.Orientation.HORIZONTAL;
|
||||
|
||||
return <Gtk.Box name={"separator"} vexpand={props.orientation === Gtk.Orientation.HORIZONTAL}
|
||||
hexpand={props.orientation === Gtk.Orientation.VERTICAL}
|
||||
class={`separator ${ props.orientation === Gtk.Orientation.VERTICAL ?
|
||||
"vertical" : "horizontal" }`} visible={props.visible}
|
||||
css={`.vertical { padding: ${props.spacing ?? 0}px ${props.margin ?? 7}px; }
|
||||
.horizontal { padding: ${props.margin ?? 4}px ${props.spacing ?? 0}px; }`}>
|
||||
|
||||
<Gtk.Box class={`${props.orientation === Gtk.Orientation.VERTICAL ?
|
||||
"vertical"
|
||||
: "horizontal"} ${props.class ?? ""}`}
|
||||
vexpand={props.orientation === Gtk.Orientation.HORIZONTAL}
|
||||
hexpand={props.orientation === Gtk.Orientation.VERTICAL}
|
||||
|
||||
css={`* {
|
||||
background: ${ props.cssColor ?? "lightgray" };
|
||||
opacity: ${props.alpha};
|
||||
}
|
||||
.horizontal { min-width: ${ props.size ?? 1 }px; }
|
||||
.vertical { min-height: ${ props.size ?? 1 }px; }`}
|
||||
/>
|
||||
</Gtk.Box>
|
||||
}
|
||||
Reference in New Issue
Block a user