Permalink
Browse files

clean osx install, trying bash again, remove tmux powerline

  • Loading branch information...
1 parent 7a20373 commit c8bc89914e3db3043126b47dbce6f028aec95c72 @waymondo committed Nov 25, 2012
Showing with 90 additions and 2,021 deletions.
  1. +0 −10 .gitignore
  2. +0 −27 .gitmodules
  3. +8 −0 bash/html5vid.sh
  4. +61 −0 bash/rake_completion
  5. +13 −0 bash_profile
  6. +8 −8 tmux.conf
  7. +0 −3 tmux/tmux-powerline/.gitignore
  8. +0 −19 tmux/tmux-powerline/AUTHORS
  9. +0 −14 tmux/tmux-powerline/LICENSE
  10. +0 −167 tmux/tmux-powerline/README.md
  11. +0 −12 tmux/tmux-powerline/config.sh
  12. BIN tmux/tmux-powerline/img/full.png
  13. BIN tmux/tmux-powerline/img/left-status.png
  14. BIN tmux/tmux-powerline/img/right-status.png
  15. BIN tmux/tmux-powerline/img/right-status_no_mail.png
  16. BIN tmux/tmux-powerline/img/right-status_no_mpd.png
  17. BIN tmux/tmux-powerline/img/right-status_weather_battery.png
  18. +0 −219 tmux/tmux-powerline/lib.sh
  19. +0 −11 tmux/tmux-powerline/mute_statusbar.sh
  20. +0 −18 tmux/tmux-powerline/segments/Makefile
  21. +0 −130 tmux/tmux-powerline/segments/battery.sh
  22. +0 −33 tmux/tmux-powerline/segments/battery_mac.sh
  23. +0 −21 tmux/tmux-powerline/segments/cpu.sh
  24. +0 −5 tmux/tmux-powerline/segments/date_day.sh
  25. +0 −5 tmux/tmux-powerline/segments/date_full.sh
  26. +0 −5 tmux/tmux-powerline/segments/hostname.sh
  27. +0 −35 tmux/tmux-powerline/segments/lan_ip.sh
  28. +0 −5 tmux/tmux-powerline/segments/load.sh
  29. +0 −14 tmux/tmux-powerline/segments/mail_count_apple_mail.sh
  30. +0 −78 tmux/tmux-powerline/segments/mail_count_gmail.sh
  31. +0 −18 tmux/tmux-powerline/segments/mail_count_maildir.sh
  32. +0 −26 tmux/tmux-powerline/segments/np_audacious.sh
  33. +0 −27 tmux/tmux-powerline/segments/np_banshee.sh
  34. +0 −23 tmux/tmux-powerline/segments/np_itunes_mac.sh
  35. +0 −31 tmux/tmux-powerline/segments/np_mocp.sh
  36. +0 −179 tmux/tmux-powerline/segments/np_mpd.c
  37. +0 −43 tmux/tmux-powerline/segments/np_mpd.sh
  38. +0 −31 tmux/tmux-powerline/segments/np_mpd_simple.sh
  39. +0 −29 tmux/tmux-powerline/segments/np_rhythmbox.sh
  40. +0 −31 tmux/tmux-powerline/segments/np_spotify_linux_native.sh
  41. +0 −28 tmux/tmux-powerline/segments/np_spotify_linux_wine.sh
  42. +0 −24 tmux/tmux-powerline/segments/np_spotify_mac.sh
  43. +0 −27 tmux/tmux-powerline/segments/pwd.sh
  44. +0 −5 tmux/tmux-powerline/segments/time.sh
  45. +0 −6 tmux/tmux-powerline/segments/tmux_session_info.sh
  46. +0 −3 tmux/tmux-powerline/segments/uptime.sh
  47. +0 −92 tmux/tmux-powerline/segments/vcs_branch.sh
  48. +0 −38 tmux/tmux-powerline/segments/wan_ip.sh
  49. +0 −129 tmux/tmux-powerline/segments/weather_google.sh
  50. +0 −112 tmux/tmux-powerline/segments/weather_yahoo.sh
  51. +0 −64 tmux/tmux-powerline/segments/xkb_layout.c
  52. +0 −31 tmux/tmux-powerline/segments/xkb_layout.sh
  53. +0 −60 tmux/tmux-powerline/status-left.sh
  54. +0 −125 tmux/tmux-powerline/status-right.sh
View
@@ -1,12 +1,2 @@
*.DS_Store
*.elc
-/emacs.d/eshell
-/emacs.d/elpa
-/emacs.d/tramp
-/emacs.d/places
-/emacs.d/savehist
-/emacs.d/history
-/emacs.d/recentf
-/emacs.d/saveplace
-/emacs.d/ac-comphist.dat
-/emacs.d/url/cookies
View
@@ -1,27 +0,0 @@
-[submodule "emacs.d/vendor/rinari"]
- path = emacs.d/vendor/rinari
- url = git://github.com/eschulte/rinari.git
-[submodule "emacs.d/vendor/rhtml-mode"]
- path = emacs.d/vendor/rhtml-mode
- url = git://github.com/eschulte/rhtml.git
-[submodule "emacs.d/vendor/bundler.el"]
- path = emacs.d/vendor/bundler.el
- url = git://github.com/tobiassvn/bundler.el.git
-[submodule "emacs.d/vendor/foreman.el"]
- path = emacs.d/vendor/foreman.el
- url = git://github.com/waymondo/foreman.el.git
-[submodule "emacs.d/vendor/cheat.el"]
- path = emacs.d/vendor/cheat.el
- url = https://github.com/defunkt/cheat.el.git
-[submodule "emacs.d/vendor/direx.el"]
- path = emacs.d/vendor/direx.el
- url = https://github.com/m2ym/direx-el
-[submodule "emacs.d/vendor/enhanced-ruby-mode"]
- path = emacs.d/vendor/enhanced-ruby-mode
- url = https://github.com/jacott/Enhanced-Ruby-Mode.git
-[submodule "emacs.d/vendor/powerline.el"]
- path = emacs.d/vendor/powerline.el
- url = https://github.com/milkypostman/powerline.git
-[submodule "emacs.d/vendor/smart-tab.el"]
- path = emacs.d/vendor/smart-tab.el
- url = https://github.com/genehack/smart-tab.git
View
@@ -0,0 +1,8 @@
+#!/bin/bash
+# html5 videos maker
+
+# ffmpeg -i $1 -b 1500k -vcodec libx264 -g 30 -s 640x360 $1.mp4
+
+ffmpeg -i $1 -b:v 1500k -vcodec libvpx -acodec libvorbis -ab 55000 -f webm -g 30 -s 640x360 $1.webm
+
+# ffmpeg -i $1 -b 1500k -vcodec libtheora -acodec libvorbis -ab 55000 -g 30 -s 640x360 $1.ogv
View
@@ -0,0 +1,61 @@
+class RakeCompletion
+ CACHE_FILE_NAME = '.rake_tasks~'
+
+ def initialize(command)
+ @command = command
+ end
+
+ def matches
+ exit 0 if rakefile.nil?
+ matching_tasks.map do |task|
+ task.sub(typed_before_colon, '')
+ end
+ end
+
+ private
+
+ def typed
+ @command[/\s(.+?)$/, 1] || ''
+ end
+
+ def typed_before_colon
+ typed[/.+\:/] || ''
+ end
+
+ def matching_tasks
+ all_tasks.select do |task|
+ task[0, typed.length] == typed
+ end
+ end
+
+ def all_tasks
+ cache_current? ? tasks_from_cache : generate_tasks
+ end
+
+ def cache_current?
+ File.exist?(cache_file) && File.mtime(cache_file) >= File.mtime(rakefile)
+ end
+
+ def rakefile
+ ['rakefile', 'Rakefile', 'rakefile.rb', 'Rakefile.rb'].detect do |file|
+ File.file? File.join(Dir.pwd, file)
+ end
+ end
+
+ def cache_file
+ File.join(Dir.pwd, CACHE_FILE_NAME)
+ end
+
+ def tasks_from_cache
+ IO.read(cache_file).split
+ end
+
+ def generate_tasks
+ tasks = `rake --tasks`.split("\n")[1..-1].collect {|line| line.split[1]}
+ File.open(cache_file, 'w') { |f| f.write tasks.join("\n") }
+ tasks
+ end
+end
+
+puts RakeCompletion.new(ENV["COMP_LINE"]).matches
+exit 0
View
@@ -0,0 +1,13 @@
+# set en_US locale w/ utf-8 encodings
+LANG="en_US.UTF-8"
+LANGUAGE="en"
+LC_CTYPE="en_US.UTF-8"
+LC_ALL="en_US.UTF-8"
+export LANG LANGUAGE LC_CTYPE LC_ALL
+
+EDITOR="emacs"
+
+complete -C ~/.bash/rake_completion -o default rake
+
+export PATH="$HOME/.rbenv/bin:/usr/local/share/npm/bin:$PATH"
+eval "$(rbenv init -)"
View
@@ -14,11 +14,11 @@ set -sg escape-time 1
set -g mode-mouse on
-set-option -g status on
-set-option -g status-interval 2
-set-option -g status-utf8 on
-set-option -g status-justify "centre"
-set-option -g status-left-length 60
-set-option -g status-right-length 90
-set-option -g status-left "#(~/.tmux/tmux-powerline/status-left.sh)"
-set-option -g status-right "#(~/.tmux/tmux-powerline/status-right.sh)"
+set-option -g status off
+# set-option -g status-interval 2
+# set-option -g status-utf8 on
+# set-option -g status-justify "centre"
+# set-option -g status-left-length 60
+# set-option -g status-right-length 90
+# set-option -g status-left "#(~/.tmux/tmux-powerline/status-left.sh)"
+# set-option -g status-right "#(~/.tmux/tmux-powerline/status-right.sh)"
@@ -1,3 +0,0 @@
-segments/np_mpd
-segments/xkb_layout
-*.swp
@@ -1,19 +0,0 @@
-Please append you name/nick here when you have contributed with something!
-
-Erik Westrup <erik.westrup@gmail.com>
-Suvash Thapaliya <suvash@gmail.com>
-Erik Jansson <erikjansson90@gmail.com>
-Yuku Takahashi <taka84u9@gmail.com>
-Oscar Olsson <osse.olsson@gmail.com>
-Ryo Katsuma
-negipo
-Sina Siadat
-Vivien Leroy <fantattitude@me.com>
-Gino Lucero
-Derek Ashley Thomas <derekathomas@gmail.com>
-LuRsT
-Tomokazu Hirai <tomokazu.hirai@gmail.com>
-Matt Black
-krieiter
-Viktor Jackson
-flytreeleft <flytreeleft@126.com>
@@ -1,14 +0,0 @@
-tmux-powerline - Statusbar configuration for tmux that looks like vim-powerline and consist of dynamic segments.
-
-Copyright (c) 2012, see AUTHORS
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- * Neither the name of the <ORGANIZATION> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-http://opensource.org/licenses/BSD-3-Clause
@@ -1,167 +0,0 @@
-# tmux-powerline
-This is a set of scripts (segments) for making a nice and dynamic tmux statusbar where elements can come and disappears depending on events. I really like the look of [Lokaltog/vim-powerline](https://github.com/Lokaltog/vim-powerline) and I decided I wanted the same for tmux.
-
-The following segments exists for now:
-* LAN & WAN IP addresses.
-* Now Playing for MPD, Spotify (GNU/Linux native or wine, OS X), iTunes (OS X), Rhythmbox, Banshee, MOC, and Audacious.
-* New mail count for GMail, Maildir and Apple Mail.
-* GNU/Linux and Macintosh OS X battery status (uses [richo/dotfiles/bin/battery](https://github.com/richoH/dotfiles/blob/master/bin/battery)).
-* Weather in Celsius, Fahrenheit and Kelvin using Yahoo Weather.
-* System load, cpu usage and uptime.
-* Git, SVN and Mercurial branch in CWD.
-* Date and time.
-* Hostname.
-* tmux info.
-* CWD in pane.
-* Current X keyboard layout.
-
-Check [segments/](https://github.com/erikw/tmux-powerline/tree/master/segments) for more undocumented segments and details.
-
-# Screenshots
-**Full screenshot**
-
-![Full screenshot](https://github.com/erikw/tmux-powerline/raw/master/img/full.png)
-
-**left-status**
-
-Current tmux session, window and pane, hostname and LAN & WAN IP address.
-
-![left-status](https://github.com/erikw/tmux-powerline/raw/master/img/left-status.png)
-
-**right-status**
-
-New mails, now playing, average load, weather, date and time.
-
-![right-status](https://github.com/erikw/tmux-powerline/raw/master/img/right-status.png)
-
-Now I've read my inbox so the mail segment disappears!
-
-![right-status, no mail](https://github.com/erikw/tmux-powerline/raw/master/img/right-status_no_mail.png)
-
-After pausing the music there's no need for showing NP anymore. Also the weather has become much nicer!
-
-![right-status, no mpd](https://github.com/erikw/tmux-powerline/raw/master/img/right-status_no_mpd.png)
-
-Remaining battery.
-
-![right-status, weather and battery](https://github.com/erikw/tmux-powerline/raw/master/img/right-status_weather_battery.png)
-
-# Requirements
-Requirements for the lib to work are:
-
-* Recent tmux version
-* `bash --version` >= 4.0
-* A patched font. Follow instructions at [Lokaltog/vim-powerline/fontpatcher](https://github.com/Lokaltog/vim-powerline/tree/develop/fontpatcher) or [download](https://github.com/Lokaltog/vim-powerline/wiki/Patched-fonts) a new one.
-
-## Segment Requirements
-Requirements for some segments. You only need to fullfill the requirements for those segments you want to use.
-
-* WAN IP: curl, bc
-* MPD now playing: [libmpdclient](http://sourceforge.net/projects/musicpd/files/libmpdclient/)
-* xkb_layout: X11, XKB
-* GMail count: wget.
-
-## OS X specific requirements
-
-**You still need to follow the first part of these instructions even if you are running zsh or something else as your default shell!**
-
-tmux-powerline uses associative arrays in bash, which were added in bash version 4.0. OS X Lion ships with an antiquated version of bash ( run
-`bash --version` to see your version). In order to use tmux-powerline, you need to install a newer version of bash, fortunately,
-[brew](http://mxcl.github.com/homebrew/) makes this very easy. If you don't have brew, [install it](https://github.com/mxcl/homebrew/wiki/installation).
-Then follow these steps:
-
-```bash
-$ brew install bash
-```
-
-**If you're using something other than bash (or if you don't want this newer version of bash as your default shell) you should be done now**. If something
-seems broken, try following the last two steps and see if it helps:
-
-```bash
-$ sudo bash -c "echo /usr/local/Cellar/bash/%INSTALLED_VERSION%/bin/bash >> /private/etc/shells"
-$ chsh -s /usr/local/Cellar/bash/%INSTALLED_VERSION%/bin/bash
-```
-
-The first command installs bash through brew, the second registers the new shell with the system and the third changes to the new shell for your user.
-If you later upgrade bash through brew, don't forget to do the last two steps again with the new version number. After doing the above and restarting your
-terminal, running `echo $SHELL` should result in the following:
-
-```bash
-$ echo $SHELL
-/usr/local/Cellar/bash/%INSTALLED_VERSION%/bin/bash
-```
-
-# Installation
-Just check out the repository with:
-
-```console
-$ cd ~/some/path/
-$ git clone git://github.com/erikw/tmux-powerline.git
-```
-
-Now edit your `~/.tmux.conf` to use the scripts:
-
-<!-- Close syntax enought. -->
-```vim
-set-option -g status on
-set-option -g status-interval 2
-set-option -g status-utf8 on
-set-option -g status-justify "centre"
-set-option -g status-left-length 60
-set-option -g status-right-length 90
-set-option -g status-left "#(~/path/to/tmux-powerline/status-left.sh)"
-set-option -g status-right "#(~/path/to/tmux-powerline/status-right.sh)"
-```
-
-Set the maximum lengths to something that suits your configuration of segments and size of terminal (the maximum segments length will be handled better in the future). Don't forget to change the PLATFORM variable in `config.sh` or your `~/.bashrc` to reflect your operating system of choice.
-
-Also I recommend you to use the [tmux-colors-solarized](https://github.com/seebi/tmux-colors-solarized) theme (as well as solarized for [everything else](http://ethanschoonover.com/solarized) :)):
-
-```bash
-source ~/path/to/tmux-colors-solarized/tmuxcolors.conf
-```
-Some segments e.g. cwd and cvs_branch needs to find the current working directory of the active pane. To achive this we let tmux save the path each time the bash prompt is displayed. Put this in your `~/.bashrc` or where you define you PS1 variable (I use and source `~/.bash_ps1`):
-
-```bash
-PS1="$PS1"'$([ -n "$TMUX" ] && tmux setenv TMUXPWD_$(tmux display -p "#I_#P") "$PWD")'
-```
-
-You can toggle the visibility of the statusbars by adding the following to your `~/.tmux.conf`:
-
-```vim
-bind C-[ run '~/path/to/tmux-powerline/mute_statusbar.sh left' # Mute left statusbar.
-bind C-] run '~/path/to/tmux-powerline/mute_statusbar.sh right' # Mute right statusbar.
-```
-
-# Configuration
-
-Edit the two status scripts to suit you needs. A number of common segments are included that covers some general functions like time, date, battery etc. The segments can be moved around and does not needs to be in the order (or same file) as they are now. It should be quite easy to add you own segments.
-
-```console
-$ $EDITOR ~/path/to/tmux-powerline/status-left.sh
-$ $EDITOR ~/path/to/tmux-powerline/status-right.sh
-```
-
-
-Here is one segment configuration explained so you'll know how to make you own.
-
-```bash
-declare -A time # The name of the array.
-time+=(["script"]="${segments_path}/time.sh") # mandatory, the shell script producing the output text to be shown.
-time+=(["foreground"]="colour136") # mandatory, the text foreground color.
-time+=(["background"]="colour235") # mandatory, the text background color.
-time+=(["separator"]="${separator_left_thin}") # mandatory, the separator to use. Can be (as described in `lib.sh`) any of separator_(left|right)_(bold|thin)
-time+=(["separator_fg"]="default") # optional, overrides the default blending coloring of the separator with a custom colored foreground.
-register_segment "time" # Registers the name of the array declared above.
-```
-# Debugging
-
-Some segments might not work on your system for various reasons such as missing programs or different versions not having the same options. If a segment fails the printing should be aborted. To investigate further why a segment fails you can run
-
-```bash
-$ bash -x ~/path/to/failing/segment.sh
-```
-
-# Hacking
-
-This project can only gain positively from contributions. Fork today and make your own enhancments and segments to share back!
@@ -1,12 +0,0 @@
-#!/bin/sh
-# Cofigurations for tmux-powerline.
-
-if [ -z "$PLATFORM" ]; then
- # You platform \in {linux,bsd,mac}.
- export PLATFORM="linux"
-fi
-
-if [ -z "$USE_PATCHED_FONT" ]; then
- # Useage of patched font for symbols. true or false.
- export USE_PATCHED_FONT="true"
-fi
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Oops, something went wrong.

0 comments on commit c8bc899

Please sign in to comment.