💄 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:
@@ -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");
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user