From 38b339e506f75d380ea7ad6b98eb8bc0782c9a62 Mon Sep 17 00:00:00 2001 From: xyz Date: Sat, 11 Sep 2021 00:17:10 -0700 Subject: firefox surfingkeys extension config, move from gist to github --- .config/myconf/surfingkeys_config.js | 79 ++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 .config/myconf/surfingkeys_config.js (limited to '.config/myconf/surfingkeys_config.js') diff --git a/.config/myconf/surfingkeys_config.js b/.config/myconf/surfingkeys_config.js new file mode 100644 index 00000000..babaeb05 --- /dev/null +++ b/.config/myconf/surfingkeys_config.js @@ -0,0 +1,79 @@ + +// old example config, may not work. also, I change ctrl-y to Ctrl-y +// an example to create a new mapping `ctrl-y` +//mapkey('', 'Show me the money', function() { +// Front.showPopup('a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close).'); +//}); +// an example to replace `T` with `gt`, click `Default mappings` to see how `T` works. +//map('gt', 'T'); + +// I choose to use , , or

instead. I prefer

+//settings.blacklistPattern = /.*youtube\.com.*|.*mail\.google\.com.*/i; + +//unmap(''); +map('',''); +unmap(''); +map('',''); +unmap(''); +// disable emoji +iunmap(':'); +// disable all insert mode hotkeys +iunmap(''); +iunmap(''); +iunmap(''); +iunmap(''); +iunmap(""); +iunmap(''); +iunmap(''); +iunmap(''); +iunmap(''); + +mapkey('n','Find next then center cursor', function(){ + Visual.next(false); + Visual.feedkeys('zz'); +}); + +mapkey('N','Find previous then center cursor', function(){ + Visual.next(true); + Visual.feedkeys('zz'); +}); + +// set theme +settings.theme = ` +.sk_theme { + font-family: Input Sans Condensed, Charcoal, sans-serif; + font-size: 10pt; + background: #24272e; + color: #abb2bf; +} +.sk_theme tbody { + color: #fff; +} +.sk_theme input { + color: #d0d0d0; +} +.sk_theme .url { + color: #61afef; +} +.sk_theme .annotation { + color: #56b6c2; +} +.sk_theme .omnibar_highlight { + color: #528bff; +} +.sk_theme .omnibar_timestamp { + color: #e5c07b; +} +.sk_theme .omnibar_visitcount { + color: #98c379; +} +.sk_theme #sk_omnibarSearchResult ul li:nth-child(odd) { + background: #303030; +} +.sk_theme #sk_omnibarSearchResult ul li.focused { + background: #3e4452; +} +#sk_status, #sk_find { + font-size: 16pt; +}`; +// click `Save` button to make above settings to take effect. -- cgit v1.2.3-70-g09d2 From 7d8255bdb7c953eea7e2384d3ca2deebf06e2dde Mon Sep 17 00:00:00 2001 From: xyz Date: Sat, 11 Sep 2021 00:27:54 -0700 Subject: refactor --- .config/myconf/surfingkeys_config.js | 1 + 1 file changed, 1 insertion(+) (limited to '.config/myconf/surfingkeys_config.js') diff --git a/.config/myconf/surfingkeys_config.js b/.config/myconf/surfingkeys_config.js index babaeb05..9d6329f7 100644 --- a/.config/myconf/surfingkeys_config.js +++ b/.config/myconf/surfingkeys_config.js @@ -18,6 +18,7 @@ unmap(''); // disable emoji iunmap(':'); // disable all insert mode hotkeys +// workaround for surfingkey Ctrl-i can't open firenvim, even with `settings.useNeovim = true;`, not sure why, I just use Ctrl-e for firenvim instead iunmap(''); iunmap(''); iunmap(''); -- cgit v1.2.3-70-g09d2 From 9a50b3d72c8e0a992733ba93495d0a585f3f3950 Mon Sep 17 00:00:00 2001 From: xyz Date: Sat, 11 Sep 2021 16:35:46 -0700 Subject: surfingkeys default use firenvim, firenvim default must be invoke with hotkey --- .config/myconf/surfingkeys_config.js | 3 ++- .config/nvim/init.vim | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to '.config/myconf/surfingkeys_config.js') diff --git a/.config/myconf/surfingkeys_config.js b/.config/myconf/surfingkeys_config.js index 9d6329f7..c4fc95f1 100644 --- a/.config/myconf/surfingkeys_config.js +++ b/.config/myconf/surfingkeys_config.js @@ -19,6 +19,8 @@ unmap(''); iunmap(':'); // disable all insert mode hotkeys // workaround for surfingkey Ctrl-i can't open firenvim, even with `settings.useNeovim = true;`, not sure why, I just use Ctrl-e for firenvim instead +settings.useNeovim = true; +//iunmap(''); iunmap(''); iunmap(''); iunmap(''); @@ -26,7 +28,6 @@ iunmap(''); iunmap(""); iunmap(''); iunmap(''); -iunmap(''); iunmap(''); mapkey('n','Find next then center cursor', function(){ diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index a7589777..caa8ea64 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -18,6 +18,9 @@ Plug 'fnune/base16-vim' "Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} " We recommend updating the parsers on update call plug#end() +" next line must put below `Plug 'glacambre/firenvim'`, else if click github issue textarea, then click elsewhere, then click textarea, textarea will not be selected (no cursor in it), not sure why +let g:firenvim_config = { 'localSettings': { '.*': { 'takeover': 'never' } } } + " I use only one return for better readability function Autocmd_set_fenc() " need to test &modifiable for gO -- cgit v1.2.3-70-g09d2 From c3519a383dd8a3ccf1c55854207802f6a9f162d0 Mon Sep 17 00:00:00 2001 From: xyz Date: Sat, 11 Sep 2021 16:45:56 -0700 Subject: try conf.useNeovim --- .config/myconf/surfingkeys_config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.config/myconf/surfingkeys_config.js') diff --git a/.config/myconf/surfingkeys_config.js b/.config/myconf/surfingkeys_config.js index c4fc95f1..4eb2d696 100644 --- a/.config/myconf/surfingkeys_config.js +++ b/.config/myconf/surfingkeys_config.js @@ -19,7 +19,7 @@ unmap(''); iunmap(':'); // disable all insert mode hotkeys // workaround for surfingkey Ctrl-i can't open firenvim, even with `settings.useNeovim = true;`, not sure why, I just use Ctrl-e for firenvim instead -settings.useNeovim = true; +conf.useNeovim = true; //iunmap(''); iunmap(''); iunmap(''); -- cgit v1.2.3-70-g09d2 From e292a0b5c3807f9f35a7e544535341fa866c71d9 Mon Sep 17 00:00:00 2001 From: xyz Date: Sat, 11 Sep 2021 16:47:29 -0700 Subject: refactor --- .config/myconf/surfingkeys_config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.config/myconf/surfingkeys_config.js') diff --git a/.config/myconf/surfingkeys_config.js b/.config/myconf/surfingkeys_config.js index 4eb2d696..38f4d2de 100644 --- a/.config/myconf/surfingkeys_config.js +++ b/.config/myconf/surfingkeys_config.js @@ -19,7 +19,7 @@ unmap(''); iunmap(':'); // disable all insert mode hotkeys // workaround for surfingkey Ctrl-i can't open firenvim, even with `settings.useNeovim = true;`, not sure why, I just use Ctrl-e for firenvim instead -conf.useNeovim = true; +useNeovim = true; //iunmap(''); iunmap(''); iunmap(''); -- cgit v1.2.3-70-g09d2 From 11cde399d33c67db83b7659ffb186efcc64a2c94 Mon Sep 17 00:00:00 2001 From: xyz Date: Sat, 11 Sep 2021 16:52:09 -0700 Subject: refactor --- .config/myconf/surfingkeys_config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.config/myconf/surfingkeys_config.js') diff --git a/.config/myconf/surfingkeys_config.js b/.config/myconf/surfingkeys_config.js index 38f4d2de..c4fc95f1 100644 --- a/.config/myconf/surfingkeys_config.js +++ b/.config/myconf/surfingkeys_config.js @@ -19,7 +19,7 @@ unmap(''); iunmap(':'); // disable all insert mode hotkeys // workaround for surfingkey Ctrl-i can't open firenvim, even with `settings.useNeovim = true;`, not sure why, I just use Ctrl-e for firenvim instead -useNeovim = true; +settings.useNeovim = true; //iunmap(''); iunmap(''); iunmap(''); -- cgit v1.2.3-70-g09d2 From ea73a976cbb557146843ab12fcadc4b0242de73f Mon Sep 17 00:00:00 2001 From: xyz Date: Sat, 11 Sep 2021 18:23:35 -0700 Subject: refactor --- .config/myconf/surfingkeys_config.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to '.config/myconf/surfingkeys_config.js') diff --git a/.config/myconf/surfingkeys_config.js b/.config/myconf/surfingkeys_config.js index c4fc95f1..67a79466 100644 --- a/.config/myconf/surfingkeys_config.js +++ b/.config/myconf/surfingkeys_config.js @@ -15,11 +15,12 @@ map('',''); unmap(''); map('',''); unmap(''); +// current surfingkeys version 0.9.74 doesn't contain firenvim integration, wait for author to update +// I tried to run the source code as temp extension in about:debugging or with web-ext cli tool but no luck +settings.useNeovim = true; // disable emoji iunmap(':'); -// disable all insert mode hotkeys -// workaround for surfingkey Ctrl-i can't open firenvim, even with `settings.useNeovim = true;`, not sure why, I just use Ctrl-e for firenvim instead -settings.useNeovim = true; +// disable all insert mode hotkeys except Ctrl-i //iunmap(''); iunmap(''); iunmap(''); -- cgit v1.2.3-70-g09d2 From 1065096de82ac9dc0c053efcbf78c39cd2e2584d Mon Sep 17 00:00:00 2001 From: xyz Date: Sun, 12 Sep 2021 00:16:29 -0700 Subject: refactor --- .config/myconf/surfingkeys_config.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to '.config/myconf/surfingkeys_config.js') diff --git a/.config/myconf/surfingkeys_config.js b/.config/myconf/surfingkeys_config.js index 67a79466..fdf3e2de 100644 --- a/.config/myconf/surfingkeys_config.js +++ b/.config/myconf/surfingkeys_config.js @@ -15,12 +15,16 @@ map('',''); unmap(''); map('',''); unmap(''); -// current surfingkeys version 0.9.74 doesn't contain firenvim integration, wait for author to update + +// on firefox, firenvim default Ctrl-e will be overwirted by github issue hotkey, see: +// https://github.com/glacambre/firenvim/issues/1046 +// https://bugzilla.mozilla.org/show_bug.cgi?id=1713794 +// currently seems no good solution but to use another hotkey, I choose Ctrl+, +// current surfingkeys version 0.9.74 is outdated and doesn't contain firenvim integration, wait for author to update // I tried to run the source code as temp extension in about:debugging or with web-ext cli tool but no luck settings.useNeovim = true; -// disable emoji -iunmap(':'); -// disable all insert mode hotkeys except Ctrl-i + +// disable all insert mode hotkeys except Ctrl-i for future firenvim integration //iunmap(''); iunmap(''); iunmap(''); @@ -30,6 +34,8 @@ iunmap(""); iunmap(''); iunmap(''); iunmap(''); +// disable emoj +iunmap(':'); mapkey('n','Find next then center cursor', function(){ Visual.next(false); -- cgit v1.2.3-70-g09d2 From 09d58a1640a6cab06742c9715200f15ddcffae4d Mon Sep 17 00:00:00 2001 From: xyz Date: Sun, 10 Oct 2021 16:15:04 -0700 Subject: surfingkeys disable smoothScroll due to firefox RFP --- .config/myconf/surfingkeys_config.js | 3 +++ 1 file changed, 3 insertions(+) (limited to '.config/myconf/surfingkeys_config.js') diff --git a/.config/myconf/surfingkeys_config.js b/.config/myconf/surfingkeys_config.js index fdf3e2de..f72ac429 100644 --- a/.config/myconf/surfingkeys_config.js +++ b/.config/myconf/surfingkeys_config.js @@ -47,6 +47,9 @@ mapkey('N','Find previous then center cursor', function(){ Visual.feedkeys('zz'); }); +// with firefox RFP enabled in user.js, smooth scroll and gg/G do not work, firefox RFP's feature +settings.smoothScroll = false; + // set theme settings.theme = ` .sk_theme { -- cgit v1.2.3-70-g09d2 From 61bfd06392f72083e788f3a4757672d8a1f20fbb Mon Sep 17 00:00:00 2001 From: xyz Date: Mon, 25 Oct 2021 01:54:07 -0700 Subject: test --- .config/myconf/surfingkeys_config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.config/myconf/surfingkeys_config.js') diff --git a/.config/myconf/surfingkeys_config.js b/.config/myconf/surfingkeys_config.js index f72ac429..55677946 100644 --- a/.config/myconf/surfingkeys_config.js +++ b/.config/myconf/surfingkeys_config.js @@ -1,4 +1,4 @@ - +//test // old example config, may not work. also, I change ctrl-y to Ctrl-y // an example to create a new mapping `ctrl-y` //mapkey('', 'Show me the money', function() { -- cgit v1.2.3-70-g09d2 From cba7342270e7c4c8d37b7d49b06f45836229bf50 Mon Sep 17 00:00:00 2001 From: xyz Date: Mon, 25 Oct 2021 02:05:00 -0700 Subject: test --- .config/myconf/surfingkeys_config.js | 1 - 1 file changed, 1 deletion(-) (limited to '.config/myconf/surfingkeys_config.js') diff --git a/.config/myconf/surfingkeys_config.js b/.config/myconf/surfingkeys_config.js index 55677946..c0a0ef20 100644 --- a/.config/myconf/surfingkeys_config.js +++ b/.config/myconf/surfingkeys_config.js @@ -1,4 +1,3 @@ -//test // old example config, may not work. also, I change ctrl-y to Ctrl-y // an example to create a new mapping `ctrl-y` //mapkey('', 'Show me the money', function() { -- cgit v1.2.3-70-g09d2 From c32a8feaabe532192843c6ddbd08f2bdf3a9ba84 Mon Sep 17 00:00:00 2001 From: xyz Date: Thu, 9 Dec 2021 14:13:44 -0800 Subject: surfingkey comment, fix user-overrides.js --- .config/myconf/surfingkeys_config.js | 1 + .mozilla/firefox/xxxxxxxx.fly/user-overrides.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to '.config/myconf/surfingkeys_config.js') diff --git a/.config/myconf/surfingkeys_config.js b/.config/myconf/surfingkeys_config.js index c0a0ef20..43316ffa 100644 --- a/.config/myconf/surfingkeys_config.js +++ b/.config/myconf/surfingkeys_config.js @@ -12,6 +12,7 @@ //unmap(''); map('',''); unmap(''); +// ctrl-alt-s not working now (12/09/2021), not sure why, maybe arkenfox user.js problem? map('',''); unmap(''); diff --git a/.mozilla/firefox/xxxxxxxx.fly/user-overrides.js b/.mozilla/firefox/xxxxxxxx.fly/user-overrides.js index 6cd94308..2cc24fb8 100644 --- a/.mozilla/firefox/xxxxxxxx.fly/user-overrides.js +++ b/.mozilla/firefox/xxxxxxxx.fly/user-overrides.js @@ -27,7 +27,8 @@ user_pref("extensions.webextensions.restrictedDomains", ""); user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true); // let tree style tab background dark with arc-dark linux theme // i'm not using TST now, but it still might be useful for other extensions -user_pref("widget.content.allow-gtk-dark-theme", true); +// however, starting from around firefox 95, this makes some site show dark background with light theme fonts? so not using it now +//user_pref("widget.content.allow-gtk-dark-theme", true); // when refresh searx page, no window will pop up and ask for resend // https://www.reddit.com/r/firefox/comments/nnluzz/disable_to_display_this_page_firefox_must_send/gzyoia4?utm_source=share&utm_medium=web2x&context=3 user_pref("dom.confirm_repost.testing.always_accept", true); -- cgit v1.2.3-70-g09d2