Browse Source

Some changes

main
Yigit Colakoglu 4 years ago
parent
commit
f8cf50f394
5 changed files with 43 additions and 5 deletions
  1. +6
    -0
      .config/crontab
  2. +6
    -5
      .local/bin/dmenu-edit
  3. +28
    -0
      .local/bin/genpwd
  4. +2
    -0
      .local/share/gnupg/gpg-agent.conf
  5. +1
    -0
      .ssh/config

+ 6
- 0
.config/crontab View File

@ -0,0 +1,6 @@
*/8 * * * * /home/yigit/.local/bin/mailsync
*/15 * * * * /home/yigit/.local/bin/nextcloud-sync
0 * * * * /home/yigit/.local/bin/check-updates
*/30 * * * * /home/yigit/.local/bin/firefox-sync
*/30 * * * * calcurse-caldav
*/30 * * * * vdirsyncer sync

+ 6
- 5
.local/bin/dmenu-edit View File

@ -3,13 +3,14 @@
DMENU='dmenu -z 1900 -x 10 -y 10 -i' DMENU='dmenu -z 1900 -x 10 -y 10 -i'
blacklist="powerlevel10k|secret|gitignore|log|plugins|patches|config/surf|BetterDiscord" blacklist="powerlevel10k|secret|gitignore|log|plugins|patches|config/surf|BetterDiscord"
whitelist="config.h|keybind.h|colors.h|color.h|rules.h" whitelist="config.h|keybind.h|colors.h|color.h|rules.h"
declare -A mappings
items=$(cd ~/.config; git ls-files | grep -Ev $blacklist | sed -n "s|^|config/|p")
scripts=$(cd ~/.local/bin ; git ls-files | grep -Ev $blacklist | sed -n "s|^|scripts/|p")
suckless=$(cd ~/.dotfiles/suckless ; git ls-files | grep -Ev $blacklist | grep -E $whitelist | sed -n "s|^|suckless/|p")
files="$(git --git-dir=$HOME/.dotfiles.git/ --work-tree=$HOME ls-files)"
selection=$(echo -e "$items\n$scripts\n$suckless" | $DMENU)
items=$(echo "$files" | grep -Ev $blacklist | sed -n "s|^|config/|p")
scripts=$(echo "$files" | grep -Ev $blacklist | sed -n "s|^|scripts/|p")
suckless=$(echo "$files" | grep -Ev $blacklist | grep -E $whitelist | sed -n "s|^|suckless/|p")
selection=$(printf "$items\n$scripts\n$suckless" | $DMENU)
if [ ! "$selection" = "" ]; then if [ ! "$selection" = "" ]; then
if [ $(echo $selection | cut -d"/" -f 1) = "scripts" ]; then if [ $(echo $selection | cut -d"/" -f 1) = "scripts" ]; then


+ 28
- 0
.local/bin/genpwd View File

@ -0,0 +1,28 @@
#!/bin/bash
shopt -s nullglob globstar
typeit=0
if [[ $1 == "--type" ]]; then
typeit=1
shift
fi
prefix=${PASSWORD_STORE_DIR-~/.password-store}
password_files=( "$prefix"/**/*.gpg )
password_files=( "${password_files[@]#"$prefix"/}" )
password_files=( "${password_files[@]%.gpg}" )
folder=$(printf '%s\n' "${password_files[@]}" | cut -d"/" -f1 | sort | uniq | dmenu -l 10 -p "Folder" -i "$@")
[[ -n $folder ]] || exit
site=$(printf '%s\n' "${password_files[@]}" | cut -d"/" -f2 | sort | uniq | dmenu -l 10 -p "Site" -i "$@")
[[ -n $site ]] || exit
username=$(printf '%s\n' "${password_files[@]}" | cut -d"/" -f3 | sort | uniq | dmenu -l 10 -p "Username" -i "$@")
[[ -n $username ]] || exit
pass generate "$folder/$site/$username"
notify-send -a " Password Manager" "Generate and saved new password";
pass git add .
pass git commit -m "Added $folder/$site/$username"
pass git push

+ 2
- 0
.local/share/gnupg/gpg-agent.conf View File

@ -0,0 +1,2 @@
allow-preset-passphrase
max-cache-ttl 172800

+ 1
- 0
.ssh/config View File

@ -0,0 +1 @@
AddKeysToAgent yes

Loading…
Cancel
Save