ags(bar/status): add notification floating dot

This commit is contained in:
retrozinndev
2025-05-17 19:06:24 -03:00
parent 9c1cd7362b
commit 80ab4ce72d
3 changed files with 66 additions and 71 deletions
+5 -22
View File
@@ -212,25 +212,6 @@
& > box { & > box {
padding: 0 8px; padding: 0 8px;
& > * > * {
margin: 0 2px;
}
& trough {
min-width: 65px;
min-height: 10px;
margin-right: 4px;
}
& slider {
min-width: 10px;
min-height: 10px;
}
& highlight {
min-height: 10px;
}
& .nf { & .nf {
margin: { margin: {
right: 3px; right: 3px;
@@ -241,10 +222,12 @@
} }
& .status-icons { & .status-icons {
padding: 0 4px; padding-left: 4px;
& > * { & .notification-count {
margin: 0 4px; font-size: 5px;
margin-left: -3px;
margin-top: 1px;
} }
} }
} }
+20 -20
View File
@@ -1,26 +1,26 @@
// SCSS Variables // SCSS Variables
// Generated by 'wal' // Generated by 'wal'
$wallpaper: "/home/joaov/wallpapers/Bocchi The Rock!.png"; $wallpaper: "/home/joaov/wallpapers/Nijika Train.jpeg";
// Special // Special
$background: #0a0a0c; $background: #11151b;
$foreground: #c1c1c2; $foreground: #c3c4c6;
$cursor: #c1c1c2; $cursor: #c3c4c6;
// Colors // Colors
$color0: #0a0a0c; $color0: #11151b;
$color1: #935d6d; $color1: #967557;
$color2: #967e84; $color2: #4f5869;
$color3: #ac8486; $color3: #665d63;
$color4: #bcae7a; $color4: #576872;
$color5: #a49c9c; $color5: #787375;
$color6: #bcb79c; $color6: #998c7f;
$color7: #8a8a96; $color7: #90949a;
$color8: #565669; $color8: #5c6371;
$color9: #C57C92; $color9: #C99D75;
$color10: #C9A9B0; $color10: #6A768C;
$color11: #E6B1B3; $color11: #897C84;
$color12: #FBE8A3; $color12: #748B99;
$color13: #DBD1D0; $color13: #A19A9D;
$color14: #FBF5D1; $color14: #CDBBAA;
$color15: #c1c1c2; $color15: #c3c4c6;
+41 -29
View File
@@ -113,7 +113,31 @@ function StatusIcons(): Gtk.Widget {
return new Widget.Box({ return new Widget.Box({
className: "status-icons", className: "status-icons",
spacing: 3,
children: [ children: [
new Widget.Revealer({
revealChild: bind(Recording.getDefault(), "recording"),
transitionDuration: 500,
transitionType: Gtk.RevealerTransitionType.SLIDE_LEFT,
onDestroy: () => recordingTimer.drop(),
child: new Widget.EventBox({
onClick: () => Recording.getDefault().recording &&
Recording.getDefault().stopRecording(),
tooltipText: tr("control_center.tiles.recording.enabled_desc"),
child: new Widget.Box({
children: [
new Widget.Label({
className: "recording nf state",
label: '󰻃'
} as Widget.LabelProps),
new Widget.Label({
className: "rec-time",
label: recordingTimer()
} as Widget.LabelProps)
]
} as Widget.BoxProps)
} as Widget.EventBoxProps)
} as Widget.RevealerProps),
new Widget.Label({ new Widget.Label({
className: "bluetooth nf state", className: "bluetooth nf state",
visible: bind(AstalBluetooth.get_default(), "adapter").as(Boolean), visible: bind(AstalBluetooth.get_default(), "adapter").as(Boolean),
@@ -125,35 +149,23 @@ function StatusIcons(): Gtk.Widget {
label: networkIcon(), label: networkIcon(),
onDestroy: () => networkIcon.drop() onDestroy: () => networkIcon.drop()
} as Widget.LabelProps), } as Widget.LabelProps),
new Widget.Revealer({ new Widget.Box({
revealChild: bind(Recording.getDefault(), "recording"), children: [
transitionDuration: 500, new Widget.Label({
transitionType: Gtk.RevealerTransitionType.SLIDE_LEFT, className: "bell nf state",
setup: (revealer) => revealer.add( label: bind(Notifications.getDefault().getNotifd(), "dontDisturb").as((dnd: boolean) =>
new Widget.EventBox({ dnd ? "󰂠" : "󰂚")
onClick: () => Recording.getDefault().recording && } as Widget.LabelProps),
Recording.getDefault().stopRecording(), new Widget.Label({
tooltipText: tr("control_center.tiles.recording.enabled_desc"), className: "notification-count nf",
child: new Widget.Box({ xalign: 0,
children: [ yalign: 0.25,
new Widget.Label({ visible: bind(Notifications.getDefault(), "history").as(history =>
className: "recording nf state", history.length > 0),
label: '󰻃' label: '󰧞'
} as Widget.LabelProps), } as Widget.LabelProps)
new Widget.Label({ ]
className: "rec-time", } as Widget.BoxProps)
label: recordingTimer()
} as Widget.LabelProps)
]
} as Widget.BoxProps)
} as Widget.EventBoxProps)
)
} as Widget.RevealerProps),
new Widget.Label({
className: "bell nf state",
label: bind(Notifications.getDefault().getNotifd(), "dontDisturb").as((dnd: boolean) =>
dnd ? "󰂠" : "󰂚")
} as Widget.LabelProps),
] ]
} as Widget.BoxProps); } as Widget.BoxProps);
} }