17 lines
422 B
QML
17 lines
422 B
QML
// FileUtiils.qml
|
|
// taken from end-4 https://github.com/end-4/dots-hyprland/blob/main/.config/quickshell/ii/modules/common/functions/FileUtils.qml
|
|
pragma Singleton
|
|
import Quickshell
|
|
|
|
Singleton {
|
|
id: root
|
|
|
|
/**
|
|
* Trims the File protocol off the input string
|
|
* @param {string} str
|
|
* @returns {string}
|
|
*/
|
|
function trimFileProtocol(str) {
|
|
return str.startsWith("file://") ? str.slice(7) : str;
|
|
}
|
|
} |