From 409c6993f2f2620aa267104baa1b1d18b785a032 Mon Sep 17 00:00:00 2001 From: AngeD Date: Sat, 28 Oct 2023 12:45:10 +0200 Subject: [PATCH] feat: ssh-agent on startup --- .config/autorandr/agn/postswitch | 1 - .config/autorandr/laptop/postswitch | 1 - {bin => .config/autorandr/postswitch.d}/wallpaper | 0 .config/zsh/.zprofile | 6 ++++++ .xinitrc | 3 +-- 5 files changed, 7 insertions(+), 4 deletions(-) delete mode 120000 .config/autorandr/agn/postswitch delete mode 120000 .config/autorandr/laptop/postswitch rename {bin => .config/autorandr/postswitch.d}/wallpaper (100%) diff --git a/.config/autorandr/agn/postswitch b/.config/autorandr/agn/postswitch deleted file mode 120000 index 1a4e529..0000000 --- a/.config/autorandr/agn/postswitch +++ /dev/null @@ -1 +0,0 @@ -/home/ange/bin/wallpaper \ No newline at end of file diff --git a/.config/autorandr/laptop/postswitch b/.config/autorandr/laptop/postswitch deleted file mode 120000 index 1a4e529..0000000 --- a/.config/autorandr/laptop/postswitch +++ /dev/null @@ -1 +0,0 @@ -/home/ange/bin/wallpaper \ No newline at end of file diff --git a/bin/wallpaper b/.config/autorandr/postswitch.d/wallpaper similarity index 100% rename from bin/wallpaper rename to .config/autorandr/postswitch.d/wallpaper diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile index 2b748be..a186c4f 100644 --- a/.config/zsh/.zprofile +++ b/.config/zsh/.zprofile @@ -1,3 +1,9 @@ +if ! pgrep -u "$USER" ssh-agent > /dev/null; then + ssh-agent > "$XDG_RUNTIME_DIR/ssh-agent.env" +fi + +. "$XDG_RUNTIME_DIR/ssh-agent.env" + [ "$XDG_VTNR" = 1 ] && { GUILOG="$HOME/.local/share/gui.log" diff --git a/.xinitrc b/.xinitrc index c901b75..c36ca74 100644 --- a/.xinitrc +++ b/.xinitrc @@ -4,8 +4,7 @@ #(i3status | while read line; do xsetroot -name "$line"; done) & # startup -eval "$(ssh-agent)" -wallpaper & +autorandr -c xss-lock -n screensaver -- lock & /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 || # arch /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 || # debian