From 121ddbd1f65eabd64f6f907d7791203ddd40560d Mon Sep 17 00:00:00 2001 From: ION606 Date: Thu, 31 Jul 2025 15:33:41 +0000 Subject: [PATCH 1/5] Update ion-theme.css --- ion-theme.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ion-theme.css b/ion-theme.css index 4b6365c..f75617f 100644 --- a/ion-theme.css +++ b/ion-theme.css @@ -349,6 +349,14 @@ color: rgb(0, 255, 128) !important; } +[aria-label="Add Role"] { + background-color: black !important; +} + +[aria-label="Add Role"]:first-child { + border-radius: 0 0 10px 10px; +} + .leading_c38106::before,.leading_c38106::after { display: none; } From 3cd1fb1ec7c75658d8a0962aed36322e53340435 Mon Sep 17 00:00:00 2001 From: ION606 Date: Thu, 14 Aug 2025 18:08:34 +0000 Subject: [PATCH 2/5] Update ion-theme.css --- ion-theme.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ion-theme.css b/ion-theme.css index f75617f..c66557c 100644 --- a/ion-theme.css +++ b/ion-theme.css @@ -14,7 +14,7 @@ /* IMPORT CSS */ -@import url(https://clearvision.github.io/ClearVision-v7/main.css); +@import url('https://raw.githubusercontent.com/ClearVision/ClearVision-v7/master/ClearVision-v7.theme.css'); @import url('https://fonts.googleapis.com/css?family=Muli&display=swap'); @import url('https://fonts.googleapis.com/css?family=Quicksand&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Playwrite+NZ:wght@100..400&display=swap'); From 60610dc81dcb1515eb8295aeed2c23344eff71d3 Mon Sep 17 00:00:00 2001 From: ION606 Date: Fri, 15 Aug 2025 21:46:59 +0000 Subject: [PATCH 3/5] added battery stuff --- i3/battery_status.sh | 140 +++++++++++++++++++++++++++++++++++ i3/toggle_battery_display.sh | 12 +++ 2 files changed, 152 insertions(+) create mode 100644 i3/battery_status.sh create mode 100644 i3/toggle_battery_display.sh diff --git a/i3/battery_status.sh b/i3/battery_status.sh new file mode 100644 index 0000000..f5c4113 --- /dev/null +++ b/i3/battery_status.sh @@ -0,0 +1,140 @@ +#!/usr/bin/env bash +# prints a battery icon + either percentage or time remaining +# depends (optional): upower or acpi; otherwise falls back to /sys + +# config: icons from nerd fonts / font awesome +icon_empty=""; # very low +icon_low=""; # low +icon_mid=""; # medium +icon_high=""; # high +icon_full=""; # full +icon_charge=""; # charging bolt +icon_plug=""; # plugged/full +icon_alert=""; # critical + +# config: low/critical thresholds +low_threshold=20; +crit_threshold=10; + +state_file="${XDG_CACHE_HOME:-$HOME/.cache}/polybar_battery_mode"; +mode="percent"; +if [[ -f "$state_file" ]]; then + mode="$(cat "$state_file" 2>/dev/null | tr -d '\n' )"; +fi + +bat_path="$(ls -d /sys/class/power_supply/BAT* 2>/dev/null | head -n1)"; +if [[ -z "$bat_path" ]]; then + echo "${icon_alert} no battery"; + exit 0; +fi + +# helpers +pick_icon() { + local pct="$1"; + local status="$2"; + local base; + if (( pct == 100 )); then base="^~^" + elif (( pct >= 95 )); then base="$icon_full"; + elif (( pct >= 75 )); then base="$icon_high"; + elif (( pct >= 50 )); then base="$icon_mid"; + elif (( pct >= 25 )); then base="$icon_low"; + else base="$icon_empty"; + fi + + # overlay/override for charging or full on ac power + if [[ "$status" == "Charging" ]]; then + echo "$icon_charge $base"; + elif [[ "$status" == "Full" || "$status" == "Not charging" ]]; then + echo "$icon_plug $base"; + else + echo "$base"; + fi +} + +fmt_time() { + # normalize various formats (e.g., "1.5 hours", "02:41:13") + local raw="$1"; + if [[ "$raw" =~ ^[0-9]+:[0-9]{2}:[0-9]{2}$ ]]; then + # hh:mm:ss -> XhYm + IFS=':' read -r h m s <<<"$raw"; + printf "%sh%sm" "$h" "$m"; + elif [[ "$raw" =~ ^([0-9]+(\.[0-9]+)?)\ hours?$ ]]; then + # upower: "1.4 hours" + local hours="${raw% hours}"; + hours="${hours% hour}"; + # convert decimal hours to h m + local total_min; + total_min="$(python - <<'PY' +import math,sys +h=float(sys.stdin.read().strip()) +m=round((h-int(h))*60) +print(f"{int(h)}h{m}m") +PY +<<<"$hours")"; + printf "%s" "$total_min"; + else + printf "%s" "$raw"; + fi +} + +percentage=""; +status=""; +eta=""; # time to empty or to full + +# try upower first (dbus-based, used by many desktops) +if command -v upower >/dev/null 2>&1; then + dev="$(upower -e | grep -m1 BAT)"; + + if [[ -n "$dev" ]]; then + info="$(upower -i "$dev" 2>/dev/null)"; + status="$(awk -F': *' '/^\s*state:/{print $2}' <<<"$info")"; + percentage="$(awk -F': *' '/^\s*percentage:/{print $2}' <<<"$info" | tr -d '% ')"; + + if [[ "$status" == "charging" ]]; then + eta="$(awk -F': *' '/time to full/{print $2}' <<<"$info")"; + elif [[ "$status" == "discharging" ]]; then + eta="$(awk -F': *' '/time to empty/{print $2}' <<<"$info")"; + fi + + # normalize capitalization + status="$(tr '[:lower:]' '[:upper:]' <<<"${status:0:1}")${status:1}"; + fi +fi + +# fallback: acpi (reads /sys or /proc and calculates eta) +if [[ -z "$percentage" || -z "$status" ]] && command -v acpi >/dev/null 2>&1; then + line="$(acpi -b 2>/dev/null | head -n1)"; + # examples: "Battery 0: Discharging, 93%, 02:41:13 remaining" + # "Battery 0: Charging, 80%, 00:20:00 until charged" + status="$(awk -F', *' -v OFS=',' '{split($1,a,": "); print a[2]}' <<<"$line")"; + percentage="$(awk -F', *' '{gsub("%","",$2); print $2}' <<<"$line")"; + eta="$(awk -F', *' '{print $3}' <<<"$line" | sed -E 's/(remaining|until charged)//g' | xargs)"; +fi + +# final fallback: sysfs (percentage + status only) +if [[ -z "$percentage" || -z "$status" ]]; then + if [[ -r "$bat_path/capacity" && -r "$bat_path/status" ]]; then + percentage="$(cat "$bat_path/capacity" 2>/dev/null)"; + status="$(cat "$bat_path/status" 2>/dev/null)"; + fi +fi + +# guard rails +if [[ -z "$percentage" ]]; then + echo "${icon_alert} n/a"; + exit 0; +fi + +icon="$(pick_icon "$percentage" "$status")"; + +# add critical marker if really low and discharging +if (( percentage <= crit_threshold )) && [[ "$status" == "Discharging" ]]; then + icon="${icon_alert} ${icon}"; +fi + +# output based on mode +if [[ "$mode" == "time" && -n "$eta" ]]; then + echo "${icon} $(fmt_time "$eta")"; +else + echo "${icon} ${percentage}%"; +fi diff --git a/i3/toggle_battery_display.sh b/i3/toggle_battery_display.sh new file mode 100644 index 0000000..59dfe57 --- /dev/null +++ b/i3/toggle_battery_display.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +# toggles display mode (percent <-> time) for the battery module +state_file="${XDG_CACHE_HOME:-$HOME/.cache}/polybar_battery_mode"; +current="percent"; +if [[ -f "$state_file" ]]; then + current="$(cat "$state_file" 2>/dev/null | tr -d '\n')"; +fi +if [[ "$current" == "percent" ]]; then + echo "time" > "$state_file"; +else + echo "percent" > "$state_file"; +fi From 3e33770ab05e0d3ebf96de34f3300dede8d7d407 Mon Sep 17 00:00:00 2001 From: ION606 Date: Wed, 3 Sep 2025 15:21:40 +0000 Subject: [PATCH 4/5] Update setup script to use currect home path god I am DUUUUMB --- setup.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/setup.sh b/setup.sh index 1605b1e..71c44eb 100644 --- a/setup.sh +++ b/setup.sh @@ -53,8 +53,8 @@ if [ "$answer" != "y" ]; then fi # Make temporary directory -mkdir $USERTEMP/Downloads/tempinstall || "" -cd $USERTEMP/Downloads/tempinstall +mkdir /home/$USERTEMP/Downloads/tempinstall || "" +cd /home/$USERTEMP/Downloads/tempinstall # Configuration Files git clone https://github.com/ION606/config-backup.git @@ -63,7 +63,7 @@ cd config-backup # sway mv -f waybar/config /etc/xdg/waybar/ mv -f waybar/style.css /etc/xdg/waybar/ -mv -f config $USERTEMP/.config/sway/config +mv -f config /home/$USERTEMP/.config/sway/config # replace "ion606" with the selected user sed -i "s/ion606/$USERTEMP/g" config @@ -83,11 +83,11 @@ mv -f terminal/alacritty.toml /home/$USERTEMP/.config/alacritty/ mv -f terminal/starship.toml /home/$USERTEMP/.config/ # battery -mkdir -p $USERTEMP/auto-cpufreq/auto-cpufreq.conf -mv auto-cpufreq.conf $USERTEMP/auto-cpufreq/auto-cpufreq.conf +mkdir -p /home/$USERTEMP/auto-cpufreq/auto-cpufreq.conf +mv auto-cpufreq.conf /home/$USERTEMP/auto-cpufreq/auto-cpufreq.conf # set up automations in child process -mkdir -p $USERTEMP/.automations && cp -r -f auto/* $USERTEMP/.automations/ && $(sudo pacman -Sy --needed --noconfirm dunst && sudo bash $USERTEMP/.automations/setupauto.sh $USERTEMP &>$USERTEMP/setuplogs.log) & +mkdir -p /home/$USERTEMP/.automations && cp -r -f auto/* /home/$USERTEMP/.automations/ && $(sudo pacman -Sy --needed --noconfirm dunst && sudo bash /home/$USERTEMP/.automations/setupauto.sh /home/$USERTEMP &> /home/$USERTEMP/setuplogs.log) & # Installs # Librewolf @@ -111,11 +111,11 @@ mv -f Librewolf/chrome /home/$USERTEMP/.librewolf/ npm install -g @bitwarden/cli alacritty-themes typescript || echo "failed to install Typescript!" -mkdir -p $USERTEMP/.icons -echo -e "https://www.gnome-look.org/p/1305251\nhttps://www.gnome-look.org/p/2091068" >$USERTEMP/.icons/links.txt +mkdir -p /home/$USERTEMP/.icons +echo -e "https://www.gnome-look.org/p/1305251\nhttps://www.gnome-look.org/p/2091068" > /home/$USERTEMP/.icons/links.txt alacritty-themes --create && alacritty-themes Hyper || echo "alacritty theme install failed!" -cp -r $USERTEMP/.config/wofi/ wofi >/dev/null 2>&1 & +cp -r /home/$USERTEMP/.config/wofi/ wofi >/dev/null 2>&1 & gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' # Remove old programs From 6f03a500db452b48c65292ae326c52d5d21af856 Mon Sep 17 00:00:00 2001 From: ION606 Date: Sat, 27 Sep 2025 01:42:28 +0000 Subject: [PATCH 5/5] Add background style for popup --- ion-theme.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ion-theme.css b/ion-theme.css index c66557c..0507f39 100644 --- a/ion-theme.css +++ b/ion-theme.css @@ -361,3 +361,8 @@ display: none; } +/* popup */ +.standardSidebarView__23e6b { + background: rgb(0 0 0 / 90%); +} +