diff --git a/.config/hypr/config/Keybinds.conf b/.config/hypr/config/Keybinds.conf index c31f4f9..689c80f 100644 --- a/.config/hypr/config/Keybinds.conf +++ b/.config/hypr/config/Keybinds.conf @@ -108,7 +108,7 @@ bind = $mainMod Shift, Return, exec, hyprdrop ghostty --identifier term_hyprdrop bind = $mainMod, Z, exec, $files bind = $mainMod, R, focusurgentorlast -bind = $mainMod SHIFT, P, exec, $scriptsDir/anyrun/Bitwarden.sh +bind = $mainMod SHIFT, P, exec, $scriptsDir/anyrun/Auth.sh # Master Layout Keybinds bind = $mainMod, A, layoutmsg,swapwithmaster master diff --git a/.config/nvim/lua/plugins/typst.lua b/.config/nvim/lua/plugins/typst.lua new file mode 100644 index 0000000..6164284 --- /dev/null +++ b/.config/nvim/lua/plugins/typst.lua @@ -0,0 +1,4 @@ +return { + "kaarmu/typst.vim", + ft = "typst", +} diff --git a/.config/scripts/anyrun/Auth.sh b/.config/scripts/anyrun/Auth.sh new file mode 100755 index 0000000..195962a --- /dev/null +++ b/.config/scripts/anyrun/Auth.sh @@ -0,0 +1,24 @@ +#!/bin/env sh + +SCRIPTPATH="$( + cd -- "$(dirname "$0")" >/dev/null 2>&1 + pwd -P +)" +TOKEN=$(cat "$SCRIPTPATH/.auth-token") + +DOMAIN="https://auth.iedsoftworks.com" + +list=$(curl --oauth2-bearer "$TOKEN" "$DOMAIN/api/v1/twofaccounts" | jq 'map({"\(.service) - \(.account)": .id}) | add' -r) +selection=$(echo "$list" | jq 'keys | map("\(.)\n") | add' -r | anyrun --plugins libstdin.so) + +if [[ $selection == "" ]]; then + exit 0 +fi + +id=$(echo $list | jq ".[\"${selection}\"]") + +curl --oauth2-bearer "$TOKEN" "$DOMAIN/api/v1/twofaccounts/$id/otp" | + jq ".password" -r | + wl-copy + +notify-send -i "lock" "2FA Code copied" "Copied code for '$selection'" diff --git a/.config/yadm/encrypt b/.config/yadm/encrypt index 14e765b..b833d97 100644 --- a/.config/yadm/encrypt +++ b/.config/yadm/encrypt @@ -1,3 +1,5 @@ .ssh/*.key .local/share/kwalletd/* + +.config/scripts/anyrun/.auth-token diff --git a/.gitignore b/.gitignore index 71cb9af..7b49436 100644 --- a/.gitignore +++ b/.gitignore @@ -38,6 +38,7 @@ !/.config/xdg-desktop-portal/ !/.config/xdg-desktop-portal-termfilechooser/ !/.config/scripts/ +/.config/scripts/anyrun/.auth-token !/.config/systemd/ /.config/systemd/* !/.config/systemd/user/ diff --git a/.ssh/config b/.ssh/config index 489bfd3..53bb936 100644 --- a/.ssh/config +++ b/.ssh/config @@ -18,7 +18,7 @@ Host git.iedsoftworks.com IdentityFile ~/.ssh/git.iedsoftworks.com.key Host home - HostName home + HostName home.server User michel IdentityFile ~/.ssh/home.key @@ -51,6 +51,6 @@ Host vagrant IdentityFile ~/.ssh/vagrant Host essential - HostName essential + HostName essential.server User michel IdentityFile ~/.ssh/essential_home.key