diff options
author | jeschli <jeschli@gmail.com> | 2018-06-19 09:52:04 +0200 |
---|---|---|
committer | jeschli <jeschli@gmail.com> | 2018-06-19 09:52:04 +0200 |
commit | 324a8615f19c267d67b8a96d8e74b648c875ba04 (patch) | |
tree | 8f7444a8e69ae254354a83a119d1c62bfaf95989 /tv/5pkgs | |
parent | 2a3f60d6fb3cd8d5f1ead4e5ff43fc9364eedad3 (diff) | |
parent | 8eca9165ce6ffaba1076a916bfa475eb935f0a6f (diff) |
Merge remote-tracking branch 'origin/staging/jeschli'
Diffstat (limited to 'tv/5pkgs')
-rw-r--r-- | tv/5pkgs/simple/otpmenu.nix | 15 | ||||
-rw-r--r-- | tv/5pkgs/simple/xmonad-tv/default.nix | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/tv/5pkgs/simple/otpmenu.nix b/tv/5pkgs/simple/otpmenu.nix new file mode 100644 index 000000000..b35e1601f --- /dev/null +++ b/tv/5pkgs/simple/otpmenu.nix @@ -0,0 +1,15 @@ +{ dmenu, gnused, pass, writeDashBin, xdotool }: + +writeDashBin "otpmenu" '' + set -efu + + x=$( + ${pass}/bin/pass git ls-files '*/otp.gpg' \ + | ${gnused}/bin/sed 's:/otp\.gpg$::' \ + | ${dmenu}/bin/dmenu -f -p OTP + ) + + otp=$(${pass}/bin/pass otp code "$x/otp") + + printf %s "$otp" | ${xdotool}/bin/xdotool type -f - +'' diff --git a/tv/5pkgs/simple/xmonad-tv/default.nix b/tv/5pkgs/simple/xmonad-tv/default.nix index d474b7edd..cb59e8517 100644 --- a/tv/5pkgs/simple/xmonad-tv/default.nix +++ b/tv/5pkgs/simple/xmonad-tv/default.nix @@ -133,6 +133,7 @@ myKeys conf = Map.fromList $ [ ((_4 , xK_Escape ), forkFile "/run/wrappers/bin/slock" [] Nothing) , ((_4S , xK_c ), kill) + , ((_4 , xK_o ), forkFile "${pkgs.otpmenu}/bin/otpmenu" [] Nothing) , ((_4 , xK_p ), forkFile "${pkgs.pass}/bin/passmenu" ["--type"] Nothing) , ((_4 , xK_x ), chooseAction spawnTermAt) |