From 8954e05d39003b7867d6707884415c69b4efb159 Mon Sep 17 00:00:00 2001 From: Pascal Thuma Date: Tue, 24 Mar 2026 20:01:44 +0100 Subject: [PATCH] Added mediaplayer widget --- style.scss | 40 ++++++++++++++++++-- widget/Bar.tsx | 14 +++++-- widget/Media.tsx | 96 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 144 insertions(+), 6 deletions(-) create mode 100644 widget/Media.tsx diff --git a/style.scss b/style.scss index 9276290..e5f7d3e 100644 --- a/style.scss +++ b/style.scss @@ -10,8 +10,8 @@ window.Bar { > centerbox { background: $bg-color; border-radius: 10px; - margin: 8px; - padding: 4px 12px; + margin: 4px 8px; // Reduced vertical margin + padding: 0 12px; // Removed vertical padding } .left-box, @@ -28,7 +28,7 @@ window.Bar { .workspaces { .workspace-btn { min-width: 24px; - min-height: 24px; + min-height: 24px; // Control height exactly here padding: 0 4px; border-radius: 6px; background: transparent; @@ -39,4 +39,38 @@ window.Bar { } } } + + .clock-btn { + padding: 0 12px; // Reduced vertical padding + min-height: 24px; + } + + .media-btn { + padding: 0 8px; + min-height: 24px; + + .media-art { + border-radius: 4px; + -gtk-icon-size: 32px; + } + } + + .system-tray { + background: rgba(150, 150, 150, 0.15); // Unified background for the tray + border-radius: 8px; + padding: 0 4px; // Reduced vertical padding + margin: 2px; + + .tray-item { + padding: 2px 4px; // Reduced vertical padding + margin: 0; + background: transparent; + border: none; + box-shadow: none; + + image { + -gtk-icon-size: 16px; + } + } + } } diff --git a/widget/Bar.tsx b/widget/Bar.tsx index 4a73534..0c823a5 100644 --- a/widget/Bar.tsx +++ b/widget/Bar.tsx @@ -1,6 +1,8 @@ import app from "ags/gtk4/app" import { Astal, Gtk, Gdk } from "ags/gtk4" import Workspaces from "./Workspaces" +import { Clock, SysTray } from "./System" +import Media from "./Media" function Left() { return ( @@ -12,8 +14,14 @@ function Left() { function Center() { return ( - -