⚡ tridactyl (styles and 🔨)
This commit is contained in:
119
.config/tridactyl/tridactylrc
Normal file
119
.config/tridactyl/tridactylrc
Normal file
@ -0,0 +1,119 @@
|
||||
""" Tridactyl config file | Jan Andrle | 2024-02-28
|
||||
" General Settings
|
||||
set configversion 2.0
|
||||
set theme dark
|
||||
set modeindicatorshowkeys true
|
||||
set modeindicatormodes.ignore false
|
||||
set modeindicator true
|
||||
set hintfiltermode simple
|
||||
set hintchars fsahjklgyuiopqwertnmzxcvb
|
||||
set smoothscroll true
|
||||
|
||||
unbind zI
|
||||
unbind zM
|
||||
unbind zO
|
||||
unbind zR
|
||||
unbind zi
|
||||
unbind zm
|
||||
unbind zo
|
||||
unbind zr
|
||||
unbind zz
|
||||
bind zt hint -z
|
||||
bind zz composite hint -z ; scrollpage -0.5
|
||||
bind zb composite hint -z ; scrollpage -0.95
|
||||
bind gm scrollto 42.5 x
|
||||
bind gM scrollto 42.5 x
|
||||
bind 0zo zoom 1
|
||||
bind zo zoom 0.1 true
|
||||
bind §zo zoom 0.5 true
|
||||
bind zO zoom -0.1 true
|
||||
bind §zO zoom -0.5 true
|
||||
bind §§h scrollpx -1000
|
||||
bind §h scrollpx -500
|
||||
bind §l scrollpx 500
|
||||
bind §§l scrollpx 1000
|
||||
|
||||
" /?*# … search collising with native ui + another problems
|
||||
" https://gist.github.com/BurntSushi/393546a65db38d57cedcfd72c6d89bf3#file-tridactylrc-L18
|
||||
unbind <c-f> " pgdown for scrolling
|
||||
bind gi hint -Jc input,textarea,[contenteditable="true"]
|
||||
|
||||
unbindurl ^https://www.youtube.com/* >>
|
||||
unbindurl ^https://www.youtube.com/* <<
|
||||
" see https://gist.github.com/jaandrle/031198ab5130deb903065138532cc066
|
||||
bindurl ^https://www.youtube.com/* ss fillcmdline open B: YT
|
||||
bindurl ^https://www.o2tv.cz/* ss fillcmdline open B: O2
|
||||
bindurl ^https://chatgpt.com/* ss fillcmdline open B: OPENAI
|
||||
|
||||
|
||||
command pauseVideos js Array.from(document.querySelectorAll("video")).forEach(el=> ( location.hostname!=="www.o2tv.cz" ? el.pause() : [ "Pauza" ].map(l=> document.querySelector(`[aria-label=${l}]`)).find(Boolean)?.dispatchEvent(new Event("click")) ))
|
||||
tri.controller.acceptExCmd(`tabopen -c pracovní https://gist.github.com/jaandrle/ff1de72c500557f401e190b4ec05aa62#${document.title.replace(/["':|\.,\?\!_]/g, '').replace(/ /g, '-').toLowerCase()}`)
|
||||
bind ůp js (v=> { if(!v) return; v.paused ? v.play() : tri.controller.acceptExCmd("pauseVideos"); })(document.querySelector("video"))
|
||||
bind ůP js (v=> { if(!v) return; v.playbackRate ? (v.playbackRate= 0) : (v.playbackRate= 1); })(document.querySelector("video"))
|
||||
bind ůl js (v=> { if(!v) return; v.currentTime+= 15 })(document.querySelector("video"))
|
||||
bind ůh js (v=> { if(!v) return; v.currentTime-= 15 })(document.querySelector("video"))
|
||||
bind ůL fillcmdline_notrail js document.querySelector("video").currentTime+= 15*30
|
||||
bind ůůl fillcmdline_notrail js document.querySelector("video").currentTime+= 15*30
|
||||
bind ůk js (v=> { if(!v) return; v.playbackRate+= 0.25 })(document.querySelector("video"))
|
||||
bind ůj js (v=> { if(!v) return; v.playbackRate-= 0.25 })(document.querySelector("video"))
|
||||
bind ů= js (v=> { if(!v) return; v.playbackRate= 1 })(document.querySelector("video"))
|
||||
bind ůG js (v=> { if(!v) return; v.play(); v.currentTime= v.duration-10; setTimeout(()=> tri.controller.acceptExCmd("pauseVideos"), 5000); })(document.querySelector("video"))
|
||||
|
||||
unbind --mode=normal d
|
||||
bind dd tabclose
|
||||
|
||||
unbind --mode=normal s
|
||||
bind st fillcmdline_notrail tab
|
||||
|
||||
" h keyboardlayoutoverrides … https://gistpreview.github.io/?324119c773fac31651f6422087b36804
|
||||
" set keyboardlayoutoverrides "Digit2: ;, Backquote: :"
|
||||
set keytranslatemap {"ě":";",";":":"}
|
||||
bindurl ^https://mail.centrum.cz/* ;; composite hint_focus ; js document.activeElement.dispatchEvent(new CustomEvent("mouseover"))
|
||||
bind --mode=normal ;gt hint -c [tabindex]
|
||||
|
||||
bind š tab #
|
||||
bind sš fillcmdline tab
|
||||
|
||||
" b→t→n to make more consistent with gn*
|
||||
unbind --mode=normal b
|
||||
unbind --mode=normal B
|
||||
bind --mode=normal t fillcmdline tab
|
||||
bind --mode=normal T fillcmdline taball
|
||||
bind --mode=normal n fillcmdline tabopen
|
||||
bind --mode=normal N current_url tabopen
|
||||
|
||||
bind -c fillcmdline recontain
|
||||
bind sc fillcmdline_notrail container
|
||||
|
||||
bind --mode=visual \t composite js "https://libretranslate.com/?source=auto&target=cs&q="+encodeURI(document.getSelection().toString()) | tabopen
|
||||
bind --mode=visual \T composite js "https://translate.google.com/?sl=auto&tl=cs&op=translate&text="+encodeURI(document.getSelection().toString()) | tabopen
|
||||
bind --mode=normal \t composite js "http://translate.google.com/translate?js=n&tl=cs&u="+encodeURI(location.href) | tabopen
|
||||
|
||||
bind gnk tabopen -c osobní https://keep.google.com/u/0/#NOTE/1UXE_BEihe2EexHwZqEYA2oSdILLxF74SPcaLFMStfIpMkWPnStWJDQqH5C1TryJld_dC
|
||||
bind gok open -c osobní https://keep.google.com/u/0/#NOTE/1UXE_BEihe2EexHwZqEYA2oSdILLxF74SPcaLFMStfIpMkWPnStWJDQqH5C1TryJld_dC
|
||||
bind gwk winopen -c osobní https://keep.google.com/u/0/#NOTE/1UXE_BEihe2EexHwZqEYA2oSdILLxF74SPcaLFMStfIpMkWPnStWJDQqH5C1TryJld_dC
|
||||
bind gnC tabopen -c osobní https://calendar.google.com
|
||||
bind goC open -c osobní https://calendar.google.com
|
||||
bind gwC winopen -c osobní https://calendar.google.com
|
||||
|
||||
" Sites (mails) notes using Github Gists
|
||||
bind sn js tri.controller.acceptExCmd(`tabopen -c pracovní https://gist.github.com/jaandrle/ff1de72c500557f401e190b4ec05aa62#${document.title.replace(/["':|\.,\?\!_]/g, '').replace(/ /g, '-').toLowerCase()}`)
|
||||
bind sN composite clipboard yankmd ; tabopen -c pracovní https://gist.github.com/jaandrle/ff1de72c500557f401e190b4ec05aa62/edit
|
||||
bindurl ^https://mail.centrum.cz/* sn js tri.controller.acceptExCmd(`tabopen -c pracovní https://gist.github.com/jaandrle/ff1de72c500557f401e190b4ec05aa62#${(new URLSearchParams(window.location.search)).get("msg")}`)
|
||||
bindurl ^https://mail.centrum.cz/* sN composite js tri.controller.acceptExCmd(`clipboard yank [${(new URLSearchParams(window.location.search)).get("msg")}](https://mail.centrum.cz/?msg=${(new URLSearchParams(window.location.search)).get("msg")})`) ; tabopen -c pracovní https://gist.github.com/jaandrle/ff1de72c500557f401e190b4ec05aa62/edit
|
||||
|
||||
alias hint_focus hint -;
|
||||
quickmark c moz-extension://616498c0-3916-4f0b-b0a9-ce01ecf2298d/popup.html
|
||||
|
||||
command mastodonUncoverAll composite hint_focus .scrollable ; js (onclick=document.createEvent("Events"), onclick.initEvent("click", true, false), Array.from(document.activeElement.getElementsByClassName("status__content__spoiler-link")).forEach(el=> el.dispatchEvent(onclick)))
|
||||
command mastodonRedirectHome js const parts = location.pathname.split('/'); if(parts.length===2) location.href= `https://fosstodon.org/${parts[1]}@${location.host}`; else location.href= `https://fosstodon.org/authorize_interaction?uri=${location.href}`;
|
||||
bind sm fillcmdline_notrail mastodon
|
||||
|
||||
command data_delall composite hint_focus * ; js document.activeElement.querySelectorAll("input").forEach(el=> el.checked=false)
|
||||
|
||||
command scrollblur js tri.scrolling.setCurrentFocus(document.documentElement || document.body)
|
||||
autocmd DocLoad https://user.centrum.cz/?url=http%3A%2F%2Fmail.centrum.cz open https://mail.centrum.cz/?fld=-666
|
||||
|
||||
" For syntax highlighting see https://github.com/tridactyl/vim-tridactyl
|
||||
" vim: set filetype=tridactyl
|
||||
" vim: set ft=vim :
|
Reference in New Issue
Block a user