> For the complete documentation index, see [llms.txt](https://docs.sacruda.nl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sacruda.nl/developers/windows/changing-the-titlebar.md).

# Changing the titlebar

Every normal window has a titlebar at the top. For your app, its title and icon are set by the `_app.tpa` file as `metadata.name` and `metadata.icon`. However, I've implemented two stores that allow you to changes these values on the fly.

### The window title

To change the window title, use this piece of code:

<pre class="language-javascript"><code class="lang-javascript">this.windowTitle.set("<a data-footnote-ref href="#user-content-fn-1">New window title</a>");
</code></pre>

You can also call `windowTitle` directly to get the current window title:

```javascript
const title = this.windowTitle();
```

### Window icon

Similarly to the window title, you can use the following code to change the window icon. In this example I'm using direct file access to get the new icon from a file named `gameover.png`:

```javascript
const gameOver = await fs.direct(util.join(workingDirectory, "gameover.png"));

this.windowIcon.set(gameOver);
```

Again, you can directly call this property to see its value:

```javascript
const icon = this.windowIcon();
```

[^1]: The new name to give your window
