💄 chore(style, widget): update styles for gtk4 and fix some issues on existing widgets

focused-client widget now updates when your open a new window in a clean workspace
This commit is contained in:
retrozinndev
2025-07-18 09:55:16 -03:00
parent 26778e91ab
commit 07d30747bf
7 changed files with 80 additions and 72 deletions
+3
View File
@@ -7,6 +7,9 @@ import Pango from "gi://Pango?version=1.0";
const hyprland = AstalHyprland.get_default();
// Fix empty focused-client on opening a window on an empty workspace
hyprland.connect("client-added", () => hyprland.notify("focused-client"));
export const FocusedClient = () => {
const focusedClient = createBinding(hyprland, "focusedClient");
+7 -6
View File
@@ -81,15 +81,16 @@ export const Workspaces = () => {
const showId = createComputed([
Config.getDefault().bindProperty("workspaces.always_show_id", "boolean").as(Boolean),
Config.getDefault().bindProperty("workspaces.enable_helper", "boolean").as(Boolean),
showNumbers
], (alwaysShowIds, enableHelper, showIds) => {
showNumbers,
i
], (alwaysShowIds, enableHelper, showIds, i) => {
if(enableHelper && !alwaysShowIds) {
const previousWorkspace = defaultWorkspaces.get()[i.get()-1];
const nextWorkspace = defaultWorkspaces.get()[i.get()+1];
const previousWorkspace = defaultWorkspaces.get()[i-1];
const nextWorkspace = defaultWorkspaces.get()[i+1];
if((defaultWorkspaces.get().filter((_, ii) => ii < i.get()).length > 0 &&
if((defaultWorkspaces.get().filter((_, ii) => ii < i).length > 0 &&
previousWorkspace?.id < (ws.id-1)) ||
(defaultWorkspaces.get().filter((_, ii) => ii > i.get()).length > 0 &&
(defaultWorkspaces.get().filter((_, ii) => ii > i).length > 0 &&
nextWorkspace?.id > (ws.id+1))) {
return true;