Inital commit checkpoint
This commit is contained in:
17
common/functions/FileUtils.qml
Normal file
17
common/functions/FileUtils.qml
Normal file
@@ -0,0 +1,17 @@
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user