Skip to content

πŸ€– A collection of scripts that can be executed via Spotlight.

Notifications You must be signed in to change notification settings

LinkSake/spotlight-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Spotlight Scripts

A collection of scripts that can be executed via Spotlight.

Usage

Permitions

All the scripts need permitions to be executable by the user, this can be done by running chmod -R u+x . on the root directory of the project or using the chmod-x-all.sh script.

All new scripts should be given permition after creation.

Then set the Terminal to automatically close the window upon completion, in the Terminal app go to Preferences > Profiles > (Select a Profile) > Shell; on When the shell exits choose Close the window.

The project can be anywhere on the system, just make sure Spotlight indexes the parent folder.

Spotlight

Use the keybinding to open Spotlight (cmd + space by default) and type the name of the script (e.g.: sleep.sh.command) and hit enter to execute it; after sometime of using the scripts Spotlight will autocomplete them, then only typing the first part of the name will be enough (e.g.: sleep).

Scripts

β”œβ”€β”€ personal
β”‚Β Β  └── morning.sh.command # Daily morning setup
β”œβ”€β”€ spotify
β”‚Β Β  β”œβ”€β”€ next.sh.command # Skips to next track on the queue
β”‚Β Β  β”œβ”€β”€ pause.sh.command # Pauses current track
β”‚Β Β  β”œβ”€β”€ play.sh.command # Plays current track
β”‚Β Β  └── prev.sh.command # Rollback to previous track
β”œβ”€β”€ system
β”‚Β Β  β”œβ”€β”€ empty-tash.sh.command # Empties the trash bin
β”‚Β Β  β”œβ”€β”€ quit-all.sh.command # Quits all open apps (WIP)
β”‚Β Β  β”œβ”€β”€ screensaver.sh.command # Sets the screensaver on all screens
β”‚Β Β  β”œβ”€β”€ shutdown.sh.command # Shuts down the system after prompting the password
β”‚Β Β  └── sleep.sh.command # Sleeps the system
└── utils
    β”œβ”€β”€ chmod-x-all.sh # Makes every script on the folder executable from spotlight (WIP)
    β”œβ”€β”€ mk-demo.sh.command # Converts every .mov file in the desktop to .mp4
    β”œβ”€β”€ name-png.sh.command # Renames every .png image to demo<n>.png
    └── pomodoro.sh.command # Simple pomodoro timer (WIP)

Next up

Scripts that would be nice to make:

  • Close specific app (like on Alfred).
  • Close all apps (WIP).
  • Play a song on Spotify by name.

Acknowledgements

Partially based on projects by brendonjohn and gtumbaga. Pomodoro timer based on pomo by Prayag2.

About

πŸ€– A collection of scripts that can be executed via Spotlight.

Topics

Resources

Stars

Watchers

Forks

Languages