diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/archlinux/README.md | 2 | ||||
-rw-r--r-- | plugins/archlinux/archlinux.plugin.zsh | 2 | ||||
-rw-r--r-- | plugins/battery/battery.plugin.zsh | 2 | ||||
-rw-r--r-- | plugins/composer/composer.plugin.zsh | 5 | ||||
-rw-r--r-- | plugins/docker/_docker | 2 | ||||
-rw-r--r-- | plugins/osx/osx.plugin.zsh | 15 |
6 files changed, 25 insertions, 3 deletions
diff --git a/plugins/archlinux/README.md b/plugins/archlinux/README.md index 16f099415..e408db13d 100644 --- a/plugins/archlinux/README.md +++ b/plugins/archlinux/README.md @@ -73,6 +73,8 @@ | pacupd | sudo pacman -Sy | Update and refresh the local package database | | pacupg | sudo pacman -Syu | Sync with repositories before upgrading packages | | upgrade | sudo pacman -Syu | Sync with repositories before upgrading packages | +| pacfileupg | sudo pacman -Fy | Download fresh package databases from the server | +| pacfiles | pacman -Fs | Search package file names for matching strings. | | Function | Description | |----------------|------------------------------------------------------| diff --git a/plugins/archlinux/archlinux.plugin.zsh b/plugins/archlinux/archlinux.plugin.zsh index 3156e949a..105bd2d5f 100644 --- a/plugins/archlinux/archlinux.plugin.zsh +++ b/plugins/archlinux/archlinux.plugin.zsh @@ -82,6 +82,8 @@ alias pacinsd='sudo pacman -S --asdeps' alias pacmir='sudo pacman -Syy' alias paclsorphans='sudo pacman -Qdt' alias pacrmorphans='sudo pacman -Rs $(pacman -Qtdq)' +alias pacfileupg='sudo pacman -Fy' +alias pacfiles='pacman tFs' if (( $+commands[abs] && $+commands[aur] )); then diff --git a/plugins/battery/battery.plugin.zsh b/plugins/battery/battery.plugin.zsh index da229cf35..8f398cfb3 100644 --- a/plugins/battery/battery.plugin.zsh +++ b/plugins/battery/battery.plugin.zsh @@ -100,7 +100,7 @@ elif [[ "$OSTYPE" = linux* ]] ; then else color='red' fi - echo "%{$fg[$color]%}[$(battery_pct_remaining)%%]%{$reset_color%}" + echo "%{$fg[$color]%}$(battery_pct_remaining)%%%{$reset_color%}" else echo "∞" fi diff --git a/plugins/composer/composer.plugin.zsh b/plugins/composer/composer.plugin.zsh index 07eb1de88..8cf50d502 100644 --- a/plugins/composer/composer.plugin.zsh +++ b/plugins/composer/composer.plugin.zsh @@ -39,14 +39,17 @@ alias c='composer' alias csu='composer self-update' alias cu='composer update' alias cr='composer require' +alias crm='composer remove' alias ci='composer install' alias ccp='composer create-project' alias cdu='composer dump-autoload' +alias cdo='composer dump-autoload --optimize-autoloader' alias cgu='composer global update' alias cgr='composer global require' +alias cgrm='composer global remove' # install composer in the current directory alias cget='curl -s https://getcomposer.org/installer | php' # Add Composer's global binaries to PATH -export PATH=$PATH:~/.composer/vendor/bin +export PATH=$PATH:$(composer global config bin-dir --absolute) 2>/dev/null diff --git a/plugins/docker/_docker b/plugins/docker/_docker index 8d00b13e6..1aec353c5 100644 --- a/plugins/docker/_docker +++ b/plugins/docker/_docker @@ -917,7 +917,7 @@ __docker_image_subcommand() { "($help)*--label=[Set metadata for an image]:label=value: " \ "($help -m --memory)"{-m=,--memory=}"[Memory limit]:Memory limit: " \ "($help)--memory-swap=[Total memory limit with swap]:Memory limit: " \ - "($help)--network=[Connect a container to a network]:network mode:(bridge none container host)" + "($help)--network=[Connect a container to a network]:network mode:(bridge none container host)" \ "($help)--no-cache[Do not use cache when building the image]" \ "($help)--pull[Attempt to pull a newer version of the image]" \ "($help -q --quiet)"{-q,--quiet}"[Suppress verbose build output]" \ diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index 95ef3e1aa..e8488ebc9 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -184,6 +184,7 @@ function vncviewer() { # iTunes control function function itunes() { local opt=$1 + local playlist=$2 shift case "$opt" in launch|play|pause|stop|rewind|resume|quit) @@ -200,6 +201,19 @@ function itunes() { vol) opt="set sound volume to $1" #$1 Due to the shift ;; + playlist) + # Inspired by: https://gist.github.com/nakajijapan/ac8b45371064ae98ea7f +if [[ ! -z "$playlist" ]]; then + osascript -e 'tell application "iTunes"' -e "set new_playlist to \"$playlist\" as string" -e "play playlist new_playlist" -e "end tell" 2>/dev/null; + if [[ $? -eq 0 ]]; then + opt="play" + else + opt="stop" + fi + else + opt="set allPlaylists to (get name of every playlist)" + fi + ;; playing|status) local state=`osascript -e 'tell application "iTunes" to player state as string'` if [[ "$state" = "playing" ]]; then @@ -250,6 +264,7 @@ EOF echo "\tshuf|shuffle [on|off|toggle]\tSet shuffled playback. Default: toggle. Note: toggle doesn't support the MiniPlayer." echo "\tvol\tSet the volume, takes an argument from 0 to 100" echo "\tplaying|status\tShow what song is currently playing in iTunes." + echo "\tplaylist [playlist name]\t Play specific playlist" echo "\thelp\tshow this message and exit" return 0 ;; |