move pentadactyl to stow
parent
828f28f0f7
commit
a4915a7956
|
@ -1,2 +1,2 @@
|
|||
#!/usr/bin/env bash
|
||||
stow nix git x
|
||||
stow nix git x pentadactyl
|
||||
|
|
|
@ -4,6 +4,7 @@ colorscheme solarized-dark
|
|||
|
||||
set go+=N
|
||||
|
||||
source ~/dotfiles/pentadactyl/user.css
|
||||
|
||||
" feedly:
|
||||
group -description 'Feedly' -locations=feedly.com feedly
|
||||
|
@ -20,3 +21,9 @@ set passkeys+=github.com:"<CR>r?jks"
|
|||
" reddit:
|
||||
set passkeys+=reddit.com:"jk[]azp?.srfF"
|
||||
|
||||
|
||||
com -d "Delete duplicate tabs" tabcloseduplicates,tabclosed -js let seen={},vtabs=tabs.visibleTabs,i=vtabs.length;while(i--){let loc=vtabs[i].linkedBrowser.contentDocument.location.href||"";if(Object.prototype.hasOwnProperty.call(seen, loc)){config.tabbrowser.removeTab(vtabs[i]);}else{seen[loc]=true;}}
|
||||
|
||||
|
||||
" Open the current URL as an argument to mpv.
|
||||
nmap <S-u> -e :launchv
|
|
@ -0,0 +1,3 @@
|
|||
external
|
||||
plugins
|
||||
user.css
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"symlinks": [
|
||||
{
|
||||
"source": "pentadactylrc.symlink",
|
||||
"target": "~/.pentadactylrc"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
/* ~/.config/pentadactyl/plugins/launchv.js
|
||||
|
||||
From Earnestly.
|
||||
|
||||
Quick function to help reduce duplication in my config, thanks mostly to
|
||||
holomorph who started pretty much all of this.
|
||||
|
||||
Requires: livestreamer, mpv, youtube-dl.
|
||||
|
||||
Command:
|
||||
* :launchv Attempts to start the current buffer URL as a video.
|
||||
|
||||
Hint:
|
||||
* ;q Likewise but for the selected hint.
|
||||
*/
|
||||
|
||||
function launchv(target){
|
||||
// Escape anything which could be used to inject shell commands before
|
||||
// passing it to the commands.
|
||||
var uri = target.replace(/([$`"\\])/g, "\\$1");
|
||||
var mpv = "mpv --loop-file --cache-file=TMP";
|
||||
|
||||
function exec(launcher, uri){
|
||||
// If we're using pentadactyl then echo the action as io.system won't.
|
||||
if(typeof dactyl !== "undefined")
|
||||
dactyl.echomsg("Executing: " + launcher + " \"" + uri + "\"");
|
||||
|
||||
return io.system(launcher + ' "' + uri + '" &');
|
||||
}
|
||||
|
||||
// Filter certain urls to more appropriate programs
|
||||
if(uri.match(/twitch\.tv\/.*\/[bc]\/[0-9]+/))
|
||||
exec(mpv, uri);
|
||||
|
||||
else if(uri.match(/hitbox\.tv\/video\/[0-9]+/))
|
||||
exec(mpv, uri);
|
||||
|
||||
else if(uri.match(/(hitbox|twitch)\.tv/))
|
||||
exec("livestreamer", uri);
|
||||
|
||||
// For everything else.
|
||||
else
|
||||
exec(mpv, uri);
|
||||
}
|
||||
|
||||
hints.addMode("q", "Launch video from hint", function(elem, loc) launchv(loc));
|
||||
commands.add(["launchv", "lv"], "Launches current buffer video", function(args){launchv(buffer.URL);});
|
|
@ -0,0 +1,91 @@
|
|||
@-moz-document url-prefix(about:blank) {*{background-color:#002b36;}}
|
||||
|
||||
@-moz-document url-prefix("http://www.reddit.com/"), url-prefix("https://www.reddit.com/") {
|
||||
|
||||
body {
|
||||
/*position: relative;*/
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
html {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
.content {
|
||||
z-index: -1 !important;
|
||||
}
|
||||
.side {
|
||||
padding-left: 3px;
|
||||
padding-bottom: 3px;
|
||||
border-left: 1px solid rgb(230, 230, 230);
|
||||
border-bottom: 1px solid rgb(230, 230, 230);
|
||||
border-bottom-left-radius: 6px;
|
||||
|
||||
}
|
||||
|
||||
body>.content, body {
|
||||
/* This MUST apply to prevent showing stuff through the side bar */
|
||||
position: relative !important;
|
||||
}
|
||||
|
||||
.res-nightmode .side {
|
||||
border-left-color: rgb(102, 102, 102);
|
||||
border-bottom-color: rgb(102, 102, 102);
|
||||
|
||||
}
|
||||
|
||||
.side {
|
||||
margin-left: 0px !important;
|
||||
|
||||
margin-right: -280px !important;
|
||||
|
||||
z-index: 5;
|
||||
|
||||
|
||||
|
||||
opacity: 0.6;
|
||||
transition: opacity 0.5s, margin 0.5s;
|
||||
|
||||
transition-delay: 1s;
|
||||
|
||||
transition-timing-function: ease-in-out;
|
||||
|
||||
}
|
||||
|
||||
.side:hover, .side:focus {
|
||||
transition: opacity 0.2s, margin 0.2s;
|
||||
/* Apply a negative margin to the left to prevent the content from
|
||||
being shuffled around by the side bar */
|
||||
margin-left: -280px !important;
|
||||
margin-right: 0px !important;
|
||||
opacity: 1;
|
||||
transition-delay: 0s;
|
||||
|
||||
}
|
||||
|
||||
.content {
|
||||
margin-right: 40px !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@-moz-document url-prefix("https://news.ycombinator.com") {
|
||||
html,#hnmain {
|
||||
background-color: #002b36 !important;
|
||||
}
|
||||
|
||||
#hnmain > tbody > tr:first-child > td {
|
||||
background-color: #073642 !important;
|
||||
}
|
||||
|
||||
* {
|
||||
color: #839496 !important;
|
||||
font-family: "Source Code Pro";
|
||||
font-weight: 9pt;
|
||||
}
|
||||
|
||||
textarea,input {
|
||||
background-color: #002b36 !important;
|
||||
color: #839496;
|
||||
border: 1pt solid #586e75;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue