lots of stuff

This commit is contained in:
2025-04-21 19:44:26 -07:00
parent 4d44700fb8
commit 857cb3060a
13 changed files with 105 additions and 246 deletions

View File

@@ -29,6 +29,7 @@ https://itsfoss.com/feed/ "~It's FOSS"
https://kmandla.wordpress.com/feed/ "~K.Mandla"
https://distrowatch.com/news/dw.xml "~DistroWatch"
https://lwn.net/headlines/rss "~LWN.net"
https://www.youtube.com/feeds/videos.xml?channel_id=UCld68syR8Wi-GY_n4CaoJGA
---Podcasts---
https://feeds.simplecast.com/dCXMIpJz "Last Podcast On the Left"

View File

@@ -1,171 +0,0 @@
# If a config.py file exists, this file is ignored unless it's explicitly loaded
# via config.load_autoconfig(). For more information, see:
# https://github.com/qutebrowser/qutebrowser/blob/main/doc/help/configuring.asciidoc#loading-autoconfigyml
# DO NOT edit this file by hand, qutebrowser will overwrite it.
# Instead, create a config.py - see :help for details.
config_version: 2
settings:
content.blocking.method:
global: both
content.javascript.enabled:
'*://*.01.emailinboundprocessing.eu/*': true
'*://*.127.0.0.1/*': true
'*://*.4chanlit.fandom.com/*': true
'*://*.account.proton.me/*': true
'*://*.account.protonvpn.com/*': true
'*://*.ancientdead.com/*': true
'*://*.app.netdata.cloud/*': true
'*://*.app.simplelogin.io/*': true
'*://*.askubuntu.com/*': true
'*://*.babeground.com/*': true
'*://*.babeground.net/*': true
'*://*.babegrounds.live/*': true
'*://*.bandcamp.com/*': true
'*://*.chmodcommand.com/*': true
'*://*.codeberg.org/*': true
'*://*.confluence.atg-corp.com/*': false
'*://*.crontab.guru/*': true
'*://*.customer.xfinity.com/*': true
'*://*.demo.uptime.kuma.pet/*': true
'*://*.docs.google.com/*': true
'*://*.drop.download/*': true
'*://*.duckduckgo.com/*': true
'*://*.features.jellyfin.org/*': true
'*://*.flathub.org/*': true
'*://*.fleet.linuxserver.io/*': true
'*://*.fmovies.to/*': true
'*://*.framatube.org/*': true
'*://*.get.adobe.com/*': true
'*://*.github.com/*': true
'*://*.gitlab.com/*': true
'*://*.goauthentik.io/*': true
'*://*.greyzone.com/*': true
'*://*.heretic.camp/*': true
'*://*.html.duckduckgo.com/*': true
'*://*.hub.docker.com/*': true
'*://*.id.atlassian.com/*': true
'*://*.idcs-3359adb31e35415e8c1729c5c8098c6d.identity.oraclecloud.com/*': true
'*://*.imgflip.com/*': true
'*://*.inv.odyssey346.dev/*': true
'*://*.jf.opal.sh/*': true
'*://*.jira.atg-corp.com/*': true
'*://*.layoffs.fyi/*': true
'*://*.learningnetwork.cisco.com/*': true
'*://*.listen.20buckspin.com/*': true
'*://*.localhost/*': true
'*://*.login.seattle.gov/*': true
'*://*.login.xfinity.com/*': true
'*://*.looking-glass.io/*': true
'*://*.lotrproject.com/*': true
'*://*.mail.proton.me/*': true
'*://*.main.realsecure.flyingcroc.net/*': true
'*://*.metalodyssey.8merch.com/*': true
'*://*.my.uscis.gov/*': true
'*://*.my.vultr.com/*': true
'*://*.myaccount.standingstonegames.com/*': true
'*://*.myutilities.seattle.gov/*': true
'*://*.nagios.realsecure.flyingcroc.net/*': true
'*://*.netbox.realsecure.flyingcroc.net/*': true
'*://*.online.adp.com/*': true
'*://*.onlinebanking.becu.org/*': true
'*://*.onyxboox.com/*': true
'*://*.openscrobbler.com/*': true
'*://*.payments.xfinity.com/*': true
'*://*.portainer.opal.sh/*': true
'*://*.protesilaos.com/*': true
'*://*.proton.me/*': true
'*://*.rateyourmusic.com/*': true
'*://*.register.be.xfinity.com/*': false
'*://*.reverb.com/*': true
'*://*.sack.realsecure.flyingcroc.net/*': true
'*://*.search.brave.com/*': true
'*://*.seattle.bibliocommons.com/*': true
'*://*.seattle.craigslist.org/*': true
'*://*.shop.bulletproof.com/*': true
'*://*.spl.overdrive.com/*': true
'*://*.stackoverflow.com/*': true
'*://*.stash.atg-corp.com/*': true
'*://*.superuser.com/*': true
'*://*.support-acquia.force.com/*': true
'*://*.thecirclemusic.gr/*': true
'*://*.thegrayzone.com/*': true
'*://*.translate.google.com/*': true
'*://*.twitter.com/*': true
'*://*.unix.stackexchange.com/*': true
'*://*.uploadev.org/*': true
'*://*.utilities-self-service.ebill.seattle.gov/*': true
'*://*.veganmenshoes.com/*': true
'*://*.vid.puffyan.us/*': true
'*://*.wooddove.fciis.net/*': true
'*://*.www.20buckspin.com/*': true
'*://*.www.airplane.dev/*': true
'*://*.www.amazon.com/*': true
'*://*.www.astound.com/*': true
'*://*.www.budgetbytes.com/*': true
'*://*.www.calculator.net/*': true
'*://*.www.carhartt.com/*': true
'*://*.www.dancarlin.com/*': true
'*://*.www.drmartens.com/*': true
'*://*.www.duluthtrading.com/*': true
'*://*.www.easyime.com/*': true
'*://*.www.ebay.com/*': true
'*://*.www.filson.com/*': true
'*://*.www.foodnetwork.com/*': true
'*://*.www.geoguessr.com/*': true
'*://*.www.goodreads.com/*': true
'*://*.www.google.com/*': true
'*://*.www.harddrivesdirect.com/*': true
'*://*.www.knoll.com/*': true
'*://*.www.kobo.com/*': true
'*://*.www.last.fm/*': true
'*://*.www.lastpodcastontheleft.com/*': true
'*://*.www.lotro.com/*': true
'*://*.www.metal-archives.com/*': true
'*://*.www.mmorpg.com/*': true
'*://*.www.moddb.com/*': true
'*://*.www.netaddictionrecovery.com/*': true
'*://*.www.nightshiftmerch.com/*': true
'*://*.www.openstreetmap.org/*': true
'*://*.www.patagonia.com/*': true
'*://*.www.paypal.com/*': true
'*://*.www.raspberrypi.com/*': true
'*://*.www.reddit.com/*': true
'*://*.www.seattle.gov/*': true
'*://*.www.startpage.com/*': true
'*://*.www.thisisclassicalguitar.com/*': true
'*://*.www.vegetarian-shoes.co.uk/*': true
'*://*.www.vultr.com/*': true
'*://*.www.wills-vegan-store.com/*': true
'*://*.www.xfinity.com/*': true
'*://*.www.youtube.com/*': true
'*://*.www.zillow.com/*': true
'*://24timezones.com/*': true
'*://chatgpt.com/*': true
'*://digital.fidelity.com/*': true
'*://gethomepage.dev/*': true
'*://git.opal.sh/*': true
'*://irc.opal.sh/*': true
'*://jf.opal.sh/*': true
'*://jsonformatter.curiousconcept.com/*': true
'*://lemmygrad.ml/*': true
'*://login.becu.org/*': true
'*://myaccounts.capitalone.com/*': true
'*://rateyourmusic.com/*': true
'*://revelationofdoom.com/*': true
'*://rss.opal.sh/*': true
'*://safereddit.com/*': true
'*://verified.capitalone.com/*': true
'*://wiki.alpinelinux.org/*': true
'*://www.duplicati.com/*': true
'*://www.fidelity.com/*': true
'*://www.instagram.com/*': true
'*://www.newegg.com/*': true
'*://www.vitamix.com/*': true
'*://www.youtube.com/*': true
'*://yewtu.be/*': true
content.notifications.enabled:
https://jf.opal.sh: false
https://www.facebook.com: false
content.register_protocol_handler:
https://mail.proton.me#mailto=%25s: false

View File

@@ -35,7 +35,6 @@ c.colors.webpage.preferred_color_scheme = "dark"
c.content.cookies.accept = "no-3rdparty"
c.content.webrtc_ip_handling_policy = "default-public-interface-only"
c.content.site_specific_quirks.enabled = False
c.content.headers.user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.79 Safari/537.36"
config.bind("j", "scroll-px 0 100")
config.bind("k", "scroll-px 0 -100")

View File

@@ -1 +0,0 @@
66h&!@Vj4n$cAfwN https://verified.capitalone.com/auth/signin

View File

@@ -152,7 +152,7 @@ bindsym $mod+Ctrl+g exec grimshot save window
# Bookmarks
# Enter selected bookmark into target text field
bindsym $mod+i exec wtype $(grep -v '^#' ~/.local/share/bookmarks/bookmarks | bemenu -p Bookmark: -l 50 -c -M 500 --fn 'Monospace 14' --tf '#ff4e00' --ff '#dbc077' --hf '#ff4e00' | cut -d ' ' -f1) wtype -k Return
bindsym $mod+i exec wtype "$(grep -v '^#' ~/.local/share/bookmarks/bookmarks | bemenu -p Bookmark: -l 20 -c -M 500 --fn 'Monospace 14' --tf '#ff4e00' --ff '#dbc077' --hf '#ff4e00' | cut -d ' ' -f1)"
# Insert bookmark into bookmark file (~/.local/share/bookmarks/bookmarks)
bindsym $mod+Shift+i exec ~/.local/bin/bookmark_insert

View File

@@ -6,7 +6,6 @@ get_date() {
get_weather() {
CACHE_FILE="$HOME/.cache/weather.txt"
# 10 minutes
CACHE_DURATION=600
mkdir -p "$(dirname "$CACHE_FILE")"
@@ -20,15 +19,19 @@ get_weather() {
fi
if [ "$age" -gt "$CACHE_DURATION" ]; then
weather_output=$(python3 "$HOME/.config/sway/scripts/weather.py")
if [ -x "$HOME/.config/sway/scripts/weather.sh" ]; then
weather_output="$("$HOME/.config/sway/scripts/weather.sh")"
echo "$weather_output" > "$CACHE_FILE"
else
echo "No weather data" > "$CACHE_FILE"
fi
fi
cat "$CACHE_FILE"
}
get_battery() {
BATTERY_PATH="/sys/class/power_supply/BAT0"
BATTERY_PATH=$(find /sys/class/power_supply/ -name "BAT*" | head -n 1)
if [ -f "$BATTERY_PATH/capacity" ]; then
BAT_PERCENT=$(cat "$BATTERY_PATH/capacity")
@@ -53,8 +56,30 @@ get_volume() {
[ "$MUTE_STATUS" = "yes" ] && printf " (m)"
}
now_playing() {
MAXLEN=35
ARTIST=$(playerctl -a metadata artist 2>/dev/null)
TITLE=$(playerctl -a metadata title 2>/dev/null)
if [ -z "$ARTIST" ] && [ -z "$TITLE" ]; then
return 0
fi
INFO="$ARTIST - $TITLE"
if [ ${#INFO} -le $MAXLEN ]; then
printf "%s" "$INFO"
else
printf "%s…" "$(printf "%s" "$INFO" | cut -c1-$((MAXLEN - 1)))"
fi
}
while true; do
PLAYING="$(now_playing)"
if [ -n "$PLAYING" ]; then
printf "%s | V:%s | %s | %s | B:%s\n" "$PLAYING" "$(get_volume)" "$(get_date)" "$(get_weather)" "$(get_battery)"
else
printf "V:%s | %s | %s | B:%s\n" "$(get_volume)" "$(get_date)" "$(get_weather)" "$(get_battery)"
fi
sleep 1
done

View File

@@ -1,60 +0,0 @@
#!/usr/bin/env python3
import requests
import json
import sys
API_KEY = "99631af2d6db903d1f689c7d2cb13764"
CITY_ID = "5809844"
UNITS = "metric"
def celsius_to_fahrenheit(celsius):
return (celsius * 9 / 5) + 32
def get_weather_icon(description):
icons = {
"clear sky": "☀️",
"few clouds": "🌤️",
"scattered clouds": "🌥️",
"broken clouds": "☁️",
"overcast clouds": "☁️",
"shower rain": "🌦️",
"light rain": "🌧️",
"light intensity drizzle": "🌧️",
"moderate rain": "🌧️",
"rain": "🌧️",
"thunderstorm": "⛈️",
"snow": "❄️",
"mist": "🌫️",
"haze": "🌫️",
"smoke": "🌫️",
"fog": "🌫️",
}
return icons.get(description, "")
try:
response = requests.get(
f"http://api.openweathermap.org/data/2.5/weather?id={CITY_ID}&units={UNITS}&appid={API_KEY}"
)
response.raise_for_status()
weather_data = response.json()
#print(weather_data)
weather_desc = weather_data["weather"][0]["description"]
(weather_desc)
temp_c = round(weather_data["main"]["temp"])
temp_f = round(celsius_to_fahrenheit(temp_c))
weather_icon = get_weather_icon(weather_desc)
print(f"{weather_icon} {temp_c}°C / {temp_f}°F")
except requests.exceptions.RequestException as e:
print(f"Error: {e}")
print(json.dumps({"text": "", "tooltip": "Could not retrieve weather data"}))
sys.exit(1)
except json.JSONDecodeError:
print("Error: Failed to parse JSON response")
print(response.content)
sys.exit(1)

39
.config/sway/scripts/weather.sh Executable file
View File

@@ -0,0 +1,39 @@
#!/bin/sh
API_KEY="99631af2d6db903d1f689c7d2cb13764"
CITY_ID="5809844"
UNITS="metric"
WEATHER_URL="http://api.openweathermap.org/data/2.5/weather?id=$CITY_ID&units=$UNITS&appid=$API_KEY"
celsius_to_fahrenheit() {
awk "BEGIN { printf \"%.0f\", ($1 * 9 / 5) + 32 }"
}
get_weather_icon() {
desc="$1"
case "$desc" in
"clear sky") echo "☀️" ;;
"few clouds") echo "🌤️" ;;
"scattered clouds") echo "🌥️" ;;
"broken clouds" | "overcast clouds") echo "☁️" ;;
"shower rain" | "light rain" | "light intensity drizzle" | "moderate rain" | "rain") echo "🌧️" ;;
"thunderstorm") echo "⛈️" ;;
"snow") echo "❄️" ;;
"mist" | "haze" | "smoke" | "fog") echo "🌫️" ;;
*) echo "❓" ;;
esac
}
response=$(curl -s "$WEATHER_URL")
if [ -z "$response" ]; then
echo "Error: Empty response from weather API"
exit 1
fi
# Extract fields using jq
desc=$(echo "$response" | jq -r '.weather[0].description')
temp_c=$(echo "$response" | jq -r '.main.temp' | awk '{ printf "%.0f", $1 }')
temp_f=$(celsius_to_fahrenheit "$temp_c")
icon=$(get_weather_icon "$desc")
printf "%s %s°C (%s°F)\n" "$icon" "$temp_c" "$temp_f"

1
.gitignore vendored
View File

@@ -1,4 +1,5 @@
.config/qutebrowser/quickmarks
.config/qutebrowser/autoconfig.yml
.config/beets/beets-library.db
.config/beets/state.pickle
*.swp

View File

@@ -1,6 +1,6 @@
#!/bin/sh
clipboard_text=$(wl-paste -p)
clipboard_text=$(wl-paste)
bookmarks_file="$HOME/.local/share/bookmarks/bookmarks"
if [ ! -f "$bookmarks_file" ]; then
@@ -12,9 +12,6 @@ fi
# Trim leading/trailing whitespace
clipboard_text=$(echo "$clipboard_text" | xargs)
# Strip https:// or http://
clipboard_text=$(echo "$clipboard_text" | sed 's#^https\?://##')
# Remove trailing slashes
clipboard_text=$(echo "$clipboard_text" | sed 's#/$##')

View File

@@ -1,5 +1,15 @@
#!/bin/sh
# Try to source keychain's environment file
if [ -f "$HOME/.keychain/$(hostname)-sh" ]; then
. "$HOME/.keychain/$(hostname)-sh"
fi
# Fallback to gnome-keyring if keychain not used
if [ -z "$SSH_AUTH_SOCK" ] && [ -S "/run/user/$(id -u)/keyring/ssh" ]; then
export SSH_AUTH_SOCK="/run/user/$(id -u)/keyring/ssh"
fi
# Define the paths and repository
bookmarks_file="$HOME/.local/share/bookmarks/bookmarks"
repo_path="$HOME/.local/share/bookmarks"
@@ -15,9 +25,9 @@ if [ -n "$(git status --porcelain "$bookmarks_file")" ]; then
git commit -m "Update bookmarks file"
# Push the changes and log output
#git push origin master
GIT_SSH_COMMAND="ssh -i ~/.ssh/ry_ecdsa" git push origin master 2>&1 | tee -a /tmp/bookmark_git_push.log
notify-send "Bookmarks updated" "Please push your changes."
notify-send "Bookmarks updated" "Changes pushed."
else
notify-send "No changes" "No changes to the bookmarks file."
fi

19
.local/bin/get_yt_id Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/sh
URL="$1"
[ -z "$URL" ] && { echo "Usage: $0 <youtube-url>"; exit 1; }
HTML=$(curl -sL "$URL")
CHANNEL_ID=$(printf "%s\n" "$HTML" | grep -oE '"channelId":"UC[^\"]+' | sed 's/.*"channelId":"//' | head -n1)
if [ -z "$CHANNEL_ID" ]; then
CHANNEL_ID=$(printf "%s\n" "$HTML" | grep -oE 'href="/channel/UC[^"]+' | sed 's|href="/channel/||' | head -n1)
fi
if [ -n "$CHANNEL_ID" ]; then
echo "https://www.youtube.com/feeds/videos.xml?channel_id=$CHANNEL_ID"
else
echo "Channel ID not found"
exit 1
fi

View File

@@ -6,7 +6,7 @@ export XDG_CACHE_HOME="$HOME/.cache"
export XDG_DATA_HOME="$HOME/.local/share"
export VISUAL=nvim
export EDITOR=nvim
export BROWSER=/usr/bin/librewolf
export BROWSER=/usr/bin/qutebrowser
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8