forked from Shinonome/dots-hyprland
sideright: hide night light button when unavailable
This commit is contained in:
@@ -78,7 +78,9 @@ export const HyprToggleIcon = async (icon, name, hyprlandConfigValue, props = {}
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ModuleNightLight = (props = {}) => Widget.Button({
|
export const ModuleNightLight = async (props = {}) => {
|
||||||
|
if (!exec(`bash -c 'command -v gammastep'`)) return null;
|
||||||
|
return Widget.Button({
|
||||||
attribute: {
|
attribute: {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
},
|
},
|
||||||
@@ -110,6 +112,7 @@ export const ModuleNightLight = (props = {}) => Widget.Button({
|
|||||||
},
|
},
|
||||||
...props,
|
...props,
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
export const ModuleInvertColors = async (props = {}) => {
|
export const ModuleInvertColors = async (props = {}) => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ const togglesBox = Widget.Box({
|
|||||||
ToggleIconBluetooth(),
|
ToggleIconBluetooth(),
|
||||||
await ModuleRawInput(),
|
await ModuleRawInput(),
|
||||||
await HyprToggleIcon('touchpad_mouse', 'No touchpad while typing', 'input:touchpad:disable_while_typing', {}),
|
await HyprToggleIcon('touchpad_mouse', 'No touchpad while typing', 'input:touchpad:disable_while_typing', {}),
|
||||||
ModuleNightLight(),
|
await ModuleNightLight(),
|
||||||
await ModuleInvertColors(),
|
await ModuleInvertColors(),
|
||||||
ModuleIdleInhibitor(),
|
ModuleIdleInhibitor(),
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user