Permalink
Browse files

removing werewolf auto theme changer. that got old fast.

  • Loading branch information...
tlhunter committed Jan 30, 2018
1 parent dd6cf46 commit a870c05be24ded6bd0441c4d299081ed621bfb4e
Showing with 0 additions and 156 deletions.
  1. +0 −82 bundle/werewolf/README.md
  2. +0 −67 bundle/werewolf/plugin/Werewolf.vim
  3. +0 −7 vimrc
View
@@ -1,82 +0,0 @@
-# werewolf.vim
-
-Werewolf changes your vim colorscheme automatically based on the time of day, allowing you to use a light theme during the day but "transform" to a dark theme once the sun goes down.
-
-# Installation
-
-## Manual
-
-```
-git clone https://github.com/jonstoler/werewolf.vim.git
-cp -R werewolf.vim .vim
-```
-
-## Pathogen
-
-```
-cd ~/.vim/bundle
-git clone https://github.com/jonstoler/werewolf.vim.git
-```
-
-## Vundle
-
-Add this line to .vimrc: `Plugin 'jonstoler/werewolf.vim'`
-Launch `vim` and run `:PluginInstall`
-Or to install from the command line: `vim +PluginInstall +qall`
-
-## vim-plug
-
-Add this line to .vimrc: `Plug 'jonstoler/werewolf.vim'`
-Launch `vim` and run `:PlugInstall`
-
-# Available Commands
-
-Command | Function
-------- | --------
-:WerewolfTransform | Checks the time of day and adjusts your colorscheme (meant to be used when automatic transformation is turned off)
-:WerewolfToggle | Switches to night if you're using the day theme, and vice versa
-:WerewolfAuto! | Toggle automatic transformation
-:WerewolfOn | Turn automatic transformation on
-:WerewolfOff | Turn automatic transformation off
-:WerewolfStart num | Set `g:werewolf_day_start` to `num`
-:WerewolfEnd num | Set `g:werewolf_day_end` to `num`
-
-# Settings
-
-## Theme Matching
-
-You need to set day/night themes. Each day theme needs a single corresponding night theme.
-
-Note that you're free to use themes not defined in either of these lists, but Werewolf will ignore them.
-
-In your `.vimrc`:
-
-```
-let g:werewolf_day_themes = ['day1', 'day2', 'day3']
-let g:werewolf_night_themes = ['night1', 'night2', 'night3']
-```
-
-## Time of Day
-
-Werewolf will transform between day and night based on two variables:
-
-```
-" default 8, use 24 hour format
-let g:werewolf_day_start = 8
-
-" default 20, 24 hour format
-let g:werewolf_day_end = 20
-```
-
-The default settings have Werewolf transform to day at 8:00 AM and transform to night at 8:00 PM.
-
-## Automatic Transformation and Toggling
-
-By default, Werewolf will automatically transform at the hours you specify. However, you can also control it manually if you wish:
-
-```
-" this defaults to 1, set it to 0 to control Werewolf manually
-let g:werewolf_change_automatically = 0
-```
-
-You can then use `:WerewolfToggle` to switch between day and night themes at any time, or call `:WerewolfTransform` to change to the proper theme based on your `day_start` and `day_end` settings.
@@ -1,67 +0,0 @@
-" WEREWOLF
-"" version 1.2.1
-"" changes your colorscheme depending on the time of day
-"" by Jonathan Stoler
-
-let g:werewolf_day_themes = get(g:, 'werewolf_day_themes', [])
-let g:werewolf_night_themes = get(g:, 'werewolf_night_themes', [])
-let g:werewolf_day_start = get(g:, 'werewolf_day_start', 8)
-let g:werewolf_day_end = get(g:, 'werewolf_day_end', 20)
-let g:werewolf_change_automatically = get(g:, 'werewolf_change_automatically', 1)
-
-let s:werewolf_autocmd_allowed = 0
-
-function! Werewolf()
- if strftime("%H") >= g:werewolf_day_start && strftime("%H") < g:werewolf_day_end
- call Werewolf#transform(g:werewolf_night_themes, g:werewolf_day_themes)
- else
- call Werewolf#transform(g:werewolf_day_themes, g:werewolf_night_themes)
- endif
-endfunction
-
-function! Werewolf#transform(current, switch)
- let i = 0
- while i < len(a:current)
- if g:colors_name ==# a:current[i]
- execute "colorscheme " . a:switch[i]
- " if we don't do this check, Werewolf's own ColorScheme autocmd will
- " run infinitely; this limits when it happens
- if s:werewolf_autocmd_allowed
- doau ColorScheme Werewolf
- let s:werewolf_autocmd_allowed = 0
- endif
- return
- endif
- let i += 1
- endwhile
-endfunction
-
-function! WerewolfToggle()
- call Werewolf#colorschemeChanged()
-endfunction
-
-function! Werewolf#colorschemeChanged()
- let s:werewolf_autocmd_allowed = 0
- call Werewolf#transform(g:werewolf_day_themes + g:werewolf_night_themes, g:werewolf_night_themes + g:werewolf_day_themes)
-endfunction
-
-function! Werewolf#autoChange()
- if g:werewolf_change_automatically
- let s:werewolf_autocmd_allowed = 1
- call Werewolf()
- endif
-endfunction
-
-command! WerewolfTransform call Werewolf()
-command! WerewolfToggle call WerewolfToggle()
-command! -bang WerewolfAuto let g:werewolf_change_automatically = <bang>g:werewolf_change_automatically
-command! WerewolfOn let g:werewolf_change_automatically = 0
-command! WerewolfOff let g:werewolf_change_automatically = 1
-command! -nargs=1 WerewolfStart let g:werewolf_day_start = <args>
-command! -nargs=1 WerewolfEnd let g:werewolf_day_end = <args>
-
-augroup werewolf
- autocmd!
- autocmd ColorScheme * nested call Werewolf#colorschemeChanged()
- autocmd CursorMoved,CursorHold,CursorHoldI,WinEnter,WinLeave,FocusLost,FocusGained,VimResized,ShellCmdPost * nested call Werewolf#autoChange()
-augroup END
View
7 vimrc
@@ -277,12 +277,6 @@ if has("gui_running")
set cursorline
colorscheme hybrid
- let g:werewolf_change_automatically = 1
- let g:werewolf_day_start = 9
- let g:werewolf_day_end = 15
- let g:werewolf_day_themes = ['pyte']
- let g:werewolf_night_themes = ['hybrid']
-
"autocmd VimEnter * TagbarOpen
" Open VIM in fullscreen window
@@ -392,7 +386,6 @@ else
set t_Co=256
colorscheme Mustang
set mouse=a
- let g:werewolf_change_automatically = 0
endif

0 comments on commit a870c05

Please sign in to comment.