forked from Shinonome/dots-hyprland
wbar: add right click menus
This commit is contained in:
@@ -285,4 +285,14 @@ Singleton {
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
function toTitleCase(str) {
|
||||
// Replace "-" and "_" with space, then capitalize each word
|
||||
return str.replace(/[-_]/g, " ").replace(
|
||||
/\w\S*/g,
|
||||
function(txt) {
|
||||
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user