Deletged generated, testing new location scripts

This commit is contained in:
2026-04-29 09:52:40 +02:00
parent 8447a9b596
commit 8e82977bc9
16997 changed files with 410 additions and 134198 deletions
@@ -1,10 +0,0 @@
#!/usr/bin/env bash
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
capacity=$(cat /sys/class/power_supply/BAT*/capacity)
status=$(cat /sys/class/power_supply/BAT*/status)
if [ "$status" != "Charging" ] && [ "$capacity" -lt 15 ]; then
echo " $capacity%"
else
echo ""
fi
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
bt_connected=""
while read -r _ mac name_rest; do
if [ "$(bluetoothctl info "$mac" | awk '/Connected:/ {print $2}')" = "yes" ]; then
bt_connected+="$name_rest\n"
fi
done < <(bluetoothctl devices)
# icon
if [ -n "$bt_connected" ]; then
icon=""
tooltip=$(printf "%b" "$bt_connected")
else
icon=""
tooltip="No devices connected"
fi
# ALWAYS produce valid JSON
printf '{"text": "%s", "tooltip": "%s"}\n' "$icon" "$tooltip"
@@ -1,35 +0,0 @@
#!/usr/bin/env bash
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
# Get focused monitor name
focused_monitor=$(hyprctl monitors -j | jq -r '.[] | select(.focused==true) | .name')
monitor="${WAYBAR_OUTPUT_NAME:-$focused_monitor}"
# Hide if not focused monitor
if [ "$monitor" != "$focused_monitor" ]; then
jq -c -n '{text:"", class:"hidden"}'
exit 0
fi
# Get active workspace on this monitor
active_ws=$(hyprctl monitors -j | jq -r \
".[] | select(.name==\"$monitor\") | .activeWorkspace.id")
# Get clients
clients=$(hyprctl clients -j | jq -r \
".[] | select(.workspace.id==$active_ws) | \"\(.title)\"")
count=$(echo "$clients" | grep -c '\S')
# Hide if 0 or 1 clients — no point showing window switcher
if [ "$count" -le 1 ]; then
jq -c -n '{text:"", class:"hidden"}'
exit 0
fi
tooltip=$(echo "$clients" | sed 's/^/• /' | paste -sd '\n' -)
jq -c -n \
--arg text "$count" \
--arg tooltip "$tooltip" \
--arg class "active" \
'{text:$text, tooltip:$tooltip, class:$class}'
@@ -1,15 +0,0 @@
#!/usr/bin/env bash
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
active_ws=$(hyprctl activeworkspace -j | jq -r '.id')
clients=$(hyprctl clients -j | jq -r \
".[] | select(.workspace.id==$active_ws) | \"\(.address)|\(.title)\"")
choice=$(echo "$clients" | cut -d'|' -f2 \
| wofi --dmenu \
--style ~/.config/wofi/style.css \
--allow-images=false \
--prompt "Active windows ...")
[ -z "$choice" ] && exit 0
addr=$(echo "$clients" | grep "|$choice" | head -n1 | cut -d'|' -f1)
hyprctl dispatch focuswindow address:"$addr"
@@ -1,17 +0,0 @@
#!/usr/bin/env bash
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
DEVICE=$(kdeconnect-cli --list-devices | grep -oP '(?<=\().*?(?=\))' | head -n 1)
if [ -z "$DEVICE" ]; then
echo "No phone"
exit 0
fi
NAME=$(kdeconnect-cli -d "$DEVICE" --name 2>/dev/null)
BATTERY=$(kdeconnect-cli -d "$DEVICE" --battery 2>/dev/null | grep -o '[0-9]\+' | head -n 1)
if [ -z "$BATTERY" ]; then
echo "$NAME"
else
echo "$NAME $BATTERY%"
fi
@@ -1,92 +0,0 @@
#!/usr/bin/env bash
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
# Player selection — prefer actively playing player
player=$(playerctl -l 2>/dev/null | while read -r p; do
st=$(playerctl --player="$p" status 2>/dev/null)
[ "$st" = "Playing" ] && echo "$p" && break
done)
[ -z "$player" ] && player=$(playerctl -l 2>/dev/null | head -n1)
if [ -z "$player" ]; then
jq -c -n '{text: "", tooltip: "", class: "inactive"}'
exit 0
fi
status=$(playerctl --player="$player" status 2>/dev/null)
if [ "$status" != "Playing" ] && [ "$status" != "Paused" ]; then
jq -c -n '{text: "", tooltip: "", class: "inactive"}'
exit 0
fi
artist=$(playerctl --player="$player" metadata artist 2>/dev/null)
title=$(playerctl --player="$player" metadata title 2>/dev/null)
album=$(playerctl --player="$player" metadata album 2>/dev/null)
art=$(playerctl --player="$player" metadata mpris:artUrl 2>/dev/null)
length=$(playerctl --player="$player" metadata mpris:length 2>/dev/null)
position=$(playerctl --player="$player" position 2>/dev/null)
# Progress percentage — pure bash, no bc needed
if [ -n "$length" ] && [ -n "$position" ] && [ "$length" -gt 0 ] 2>/dev/null; then
pos_us=$(echo "$position" | awk '{printf "%d", $1 * 1000000}')
progress=$(( pos_us * 100 / length ))
else
progress=0
fi
# Spotify device
device=""
if [[ "$player" == *"spotify"* ]]; then
device=$(playerctl --player="$player" metadata xesam:url 2>/dev/null | grep -o 'device=[^&]*' | cut -d= -f2)
fi
# Icon
if [ "$status" = "Paused" ]; then
icon="⏸ "
else
icon="▶ "
fi
# Scrolling ticker
CACHE_FILE="/tmp/waybar_media_scroll_${player//\//_}"
full_text="${artist}${title}"
text_len=${#full_text}
display_len=30
# Reset scroll offset when track changes
TRACK_FILE="/tmp/waybar_media_track_${player//\//_}"
last_track=""
[ -f "$TRACK_FILE" ] && last_track=$(cat "$TRACK_FILE")
if [ "$full_text" != "$last_track" ]; then
echo "0" > "$CACHE_FILE"
echo "$full_text" > "$TRACK_FILE"
fi
if [ "$text_len" -le "$display_len" ]; then
text="$full_text"
else
offset=0
[ -f "$CACHE_FILE" ] && offset=$(cat "$CACHE_FILE")
padded="${full_text} ${full_text}"
text="${padded:$offset:$display_len}"
next_offset=$(( (offset + 1) % (text_len + 4) ))
echo "$next_offset" > "$CACHE_FILE"
fi
# Build tooltip
tooltip="Artist: ${artist}
Title: ${title}
Album: ${album}"
if [ -n "$device" ]; then
tooltip="${tooltip}
󰓻 ${device}"
fi
tooltip="${tooltip}"
jq -c -n \
--arg text "${icon}${text}" \
--arg tooltip "$tooltip" \
--arg class "$player" \
--arg art "$art" \
'{text: $text, tooltip: $tooltip, class: $class, alt: $art}'
@@ -1,15 +0,0 @@
#!/usr/bin/env bash
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
# Tel toetsenborden met volledige toetsset (geen media-only apparaten)
COUNT=$(libinput list-devices 2>/dev/null \
| grep -A5 "Keyboard" \
| grep -c "kbd")
# Of via xinput / /proc alternatief:
# COUNT=$(cat /proc/bus/input/devices | grep -B5 'KEY=.*[a-f0-9]\{10\}' | grep -c 'Name=')
if [ "$COUNT" -ge 2 ]; then
numlockx on
else
numlockx off
fi
@@ -1,48 +0,0 @@
#!/usr/bin/env bash
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
#
# Launch a power menu
#
# Requires fzf and systemd (loginctl, systemctl)
#
# Author: Jesse Mirabel <sejjymvm@gmail.com>
# Date: August 19, 2025
# License: MIT
main() {
local list=(
"󰌾 Lock"
"󰐥 Shutdown"
"󰑙 Reboot"
"󰍃 Logout"
"󰒲 Hibernate"
"󰤄 Suspend"
)
local options=(
"--border=sharp"
"--border-label= Power Menu "
"--cycle"
"--ghost=Search"
"--height=~100%"
"--highlight-line"
"--info=inline-right"
"--pointer="
"--reverse"
)
local selected
selected=$(printf "%s\n" "${list[@]}" | fzf "${options[@]}")
case $selected in
Lock) loginctl lock-session ;;
Shutdown) systemctl poweroff ;;
Reboot) systemctl reboot ;;
Logout) loginctl terminate-session "$XDG_SESSION_ID" ;;
Hibernate) systemctl hibernate ;;
Suspend) systemctl suspend ;;
*) return 1 ;;
esac
}
main
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
set -e
REPO="/home/$USER/Repos/nixos/Droidnix"
HOSTNAME="$(hostname)"
cd "$REPO"
echo "🔧 Fixing ownership..."
sudo chown "$USER":"$USER" flake.lock 2>/dev/null || true
echo "🔄 Updating flake..."
nix flake update
echo "🏗 Rebuilding NixOS..."
sudo nixos-rebuild switch --flake ".#$HOSTNAME"
echo "📦 Updating Flatpaks..."
flatpak update -y
@@ -1,8 +0,0 @@
#!/usr/bin/env bash
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
wofi --show drun \
--style ~/.config/wofi/style.css \
--no-actions \
--allow-images=false \
--columns 1 \
--prompt "Apps ..."