mirror of
https://github.com/yuaotian/go-cursor-help.git
synced 2025-06-08 12:32:06 +08:00
feat: add cyberpunk logo and auto-execute after install
This commit is contained in:
parent
b3e748554f
commit
9d41a9a2c7
@ -156,6 +156,9 @@ func main() {
|
|||||||
log.Warn("Failed to clear screen:", err)
|
log.Warn("Failed to clear screen:", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Show logo
|
||||||
|
display.ShowLogo()
|
||||||
|
|
||||||
// Read existing config
|
// Read existing config
|
||||||
text := lang.GetText()
|
text := lang.GetText()
|
||||||
display.ShowProgress(text.ReadingConfig)
|
display.ShowProgress(text.ReadingConfig)
|
||||||
|
20
internal/ui/logo.go
Normal file
20
internal/ui/logo.go
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
package ui
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/fatih/color"
|
||||||
|
)
|
||||||
|
|
||||||
|
const cyberpunkLogo = `
|
||||||
|
______ ______ ______
|
||||||
|
/ ____/_ __________ ___ _____/ __/ // / / /
|
||||||
|
/ / / / / / ___/ _ \/ __ \/ ___/ /_/ // /_/ /
|
||||||
|
/ /___/ /_/ / / / __/ /_/ (__ ) __/__ __/ /
|
||||||
|
\____/\__,_/_/ \___/\____/____/_/ /_/ /_/
|
||||||
|
|
||||||
|
`
|
||||||
|
|
||||||
|
// ShowLogo displays the cyberpunk-style logo
|
||||||
|
func (d *Display) ShowLogo() {
|
||||||
|
cyan := color.New(color.FgCyan, color.Bold)
|
||||||
|
cyan.Println(cyberpunkLogo)
|
||||||
|
}
|
@ -117,7 +117,21 @@ function Install-CursorModifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "${Green}Installation completed successfully!${Reset}"
|
Write-Host "${Green}Installation completed successfully!${Reset}"
|
||||||
Write-Host "${Blue}You can now run: cursor-id-modifier${Reset}"
|
Write-Host "${Blue}Running cursor-id-modifier...${Reset}"
|
||||||
|
|
||||||
|
# Run the program
|
||||||
|
try {
|
||||||
|
$env:AUTOMATED_MODE = "1"
|
||||||
|
& "$InstallDir\cursor-id-modifier.exe"
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
Write-Host "${Red}Failed to run cursor-id-modifier${Reset}"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-Host "${Red}Failed to run cursor-id-modifier: $_${Reset}"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Run installation
|
# Run installation
|
||||||
|
@ -99,7 +99,14 @@ main() {
|
|||||||
sudo mv "$TMP_DIR/cursor-id-modifier" "$INSTALL_DIR/"
|
sudo mv "$TMP_DIR/cursor-id-modifier" "$INSTALL_DIR/"
|
||||||
|
|
||||||
echo -e "${GREEN}Installation completed successfully!${NC}"
|
echo -e "${GREEN}Installation completed successfully!${NC}"
|
||||||
echo -e "${BLUE}You can now run: cursor-id-modifier${NC}"
|
echo -e "${BLUE}Running cursor-id-modifier...${NC}"
|
||||||
|
|
||||||
|
# Run the program
|
||||||
|
export AUTOMATED_MODE=1
|
||||||
|
if ! cursor-id-modifier; then
|
||||||
|
echo -e "${RED}Failed to run cursor-id-modifier${NC}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
main
|
main
|
||||||
|
Loading…
x
Reference in New Issue
Block a user