fix: display "Desktop" instead of nothing when no client
This commit is contained in:
15
flake.nix
15
flake.nix
@@ -34,21 +34,6 @@
|
|||||||
];
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# packages.${system} = {
|
|
||||||
# status-bar = ags.lib.bundle {
|
|
||||||
# inherit pkgs;
|
|
||||||
# src = ./.;
|
|
||||||
# name = "status-bar";
|
|
||||||
# entry = "app.ts";
|
|
||||||
#
|
|
||||||
# extraPackages =
|
|
||||||
# with pkgs;
|
|
||||||
# extraPkgs
|
|
||||||
# ++ [
|
|
||||||
# libgtop
|
|
||||||
# ];
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
packages.${system}.default = pkgs.stdenv.mkDerivation rec {
|
packages.${system}.default = pkgs.stdenv.mkDerivation rec {
|
||||||
pname = "status-bar";
|
pname = "status-bar";
|
||||||
name = "status-bar";
|
name = "status-bar";
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import AstalHyprland from "gi://AstalHyprland?version=0.1";
|
|||||||
const hyprland = AstalHyprland.get_default()
|
const hyprland = AstalHyprland.get_default()
|
||||||
|
|
||||||
function get_title() {
|
function get_title() {
|
||||||
return hyprland.focusedClient?.title ?? ""
|
return hyprland.focusedClient?.title ?? "Desktop"
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Title() {
|
export default function Title() {
|
||||||
|
|||||||
Reference in New Issue
Block a user