feat: launcher icon auto detect from os name (#413)

* feat: launcher icon auto detect from os name

* feat: add more

* fix: revamp distro icon

* feat: on hover only show actions if available on notifications (#396)

* feat: on hover only show actions if available on notifications

* feat: on hover only show actions if available on notifications

* fix: make the change configurable

* fix: remove unneeded op

* Added the ability to scale a popover. (#443)

* Added the ability to scale a popover.

* Removed redundant code

* Provide a cli command to clear notifications. (#444)

* Added a cpu temperature custom module. (#446)

* Added a CPU Temperature module.

* Update defauls and add wiki link.

* Move celsius to fahr conversion to method.

* fix: move distoicons , use capitalizeLetter func

* fix: lint

* Rename dissto.ts to distro.ts

* Update lib/utils.ts

---------

Co-authored-by: Jas Singh <jaskiratpal.singh@outlook.com>
This commit is contained in:
Rubin Bhandari
2024-11-08 15:16:21 +05:45
committed by GitHub
parent 9ae59034fa
commit 3cc3fa5d42
8 changed files with 68 additions and 20 deletions

View File

@@ -11,6 +11,8 @@ import { NotificationArgs } from 'types/utils/notify';
import { SubstituteKeys } from './types/utils';
import { Window } from 'types/@girs/gtk-3.0/gtk-3.0.cjs';
import { namedColors } from './constants/colors';
import { distroIcons } from './constants/distro';
import { distro } from './variables';
export type Binding<T> = import('types/service').Binding<any, any, T>;
@@ -193,3 +195,8 @@ export const isValidGjsColor = (color: string): boolean => {
export const capitalizeFirstLetter = (str: string): string => {
return str.charAt(0).toUpperCase() + str.slice(1);
};
export function getDistroIcon(): string {
const icon = distroIcons.find(([id]) => id === distro.id);
return icon ? icon[1] : ''; // default icon if not found
}