Browse Source

feat: add cyberpunk logo and auto-execute after install

pull/85/head
dacrab 5 months ago
parent
commit
9d41a9a2c7
  1. 3
      cmd/cursor-id-modifier/main.go
  2. 20
      internal/ui/logo.go
  3. 16
      scripts/install.ps1
  4. 9
      scripts/install.sh

3
cmd/cursor-id-modifier/main.go

@ -156,6 +156,9 @@ func main() {
log.Warn("Failed to clear screen:", err)
}
// Show logo
display.ShowLogo()
// Read existing config
text := lang.GetText()
display.ShowProgress(text.ReadingConfig)

20
internal/ui/logo.go

@ -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)
}

16
scripts/install.ps1

@ -117,7 +117,21 @@ function Install-CursorModifier {
}
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

9
scripts/install.sh

@ -99,7 +99,14 @@ main() {
sudo mv "$TMP_DIR/cursor-id-modifier" "$INSTALL_DIR/"
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
Loading…
Cancel
Save