forked from Shinonome/dots-hyprland
format
This commit is contained in:
@@ -19,7 +19,7 @@ const CUSTOM_MODULE_SCROLLDOWN_SCRIPT = `${GLib.get_home_dir()}/.cache/ags/user/
|
|||||||
function trimTrackTitle(title) {
|
function trimTrackTitle(title) {
|
||||||
if (!title) return '';
|
if (!title) return '';
|
||||||
const cleanPatterns = [
|
const cleanPatterns = [
|
||||||
/【[^】]*】/, // Touhou n weeb stuff
|
/【[^】]*】/, // Touhou n weeb stuff
|
||||||
" [FREE DOWNLOAD]", // F-777
|
" [FREE DOWNLOAD]", // F-777
|
||||||
];
|
];
|
||||||
cleanPatterns.forEach((expr) => title = title.replace(expr, ''));
|
cleanPatterns.forEach((expr) => title = title.replace(expr, ''));
|
||||||
@@ -67,13 +67,12 @@ const BarResource = (name, icon, command, circprogClassName = 'bar-batt-circprog
|
|||||||
resourceProgress,
|
resourceProgress,
|
||||||
resourceLabel,
|
resourceLabel,
|
||||||
],
|
],
|
||||||
setup: (self) => self
|
setup: (self) => self.poll(5000, () => execAsync(['bash', '-c', command])
|
||||||
.poll(5000, () => execAsync(['bash', '-c', command])
|
.then((output) => {
|
||||||
.then((output) => {
|
resourceCircProg.css = `font-size: ${Number(output)}px;`;
|
||||||
resourceCircProg.css = `font-size: ${Number(output)}px;`;
|
resourceLabel.label = `${Math.round(Number(output))}%`;
|
||||||
resourceLabel.label = `${Math.round(Number(output))}%`;
|
widget.tooltipText = `${name}: ${Math.round(Number(output))}%`;
|
||||||
widget.tooltipText = `${name}: ${Math.round(Number(output))}%`;
|
}).catch(print))
|
||||||
}).catch(print))
|
|
||||||
,
|
,
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ const AudioDevices = (input = false) => {
|
|||||||
maxWidthChars: 10,
|
maxWidthChars: 10,
|
||||||
label: `${input ? '[In]' : '[Out]'}`,
|
label: `${input ? '[In]' : '[Out]'}`,
|
||||||
setup: (self) => self.hook(Audio, (self) => {
|
setup: (self) => self.hook(Audio, (self) => {
|
||||||
self.label = `${input ? '[In]' : '[Out]'} ${input ? Audio.microphone.description : Audio.speaker.description}`;
|
self.label = `${input ? '[In]' : '[Out]'} ${input ? Audio.microphone.description : Audio.speaker.description}`;
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
Label({
|
Label({
|
||||||
|
|||||||
Reference in New Issue
Block a user