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:
@@ -1,12 +1,13 @@
|
||||
import Gdk from 'gi://Gdk?version=3.0';
|
||||
import { openMenu } from '../utils.js';
|
||||
import options from 'options';
|
||||
import { BarBoxChild } from 'lib/types/bar.js';
|
||||
import Button from 'types/widgets/button.js';
|
||||
import { Attribute, Child } from 'lib/types/widget.js';
|
||||
import { runAsyncCommand, throttledScrollHandler } from 'customModules/utils.js';
|
||||
import Gdk from 'gi://Gdk?version=3.0';
|
||||
import { BarBoxChild } from 'lib/types/bar.js';
|
||||
import { Attribute, Child } from 'lib/types/widget.js';
|
||||
import options from 'options';
|
||||
import Button from 'types/widgets/button.js';
|
||||
import { openMenu } from '../utils.js';
|
||||
import { getDistroIcon } from 'lib/utils.js';
|
||||
|
||||
const { rightClick, middleClick, scrollUp, scrollDown } = options.bar.launcher;
|
||||
const { rightClick, middleClick, scrollUp, scrollDown, autoDetectIcon, icon } = options.bar.launcher;
|
||||
|
||||
const Menu = (): BarBoxChild => {
|
||||
return {
|
||||
@@ -22,7 +23,9 @@ const Menu = (): BarBoxChild => {
|
||||
}),
|
||||
child: Widget.Label({
|
||||
class_name: 'bar-menu_label bar-button_icon txt-icon bar',
|
||||
label: options.bar.launcher.icon.bind('value'),
|
||||
label: Utils.merge([autoDetectIcon.bind('value'), icon.bind('value')], (autoDetect, icon): string => {
|
||||
return autoDetect ? getDistroIcon() : icon;
|
||||
}),
|
||||
}),
|
||||
}),
|
||||
isVisible: true,
|
||||
|
||||
Reference in New Issue
Block a user