Minor update
This commit is contained in:
parent
13e3a5ac99
commit
aff1537f14
5 changed files with 54 additions and 5 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,6 +1,7 @@
|
||||||
#Local Gitignore for Repo#
|
#Local Gitignore for Repo#
|
||||||
##########################
|
##########################
|
||||||
|
|
||||||
#Ignore the vim bundle directory, thanks to Vundle
|
# Ignore Plug-related directories
|
||||||
|
vim/vim/autoload
|
||||||
vim/vim/bundle
|
vim/vim/bundle
|
||||||
|
|
||||||
|
|
47
tmux/clocks.rb
Normal file
47
tmux/clocks.rb
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
######
|
||||||
|
# Clocks -- Tmux status line output
|
||||||
|
###
|
||||||
|
|
||||||
|
require 'net/http'
|
||||||
|
|
||||||
|
class Weather
|
||||||
|
|
||||||
|
attr_reader :temp, :flag, :summary
|
||||||
|
|
||||||
|
def initialize()
|
||||||
|
@temp = 68
|
||||||
|
@flag = "(!)" if hasflag?
|
||||||
|
@summary = "Dang nice"
|
||||||
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def get_weather(lat = 42.9333, lon = -78.877)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
def hasflag?
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
class Clocks
|
||||||
|
|
||||||
|
def initialize()
|
||||||
|
w = Weather.new()
|
||||||
|
t = Time.new()
|
||||||
|
@tu = t.utc.strftime("[ %H:%M ]")
|
||||||
|
@tb = t.getlocal("-04:00").strftime("<][ %b %d %H:%M | ")
|
||||||
|
@tw = "#{w::flag} #{w::temp} ][>"
|
||||||
|
@tc = t.getlocal("-07:00").strftime("<][ %H:%M ]")
|
||||||
|
@ti = t.getlocal("+05:30").strftime("[ %H:%M ][>")
|
||||||
|
end
|
||||||
|
|
||||||
|
def show()
|
||||||
|
puts "#{@tc} #{@tb}#{@tw} #{@tu} #{@ti}"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
c = Clocks.new()
|
||||||
|
c.show()
|
|
@ -4,12 +4,12 @@
|
||||||
# Each variable encompasses a time and a color
|
# Each variable encompasses a time and a color
|
||||||
|
|
||||||
caliTime="$(TZ=America/Los_Angeles date +%R)"
|
caliTime="$(TZ=America/Los_Angeles date +%R)"
|
||||||
buffTime="$(TZ=America/New_York date +%R)"
|
buffTime="$(TZ=America/New_York date +'%b %d %R')"
|
||||||
utcTime="$(date -u +%R)"
|
utcTime="$(date -u +%R)"
|
||||||
bangTime="$(TZ=Asia/Kolkata date +%R)"
|
bangTime="$(TZ=Asia/Kolkata date +%R)"
|
||||||
|
|
||||||
caliForm="#[fg=red]<][ $caliTime ] "
|
caliForm="#[fg=red]<][ $caliTime ] "
|
||||||
buffForm="#[fg=green]<][ $buffTime ][> "
|
buffForm="#[fg=green]<][ $buffTime | #[fg=red](!)#[fg=green]][> "
|
||||||
utcForm="#[fg=blue][ $utcTime ][> "
|
utcForm="#[fg=blue][ $utcTime ][> "
|
||||||
bangForm="#[fg=magenta][ $bangTime ][>>"
|
bangForm="#[fg=magenta][ $bangTime ][>>"
|
||||||
|
|
||||||
|
|
|
@ -65,8 +65,8 @@ set -g allow-rename off
|
||||||
|
|
||||||
set -g status-left-length 40
|
set -g status-left-length 40
|
||||||
set -g status-left "#[bright][ #S ]"
|
set -g status-left "#[bright][ #S ]"
|
||||||
set -g status-right-length 60
|
set -g status-right-length 80
|
||||||
set -g status-right "#(~/.dotfiles/tmux/clocks.sh)"
|
set -g status-right "#(ruby ~/.dotfiles/tmux/clocks.rb)"
|
||||||
|
|
||||||
######
|
######
|
||||||
# Keybinds
|
# Keybinds
|
||||||
|
|
|
@ -33,6 +33,7 @@ Plug 'tpope/vim-vinegar'
|
||||||
Plug 'tpope/vim-tbone'
|
Plug 'tpope/vim-tbone'
|
||||||
Plug 'tpope/vim-surround'
|
Plug 'tpope/vim-surround'
|
||||||
Plug 'vimwiki/vimwiki'
|
Plug 'vimwiki/vimwiki'
|
||||||
|
Plug 'tpope/vim-unimpaired'
|
||||||
" Plug 'justinmk/vim-sneak'
|
" Plug 'justinmk/vim-sneak'
|
||||||
" Plug 'ap/vim-templates'
|
" Plug 'ap/vim-templates'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue