Update configs
This commit is contained in:
		
							parent
							
								
									028d3d7760
								
							
						
					
					
						commit
						ddcc044ec6
					
				
					 8 changed files with 30 additions and 11 deletions
				
			
		|  | @ -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 | ||||
| } | ||||
|  |  | |||
|  | @ -34,7 +34,7 @@ _autostart_manage_add () { | |||
| Description=$1 | ||||
| 
 | ||||
| [Service] | ||||
| ExecStart=$2 | ||||
| ExecStart=/usr/bin/sh -c ". \$HOME/.config/environment && $2" | ||||
| EOF | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -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 | ||||
|  |  | |||
|  | @ -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' | ||||
|  |  | |||
|  | @ -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' | ||||
|  |  | |||
|  | @ -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, | ||||
|  |  | |||
|  | @ -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}') | ||||
|  |  | |||
|  | @ -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() | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue