From bb88edcb0cbc6d10cadd37bde6833e79c7cab531 Mon Sep 17 00:00:00 2001 From: katherine Date: Wed, 9 Sep 2020 10:03:57 -0700 Subject: add rpass func --- .config/init/funcreqs/rpass | 2 ++ .config/init/funcs/rpass | 10 ++++++++++ .config/newsboat/urls | 1 + .iex.exs | 28 +++++++++++++++++++++++++++- 4 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .config/init/funcreqs/rpass create mode 100755 .config/init/funcs/rpass diff --git a/.config/init/funcreqs/rpass b/.config/init/funcreqs/rpass new file mode 100644 index 0000000..b689615 --- /dev/null +++ b/.config/init/funcreqs/rpass @@ -0,0 +1,2 @@ +func_init_prereqs=(xclip) +func_init_checks=("stat /dev/random") diff --git a/.config/init/funcs/rpass b/.config/init/funcs/rpass new file mode 100755 index 0000000..9cfbc84 --- /dev/null +++ b/.config/init/funcs/rpass @@ -0,0 +1,10 @@ +#!/usr/bin/env zsh +# generate random passwords + +unsetopt MULTIBYTE + +{ + cat /dev/random | while read -u0 -k1 c; do + [[ $c =~ '^[a-zA-Z0-9]$' ]] && printf $c + done | head -c 24 && printf "\n" +} | tee >(xclip -i -selection primary) | xclip -i -selection clipboard diff --git a/.config/newsboat/urls b/.config/newsboat/urls index 9cd35d4..15fcc2b 100644 --- a/.config/newsboat/urls +++ b/.config/newsboat/urls @@ -4,6 +4,7 @@ http://historyofenglishpodcast.com/feed/ http://feeds.megaphone.fm/ADL5280986787 https://api.quantamagazine.org/feed/ https://feeds.megaphone.fm/darknetdiaries +https://feeds.buzzsprout.com/1315237.rss https://www.schneier.com/blog/atom.xml https://aminormagazine.com/feed/ diff --git a/.iex.exs b/.iex.exs index fcd3931..780c15d 100644 --- a/.iex.exs +++ b/.iex.exs @@ -48,7 +48,33 @@ defmodule IExConfigInit do "]\n", "└:", :reset - ] |> IO.ANSI.format |> IO.chardata_to_string + ] |> IO.ANSI.format |> IO.chardata_to_string, + alive_prompt: [ + # "\e[1A", + "\e[G", # ANSI CHA, move cursor to column 1 + :bright, + :white, + "┌[(", + :blue, + "%node", + :white, + ")", + :magenta, + (if user, do: user <> "@", else: ""), + "elixir-", + Elixir.System.version, + "@", + hostname, + " ", + :blue, + dir, + :white, + "]\n", + "└:", + :reset + ] |> IO.ANSI.format |> IO.chardata_to_string, + continuation_prompt: " ", + alive_continuation_prompt: " " ) end -- cgit v1.2.3