Преглед изворни кода

Add tridactylrc

Vimperator is dead, long live Vimperator! All basic customisation
re-implemented in Tridactyl.

`.tridactylrc` requires Tridactyl's native messenger to be installed in
order to get read. `:installnative` provides the bash command to do
this.
cinaeco пре 7 година
родитељ
комит
d7c0e81b8a
4 измењених фајлова са 52 додато и 8 уклоњено
  1. 7 2
      Makefile
  2. 6 6
      README.md
  3. 3 0
      install
  4. 36 0
      tridactyl/tridactylrc

+ 7 - 2
Makefile

@@ -2,8 +2,8 @@
 # dotfiles setup. Run `make install` to perform all setup tasks.
 
 # Groups of targets
-all = git bash zsh tmux ack vimperator vim
-rm-all = rm-git rm-bash rm-zsh rm-tmux rm-ack rm-vimperator rm-vim
+all = git bash zsh tmux ack vimperator tridactyl vim
+rm-all = rm-git rm-bash rm-zsh rm-tmux rm-ack rm-vimperator rm-tridactyl rm-vim
 aux = help install uninstall upgrade show-versions submodules xdg
 .PHONY: $(all) $(rm-all) $(aux)
 
@@ -78,6 +78,11 @@ rm-vimperator:
 	rm ~/.vimperator
 	rm ~/.vimperatorrc
 
+tridactyl:
+	@./bin/linkup ~/dotfiles/tridactyl/tridactylrc ~/.tridactylrc
+rm-tridactyl:
+	rm ~/.tridactylrc
+
 vim: xdg
 	@./bin/linkup ~/dotfiles/vim ~/.vim
 	@./bin/linkup ~/dotfiles/vim/vimrc ~/.vimrc

+ 6 - 6
README.md

@@ -4,7 +4,7 @@ Configuration files for:
 
 - Bash (3.2+) and Zsh (4.3.17+)
 - Vim (7+) and NeoVim
-- Vimperator (3.8+)
+- Vimperator (3.8+) and Tridactyl
 - Tmux (1.8+)
 - Other bits and pieces
 
@@ -90,7 +90,7 @@ Below is a non-exhaustive list of dotfiles usage.
 - `<C-a><C-s>` swaps between sessions.
 - Mouse support works for selecting and resizing panes/windows.
 
-### Vimperator
+### Vimperator and Tridactyl
 
 Apart from the default Vimperator goodness e.g.
 
@@ -98,9 +98,9 @@ Apart from the default Vimperator goodness e.g.
 - `f` and `F` follow links on this tab/in a new tab.
 - et cetera...
 
-These dotfiles provide the following:
+These dotfiles provide a dark theme and the following binding changes:
 
-- `h` and `l` - move left and right between tabs.
-- `j` and `k` - scroll the page down and up.
-- `H`, `J`, `K`, `L` - scroll the page slowly (left, down, up, right).
+- `h` and `l` - change between tabs (left and right).
+- `j` and `k` - scroll by a half-page (down and up).
+- `H`, `J`, `K`, `L` - scroll slowly (left, down, up, right).
 - `<C-h>` and `<C-l>` - relocate a tab left and right.

+ 3 - 0
install

@@ -36,6 +36,9 @@ echo "Git config done."
 ~/dotfiles/bin/linkup ~/dotfiles/vimperator ~/.vimperator
 ~/dotfiles/bin/linkup ~/dotfiles/vimperator/vimperatorrc ~/.vimperatorrc
 
+# Tridactyl
+~/dotfiles/bin/linkup ~/dotfiles/tridactyl/tridactylrc ~/.tridactylrc
+
 # Vim
 ~/dotfiles/bin/linkup ~/dotfiles/vim ~/.vim
 ~/dotfiles/bin/linkup ~/dotfiles/vim/vimrc ~/.vimrc

+ 36 - 0
tridactyl/tridactylrc

@@ -0,0 +1,36 @@
+set theme dark
+
+set searchengine duckduckgo
+
+" Vimperator-style hints
+set hintfiltermode vimperator-reflow
+set hintnames numeric
+
+" Make Tridactyl work on more sites at the expense of some security
+set csp clobber
+fixamo
+
+" Sanity before custom bindings
+reset all
+
+" Change between tabs
+bind l tabnext_gt
+bind h tabprev
+
+" Scroll by half page
+bind j scrollpage 0.5
+bind k scrollpage -0.5
+
+" Scroll slowly
+bind H scrollpx -50
+bind J scrollline 5
+bind K scrollline -5
+bind L scrollpx 50
+
+" Relocate tabs
+bind <c-l>  tabmove +1
+bind <c-h>  tabmove -1
+
+" Go forwards and backwards through history
+bind <c-o> back
+bind <c-i> forward