clone of my dotfiles.ssp.sh
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

add encryption

sspaeti 9790a90d 2106388b

+85 -1
+62
newsboat/.config/newsboat/Makefile
··· 1 + .DEFAULT_GOAL := save 2 + .PHONY: decrypt run save clean help 3 + 4 + # Default target - decrypt and run newsboat 5 + run: decrypt 6 + @newsboat 7 + 8 + # Decrypt urls.gpg to urls using environment variable 9 + decrypt: 10 + @if [ -z "$$NEWSBOAT_PASS" ]; then \ 11 + echo "Error: NEWSBOAT_PASS environment variable not set"; \ 12 + exit 1; \ 13 + fi; \ 14 + if [ -f urls.gpg ]; then \ 15 + echo "$$NEWSBOAT_PASS" | gpg --batch --yes --passphrase-fd 0 --quiet --decrypt urls.gpg > urls 2>/dev/null; \ 16 + if [ $$? -eq 0 ]; then \ 17 + echo "✓ Decrypted urls.gpg -> urls"; \ 18 + else \ 19 + echo "Error: Failed to decrypt urls.gpg"; \ 20 + exit 1; \ 21 + fi \ 22 + else \ 23 + echo "Error: urls.gpg not found"; \ 24 + exit 1; \ 25 + fi 26 + 27 + # Save (encrypt) urls to urls.gpg using environment variable 28 + save: 29 + @if [ -z "$$NEWSBOAT_PASS" ]; then \ 30 + echo "Error: NEWSBOAT_PASS environment variable not set"; \ 31 + exit 1; \ 32 + fi; \ 33 + if [ -f urls ]; then \ 34 + echo "$$NEWSBOAT_PASS" | gpg --batch --yes --passphrase-fd 0 --symmetric --cipher-algo AES256 -o urls.gpg urls 2>/dev/null; \ 35 + if [ $$? -eq 0 ]; then \ 36 + echo "✓ Encrypted urls -> urls.gpg"; \ 37 + echo "Ready to commit: cd ~/git/general/dotfiles && git add newsboat/.config/newsboat/urls.gpg && git commit"; \ 38 + else \ 39 + echo "Error: Failed to encrypt urls"; \ 40 + exit 1; \ 41 + fi \ 42 + else \ 43 + echo "Error: urls file not found"; \ 44 + exit 1; \ 45 + fi 46 + 47 + # Clean decrypted urls file 48 + clean: 49 + @rm -f urls 50 + @echo "✓ Removed decrypted urls file" 51 + 52 + # Help message 53 + help: 54 + @echo "Newsboat Encrypted URLs Management" 55 + @echo "" 56 + @echo "Usage:" 57 + @echo " make run - Decrypt and run newsboat (default)" 58 + @echo " make save - Encrypt urls to urls.gpg" 59 + @echo " make clean - Remove decrypted urls file" 60 + @echo "" 61 + @echo "Environment variable required:" 62 + @echo " NEWSBOAT_PASS - Passphrase for encryption/decryption"
+21
newsboat/.config/newsboat/decrypt.sh
··· 1 + #!/bin/bash 2 + # Decrypt newsboat urls and launch newsboat 3 + 4 + NEWSBOAT_DIR="$HOME/.config/newsboat" 5 + URLS_ENCRYPTED="$NEWSBOAT_DIR/urls.gpg" 6 + URLS_DECRYPTED="$NEWSBOAT_DIR/urls" 7 + 8 + # Decrypt the urls file 9 + if [ -f "$URLS_ENCRYPTED" ]; then 10 + gpg --quiet --decrypt "$URLS_ENCRYPTED" > "$URLS_DECRYPTED" 2>/dev/null 11 + if [ $? -ne 0 ]; then 12 + echo "Error: Failed to decrypt $URLS_ENCRYPTED" 13 + exit 1 14 + fi 15 + else 16 + echo "Error: Encrypted urls file not found at $URLS_ENCRYPTED" 17 + exit 1 18 + fi 19 + 20 + # Launch newsboat with any provided arguments 21 + exec newsboat "$@"
newsboat/.config/newsboat/urls.gpg

This is a binary file and will not be displayed.

+2 -1
zsh/.dotfiles/zsh/aliases.shrc
··· 116 116 alias mutt="neomutt" 117 117 alias m="neomutt" 118 118 119 - alias rss="newsboat" 119 + # alias rss="newsboat" 120 + alias rss='cd ~/.config/newsboat && make run' 120 121 121 122 # alias mscreener="~/.config/mutt/initial_screening.sh" 122 123 alias mscreener="~/.config/mutt/initial_screening.sh >> ~/.config/mutt/logs/screening.log 2>&1"