Documentation
¶
Index ¶
- Variables
- func Blue(text string) string
- func Bold(text string) string
- func CheckExistAndCreate(dir string)
- func CheckExistAndDelete(dir string)
- func CmdScanner(cmd *exec.Cmd)
- func Copy(src, dest string, recursive bool, filters []string) error
- func CopyFile(srcPath, dest string) error
- func CreateJunction(location, destination string) error
- func Fatal(err error)
- func FetchLatestTag() (string, error)
- func FindAppPath() string
- func FindFirstMatch(input string, regexpTerm string) []string
- func FindLastMatch(input string, regexpTerm string) []string
- func FindMatch(input string, regexpTerm string) [][]string
- func FindPrefFilePath() string
- func FindSymbol(debugInfo, content string, clues []string) []string
- func GetCustomAppPath(name string) (string, error)
- func GetCustomAppSubfolderPath(folderPath string) string
- func GetDebuggerPath() string
- func GetExecutableDir() string
- func GetExtensionPath(name string) (string, error)
- func GetJsHelperDir() string
- func GetSpotifyVersion(prefsPath string) string
- func GetStateFolder(name string) string
- func GetSubFolder(folder string, name string) string
- func GetWhymeFolder() string
- func Green(text string) string
- func MigrateConfigFolder()
- func MigrateFolders()
- func ModifyFile(path string, repl func(string) string)
- func PrependTime(text string) string
- func PrintBold(text string)
- func PrintError(text string)
- func PrintGreen(text string)
- func PrintInfo(text string)
- func PrintNote(text string)
- func PrintRed(text string)
- func PrintSuccess(text string)
- func PrintWarning(text string)
- func Red(text string) string
- func Replace(str *string, pattern string, repl func(submatches ...string) string)
- func ReplaceEnvVarsInString(input string) string
- func ReplaceOnce(str *string, pattern string, repl func(submatches ...string) string)
- func SeekToCloseParen(content string, regexpTerm string, leftChar, rightChar byte) string
- func SendReload(debuggerURL *string) error
- func ShowDirectory(dir string) error
- func Unzip(src, dest string) error
- func Watch(fileList []string, callbackEach func(fileName string, err error), ...)
- func WatchRecursive(root string, callbackEach func(fileName string, err error), ...)
- func WinXApp() string
- func WinXPrefs() string
- func Yellow(text string) string
- type AppManifest
- type Color
- type Config
- type GithubRelease
- type TernaryBool
- type Tracker
Constants ¶
This section is empty.
Variables ¶
var ( // BaseColorList is color names list and their default values BaseColorList = map[string]string{ "text": "ffffff", "subtext": "b3b3b3", "main": "121212", "main-elevated": "242424", "highlight": "1a1a1a", "highlight-elevated": "2a2a2a", "sidebar": "000000", "player": "181818", "card": "282828", "shadow": "000000", "selected-row": "ffffff", "button": "1db954", "button-active": "1ed760", "button-disabled": "535353", "tab-active": "333333", "notification": "4687d6", "notification-error": "e22134", "misc": "7f7f7f", } // BaseColorOrder is color name list in an order BaseColorOrder = []string{ "text", "subtext", "main", "main-elevated", "highlight", "highlight-elevated", "sidebar", "player", "card", "shadow", "selected-row", "button", "button-active", "button-disabled", "tab-active", "notification", "notification-error", "misc", } )
var ( // INTERVAL . INTERVAL = 200 * time.Millisecond )
Functions ¶
func CheckExistAndCreate ¶
func CheckExistAndCreate(dir string)
CheckExistAndCreate checks folder existence and makes that folder, recursively, if it does not exist
func CheckExistAndDelete ¶
func CheckExistAndDelete(dir string)
CheckExistAndDelete checks folder existence and deletes that folder if it does exist
func CmdScanner ¶
CmdScanner is a helper function to scan output from exec.Cmd
func CreateJunction ¶
CreateJunction creates a junction in Windows or a symlink in Linux/Mac.
func FetchLatestTag ¶
func FindAppPath ¶
func FindAppPath() string
FindAppPath finds Spotify location in various possible places of each platform and returns it. Returns blank string if none of default locations exists.
func FindFirstMatch ¶
func FindLastMatch ¶
func FindPrefFilePath ¶
func FindPrefFilePath() string
FindPrefFilePath finds Spotify "prefs" file location in various possible places of each platform and returns it. Returns blank string if none of default locations exists.
func FindSymbol ¶
FindSymbol uses regexp from one or multiple clues to find variable or function symbol in obfuscated code.
func GetCustomAppPath ¶
func GetDebuggerPath ¶
func GetDebuggerPath() string
GetDebuggerPath fetches opening debugger list from localhost and returns the Spotify one.
func GetExecutableDir ¶
func GetExecutableDir() string
GetExecutableDir returns directory of current process
func GetExtensionPath ¶
func GetJsHelperDir ¶
func GetJsHelperDir() string
GetJsHelperDir returns jsHelper directory in executable directory
func GetStateFolder ¶
func GetSubFolder ¶
GetSubFolder checks if folder `name` is available in specified folder, else creates then returns the path.
func GetWhymeFolder ¶
func GetWhymeFolder() string
func MigrateConfigFolder ¶
func MigrateConfigFolder()
func MigrateFolders ¶
func MigrateFolders()
func ModifyFile ¶
ModifyFile opens file, changes file content by executing `repl` callback function and writes new content.
func PrependTime ¶
PrependTime prepends current time string to text and returns new string
func Replace ¶
Replace uses Regexp to find any matched from `input` with `regexpTerm` and replaces them with `replaceTerm` then returns new string.
func ReplaceEnvVarsInString ¶
func ReplaceOnce ¶
func SeekToCloseParen ¶
func SendReload ¶
SendReload sends reload command to debugger Websocket server
func ShowDirectory ¶
ShowDirectory shows directory in user's default file manager application
func WatchRecursive ¶
func WatchRecursive(root string, callbackEach func(fileName string, err error), callbackAfter func())
WatchRecursive .
Types ¶
type AppManifest ¶
type AppManifest struct { Files []string `json:"subfiles"` ExtensionFiles []string `json:"subfiles_extension"` Assets []string `json:"assets"` }
func GetAppManifest ¶
func GetAppManifest(app string) (AppManifest, string, error)
type Color ¶
Color stores hex and rgb value of color
func ParseColor ¶
ParseColor parses a string in both hex or rgb or from XResources or env variable and converts to both rgb and hex value
type Config ¶
Config .
func ParseConfig ¶
ParseConfig read config file content, return default config if file doesn't exist.
type GithubRelease ¶
type TernaryBool ¶
type TernaryBool int
TernaryBool is three-way boolean: default, true, false
func (TernaryBool) ToForceOperator ¶
func (b TernaryBool) ToForceOperator() string
ToForceOperator .