From d3977958edc1f1707560da52dd33c7c6a49357e9 Mon Sep 17 00:00:00 2001 From: ProtoShark Date: Sun, 2 Feb 2025 13:58:45 -0800 Subject: [PATCH] Bluetooth works now and some style adjustments --- app.ts | 2 +- style.scss | 15 ++++++++++++++- widget/battery.tsx | 5 +++-- widget/bluetooth.tsx | 18 ++++++++++++------ widget/client.tsx | 22 +++++++++++++++++----- 5 files changed, 47 insertions(+), 15 deletions(-) diff --git a/app.ts b/app.ts index 1f413e3..4daffe8 100644 --- a/app.ts +++ b/app.ts @@ -7,7 +7,7 @@ const hyprland = Hyprland.get_default() App.start({ css: style, - icons: "/home/protoshark/.config/astal/assets/", + icons: "/home/protoshark/.config/ags/assets/", main() { hyprland.monitors.map((monitor) => Bar(monitor)) }, diff --git a/style.scss b/style.scss index 505e162..efc32ad 100644 --- a/style.scss +++ b/style.scss @@ -4,7 +4,7 @@ window { background: $background-1; color: $text-2; font-family: comfortaa; - font-weight: bolder; + font-weight: 900; font-size: 14px; > centerbox { @@ -154,6 +154,18 @@ button { } .toggleButton { + &.bt { + icon { + margin-right: 8px; + } + box { + background: none; + } + label { + margin-top: 2px; + margin-right: 60px; + } + } &:hover .toggleIndicator { box-shadow: 0 0 6px 0px $highlight-3; } @@ -229,6 +241,7 @@ button { @keyframes upIn { from {margin-top: -50px; opacity: 0;} to {opacity: 100;} + } .clientLabel { diff --git a/widget/battery.tsx b/widget/battery.tsx index efab899..e29fecd 100644 --- a/widget/battery.tsx +++ b/widget/battery.tsx @@ -44,7 +44,7 @@ function BattWindow() { + spacing={12}> + vertical={true} + spacing={4}> {profileButton("Power Saver", "power-saver")} {profileButton("Balanced", "balanced")} {profileButton("Performance", "performance")} diff --git a/widget/bluetooth.tsx b/widget/bluetooth.tsx index 43a2365..7b5c1fb 100644 --- a/widget/bluetooth.tsx +++ b/widget/bluetooth.tsx @@ -1,4 +1,4 @@ -import { bind } from "astal" +import { bind, execAsync } from "astal" import Bluetooth from "gi://AstalBluetooth" import { popup } from "./popup" import { Astal, Gtk, Widget } from "astal/gtk3" @@ -8,15 +8,21 @@ const { TOP, LEFT } = Astal.WindowAnchor const bluetooth = Bluetooth.get_default() function bluetoothItem(device: Bluetooth.Device) { - return @@ -25,10 +31,10 @@ function bluetoothItem(device: Bluetooth.Device) { function bluetoothWindow() { return - + {bluetooth.devices.map(dev => bluetoothItem(dev))} diff --git a/widget/client.tsx b/widget/client.tsx index 2d22123..5787a85 100644 --- a/widget/client.tsx +++ b/widget/client.tsx @@ -4,18 +4,30 @@ import Apps from "gi://AstalApps" import { Gtk, Widget } from "astal/gtk3" import { Overlay } from "astal/gtk3/widget" const hyprland = Hyprland.get_default() -const apps = new Apps.Apps() +const apps = new Apps.Apps({ + entryMultiplier: 2, + categories_multiplier: 0, + description_multiplier: 0, + executable_multiplier: 0, + name_multiplier: 0, + keywordsMultiplier: 0, +}) function NewClient(client: Hyprland.Client) { - apps.entryMultiplier = 10 - let hyprClass = (client) ? apps.exact_query(client.class)[0] : null + let appsClass = null + if (client) { + if (client.class == "soffice") { + client.class = "" + } + appsClass = apps.exact_query(client.class)[0] + } let b = return b