feat: add TypeScript types to getAppIcon and document fullscreen toggle command

This commit is contained in:
JPratama7 2025-07-26 22:53:42 +07:00
parent ef2bacc4c4
commit f3652e7c82
No known key found for this signature in database
GPG key ID: CD3EB7D0490C5F4B
2 changed files with 8 additions and 3 deletions

View file

@ -11,12 +11,12 @@ Item {
width: runningAppsRow.width
height: Settings.settings.taskbarIconSize
function getAppIcon(toplevel) {
function getAppIcon(toplevel: Toplevel): string {
if (!toplevel)
return "";
// Try different icon resolution strategies
var icon = Quickshell.iconPath(toplevel.appId?.toLowerCase(), true);
let icon = Quickshell.iconPath(toplevel.appId?.toLowerCase(), true);
if (!icon) {
icon = Quickshell.iconPath(toplevel.appId, true);
}
@ -29,7 +29,6 @@ Item {
if (!icon) {
icon = Quickshell.iconPath("application-x-executable", true);
}
console.log(icon)
return icon || "";
}

View file

@ -161,6 +161,12 @@ qs ipc call globalIPC toggleLock
You can keybind it however you want in your niri setup.
### Toggle Fullscreen:
```
qs ipc call globalIPC toggleFullscreen
```
</details>
---