Browse Source

Merge remote-tracking branch 'gh/master'

master
Yorick van Pelt 2 years ago
parent
commit
3216589f1f
18 changed files with 263 additions and 191 deletions
  1. +0
    -3
      .gitmodules
  2. +5
    -0
      emacs/emacs.org
  3. +2
    -0
      git/.gitconfig
  4. +1
    -0
      gpg/.gnupg/gpg-agent.conf
  5. +4
    -4
      i3/i3.nix
  6. +2
    -1
      install.sh
  7. +10
    -0
      misc/.ssh/config
  8. +1
    -1
      mutt/.mutt/creds
  9. BIN
      mutt/.mutt/yorick_pass.gpg
  10. +8
    -9
      nix/.config/nixpkgs/overlays/05-envs.nix
  11. +2
    -2
      nix/.config/nixpkgs/pkgs/ftb.nix
  12. +0
    -29
      pentadactyl/.pentadactylrc
  13. +0
    -3
      pentadactyl/.stow-local-ignore
  14. +0
    -1
      pentadactyl/external/pentadactyl-solarized
  15. +0
    -47
      pentadactyl/plugins/launchv.js
  16. +0
    -91
      pentadactyl/user.css
  17. +136
    -0
      rofi/.config/rofi/config.rasi
  18. +92
    -0
      rofi/.config/rofi/rofi-pass

+ 0
- 3
.gitmodules View File

@@ -1,3 +0,0 @@
[submodule "pentadactyl/external/pentadactyl-solarized"]
path = pentadactyl/external/pentadactyl-solarized
url = https://github.com/claytron/pentadactyl-solarized

+ 5
- 0
emacs/emacs.org View File

@@ -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


+ 2
- 0
git/.gitconfig View File

@@ -23,3 +23,5 @@
signingkey = A36E70F9DC014A15
[help]
autocorrect = 5
[includeIf "gitdir:~/serokell/"]
path=~/serokell/.gitconfig

+ 1
- 0
gpg/.gnupg/gpg-agent.conf View File

@@ -1 +1,2 @@
enable-ssh-support
extra-socket /home/yorick/.gnupg/S.gpg-agent.extra

+ 4
- 4
i3/i3.nix View File

@@ -1,7 +1,7 @@
{writeTextDir, writeScript, lib,
rofi, xss-lock, nitrogen, compton-git,
i3lock-color, xset, alsaUtils, light, screenshot_public, libinput-gestures,
haskellPackages, polybar,
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
@@ -184,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


+ 2
- 1
install.sh View File

@@ -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
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)

+ 10
- 0
misc/.ssh/config View File

@@ -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
- 1
mutt/.mutt/creds View File

@@ -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>"


BIN
mutt/.mutt/yorick_pass.gpg View File


+ 8
- 9
nix/.config/nixpkgs/overlays/05-envs.nix View File

@@ -16,8 +16,7 @@ in {
xorg.xrandr
pavucontrol
light nitrogen
dropbox # really?
# wpa_supplicant_gui
# dropbox # really?
xclip siji fira-mono playerctl font-awesome-ttf
hs.arbtt
];
@@ -27,6 +26,7 @@ in {
];
apps = mkEnv "y-apps" [
wpa_supplicant_gui
gajim
neomutt
torbrowser
@@ -42,7 +42,6 @@ in {
quasselClient
leafpad
calibre
wpa_supplicant_gui
#py2.plover
wireshark # meld
discord
@@ -84,9 +83,9 @@ in {
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" [
@@ -95,7 +94,7 @@ in {
];

js = mkEnv "y-jsdev" [
js.jshint nodejs-6_x electron js.node2nix
js.jshint nodejs electron js.node2nix
];

pdf = mkEnv "y-pdf" [
@@ -110,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 myEmacs];
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];


+ 2
- 2
nix/.config/nixpkgs/pkgs/ftb.nix View File

@@ -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;
};
}
}

+ 0
- 29
pentadactyl/.pentadactylrc View File

@@ -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

+ 0
- 3
pentadactyl/.stow-local-ignore View File

@@ -1,3 +0,0 @@
external
plugins
user.css

+ 0
- 1
pentadactyl/external/pentadactyl-solarized

@@ -1 +0,0 @@
Subproject commit bf2d2e5d65cc97a11f0e2ca4c06d8041652c9fef

+ 0
- 47
pentadactyl/plugins/launchv.js View File

@@ -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);});

+ 0
- 91
pentadactyl/user.css View File

@@ -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;
}
}

+ 136
- 0
rofi/.config/rofi/config.rasi View File

@@ -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";*/
}

+ 92
- 0
rofi/.config/rofi/rofi-pass View File

@@ -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…
Cancel
Save