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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user