diff --git a/.bin/autoinstall b/.bin/autoinstall index b8b37ba..0bf0c91 100755 --- a/.bin/autoinstall +++ b/.bin/autoinstall @@ -73,7 +73,7 @@ _autoinstall_file () { file_path=$(dirname "$2") mkdir -p "$file_path" cd "$file_path" || exit - curl -LsSo "$2" "$1" + curl -fsSLo "$2" "$1" fi } @@ -84,7 +84,7 @@ _autoinstall_archive () { file_path=$(dirname "$2") mkdir -p "$file_path" cd "$file_path" || exit - curl -LsSo "$2" "$1" + curl -fsSLo "$2" "$1" tar xaf "$2" fi } diff --git a/.bin/autostart-manage b/.bin/autostart-manage index 69a738e..43c5f5e 100755 --- a/.bin/autostart-manage +++ b/.bin/autostart-manage @@ -34,7 +34,7 @@ _autostart_manage_add () { Description=$1 [Service] -ExecStart=$2 +ExecStart=/usr/bin/sh -c ". \$HOME/.config/environment && $2" EOF } diff --git a/.bin/source-remote-file b/.bin/source-remote-file index 54d01d2..00b1077 100755 --- a/.bin/source-remote-file +++ b/.bin/source-remote-file @@ -8,7 +8,7 @@ mkdir -p "$base_path" if [ ! -f "$file_path" ] then echo "Installing file $2" - curl -Ls -o "$file_path" "$1" + curl -fsSL -o "$file_path" "$1" fi # shellcheck disable=SC1090 diff --git a/.bin/start-audio b/.bin/start-audio index 18c57b0..bc7b528 100755 --- a/.bin/start-audio +++ b/.bin/start-audio @@ -42,8 +42,8 @@ start_audio_pipewire () { sleep 5 - pw-link 'default-sink:monitor_FL' 'alsa_output.usb-BEHRINGER_UMC202HD_192k-00.analog-stereo:playback_FL' - pw-link 'default-sink:monitor_FR' 'alsa_output.usb-BEHRINGER_UMC202HD_192k-00.analog-stereo:playback_FR' + pw-link 'default-sink:monitor_FL' 'alsa_output.usb-BEHRINGER_UMC202HD_192k-00.HiFi__hw_U192k__sink:playback_FL' + pw-link 'default-sink:monitor_FR' 'alsa_output.usb-BEHRINGER_UMC202HD_192k-00.HiFi__hw_U192k__sink:playback_FR' pw-link 'default-sink:monitor_FL' 'alsa_output.pci-0000_00_1f.3.analog-stereo:playback_FL' pw-link 'default-sink:monitor_FR' 'alsa_output.pci-0000_00_1f.3.analog-stereo:playback_FR' diff --git a/.config/aliasrc b/.config/aliasrc index 5323922..6347605 100644 --- a/.config/aliasrc +++ b/.config/aliasrc @@ -18,8 +18,7 @@ alias cp='cp -iv' alias df='df -h' alias doas='doas -- ' alias doasu='\doas -u ' -alias dotfiles='.f' -alias dotfiles-mail='.fm' +alias docker-caddy-reload='docker compose exec app sh -c "caddy validate --config /etc/caddy/Caddyfile && caddy reload --config /etc/caddy/Caddyfile"' alias du='du -h' alias free='free -h' diff --git a/.config/qutebrowser/common.py b/.config/qutebrowser/common.py index 3ec2c87..355692e 100644 --- a/.config/qutebrowser/common.py +++ b/.config/qutebrowser/common.py @@ -31,6 +31,8 @@ def init(c): } c.url.start_pages = ['rss.serguzim.me', 'open.spotify.com'] + c.zoom.mouse_divider = 0 + dracula.draw.blood(c, { 'spacing': { 'vertical': 1, diff --git a/.config/qutebrowser/keybindings.py b/.config/qutebrowser/keybindings.py index 603ddeb..b0314e2 100644 --- a/.config/qutebrowser/keybindings.py +++ b/.config/qutebrowser/keybindings.py @@ -19,6 +19,7 @@ def init(c): c.bind(',Pu', 'spawn --userscript qute-keepassxc --only-username --key ' + gpg_key, mode='normal') c.bind(',Pi', 'spawn --userscript qute-keepassxc --only-password --key ' + gpg_key, mode='normal') c.bind(',Po', 'spawn --userscript qute-keepassxc --only-otp --key ' + gpg_key, mode='normal') + c.bind(',Pp', 'spawn --userscript qute-keepassxc --autotype --key ' + gpg_key, mode='normal') c.bind(',q', 'spawn --userscript qr {url}') c.bind(',Q', 'hint links spawn --userscript qr {hint-url}') diff --git a/.local/share/qutebrowser/userscripts/qute-keepassxc b/.local/share/qutebrowser/userscripts/qute-keepassxc index 59c1bab..466d856 100755 --- a/.local/share/qutebrowser/userscripts/qute-keepassxc +++ b/.local/share/qutebrowser/userscripts/qute-keepassxc @@ -81,6 +81,7 @@ import base64 import shlex import subprocess import argparse +#from urllib.parse import urlparse import nacl.utils import nacl.public @@ -103,6 +104,8 @@ def parse_args(): help='Only insert password') parser.add_argument('--only-otp', action='store_true', help='Only insert OTP code') + parser.add_argument('--autotype', action='store_true', + help='Only insert OTP code') return parser.parse_args() @@ -196,6 +199,13 @@ class KeepassXC: )) return self.recv_msg()['totp'] + def autotype(self, uuid): + self.send_msg(dict( + action = 'request-autotype', + uuid = uuid, + )) + return self.recv_msg()['totp'] + def send_raw_msg(self, msg): self.sock.send( json.dumps(msg).encode('utf-8') ) @@ -371,13 +381,17 @@ def main(): kp = connect_to_keepassxc(args) if not kp: error('Could not connect to KeepassXC') - return + + #if args.autotype: + # qute('mode-enter insert') + # kp.autotype(selection['uuid']) + # return + creds = kp.get_logins(args.url) if not creds: error('No credentials found') return - selection = creds[0] if len(creds) > 1: login = dmenu(sorted(map(lambda c: c['login'], creds)), args.dmenu_invocation) @@ -402,6 +416,10 @@ def main(): if otp: fake_key_raw(otp) return + if args.autotype: + qute('mode-enter insert') + kp.autotype(selection['uuid']) + return if name and pw: qute('jseval -q ' + make_js_code(name, pw)) @@ -411,4 +429,3 @@ def main(): if __name__ == '__main__': main() -