diff --git a/src/.config/ags/config.js b/src/.config/ags/config.js index 4667201..30debe8 100644 --- a/src/.config/ags/config.js +++ b/src/.config/ags/config.js @@ -20,17 +20,17 @@ function Workspaces(monitor) { const workspaces = hyprland .bind("workspaces") - .as((ws) => - ws - .filter((z) => z.monitorID == monitor) - .map(({ id }) => - Widget.Button({ - on_clicked: () => hyprland.messageAsync(`dispatch workspace ${id}`), - child: Widget.Label(`${id}`), - class_name: activeId.as((i) => `${i === id ? "focused" : ""}`), - }) - ) - ); + .as((ws) => { + const g = ws.filter((z) => z.monitorID == monitor); + g.sort((a,b) => a.id - b.id) + return g.map(({ id }) => + Widget.Button({ + on_clicked: () => hyprland.messageAsync(`dispatch workspace ${id}`), + child: Widget.Label(`${id}`), + class_name: activeId.as((i) => `${i === id ? "focused" : ""}`), + }) + ); + }); return Widget.Box({ class_name: "workspaces", @@ -54,13 +54,15 @@ function Clock() { function Media() { const label = Utils.watch("", mpris, "player-changed", () => { - const player = mpris.players.find(z => z.entry == "spotify"); + const player = mpris.players.find((z) => z.entry == "spotify"); if (player) { - const ms = player.metadata["mpris:length"]/1000; - const minutes = Math.floor((ms/1000)/60) - const seconds = Math.floor((ms/1000)%60) + const ms = player.metadata["mpris:length"] / 1000; + const minutes = Math.floor(ms / 1000 / 60); + const seconds = Math.floor((ms / 1000) % 60); - return `${player.track_artists.join(", ")} - ${player.track_title} [${minutes}:${seconds}]`; + return `${player.track_artists.join(", ")} - ${ + player.track_title + } [${minutes}:${seconds}]`; } else { return "Nothing is playing"; } diff --git a/src/.config/hypr/hyprland.conf b/src/.config/hypr/hyprland.conf index 09039c2..51f5324 100644 --- a/src/.config/hypr/hyprland.conf +++ b/src/.config/hypr/hyprland.conf @@ -17,6 +17,8 @@ exec-once=~/.config/hypr/portal.sh exec-once=swww init && swww img ~/wallpaper.jpg exec-once=nm-applet exec-once=ags +exec-once=gsettings set org.gnome.desktop.interface gtk-theme 'Catppuccin-Latte-Standard-Pink-Light' + exec=~/.config/hypr/import-gsettings.sh env = XCURSOR_SIZE,24