summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--pentadactyl/plugins/pinboard.js78
-rw-r--r--pentadactylrc63
-rw-r--r--vimfx/config.js26
-rw-r--r--vimfx/frame.js0
5 files changed, 27 insertions, 143 deletions
diff --git a/Makefile b/Makefile
index 2f6740b..f17f660 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,6 @@ INSTALL = agignore \
nethackrc \
notmuch-config \
offlineimaprc \
- pentadactylrc \
procmailrc \
proverc \
replyrc \
@@ -53,7 +52,6 @@ INSTALL = agignore \
ncmpc \
procmail \
offlineimap \
- pentadactyl \
services \
ssh \
taeb \
@@ -61,6 +59,7 @@ INSTALL = agignore \
themes \
urxvt \
vim \
+ vimfx \
weechat \
zsh
INSTALLED = $(patsubst %,$(INTO)/.%,$(INSTALL))
diff --git a/pentadactyl/plugins/pinboard.js b/pentadactyl/plugins/pinboard.js
deleted file mode 100644
index 6bfb5f8..0000000
--- a/pentadactyl/plugins/pinboard.js
+++ /dev/null
@@ -1,78 +0,0 @@
-(function() {
-
- function buildURL(url, queries) {
- var result = [url];
- for (var i = 0; i < queries.length; i++)
- if (queries[i][1])
- result.push('&', queries[i][0], '=', encodeURIComponent(queries[i][1]));
- return result.join("");
- }
-
- function httpPost(url, callback) {
- try {
- let xmlhttp = new XMLHttpRequest();
- if (callback)
- xmlhttp.onreadystatechange = function() {
- if (xmlhttp.readyState == 4)
- callback(xmlhttp);
- }
- xmlhttp.open('POST', url, !!callback);
- xmlhttp.send(null);
- return xmlhttp;
- } catch (e) {
- dactyl.log('Error opening ' + url + ': ' + e, 1);
- }
- }
- group.commands.add(['p[board]'], 'Bookmark page at pinboard.in', function(args) {
- var url = buffer.URL;
- var description = args['-description'] || buffer.title || url;
- var note = args['-note'] || String(window.content.getSelection());
- var shared = args['-private'] ? 'no' : null;
-
- httpPost(buildURL('https://api.pinboard.in/v1/posts/add?',
- [['url', url],
- ['description', description],
- ['extended', note],
- ['tags', args.join(" ")],
- ['shared', shared],
- ['toread', args.length ? 'no' : 'yes']]), function(xhr) {
- var result = xhr.status == 200 ?
- xhr.responseXML.documentElement.getAttribute('code') :
- 'failed with status ' + xhr.status;
- dactyl.echo('Bookmarking ' + url + ' at pinboard.in ' + result);
- });
- }, {
- argCount: '*',
- options: [[['-description', '-d'], commands.OPTION_STRING, null, function() [[buffer.title]]],
- [['-note', '-n'], commands.OPTION_STRING, null, null],
- [['-private', '-p'], commands.OPTION_NOARG]],
- completer: function(context) {
- if (context.result) {
- context.completions = context.result;
- return;
- }
-
- context.title = ['Tags', 'Type'];
- context.incomplete = true;
-
- var xhr = util.httpGet(buildURL('https://api.pinboard.in/v1/posts/suggest?',
- [['url', buffer.URL]]), function(xhr) {
- context.incomplete = false;
-
- if (xhr.status != 200) {
- context.completions = context.result = [];
- return;
- }
-
- var result = [];
- var tags = xhr.responseXML.documentElement.getElementsByTagName('*');
- for (var i = 0; i < tags.length; i++)
- result.push([tags[i].textContent, tags[i].localName]);
-
- context.completions = context.result = result;
- });
- context.cancel = function() xhr.abort();
- }
- }, true);
-
-})();
diff --git a/pentadactylrc b/pentadactylrc
deleted file mode 100644
index eab35b3..0000000
--- a/pentadactylrc
+++ /dev/null
@@ -1,63 +0,0 @@
-map ; <Leader>
-map -builtin \" ;
-
-" single line status/command bar
-set go-=C
-
-" scrolling
-map H :bp<CR>
-map L :bn<CR>
-map J 20j
-map K 20k
-
-" navigation
-map <C-h> :back<CR>
-map <C-L> :forward<CR>
-
-" disable autocompletion entirely
-set au=
-" when completing, only show 5 at a time
-set maxitems=5
-
-" prettier hint numbering
-highlight Hint -append font-size:11px;font-weight:bold;background:#fff;border:1px solid red;color:#000;font-family:monospace
-set hintkeys=")!@#$%^&*("
-
-" backspace to open panorama
-map <BS> <C-v><C-S-e>
-map <C-f><C-f> <C-v><C-S-e>
-
-" default to using the 'g' search keyword
-set defsearch=g
-
-" highlight all matches, but let them be hidden
-set hlfind
-nmap <Leader>/ :nohlfind<CR>
-
-" reactivate `` - can't actually use ` mark since pentadactyl wants letter
-" registers only
-nmap -builtin gg mpgg
-nmap -builtin G mpG
-map `` `p
-
-map a :pb
-
-map , :
-nmap ) 0
-
-" no beeps
-javascript dactyl.beep = function() { return false; }
-
-command! wish js add_to_amazon_wishlist();
-:js <<EOJS
- add_to_amazon_wishlist = function() {
- var amazon_wishlist_url = 'http://www.amazon.com/wishlist/add'
- + '?u=' + encodeURIComponent(window.getBrowser().currentURI.spec)
- + '&t=' + encodeURIComponent(window.getBrowser().contentDocument.title);
- window.open(amazon_wishlist_url, 'amzwishlist', 'width=900,height=553');
- }
-EOJS
-
-command! pocket -description "Save to Pocket" open javascript:(function(){var%20e=function(t,n,r,i,s){var%20o=[6319846,4892661,2357932,4651859,2918433,4530642,6436060,3138334,5448248,2923100];var%20i=i||0,u=0,n=n||[],r=r||0,s=s||0;var%20a={'a':97,'b':98,'c':99,'d':100,'e':101,'f':102,'g':103,'h':104,'i':105,'j':106,'k':107,'l':108,'m':109,'n':110,'o':111,'p':112,'q':113,'r':114,'s':115,'t':116,'u':117,'v':118,'w':119,'x':120,'y':121,'z':122,'A':65,'B':66,'C':67,'D':68,'E':69,'F':70,'G':71,'H':72,'I':73,'J':74,'K':75,'L':76,'M':77,'N':78,'O':79,'P':80,'Q':81,'R':82,'S':83,'T':84,'U':85,'V':86,'W':87,'X':88,'Y':89,'Z':90,'0':48,'1':49,'2':50,'3':51,'4':52,'5':53,'6':54,'7':55,'8':56,'9':57,'\/':47,':':58,'?':63,'=':61,'-':45,'_':95,'&':38,'$':36,'!':33,'.':46};if(!s||s==0){t=o[0]+t}for(var%20f=0;f<t.length;f++){var%20l=function(e,t){return%20a[e[t]]?a[e[t]]:e.charCodeAt(t)}(t,f);if(!l*1)l=3;var%20c=l*(o[i]+l*o[u%o.length]);n[r]=(n[r]?n[r]+c:c)+s+u;var%20p=c%(50*1);if(n[p]){var%20d=n[r];n[r]=n[p];n[p]=d}u+=c;r=r==50?0:r+1;i=i==o.length-1?0:i+1}if(s==300){var%20v='';for(var%20f=0;f<n.length;f++){v+=String.fromCharCode(n[f]%(25*1)+97)}o=function(){};return%20v+'0fe87e4d2b'}else{return%20e(u+'',n,r,i,s+1)}};var%20t=document,n=t.location.href,r=t.title;var%20i=e(n);var%20s=t.createElement('script');s.type='text/javascript';s.src='https://getpocket.com/b/r4.js?h='+i+'&u='+encodeURIComponent(n)+'&t='+encodeURIComponent(r);e=i=function(){};var%20o=t.getElementsByTagName('head')[0]||t.documentElement;o.appendChild(s)})()
-
-" vim:ft=vim:
diff --git a/vimfx/config.js b/vimfx/config.js
new file mode 100644
index 0000000..cc768f4
--- /dev/null
+++ b/vimfx/config.js
@@ -0,0 +1,26 @@
+vimfx.set('mode.normal.copy_current_url', 'y');
+vimfx.set('mode.normal.history_back', '<C-h>');
+vimfx.set('mode.normal.history_forward', '<C-l>');
+
+vimfx.set('mode.normal.scroll_half_page_down', 'J');
+vimfx.set('mode.normal.scroll_half_page_up', 'K');
+vimfx.set('mode.normal.scroll_to_left', '0 ) _');
+vimfx.set('mode.normal.scroll_to_mark', '\'');
+
+vimfx.set('mode.normal.tab_select_previous', 'H');
+vimfx.set('mode.normal.tab_select_next', 'L');
+vimfx.set('mode.normal.tab_close', 'd');
+vimfx.set('mode.normal.tab_restore', 'u');
+
+vimfx.set('mode.normal.enter_mode_ignore', '<C-v>');
+vimfx.set('mode.normal.dev', ': ,');
+
+vimfx.set('notify_entered_keys', true);
+vimfx.set('smoothScroll.lines.spring-constant', '400');
+vimfx.set('smoothScroll.pages.spring-constant', '2000');
+vimfx.set('scroll.last_position_mark', '\'');
+
+// XXX pocket
+// XXX tab groups
+// XXX search existing buffers (possible? or is awesomebar fine?)
+// XXX quit?
diff --git a/vimfx/frame.js b/vimfx/frame.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/vimfx/frame.js