aboutsummaryrefslogtreecommitdiff
path: root/quickshell/scripts
diff options
context:
space:
mode:
authorAargh Rai <aargh.rai+git@gmail.com>2026-08-06 00:29:36 +0530
committerAargh Rai <aargh.rai+git@gmail.com>2026-08-06 00:29:36 +0530
commit91a5f9790cfd4a98ee940633694fb512ecf24942 (patch)
treeb20bdd22e304234b6893e20d0ca5fbfd042f2184 /quickshell/scripts
parentced774e19c36fb3b0b33a3846e7c9cf874b0c206 (diff)
i3 > hyprland & x11 > wayland
Diffstat (limited to 'quickshell/scripts')
-rw-r--r--quickshell/scripts/battery-info.py39
-rwxr-xr-xquickshell/scripts/battery-info.sh17
-rwxr-xr-xquickshell/scripts/battery.sh3
-rwxr-xr-xquickshell/scripts/bluetooth.sh9
-rwxr-xr-xquickshell/scripts/brightness.sh4
-rwxr-xr-xquickshell/scripts/cpu_temp.sh2
-rwxr-xr-xquickshell/scripts/list-apps.sh115
-rwxr-xr-xquickshell/scripts/network.sh2
8 files changed, 0 insertions, 191 deletions
diff --git a/quickshell/scripts/battery-info.py b/quickshell/scripts/battery-info.py
deleted file mode 100644
index c3958f7..0000000
--- a/quickshell/scripts/battery-info.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# this script was used to generate the battery-info.sh via chatgpt
-
-import subprocess
-
-output = subprocess.run(
- ["upower", "--enumerate"],
- capture_output=True
-).stdout.decode('utf-8')
-
-target = None
-
-for line in output.split("\n"):
- if "BAT" not in line:
- continue
- target = line
- break
-
-print(line)
-
-output = subprocess.run(
- ["upower", "-i", line],
- capture_output=True
-).stdout.decode('utf-8')
-
-energy = None
-voltage = None
-capacity = None
-
-for line in output.split("\n"):
- if energy is None and "energy:" in line:
- energy = line.split(":")[1].strip()
- if voltage is None and "voltage:" in line:
- voltage = line.split(":")[1].strip()
- if capacity is None and "capacity:" in line:
- capacity = line.split(":")[1].strip()
-
-print("energy:", energy)
-print("voltage:", voltage)
-print("capacity:", capacity)
diff --git a/quickshell/scripts/battery-info.sh b/quickshell/scripts/battery-info.sh
deleted file mode 100755
index 414d168..0000000
--- a/quickshell/scripts/battery-info.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/env bash
-
-target=$(upower --enumerate | awk '/BAT/ { print; exit }')
-
-upower -i "$target" | awk -F: '
-/energy:/ && !e { e=$2 }
-/voltage:/ && !v { v=$2 }
-/capacity:/ && !c { c=$2 }
-END {
- gsub(/^[ \t]+/, "", e)
- gsub(/^[ \t]+/, "", v)
- gsub(/^[ \t]+/, "", c)
-
- print "energy:", e
- print "voltage:", v
- print "capacity:", c
-}'
diff --git a/quickshell/scripts/battery.sh b/quickshell/scripts/battery.sh
deleted file mode 100755
index 77f800a..0000000
--- a/quickshell/scripts/battery.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-battery=$(cat /sys/class/power_supply/BAT1/capacity)
-charging=$(cat /sys/class/power_supply/ACAD/online)
-echo "$battery $charging"
diff --git a/quickshell/scripts/bluetooth.sh b/quickshell/scripts/bluetooth.sh
deleted file mode 100755
index 861e4a3..0000000
--- a/quickshell/scripts/bluetooth.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env bash
-
-connected="$(bluetoothctl devices Connected)"
-
-if [ -z "$connected" ]; then
- echo "Offline"
-else
- echo "$connected"
-fi
diff --git a/quickshell/scripts/brightness.sh b/quickshell/scripts/brightness.sh
deleted file mode 100755
index a39b85d..0000000
--- a/quickshell/scripts/brightness.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-brightness=$(cat /sys/class/backlight/acpi_video0/actual_brightness)
-temp=$(hyprctl hyprsunset temperature 2>/dev/null | grep -o '[0-9]\+')
-if [ -z "$temp" ]; then temp=6000; fi
-echo "$brightness $temp"
diff --git a/quickshell/scripts/cpu_temp.sh b/quickshell/scripts/cpu_temp.sh
deleted file mode 100755
index de73d7d..0000000
--- a/quickshell/scripts/cpu_temp.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-temp=$(sensors | awk '/^Package id 0:/ {print int($4) + 273}')
-echo "$temp"
diff --git a/quickshell/scripts/list-apps.sh b/quickshell/scripts/list-apps.sh
deleted file mode 100755
index bac48b6..0000000
--- a/quickshell/scripts/list-apps.sh
+++ /dev/null
@@ -1,115 +0,0 @@
-#!/bin/sh
-# List desktop applications for the launcher
-
-# Blacklist - apps to hide (add desktop file basenames here)
-BLACKLIST=(
- # "xfce4-about.desktop"
- # "avahi-discover.desktop"
- # "bssh.desktop"
- # "bvnc.desktop"
- # "qv4l2.desktop"
- # "qvidcap.desktop"
- # "lstopo.desktop"
- # "uuctl.desktop"
- # "codium.desktop" # Hide regular VSCodium (keep Wayland version)
- # "xgps.desktop" # Hide Xgps
- # "xgpsspeed.desktop" # Hide Xgpsspeed
-)
-
-# Search paths for .desktop files (local first so overrides work)
-XDG_DATA_DIRS="${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
-IFS=':' read -ra SEARCH_PATHS <<< "$XDG_DATA_DIRS"
-
-# Function to find icon path
-find_icon() {
- local icon_name="$1"
-
- # If it's already a path, return it
- if [[ "$icon_name" == /* ]]; then
- echo "$icon_name"
- return
- fi
-
- # Common icon sizes to try
- local sizes=(48 32 64 128 256)
-
- # Icon theme paths
- local icon_paths=(
- "$HOME/.local/share/icons"
- "$HOME/.icons"
- "/usr/share/icons"
- "/usr/share/pixmaps"
- )
-
- # Try to find the icon
- for path in "${icon_paths[@]}"; do
- # Try with extensions
- for ext in png svg xpm; do
- # Direct match in pixmaps
- if [ -f "$path/$icon_name.$ext" ]; then
- echo "$path/$icon_name.$ext"
- return
- fi
-
- # Try in hicolor theme with different sizes
- for size in "${sizes[@]}"; do
- if [ -f "$path/hicolor/${size}x${size}/apps/$icon_name.$ext" ]; then
- echo "$path/hicolor/${size}x${size}/apps/$icon_name.$ext"
- return
- fi
- done
- done
- done
-
- # If not found, just return the icon name
- echo "$icon_name"
-}
-
-# Collect all desktop files and process, avoiding duplicates
-# We use process substitution to avoid subshell issues with arrays
-declare -A seen_apps
-
-for dir in "${SEARCH_PATHS[@]}"; do
- [ ! -d "$dir" ] && continue
-
- while IFS= read -r desktop_file; do
- basename_file=$(basename "$desktop_file")
-
- # Skip duplicates (local overrides system)
- [[ -n "${seen_apps[$basename_file]}" ]] && continue
- seen_apps[$basename_file]=1
-
- # Skip blacklisted
- skip=0
- for blacklisted in "${BLACKLIST[@]}"; do
- if [[ "$basename_file" == "$blacklisted" ]]; then
- skip=1
- break
- fi
- done
- [[ $skip -eq 1 ]] && continue
-
- # Skip if NoDisplay=true
- grep -q "^NoDisplay=true" "$desktop_file" 2>/dev/null && continue
-
- # Extract fields
- name=$(grep "^Name=" "$desktop_file" | head -1 | cut -d= -f2-)
- comment=$(grep "^Comment=" "$desktop_file" | head -1 | cut -d= -f2-)
- icon=$(grep "^Icon=" "$desktop_file" | head -1 | cut -d= -f2-)
- exec=$(grep "^Exec=" "$desktop_file" | head -1 | cut -d= -f2- | sed 's/%[uUfF]//g' | sed 's/%[cdnNvmki]//g')
-
- # Skip if no name or exec
- [ -z "$name" ] && continue
- [ -z "$exec" ] && continue
-
- # Default comment if empty
- [ -z "$comment" ] && comment="Application"
-
- # Find icon path
- icon_path=$(find_icon "$icon")
-
- # Output in format: name|comment|icon_path|exec
- echo "$name|$comment|$icon_path|$exec"
-
- done < <(find -L "$dir" -name "*.desktop" -type f 2>/dev/null)
-done | sort -u
diff --git a/quickshell/scripts/network.sh b/quickshell/scripts/network.sh
deleted file mode 100755
index f50707e..0000000
--- a/quickshell/scripts/network.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-connections=$(nmcli connection show --active | sed -n '2 p')
-echo "$connections"