Compare commits
7 Commits
77682d7b8f
...
3216589f1f
Author | SHA1 | Date |
---|---|---|
Yorick van Pelt | 3216589f1f | |
Yorick van Pelt | 38875c2ad5 | |
Yorick van Pelt | eb47a5b33e | |
Yorick van Pelt | 99b6d412bd | |
Yorick van Pelt | ddd8511539 | |
Yorick van Pelt | b129a221b6 | |
Yorick van Pelt | 71a1d484a9 |
|
@ -1,3 +0,0 @@
|
|||
[submodule "pentadactyl/external/pentadactyl-solarized"]
|
||||
path = pentadactyl/external/pentadactyl-solarized
|
||||
url = https://github.com/claytron/pentadactyl-solarized
|
19
bash/.bashrc
19
bash/.bashrc
|
@ -10,8 +10,25 @@ shopt -s histappend
|
|||
HISTSIZE=100000
|
||||
HISTFILESIZE=200000
|
||||
|
||||
alias nr="nix-repl '<nixpkgs>'"
|
||||
alias nr="nix repl '<nixpkgs>'"
|
||||
alias ns="nix-shell"
|
||||
alias nsp="nix-shell -p"
|
||||
alias niA="nix-env -iA nixos."
|
||||
alias subl="sublime3"
|
||||
|
||||
# eval $(thefuck --alias)
|
||||
|
||||
function fuck () {
|
||||
TF_PYTHONIOENCODING=$PYTHONIOENCODING;
|
||||
export TF_ALIAS=fuck;
|
||||
export TF_SHELL_ALIASES=$(alias);
|
||||
export TF_HISTORY=$(fc -ln -10);
|
||||
export PYTHONIOENCODING=utf-8;
|
||||
TF_CMD=$(
|
||||
thefuck THEFUCK_ARGUMENT_PLACEHOLDER $@
|
||||
) && eval $TF_CMD;
|
||||
unset TF_HISTORY;
|
||||
export PYTHONIOENCODING=$TF_PYTHONIOENCODING;
|
||||
history -s $TF_CMD;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
nix build --no-link -f '<nixpkgs>' hosts.$(hostname -s)
|
||||
nix-env -iA nixos.hosts.$(hostname -s)
|
||||
|
|
|
@ -165,6 +165,11 @@
|
|||
(put 'sfp-page-up 'isearch-scroll t)
|
||||
(put 'sfp-page-up 'CUA 'move)
|
||||
(setq scroll-error-top-bottom t)
|
||||
#+END_SRC
|
||||
** fix c-z
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(global-unset-key (kbd "C-z"))
|
||||
|
||||
#+END_SRC
|
||||
** Ivy
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
|
|
|
@ -23,3 +23,5 @@
|
|||
signingkey = A36E70F9DC014A15
|
||||
[help]
|
||||
autocorrect = 5
|
||||
[includeIf "gitdir:~/serokell/"]
|
||||
path=~/serokell/.gitconfig
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
enable-ssh-support
|
||||
extra-socket /home/yorick/.gnupg/S.gpg-agent.extra
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{writeTextDir, writeScript, lib,
|
||||
rofi, xss-lock, nitrogen, compton-git, i3status, i3-gaps
|
||||
,i3lock-color, xset, alsaUtils, light, screenshot_public, xorg, libinput-gestures,
|
||||
haskellPackages, polybar, procps,
|
||||
rofi, xss-lock, nitrogen, compton-git, i3status, i3-gaps,
|
||||
i3lock-color, xset, alsaUtils, light, screenshot_public, xorg, libinput-gestures,
|
||||
haskellPackages, polybar, rofi-pass,
|
||||
with_lock ? true, compton_name ? "default"}:
|
||||
|
||||
let
|
||||
|
@ -169,7 +169,6 @@ exec_always --no-startup-id ${nitrogen}/bin/nitrogen --restore
|
|||
${kill-and-restart compton-git "compton --config /home/yorick/dotfiles/x/compton_${compton_name}.conf"}
|
||||
'' + (lib.optionalString with_lock ''
|
||||
|
||||
${kill-and-restart xorg.xf86inputsynaptics "syndaemon -i 0.5 -k -t"}
|
||||
${kill-and-then "polybar" "PATH=${polybar}/bin:$PATH /home/yorick/dotfiles/i3/polybar.sh"}
|
||||
${kill-and-restart xss-lock "xss-lock -l -- ${locker}"}
|
||||
${kill-and-restart libinput-gestures "libinput-gestures"}
|
||||
|
@ -185,7 +184,7 @@ bindsym XF86AudioRaiseVolume exec ${alsaUtils}/bin/amixer set Master 1%+
|
|||
bindsym XF86AudioMute exec ${alsaUtils}/bin/amixer set Master toggle
|
||||
bindsym $mod+Shift+s exec --no-startup-id ${screenshot_public}/bin/screenshot_public
|
||||
bindsym Print exec --no-startup-id ${screenshot_public}/bin/screenshot_public
|
||||
bindsym $mod+p exec --no-startup-id passmenu
|
||||
bindsym $mod+p exec --no-startup-id ${rofi-pass}/bin/rofi-pass
|
||||
workspace_auto_back_and_forth yes
|
||||
|
||||
hide_edge_borders smart
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
#!nix-shell -i bash -p stow
|
||||
$(nix-build '<nixpkgs>' -A stow --no-out-link)/bin/stow -d `dirname $0` -t ~ nix git x pentadactyl gtk gpg mutt misc bash stow
|
||||
nix-build -A $(hostname -s)
|
||||
set -e
|
||||
$(nix-build '<nixpkgs>' -A stow --no-out-link)/bin/stow -d `dirname $0` -t ~ nix git x gtk gpg mutt misc bash stow rofi
|
||||
nix build -f. $(hostname -s)
|
||||
|
|
|
@ -39,3 +39,13 @@ Host asc_wh
|
|||
hostname 192.168.1.4
|
||||
ProxyJump yorick@woodhouse.onion
|
||||
|
||||
Host skl_deployer
|
||||
hostname deployer.serokell.team
|
||||
RemoteForward /home/yorick/.aws/pass-socket /home/yorick/.aws/pass-socket
|
||||
RemoteForward /home/yorick/.gnupg/S.gpg-agent /home/yorick/.gnupg/S.gpg-agent.extra
|
||||
ForwardAgent yes
|
||||
Host skl_deployer_vbox
|
||||
hostname 192.168.56.101
|
||||
ForwardAgent yes
|
||||
RemoteForward /home/yorick/.aws/pass-socket /home/yorick/.aws/pass-socket
|
||||
RemoteForward /home/yorick/.gnupg/S.gpg-agent /home/yorick/.gnupg/S.gpg-agent.extra
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
set my_pass = "`gpg -q --no-tty --batch -d ~/.mutt/yorick_pass.gpg`""
|
||||
set my_pass = "`pass sysadmin/yori.ccMail | head -n1`"
|
||||
set spoolfile = "imaps://yorick:$my_pass@pennyworth.yori.cc/INBOX"
|
||||
set realname = "Yorick van Pelt"
|
||||
set from = "Yorick van Pelt <yorick@yorickvanpelt.nl>"
|
||||
|
|
Binary file not shown.
|
@ -1,23 +1,11 @@
|
|||
self: super:
|
||||
let
|
||||
pkgold = super;
|
||||
overrideOlder = original: override: let
|
||||
lib = super.lib;
|
||||
newpkgver = lib.getVersion (override original);
|
||||
oldpkgver = lib.getVersion original;
|
||||
in if (lib.versionOlder oldpkgver newpkgver) then original.overrideDerivation override else original;
|
||||
overrideOlder = original: override: with self.lib; let
|
||||
newpkgver = getVersion (override original);
|
||||
oldpkgver = getVersion original;
|
||||
in if (versionOlder oldpkgver newpkgver) then original.overrideDerivation override else original;
|
||||
in
|
||||
{
|
||||
i3lock-color = overrideOlder super.i3lock-color (attrs: rec {
|
||||
version = "2.9.1-2017-09-10";
|
||||
name = "i3lock-color-${version}";
|
||||
src = super.fetchFromGitHub {
|
||||
owner = "chrjguill";
|
||||
repo = "i3lock-color";
|
||||
rev = "d03fbe70c92505627af61a1464f2eaafe9fcbfd5";
|
||||
sha256 = "12vw90n6pmz1fxqv55nlwpbfzj9wap6b7rcrxjgfl0snqx3nijlg";
|
||||
};
|
||||
});
|
||||
# spotify = overrideOlder pkgs.spotify (attrs: rec {
|
||||
# version = "1.0.48.103.g15edf1ec-94";
|
||||
# name = "spotify-${version}";
|
||||
|
@ -27,9 +15,9 @@ in
|
|||
# };
|
||||
#});
|
||||
|
||||
haskellPackages = with super.haskell.lib; super.haskellPackages.extend (self: super:{
|
||||
X11 = overrideCabal super.X11 (drv: {
|
||||
librarySystemDepends = drv.librarySystemDepends ++ [ pkgold.xorg.libXScrnSaver ];
|
||||
haskellPackages = with super.haskell.lib; super.haskellPackages.extend (hself: hsuper:{
|
||||
X11 = overrideCabal hsuper.X11 (drv: {
|
||||
librarySystemDepends = drv.librarySystemDepends ++ [ self.xorg.libXScrnSaver ];
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
self: super: {
|
||||
|
||||
ftb = super.callPackage ../pkgs/ftb.nix {};
|
||||
pyroscope = super.callPackage ../pkgs/pyroscope {};
|
||||
peageprint = super.callPackage ../pkgs/peageprint.nix {};
|
||||
nottetris2 = super.callPackage ../pkgs/nottetris2.nix {};
|
||||
mailpile = super.callPackage ../pkgs/mailpile.nix {};
|
||||
lejos = super.callPackage ../pkgs/lejos.nix {};
|
||||
libinput-gestures = super.callPackage ../pkgs/libinput-gestures.nix {};
|
||||
ftb = self.callPackage ../pkgs/ftb.nix {};
|
||||
pyroscope = self.callPackage ../pkgs/pyroscope {};
|
||||
peageprint = self.callPackage ../pkgs/peageprint.nix {};
|
||||
nottetris2 = self.callPackage ../pkgs/nottetris2.nix {};
|
||||
mailpile = self.callPackage ../pkgs/mailpile.nix {};
|
||||
lejos = self.callPackage ../pkgs/lejos.nix {};
|
||||
libinput-gestures = super.libinput-gestures.override { extraUtilsPath = [
|
||||
self.xdotool self.python3
|
||||
];};
|
||||
gitFire = super.stdenv.mkDerivation {
|
||||
src = super.fetchFromGitHub {
|
||||
owner = "qw3rtman";
|
||||
|
@ -21,18 +23,11 @@ self: super: {
|
|||
'';
|
||||
};
|
||||
|
||||
weiightminder = super.callPackage (super.fetchgit {
|
||||
weiightminder = self.callPackage (builtins.fetchGit {
|
||||
url = https://gist.github.com/yorickvP/229d21a7da13c9c514dbd26147822641;
|
||||
rev = "9749ef4d83c0078bc0248215ee882d7124827cf3";
|
||||
sha256 = "0kxi20ss2k22sv3ndplnklc6r7ja0lcgklw6mz43qcj7vmgxxllf";
|
||||
}) {};
|
||||
|
||||
node2nix_git = (super.callPackage (super.fetchFromGitHub {
|
||||
owner = "svanderburg";
|
||||
repo = "node2nix";
|
||||
rev = "b6545937592e7e54a14a2df315598570480fee9f";
|
||||
sha256 = "1y50gs5mk2sdzqx68lr3qb71lh7jp4c38ynybf8ikx7kfkzxvasb";
|
||||
}) {}).package;
|
||||
|
||||
yscripts = super.callPackage /home/yorick/dotfiles/bin {};
|
||||
yscripts = self.callPackage /home/yorick/dotfiles/bin {};
|
||||
}
|
||||
|
|
|
@ -7,22 +7,15 @@ self: super: {
|
|||
});
|
||||
|
||||
mpv = super.mpv.override { vaapiSupport = true; };
|
||||
polybar = super.polybar.override {i3GapsSupport = true; githubSupport = false;};
|
||||
|
||||
python36Packages = let py3 = super.python36Packages; in (py3 // {
|
||||
polybar = super.polybar.override { i3GapsSupport = true; };
|
||||
python36Packages = super.python36Packages.override { overrides = (self: super: {
|
||||
# pycrypto runs slow tests by default
|
||||
pycrypto = py3.pycrypto.overrideDerivation (attrs: {
|
||||
pycrypto = super.pycrypto.overrideDerivation (attrs: {
|
||||
installCheckPhase = ''
|
||||
${py3.python.interpreter} nix_run_setup.py test --skip-slow-tests
|
||||
${self.python.interpreter} nix_run_setup.py test --skip-slow-tests
|
||||
'';
|
||||
});
|
||||
});
|
||||
i3-gaps = super.i3-gaps.overrideDerivation (attrs: {
|
||||
patches = [(super.fetchpatch {
|
||||
url = "https://github.com/Lucus16/i3/commit/65a5afda81ddd1618b4a62b7188173c82ee5f985.patch";
|
||||
sha256 = "1s943069afamizrz5pmll6cmrzgnlv3v93bmnykifhr0mnavbhph";
|
||||
})];
|
||||
});
|
||||
}); };
|
||||
|
||||
# wine = pkgs.wine.override { wineRelease = "staging"; wineBuild = "wineWow"; };
|
||||
}
|
||||
|
|
|
@ -31,12 +31,10 @@ self: super: {
|
|||
src = super.fetchFromGitHub {
|
||||
owner = "matthewbauer";
|
||||
repo = "nix-mode";
|
||||
rev = "v1.2.1";
|
||||
sha256 = "1zpqpq6hd83prk80921nbjrvcmk0dykqrrr1mw3b29ppjma5zjiz";
|
||||
rev = "f24abeb736a028deb283d51a859e7e34aba5e42b";
|
||||
sha256 = "06kznwa5qbl3vzvvdh6lqdgzjzkvkvayvv3bjx3p2j275fxy1kfw";
|
||||
};
|
||||
preConfigure = ''
|
||||
rm nix-company.el nix-mode-mmm.el
|
||||
'';
|
||||
preConfigure = "rm nix-company.el nix-mode-mmm.el";
|
||||
})
|
||||
nix-buffer
|
||||
which-key
|
||||
|
|
|
@ -16,9 +16,9 @@ in {
|
|||
xorg.xrandr
|
||||
pavucontrol
|
||||
light nitrogen
|
||||
dropbox # really?
|
||||
# wpa_supplicant_gui
|
||||
# dropbox # really?
|
||||
xclip siji fira-mono playerctl font-awesome-ttf
|
||||
hs.arbtt
|
||||
];
|
||||
scripts = mkEnv "y-scripts" [
|
||||
peageprint
|
||||
|
@ -26,6 +26,7 @@ in {
|
|||
];
|
||||
|
||||
apps = mkEnv "y-apps" [
|
||||
wpa_supplicant_gui
|
||||
gajim
|
||||
neomutt
|
||||
torbrowser
|
||||
|
@ -35,16 +36,14 @@ in {
|
|||
tdesktop
|
||||
#hexchat
|
||||
#inkscape
|
||||
keepassx
|
||||
# libreoffice
|
||||
# skype
|
||||
spotify
|
||||
quasselClient
|
||||
leafpad
|
||||
calibre
|
||||
wpa_supplicant_gui
|
||||
#py2.plover
|
||||
wireshark meld
|
||||
wireshark # meld
|
||||
discord
|
||||
fanficfare
|
||||
hledger hledger-web
|
||||
|
@ -64,7 +63,7 @@ in {
|
|||
];
|
||||
|
||||
nix = mkEnv "y-nix" [
|
||||
patchelf nix nix-prefetch-git nix-repl nixopsUnstable nox
|
||||
patchelf nix-prefetch-git nixopsUnstable nox
|
||||
];
|
||||
|
||||
c = mkEnv "y-cdev" [
|
||||
|
@ -81,11 +80,12 @@ in {
|
|||
wakelan x2x pass
|
||||
abduco dvtm w3m
|
||||
jq jo
|
||||
thefuck
|
||||
];
|
||||
|
||||
code = mkEnv "y-code" [
|
||||
python gitAndTools.hub gnumake cloc silver-searcher gitFire gti
|
||||
];
|
||||
code = mkEnv "y-code" (with gitAndTools; [
|
||||
python3 git-crypt hub gnumake cloc silver-searcher gitFire gti gcc
|
||||
]);
|
||||
java = openjdk;
|
||||
|
||||
games = mkEnv "y-games" [
|
||||
|
@ -94,7 +94,7 @@ in {
|
|||
];
|
||||
|
||||
js = mkEnv "y-jsdev" [
|
||||
js.jshint nodejs-6_x electron node2nix_git
|
||||
js.jshint nodejs electron js.node2nix
|
||||
];
|
||||
|
||||
pdf = mkEnv "y-pdf" [
|
||||
|
@ -109,8 +109,8 @@ in {
|
|||
# will remove all your previously installed nix-env stuff
|
||||
# so check with nix-env -q first
|
||||
hosts = with self; with self.envs; {
|
||||
ascanius = [apps code de games envs.js pdf nix media gcc misc scripts coins];
|
||||
jarvis = [apps code de games envs.js pdf nix media gcc misc scripts myEmacs];
|
||||
ascanius = [apps code de games envs.js pdf nix media misc scripts coins myEmacs];
|
||||
jarvis = [apps code de games envs.js pdf nix media misc scripts myEmacs];
|
||||
woodhouse = [de media misc kodi chromium spotify];
|
||||
pennyworth = [];
|
||||
frumar = [bup gitAndTools.git-annex rtorrent pyroscope];
|
||||
|
|
|
@ -9,7 +9,7 @@ in
|
|||
name = "ftb-1.4.14";
|
||||
src = fetchurl {
|
||||
url = "http://ftb.cursecdn.com/FTB2/launcher/FTB_Launcher.jar";
|
||||
sha256 = "1m2kyvq4fknr3ric5wwg55qzjqhpkjaq9zragsvippibg78w9hy4";
|
||||
sha256 = "10ga4jgyfsj5dy4rj2rla0fpnfpnxv8r3bmxpqpwn7fsry4il79v";
|
||||
};
|
||||
|
||||
phases = "installPhase";
|
||||
|
@ -32,4 +32,4 @@ in
|
|||
homepage = http://www.feed-the-beast.com;
|
||||
license = stdenv.lib.licenses.unfreeRedistributable;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
{ pkgs ? (import <nixpkgs> {})
|
||||
, stdenv ? pkgs.stdenv
|
||||
, xdotool ? pkgs.xdotool
|
||||
, makeWrapper ? pkgs.makeWrapper
|
||||
, wmctrl ? pkgs.wmctrl
|
||||
, fetchFromGitHub ? pkgs.fetchFromGitHub
|
||||
, bash ? pkgs.bash
|
||||
, python3 ? pkgs.python3
|
||||
, libinput ? pkgs.libinput
|
||||
, procps ? pkgs.procps
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "2.16";
|
||||
name = "libinput-gestures-${version}";
|
||||
src = fetchFromGitHub {
|
||||
owner = "bulletmark";
|
||||
repo = "libinput-gestures";
|
||||
rev = version;
|
||||
sha256 = "0ix1ygbrwjvabxpq8g4xcfdjrcc6jq79vxpbv6msaxmjxp6dv17w";
|
||||
};
|
||||
|
||||
patches = [./paths.diff];
|
||||
|
||||
buildInputs = with pkgs; [ makeWrapper ];
|
||||
|
||||
installFlags = "DESTDIR=$(out)";
|
||||
preInstall = ''
|
||||
substituteAllInPlace libinput-gestures.desktop
|
||||
'';
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/libinput-gestures \
|
||||
--prefix PATH : "${python3}/bin:${xdotool}/bin:${wmctrl}/bin:${libinput}/bin"
|
||||
substituteInPlace $out/bin/libinput-gestures-setup \
|
||||
--replace "DIR=\"/" "DIR=\"$out/"
|
||||
wrapProgram $out/bin/libinput-gestures-setup \
|
||||
--prefix PATH : "${procps}/bin:${libinput}/bin"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "libinput gesture recognition";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ yorickvp ];
|
||||
};
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
diff --git a/libinput-gestures b/libinput-gestures
|
||||
index 7c7418e..db8326e 100755
|
||||
--- a/libinput-gestures
|
||||
+++ b/libinput-gestures
|
||||
@@ -4,13 +4,13 @@
|
||||
import os, sys, argparse, subprocess, shlex, re, getpass, fcntl
|
||||
from pathlib import Path
|
||||
|
||||
-PROG = Path(sys.argv[0]).name
|
||||
+PROG = "libinput-gestures"
|
||||
|
||||
# Conf file containing gesture commands.
|
||||
# Search first for user file then system file.
|
||||
CONFNAME = '{}.conf'.format(PROG)
|
||||
USERDIR = os.getenv('XDG_CONFIG_DIR', os.path.expanduser('~/.config'))
|
||||
-CONFDIRS = (USERDIR, '/etc')
|
||||
+CONFDIRS = (USERDIR, str(Path(os.path.abspath(__file__)).parent / '../etc'), '/etc')
|
||||
|
||||
# Set up command line arguments
|
||||
opt = argparse.ArgumentParser(description=__doc__)
|
||||
diff --git a/libinput-gestures-setup b/libinput-gestures-setup
|
||||
index 22be217..03ff39b 100755
|
||||
--- a/libinput-gestures-setup
|
||||
+++ b/libinput-gestures-setup
|
||||
@@ -1,11 +1,11 @@
|
||||
-#!/bin/bash
|
||||
+#!/usr/bin/env bash
|
||||
# User setup script.
|
||||
# (C) Mark Blakeney, markb@berlios.de, Aug 2016.
|
||||
|
||||
-PROG="$(basename $0)"
|
||||
+PROG="libinput-gestures-setup"
|
||||
NAME=${PROG%-*}
|
||||
|
||||
-BINDIR="/usr/bin"
|
||||
+BINDIR="/bin"
|
||||
APPDIR="/usr/share/applications"
|
||||
ICOBAS="/usr/share/icons/hicolor"
|
||||
ICODIR="$ICOBAS/128x128/apps"
|
||||
diff --git a/libinput-gestures.desktop b/libinput-gestures.desktop
|
||||
index 903c14c..13d71f3 100644
|
||||
--- a/libinput-gestures.desktop
|
||||
+++ b/libinput-gestures.desktop
|
||||
@@ -2,7 +2,7 @@
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Name=Libinput Gestures
|
||||
-Exec=/usr/bin/libinput-gestures
|
||||
+Exec=@out@/bin/libinput-gestures
|
||||
Icon=libinput-gestures
|
||||
Comment=Background application to intercept and action libinput gestures from touchpad.
|
||||
Categories=GNOME;GTK;System;
|
|
@ -1,29 +0,0 @@
|
|||
" vim: set ft=pentadactyl:ts=4:sw=4:tw=0:
|
||||
set runtimepath=~/dotfiles/pentadactyl,~/dotfiles/pentadactyl/external/pentadactyl-solarized
|
||||
colorscheme solarized-dark
|
||||
|
||||
set go+=N
|
||||
|
||||
source ~/dotfiles/pentadactyl/user.css
|
||||
|
||||
" feedly:
|
||||
group -description 'Feedly' -locations=feedly.com feedly
|
||||
nmap -group feedly gm <Pass>
|
||||
nmap -group feedly ga <Pass>
|
||||
nmap -group feedly gg <Pass>
|
||||
nmap -group feedly gl <Pass>
|
||||
|
||||
set passkeys+=feedly.com:"r/jknpv<S-j><S-m>mxs<S-v>"
|
||||
|
||||
" github:
|
||||
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
|
|
@ -1,3 +0,0 @@
|
|||
external
|
||||
plugins
|
||||
user.css
|
|
@ -1 +0,0 @@
|
|||
Subproject commit bf2d2e5d65cc97a11f0e2ca4c06d8041652c9fef
|
|
@ -1,47 +0,0 @@
|
|||
/* ~/.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);});
|
|
@ -1,91 +0,0 @@
|
|||
/*@-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;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,136 @@
|
|||
configuration {
|
||||
modi: "window,run,ssh,drun";
|
||||
/* width: 50;*/
|
||||
/* lines: 15;*/
|
||||
/* columns: 1;*/
|
||||
font: "Source Code Pro 12";
|
||||
/* bw: 1;*/
|
||||
/* location: 0;*/
|
||||
/* padding: 5;*/
|
||||
/* yoffset: 0;*/
|
||||
/* xoffset: 0;*/
|
||||
/* fixed-num-lines: true;*/
|
||||
/* show-icons: false;*/
|
||||
/* terminal: "rofi-sensible-terminal";*/
|
||||
/* ssh-client: "ssh";*/
|
||||
/* ssh-command: "{terminal} -e {ssh-client} {host}";*/
|
||||
/* run-command: "{cmd}";*/
|
||||
/* run-list-command: "";*/
|
||||
/* run-shell-command: "{terminal} -e {cmd}";*/
|
||||
/* window-command: "xkill -id {window}";*/
|
||||
/* drun-icon-theme: ;*/
|
||||
/* disable-history: false;*/
|
||||
/* sort: false;*/
|
||||
/* levenshtein-sort: false;*/
|
||||
/* case-sensitive: false;*/
|
||||
/* cycle: true;*/
|
||||
/* sidebar-mode: false;*/
|
||||
/* eh: 1;*/
|
||||
/* auto-select: false;*/
|
||||
/* parse-hosts: false;*/
|
||||
/* parse-known-hosts: true;*/
|
||||
/* combi-modi: "window,run";*/
|
||||
/* matching: "normal";*/
|
||||
/* tokenize: true;*/
|
||||
/* m: "-5";*/
|
||||
/* line-margin: 2;*/
|
||||
/* line-padding: 1;*/
|
||||
/* filter: ;*/
|
||||
/* separator-style: "dash";*/
|
||||
/* hide-scrollbar: false;*/
|
||||
/* fullscreen: false;*/
|
||||
/* fake-transparency: false;*/
|
||||
dpi: 109;
|
||||
/* threads: 0;*/
|
||||
/* scrollbar-width: 8;*/
|
||||
/* scroll-method: 0;*/
|
||||
/* fake-background: "screenshot";*/
|
||||
/* window-format: "{w} {i}{c} {t}";*/
|
||||
/* click-to-exit: true;*/
|
||||
/* show-match: true;*/
|
||||
theme: "solarized_alternate";
|
||||
/* color-normal: ;*/
|
||||
/* color-urgent: ;*/
|
||||
/* color-active: ;*/
|
||||
/* color-window: ;*/
|
||||
/* plugin-path: "/nix/store/21jzqk1r0ni4dwjr6icq5w7kginmg61y-rofi-1.4.2/lib/rofi";*/
|
||||
/* pid: "/run/user/1000/rofi.pid";*/
|
||||
/* display-window: ;*/
|
||||
/* display-windowcd: ;*/
|
||||
/* display-run: ;*/
|
||||
/* display-ssh: ;*/
|
||||
/* display-drun: ;*/
|
||||
/* display-combi: ;*/
|
||||
/* display-keys: ;*/
|
||||
/* kb-primary-paste: "Control+V,Shift+Insert";*/
|
||||
/* kb-secondary-paste: "Control+v,Insert";*/
|
||||
/* kb-clear-line: "Control+w";*/
|
||||
/* kb-move-front: "Control+a";*/
|
||||
/* kb-move-end: "Control+e";*/
|
||||
/* kb-move-word-back: "Alt+b";*/
|
||||
/* kb-move-word-forward: "Alt+f";*/
|
||||
/* kb-move-char-back: "Left,Control+b";*/
|
||||
/* kb-move-char-forward: "Right,Control+f";*/
|
||||
/* kb-remove-word-back: "Control+Alt+h,Control+BackSpace";*/
|
||||
/* kb-remove-word-forward: "Control+Alt+d";*/
|
||||
/* kb-remove-char-forward: "Delete,Control+d";*/
|
||||
/* kb-remove-char-back: "BackSpace,Control+h";*/
|
||||
/* kb-remove-to-eol: "Control+k";*/
|
||||
/* kb-remove-to-sol: "Control+u";*/
|
||||
/* kb-accept-entry: "Control+j,Control+m,Return,KP_Enter";*/
|
||||
/* kb-accept-custom: "Control+Return";*/
|
||||
/* kb-accept-alt: "Shift+Return";*/
|
||||
/* kb-delete-entry: "Shift+Delete";*/
|
||||
/* kb-mode-next: "Shift+Right,Control+Tab";*/
|
||||
/* kb-mode-previous: "Shift+Left,Control+ISO_Left_Tab";*/
|
||||
/* kb-row-left: "Control+Page_Up";*/
|
||||
/* kb-row-right: "Control+Page_Down";*/
|
||||
/* kb-row-up: "Up,Control+p,ISO_Left_Tab";*/
|
||||
/* kb-row-down: "Down,Control+n";*/
|
||||
/* kb-row-tab: "Tab";*/
|
||||
/* kb-page-prev: "Page_Up";*/
|
||||
/* kb-page-next: "Page_Down";*/
|
||||
/* kb-row-first: "Home,KP_Home";*/
|
||||
/* kb-row-last: "End,KP_End";*/
|
||||
/* kb-row-select: "Control+space";*/
|
||||
/* kb-screenshot: "Alt+S";*/
|
||||
/* kb-toggle-case-sensitivity: "grave,dead_grave";*/
|
||||
/* kb-toggle-sort: "Alt+grave";*/
|
||||
/* kb-cancel: "Escape,Control+g,Control+bracketleft";*/
|
||||
/* kb-custom-1: "Alt+1";*/
|
||||
/* kb-custom-2: "Alt+2";*/
|
||||
/* kb-custom-3: "Alt+3";*/
|
||||
/* kb-custom-4: "Alt+4";*/
|
||||
/* kb-custom-5: "Alt+5";*/
|
||||
/* kb-custom-6: "Alt+6";*/
|
||||
/* kb-custom-7: "Alt+7";*/
|
||||
/* kb-custom-8: "Alt+8";*/
|
||||
/* kb-custom-9: "Alt+9";*/
|
||||
/* kb-custom-10: "Alt+0";*/
|
||||
/* kb-custom-11: "Alt+exclam";*/
|
||||
/* kb-custom-12: "Alt+at";*/
|
||||
/* kb-custom-13: "Alt+numbersign";*/
|
||||
/* kb-custom-14: "Alt+dollar";*/
|
||||
/* kb-custom-15: "Alt+percent";*/
|
||||
/* kb-custom-16: "Alt+dead_circumflex";*/
|
||||
/* kb-custom-17: "Alt+ampersand";*/
|
||||
/* kb-custom-18: "Alt+asterisk";*/
|
||||
/* kb-custom-19: "Alt+parenleft";*/
|
||||
/* kb-select-1: "Super+1";*/
|
||||
/* kb-select-2: "Super+2";*/
|
||||
/* kb-select-3: "Super+3";*/
|
||||
/* kb-select-4: "Super+4";*/
|
||||
/* kb-select-5: "Super+5";*/
|
||||
/* kb-select-6: "Super+6";*/
|
||||
/* kb-select-7: "Super+7";*/
|
||||
/* kb-select-8: "Super+8";*/
|
||||
/* kb-select-9: "Super+9";*/
|
||||
/* kb-select-10: "Super+0";*/
|
||||
/* ml-row-left: "Mouse6";*/
|
||||
/* ml-row-right: "Mouse7";*/
|
||||
/* ml-row-up: "Mouse4";*/
|
||||
/* ml-row-down: "Mouse5";*/
|
||||
/* me-select-entry: "Mouse1";*/
|
||||
/* me-accept-entry: "MouseD1";*/
|
||||
/* me-accept-custom: "Control+MouseD1";*/
|
||||
}
|
|
@ -0,0 +1,92 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
print-passwords() {
|
||||
prefix=${PASSWORD_STORE_DIR-~/.password-store}
|
||||
password_files=( "$prefix"/**/*.gpg )
|
||||
password_files=( "${password_files[@]#"$prefix"/}" )
|
||||
password_files=( "${password_files[@]%.gpg}" )
|
||||
printf '%s\n' "${password_files[@]}"
|
||||
}
|
||||
|
||||
copy-account-field() {
|
||||
lpass show --clip "--${2}" "$1" >/dev/null 2>/dev/null
|
||||
}
|
||||
|
||||
open-account-url() {
|
||||
local url=$(lpass show --url "$1")
|
||||
if [[ -n $url ]]; then
|
||||
xdg-open "$url" >/dev/null 2>/dev/null
|
||||
else
|
||||
exit 2
|
||||
fi
|
||||
}
|
||||
|
||||
is-actual-url() {
|
||||
local url="$1"
|
||||
if [[ -n $url && "$url" != " " && "$url" != "http://" && "$url" != "https://" ]]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
show-account-options() {
|
||||
local id="$1"
|
||||
|
||||
echo ">> Copy password [$id]"
|
||||
echo ">> Copy username [$id]"
|
||||
|
||||
url=$(lpass show --url "$id")
|
||||
if is-actual-url "$url"; then
|
||||
echo ">> Open $url [$id]"
|
||||
echo ">> Copy URL [$id]"
|
||||
fi
|
||||
|
||||
echo ">> Copy ID [$id]"
|
||||
}
|
||||
|
||||
is-entry-selected() {
|
||||
if [[ -n $@ ]]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
id-in-selection() {
|
||||
echo "$1" | grep -oE '\[[0-9]+\]$' | tr -d '[]'
|
||||
}
|
||||
|
||||
debug() {
|
||||
echo "$@" > /dev/stderr
|
||||
}
|
||||
|
||||
if is-entry-selected "$1"; then
|
||||
selected="$1"
|
||||
|
||||
id="$(id-in-selection "$selected")"
|
||||
|
||||
if [[ -n $id ]]; then
|
||||
case "$selected" in
|
||||
'>> Copy password'*)
|
||||
copy-account-field "$id" password ;;
|
||||
'>> Copy username'*)
|
||||
copy-account-field "$id" username ;;
|
||||
'>> Copy URL'*)
|
||||
copy-account-field "$id" url ;;
|
||||
'>> Copy ID'*)
|
||||
copy-account-field "$id" id ;;
|
||||
'>> Open'*)
|
||||
open-account-url "$id" ;;
|
||||
*)
|
||||
show-account-options "$id" ;;
|
||||
esac
|
||||
else
|
||||
echo "Could not detect the entry ID of \"${selection}\""
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
print-passwords
|
||||
fi
|
Loading…
Reference in New Issue