Giter Club home page Giter Club logo

m-cli's Introduction

 m-cli

💥 Swiss Army Knife for macOS !

Overview
Install
Uninstall
How To Use
All Commands
Contributing

Overview

m-cli is a macOS command line tool that lets you interact with utilities and applications entirely in Terminal. It differs from other macOS command line tools in the following ways:

  • You can easily manage administrative tasks
  • It doesn't install 3rd party tools since it doesn't have dependencies
  • Installation is easy and doesn't require intervention
  • It only uses macOS commands

Install

You can install m-cli using Homebrew, or you can manually install it.

Homebrew install

If you have Homebrew installed, run:

brew install m-cli

Manual install

If you want to manually install m-cli, run:

curl -fsSL https://raw.githubusercontent.com/rgcr/m-cli/master/install.sh | sudo sh

You can also install it to a different path, shown below:

INSTALL_DIR=$HOME/.m-cli sh <(curl -fsSL https://raw.githubusercontent.com/rgcr/m-cli/master/install.sh)

Note: Certain plugins, such as that for the "gatekeeper" command, will not work if m-cli is installed with standard user privilege. Certain plugins, such as that for the "trash" command, will not work until and unless your terminal emulator is granted Full Disk Access (look under "Security & Privacy" in System Preferences).

Uninstall

To uninstall m-cli from your system, run:

m --uninstall

How To Use

m-cli commands are executed using the following steps:

1. Run mto display all of the commands (utilities) available in m-cli.

2. Run m <command> to display the options available for this command.

3. Run m <command> <option> to execute an option for this command.

A diagram of this structure is shown below:

m
|___itunes
|     |___status
|     |___play
|     |___pause
|     |
|     ...
|
|___disk 
      |___ls
      |___list
      |___fs
      ...

For example, running m itunes will display the options available for iTunes, as shown below:

    usage: m itunes [ status | play | pause | next | prev | mute | unmute | vol up | vol down | vol #| stop | quit | help ]

    Examples:
      m itunes status       # Show status
      m itunes play         # Play track
      m itunes pause        # Pause track
      m itunes next         # Play next track
      m itunes prev         # Play previous track
      m itunes mute         # Mute iTunes
      m itunes unmute       # Unmute iTunes
      m itunes vol up       # Volume Up
      m itunes vol down     # Volume Down
      m itunes vol #        # Set volume level
      m itunes stop         # Stop track
      m itunes quit         # Quit iTunes

In this example, running m itunes play will play the current selected track in your iTunes music library.

All Commands

m-cli currently supports the following commands:

help
airdrop
appearance
audio
battery
bluetooth
dir
disk
display
dns
dock
fan
finder
firewall
flightmode
gatekeeper
group
hostname
info
itunes
localhost
lock
network
nosleep
notification
ntp
printer
restart
safeboot
screensaver
service
shutdown
sleep
timezone
touchbar
trash
usb
update
user
volume
vpn
wallpaper
wifi

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -m 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request 🤘

TODO:

  • Add more plugins
  • Improve the help
  • Improve the installation script

Resources:

Thanks

guarinogabriel/Mac-CLI was a great source of inspiration.


MIT License © Rogelio Cedillo

m-cli's People

Contributors

ashleyem avatar bensleveritt avatar bl-ue avatar bressan3 avatar codejunkie84 avatar cristianbica avatar doodzik avatar dralbert avatar elyscape avatar focusaurus avatar heywoodlh avatar incanus avatar lzmartinico avatar musically-ut avatar niko-dunixi avatar paxperscientiam avatar pbnj avatar pehlicd avatar qw3rtman avatar retokromer avatar rgcr avatar sadams avatar sangdol avatar sconaway avatar simonla avatar sllt avatar smileart avatar swsnr avatar thrashr888 avatar yazgazan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

m-cli's Issues

Disable lock animation

Hello,

With m lock I get an animation before it locks the screen. I also get an animation when after entering my password when unlocking. Is there a way to disable this?

Thank you.

plugin bluetooth enable doesn't work

Model Name: MacBook Pro
Model Identifier: MacBookPro11,3
Processor Name: Intel Core i7
Bluetooth Firmware Version: v118 c9121

Doesn't enable hardware using m bluetooth enable. reports same as disable, which works fine.

homebrew?

Any chance to install from homebrew?

vpn start does not work on El Capitan

When I start VPN I get an error from AppleScript

$ m vpn start <name>
missing value

I'd use scutil --nc start "$1" instead. Do you want me to file a pull request?

By the way, great projects!

Cheers

m-cli update with homebrew install

Can not update homebrew installed m-cli, getting message that not a git repository.
I run the command 'm --update' and it shows the following:

> m --update
m-cli is already installed
Updating m-cli from git
fatal: Not a git repository: '/usr/local/Cellar/m-cli/0.1.0/.git'
Failed to fetch changes => https://github.com/rgcr/m-cli.git

Which I would assume that I should use 'brew upgrade m-cli' if I installed it with homebrew. Just thought I would advise on the error message when I try to upgrade via m-cli

Tag a stable release?

It'd be really nice to have this available on Homebrew and they like for there to be a git tag of a stable release to point most people at (with the option to install directly from the latest master). Any chance we could have a stable released tagged? ❤️

Wallpaper is not set

Whenever I want to change my wallpaper I would assume to navigate to the directory where the desired image file is located and then run m wallpaper ./image.jpg. However, when the command is run the dock disappears for a moment (restarting the Finder I guess) and the wallpaper is changed to the default wallpaper of macOS. The image which was mentioned in the command is not used.
I have not found any issue related to this problem so there are two possibilities: I am not using the command correctly or there is an issue in the project nobody before me has found. Also there could be a bug that only shows up on my machine.

`nvarm` error on checking safeboot status

➜  ~ m --update
m-cli Is already installed
Updating m-cli from git
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
HEAD is now at d0b6f56 Merge 'jfultz-master',we can launch m from a symlink

Done!
➜  ~ m safeboot status
nvram: Error getting variable - 'boot-args': (iokit/common) data was not found
➜  ~

Network interfaces should show IP addresses

When typing m network ls, I get a list of all interfaces and their Mac addresses.

Expected behavior: seeing the current IP addresses as well. That would be really useful to have for troubleshooting purposes.

Zsh completion error

If I type m <tab>, in zsh, I'm getting the following:

_m:2: unknown file attribute: \n
_m:2: unknown file attribute: \n

Any ideas? Some googling brings up something about zsh arrays not being the same as bash arrays but I'm not sure that's the problem here. Sorry for not giving more information but I'm not what would be helpful – so please let me know. Thanks very much!

VPN?

any plans to support connecting to a listed vpn?

great tool

Feature: Add iTunes Support

Per this article, it seems that controlling iTunes via Bash is possible.

I haven't tested it and I don't know if the API has changed much for OS X versions released after 2001.

TL;DR

#!/bin/sh
#
####################################
# iTunes Command Line Control v1.0
# written by David Schlosnagle
# created 2001.11.08
####################################

showHelp () {
    echo "-----------------------------";
    echo "iTunes Command Line Interface";
    echo "-----------------------------";
    echo "Usage: `basename $0` <option>";
    echo;
    echo "Options:";
    echo " status   = Shows iTunes' status, current artist and track.";
    echo " play     = Start playing iTunes.";
    echo " pause    = Pause iTunes.";
    echo " next     = Go to the next track.";
    echo " prev     = Go to the previous track.";
    echo " mute     = Mute iTunes' volume.";
    echo " unmute   = Unmute iTunes' volume.";
    echo " vol up   = Increase iTunes' volume by 10%";
    echo " vol down = Increase iTunes' volume by 10%";
    echo " vol #    = Set iTunes' volume to # [0-100]";
    echo " stop     = Stop iTunes.";
    echo " quit     = Quit iTunes.";
}

if [ $# = 0 ]; then
    showHelp;
fi

while [ $# -gt 0 ]; do
    arg=$1;
    case $arg in
        "status" ) state=`osascript -e 'tell application "iTunes" to player state as string'`;
            echo "iTunes is currently $state.";
            if [ $state = "playing" ]; then
                artist=`osascript -e 'tell application "iTunes" to artist of current track as string'`;
                track=`osascript -e 'tell application "iTunes" to name of current track as string'`;
                echo "Current track $artist:  $track";
            fi
            break ;;

        "play"    ) echo "Playing iTunes.";
            osascript -e 'tell application "iTunes" to play';
            break ;;

        "pause"    ) echo "Pausing iTunes.";
            osascript -e 'tell application "iTunes" to pause';
            break ;;

        "next"    ) echo "Going to next track." ;
            osascript -e 'tell application "iTunes" to next track';
            break ;;

        "prev"    ) echo "Going to previous track.";
            osascript -e 'tell application "iTunes" to previous track';
            break ;;

        "mute"    ) echo "Muting iTunes volume level.";
            osascript -e 'tell application "iTunes" to set mute to true';
            break ;;

        "unmute" ) echo "Unmuting iTunes volume level.";
            osascript -e 'tell application "iTunes" to set mute to false';
            break ;;

        "vol"    ) echo "Changing iTunes volume level.";
            vol=`osascript -e 'tell application "iTunes" to sound volume as integer'`;
            if [ $2 = "up" ]; then
                newvol=$(( vol+10 ));
            fi

            if [ $2 = "down" ]; then
                newvol=$(( vol-10 ));
            fi

            if [ $2 -gt 0 ]; then
                newvol=$2;
            fi
            osascript -e "tell application \"iTunes\" to set sound volume to $newvol";
            break ;;

        "stop"    ) echo "Stopping iTunes.";
            osascript -e 'tell application "iTunes" to stop';
            break ;;
            
        "quit"    ) echo "Quitting iTunes.";
            osascript -e 'tell application "iTunes" to quit';
            exit 1 ;;

        "help" | * ) echo "help:";
            showHelp;
            break ;;
    esac
done

m-cli not installing to specified directory

Hi, thanks for the hard work into this project!

I am trying to install the project into my home folder, the documentation says i can specify a path with INSTALL_DIR but that function does not appear to be working. The following is an example of me trying to install m-cli into ~/.m-cli but is instead being installed into /usr/local/m-cli. I am not sure if the documentation is wrong or if the function is broken. See example below.

c in ~
› INSTALL_DIR=~/.m-cli curl -fsSL https://raw.githubusercontent.com/rgcr/m-cli/master/install.sh | sh
Downloading m-cli from git to /usr/local
Cloning into '/usr/local/m-cli'...
remote: Counting objects: 38, done.
remote: Compressing objects: 100% (36/36), done.
remote: Total 38 (delta 3), reused 21 (delta 1), pack-reused 0
Unpacking objects: 100% (38/38), done.
Checking connectivity... done.

Done!

c in ~
› ls -la ~ | grep m-cli

c in ~
› ls -la /usr/local | grep m-cli
drwxr-xr-x   10 c     admin   340 17 Jul 01:30 m-cli

c in ~
›

Thanks again!

[Enhancement] Spotlight & Time-Machine Commands

Found this Apple OS X Command Line documentation, which could be a gold-mine of potential additions to this project.

A few potentially interesting additions:

Spotlight Search

$ mdfind
Usage: mdfind [-live] [-count] [-onlyin directory] [-name fileName | -s smartFolderName | query]
list the files matching the query
query can be an expression or a sequence of words

	-attr <attr>      Fetches the value of the specified attribute
	-count            Query only reports matching items count
	-onlyin <dir>     Search only within given directory
	-live             Query should stay active
	-name <name>      Search on file name only
	-reprint          Reprint results on live update
	-s <name>         Show contents of smart folder <name>
	-0                Use NUL (``\0'') as a path separator, for use with xargs -0.

example:  mdfind image
example:  mdfind -onlyin ~ image
example:  mdfind -name stdlib.h
example:  mdfind "kMDItemAuthor == '*MyFavoriteAuthor*'"
example:  mdfind -live MyFavoriteAuthor

App Store Software Updates Already implemented

$ softwareupdate
usage: softwareupdate <cmd> [<args> ...]

** Catalog Management:
	--set-catalog <URL>	Set the new catalog URL (requires privileges)
	--clear-catalog		Clear the catalog URL back to defaults (requires privileges)

** Manage Updates:
	-l | --list		List all appropriate update labels (options:  --no-scan)
	-d | --download		Download Only
	-e | --cancel-download		Cancel a download
	-i | --install		Install
		<label> ...	specific updates
		-a | --all		All appropriate updates
		-r | --recommended	Only recommended updates
	--background		Trigger a background scan and update operation
	--ignore <label> ...	Ignore specific updates
	--reset-ignored		Clear all ignored updates

** Other Tools:
	--suspend-background 	Suspend background operations from occurring temporarily (use --duration to specify duration to suspend in seconds)
		--duration <duration>)		Optional duration in seconds to suspend background operations (defaults to 5*60 seconds)
	--dump-state		Log the internal state of the SU daemon to /var/log/install.log
	--evaluate-products		Evaluate a list of product keys specified by the --products option

** Options:
	--no-scan		Do not scan when listing or installing updates (use available updates previously scanned)
	--products		A comma-separated (no spaces) list of product keys to operate on.
	--force			Force an operation to complete.  Use with --background to trigger a background scan regardless of "Automatically check" pref

--verbose	Enable verbose output
--help	Print this help

Time Machine

$ tmutil
Usage: tmutil version

Usage: tmutil enable

Usage: tmutil disable

Usage: tmutil startbackup [-a | --auto] [-b | --block] [-r | --rotation] [-d | --destination dest_id]

Usage: tmutil stopbackup

Usage: tmutil enablelocal

Usage: tmutil disablelocal

Usage: tmutil snapshot

Usage: tmutil delete snapshot_path ...

Usage: tmutil restore [-v] src ... dst

Usage: tmutil compare [-@acdefghlmnstuEX] [-D depth] [-I name]
       tmutil compare [-@acdefghlmnstuEX] [-D depth] [-I name] snapshot_path
       tmutil compare [-@acdefghlmnstuEUX] [-D depth] [-I name] path1 path2

Usage: tmutil setdestination [-a]  mount_point
       tmutil setdestination [-ap] afp://user[:pass]@host/share

Usage: tmutil removedestination destination_id

Usage: tmutil destinationinfo [-X]

Usage: tmutil addexclusion [-p|-v] item ...

Usage: tmutil removeexclusion [-p|-v] item ...

Usage: tmutil isexcluded item ...

Usage: tmutil inheritbackup machine_directory
       tmutil inheritbackup sparse_bundle

Usage: tmutil associatedisk [-a] mount_point volume_backup_directory

Usage: tmutil latestbackup

Usage: tmutil listbackups

Usage: tmutil machinedirectory

Usage: tmutil calculatedrift machine_directory

Usage: tmutil uniquesize path ...

Usage: tmutil verifychecksums path ...

Documentation/Recommendation: /etc/paths.d/m-cli

The most universal and complete way to set a path variable on OS X (all users, all recent version of OS X, GUI & CLI) is the /etc/paths.d/ directory. Instead of (or in addition to) the recommendation to put "export $PATH..." inside one of the user profiles, the install process can recommend something like sudo echo '/usr/local/m-cli' > /etc/paths.d/m-cli. Or it can be an automatic part of the install process. There are permission issues (in both cases) to iron out, though.

scutil: unrecognized option `--user

When using the command m vpn start VPNNAME username password I'm getting the following error:

scutil: unrecognized option --user username'`

It is apparently the result of quoting the arguments. Submitting a PR to demonstrate the fix..

Prompt for password (vpn, wifi etc.)

Hi!

Just recently found this tool and find it very nice. No longer need to remember the weird commands in OSX to configure it is great! Thanks!

Have you considered an option for getting a prompt to type in the password instead of having to have it in the command?
I'm no talking about the admin password but for example when connecting to VPN or wifi.

Make finder subcommands consistent

The new m finder desktop subcommand takes as arguments enable and disable, lowercase only. This is in contrast to m finder showhiddenfiles and m finder showextensions, which both take yes and no case-insensitively. Additionally, the bash completion will only suggest YES and NO. This should be unified so that m finder desktop takes yes and no case-insensitively. Alternatively, all three commands could be extended to take yes, no, enable, and disable case-insensitively.

Additionally, both showhiddenfiles and showextensions are clear in what they mean: showhiddenfiles means the finder will show hidden files and showextensions means that the finder will show file extensions. desktop is vague. It should probably be renamed to showdesktop.

`m finder desktop` gives an error if CreateDesktop has never been set

CreateDesktop defaults to being unset. As such, if it hasn't ever been manually set, running m finder desktop yields an error:

$ m finder desktop
/usr/local/Cellar/m-cli/0.1.0/plugins/finder: line 70: [: : integer expression expected
Desktop is: enabled
$ 

The relevant section of the code:

DESKTOP_STATUS_NUM=$(defaults read com.apple.finder CreateDesktop 2>/dev/null)
if [ "$DESKTOP_STATUS_NUM" -eq 0 ] ; then

Running the defaults command manually:

$ defaults read com.apple.finder CreateDesktop 2>/dev/null
$ defaults read com.apple.finder CreateDesktop # let's check for errors
2016-08-03 12:31:39.782 defaults[90896:5643237] 
The domain/default pair of (/Users/elyscape/Library/Preferences/com.apple.finder, CreateDesktop) does not exist
$ # aha

`m dir` returns error

Hello,

I just installed this and after running m dir I get the following:

➜  ~ m dir tree
/usr/local/m-cli/plugins/dir: line 3: /lib/functions.sh: No such file or directory

Everything else seems fine:

➜  ~ m --update
m-cli Is already installed
Updating m-cli from git
m remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
HEAD is now at 516b2eb updating readme
➜  ~ m battery status
Now drawing from 'AC Power'
 -InternalBattery-0     100%; charged; 0:00 remaining present: true

Add displays management

I have two screens and I constantly switch the main one because I also use one of the two for the PC. Would love to have a command like m displays switch or something that switches screen, like when dragging the bar here from one screen to another:

screen shot 2016-07-16 at 20 51 40

VPN: unrecognized option `--pasword'

I got the following error~

➜ ~ m vpn start 8CB2849B-5EC3-4F80-88E5-02E41CD9BA7A 'user' 'mypass'
scutil: unrecognized option `--pasword'
usage: scutil
interactive access to the dynamic store.

or: scutil --prefs [preference-file]
interactive access to the [raw] stored preferences.

or: scutil [-W] -r nodename
or: scutil [-W] -r address
or: scutil [-W] -r local-address remote-address
check reachability of node, address, or address pair (-W to "watch").

or: scutil -w dynamic-store-key [ -t timeout ]
-w wait for presense of dynamic store key
-t time to wait for key

or: scutil --get pref
or: scutil --set pref [newval]
or: scutil --get filename path key
pref display (or set) the specified preference. Valid preferences
include:
ComputerName, LocalHostName, HostName
newval New preference value to be set. If not specified,
the new value will be read from standard input.

Require a password once for certain commands

Thanks for putting this utility together it is very helpful.

Is it be possible to require the password only once instead of having to re-enter it for certain commands? Or is there a limitation/security concern in enabling that functionality that lead to the current implementation?

As an example:

 $: m hostname
Password:
ComputerName:  [computername]
Password:
HostName:  [hostname]
Password:
...

Add command for flushing DNS cache

Just an idea, but the DNS cache flush operation is different dependent on your version of Mac OS, and it isn't exactly pretty:

From https://support.apple.com/en-gb/HT202516:

10.10.4 and later:

sudo killall -HUP mDNSResponder

10.10 to 10.10.3:

sudo discoveryutil mdnsflushcache

10.9.5 and earlier:

sudo killall -HUP mDNSResponder

10.6 to 10.6.8:

sudo dscacheutil -flushcache

<< m lock >> command not working.

Hey, here's the output from the terminal

  File "/usr/local/m-cli/plugins/lock", line 10
    m lock     # lock session"""
                               ^
SyntaxError: Missing parentheses in call to 'print'

drying up the autocompletion code

This project offers now 3 different completion solutions. IMO we should look into removing that repetition.

Does anyone have a suggestion for tackling this problem?

Feature: Add support for screencapture

Adding support for most common screen capture use-cases might be nice.

For example:

  • To screen-capture a Window: screencapture -iW ~/Desktop/screen.jpg (where i flag is interactive and W is Window Selection Mode)
  • To screen-capture a user-defined rectangle: screencapture -i ~/Desktop/screen.jpg
  • To screen-capture the whole screen: screencapture -S ~/Desktop/screen.jpg

I envision the CLI interaction might look something like:

usage: m screencap [ file-name | -w | -f | -r | help ]

Examples:
    m screencap                          # full screencapture of current screen. File saved as ~/Desktop/screen.jpg
    m screencap window.png -w            # prompt user to select a window to screencapture
    m screencap ~/Documents/full.jpg -f  # full screencapture of current screen
    m screencap rectangle.pdf -r         # prompt user to select custom dimensions.

Gotchas:

  • File name is required. If user types any command without specifying a file name, use a default name and location (e.g. ~/Desktop/screen.png)

Reference: http://guides.macrumors.com/Taking_Screenshots_in_Mac_OS_X

Reference Mac CLI at top of Readme file

Hi Rogelio,

Since this contains basically 97% of the code from Mac CLI, you should reference that your tool is based on my project.

I am okay with you when it comes to reusing the code, but it all comes down to being fair.
If not, all the credit goes to you but the effort of creating the tool for more than 6 months was made by me.

Looking forward your response.
Gabriel

Feature req: Show/Hide wifi status in menu

Not sure if this is easy/hard/impossible, but I'd like a scripted way to toggle the "Show Wi-Fi status in menu bar" setting from the Network preferences screen. I think this uses the defaults system and updates something like NSStatusItem Visible com.apple.menuextra.airport" = 1; but I don't know the proper incantation to simulate the Preferences Pane behavior via command line.

  "com.apple.systemuiserver" =     {
        "NSStatusItem Visible Siri" = 0;
        "NSStatusItem Visible com.apple.menuextra.airport" = 1;
        "NSStatusItem Visible com.apple.menuextra.battery" = 1;
        "NSStatusItem Visible com.apple.menuextra.bluetooth" = 1;
        "NSStatusItem Visible com.apple.menuextra.clock" = 1;
        "NSStatusItem Visible com.apple.menuextra.textinput" = 1;
        "__NSEnableTSMDocumentWindowLevel" = 1;
        "last-messagetrace-stamp" = "497807700.002411";
        menuExtras =         (
            "/System/Library/CoreServices/Menu Extras/Clock.menu",
            "/System/Library/CoreServices/Menu Extras/TextInput.menu",
            "/System/Library/CoreServices/Menu Extras/Bluetooth.menu",
            "/System/Library/CoreServices/Menu Extras/Battery.menu",
            "/System/Library/CoreServices/Menu Extras/AirPort.menu"
        );
    };

Installed but won't work

USER@HOST:~$ m
-bash: m: command not found

macOS 10.11.5, using iTerm2 Build 3.0.4, but same problem in standard macOS Terminal. Ran the installscript multiple times, always says, already installed. But no luck getting it to work.

Any suggestions?

Feature: No Sleep (Caffeinate) with PID

This is a simple feature request. I find that after I begin a script, I realize I would like to use 'm nosleep until' on that process. I can do that with caffeinate by running 'caffeinate -w PID'. I think it would be nice to support that feature in m-cli.

I would be happy to make a pull request with this addition, but I am not sure how best to add the feature. As of now, 'm nosleep until NUMBER' will not sleep for NUMBER seconds. There would need to be a way to specify that the number is a PID. Perhaps, prefixing the number with a + or some other character? Backwards compatibility should not be broken.

Let me know what you think. Like I said, I would be happy to make a pull request with the changes. I really enjoy using this tool and would love to contribute to it!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.