mirror of
https://github.com/zephrynis/nix-flake.git
synced 2026-02-19 04:21:55 +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:
45
home/ags-config/window/center-window/index.tsx
Normal file
45
home/ags-config/window/center-window/index.tsx
Normal file
@@ -0,0 +1,45 @@
|
||||
import { Gdk, Gtk } from "ags/gtk4";
|
||||
import { Separator } from "../../widget/Separator";
|
||||
import { PopupWindow } from "../../widget/PopupWindow";
|
||||
import { BigMedia } from "./widgets/BigMedia";
|
||||
import { time, variableToBoolean } from "../../modules/utils";
|
||||
import { createBinding } from "ags";
|
||||
|
||||
import Media from "../../modules/media";
|
||||
import AstalMpris from "gi://AstalMpris";
|
||||
|
||||
|
||||
export const CenterWindow = (mon: number) =>
|
||||
<PopupWindow namespace={"center-window"} marginTop={10} monitor={mon}
|
||||
halign={Gtk.Align.CENTER} valign={Gtk.Align.START}
|
||||
actionKeyPressed={(_, keyval) => {
|
||||
if(keyval === Gdk.KEY_space) {
|
||||
Media.getDefault().player.available &&
|
||||
Media.getDefault().player.play_pause();
|
||||
return true;
|
||||
}
|
||||
}}>
|
||||
|
||||
<Gtk.Box class={"center-window-container"} spacing={6}>
|
||||
<Gtk.Box class={"left"} orientation={Gtk.Orientation.VERTICAL}>
|
||||
<Gtk.Box class={"datetime"} orientation={Gtk.Orientation.VERTICAL}
|
||||
halign={Gtk.Align.CENTER} valign={Gtk.Align.CENTER} vexpand>
|
||||
|
||||
<Gtk.Label class={"time"} label={time(t => t.format("%H:%M")!)} />
|
||||
<Gtk.Label class={"date"} label={time(d => d.format("%A, %B %d")!)} />
|
||||
</Gtk.Box>
|
||||
<Gtk.Box class={"calendar-box"} hexpand={true} valign={Gtk.Align.START}>
|
||||
<Gtk.Calendar showHeading={true} showDayNames={true}
|
||||
showWeekNumbers={false}
|
||||
/>
|
||||
</Gtk.Box>
|
||||
</Gtk.Box>
|
||||
|
||||
<Separator orientation={Gtk.Orientation.HORIZONTAL} cssColor="gray"
|
||||
margin={5} spacing={8} alpha={.3} visible={variableToBoolean(
|
||||
createBinding(AstalMpris.get_default(), "players")
|
||||
)}
|
||||
/>
|
||||
<BigMedia />
|
||||
</Gtk.Box>
|
||||
</PopupWindow>;
|
||||
Reference in New Issue
Block a user