matryer / xbar

Put the output from any script or program into your macOS Menu Bar (the BitBar reboot)
https://xbarapp.com
MIT License
17.58k stars 642 forks source link

Is it possible to make an action of main icon? #910

Open fm4tt0s opened 10 months ago

fm4tt0s commented 10 months ago

I have a simple script to launch my WIN365 homepage on MS Edge. I wanted to make the main icon clickable, instead of opening the menu and having to click on its child. Is that possible?

current script DOES have the submenu item (WIN365), I want to make the main icon (the computer one) an clickable action.

!/usr/bin/env bash
# <xbar.title>Win365 Edge Launcher</xbar.title>
# <xbar.version>0.1</xbar.version>
# <xbar.author>Felipe Mattos</xbar.author>
# <xbar.author.github>fm4tt0s</xbar.author.github>
# <xbar.desc>Open My W365 VM/xbar.desc>
# <xbar.image>https://pngimg.com/d/windows_logos_PNG24.png</xbar.image>
# <xbar.dependencies></xbar.dependencies>

case "$1" in
    0)
        osascript -e "do shell script \"open -a 'Microsoft Edge' --args --start-fullscreen https://windows365.microsoft.com/"\"
    exit
esac

echo "🖥️"
echo "---"
echo "🖥️ WIN 365 | bash='$0' param1='0' terminal=false refresh='false'"
exit 0