From 1fc598c6a08f6438a3689116413d8eb7a10218a5 Mon Sep 17 00:00:00 2001 From: ION606 Date: Sat, 3 Jan 2026 12:55:26 -0800 Subject: [PATCH] merge --- i3/battery_status.sh | 9 +++-- i3/bluetooth_status.sh | 39 ++++++++++++++++++++ i3/main.module | 16 ++++---- lemurs-config.toml | 83 ++++++++++++++++++++++++++++++++++++++++++ packages.txt | 1 + setup.sh | 6 +++ 6 files changed, 141 insertions(+), 13 deletions(-) create mode 100644 i3/bluetooth_status.sh create mode 100644 lemurs-config.toml diff --git a/i3/battery_status.sh b/i3/battery_status.sh index f5c4113..f01e56d 100644 --- a/i3/battery_status.sh +++ b/i3/battery_status.sh @@ -64,13 +64,14 @@ fmt_time() { hours="${hours% hour}"; # convert decimal hours to h m local total_min; - total_min="$(python - <<'PY' + total_min="$(python - <<'PY' "$hours" import math,sys -h=float(sys.stdin.read().strip()) -m=round((h-int(h))*60) +arg = sys.argv[1] if len(sys.argv) > 1 else "0" +h = float(arg) +m = round((h - int(h)) * 60) print(f"{int(h)}h{m}m") PY -<<<"$hours")"; +)"; printf "%s" "$total_min"; else printf "%s" "$raw"; diff --git a/i3/bluetooth_status.sh b/i3/bluetooth_status.sh new file mode 100644 index 0000000..9ad265f --- /dev/null +++ b/i3/bluetooth_status.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +# check status of a specific bluetooth device via bluetoothctl + + +# check if bluetooth service is active +if ! systemctl is-active --quiet bluetooth.service; then + echo "Bluetooth off" # icon or text when BT is down + exit 0 +fi + +# check if controller is powered on +if ! bluetoothctl show | grep -q "Powered: yes"; then + echo "BT ctrl off" + exit 0 +fi + +# check connected status +mapfile -t macs < <(bluetoothctl devices | awk '{print $2}') + +connected_name="" + +for mac in "${macs[@]}"; do + # get info for this device + info=$(bluetoothctl info "$mac") + if echo "$info" | grep -q "Connected: yes"; then + # extract Name: + name=$(echo "$info" | grep "^\\s*Name:" | sed 's/.*Name: //') + connected_name="$name" + break + fi +done + +if [[ -n "$connected_name" ]]; then + # you can replace the icon with a nerd-font icon if you use one + echo " $connected_name" +else + echo " Disconnected" +fi + diff --git a/i3/main.module b/i3/main.module index 6849c9e..ffe39aa 100644 --- a/i3/main.module +++ b/i3/main.module @@ -11,11 +11,13 @@ modules-left = i3 modules-center = memory modules-right = cpu player wifi bluetooth clock backlight battery font-0 = Noto Sans:size=10;2 -font-1 = Font Awesome 6 Free Solid:size=10;2 +# font-1 = Font Awesome 6 Free Solid:size=10;2 +font-1 = "Symbols Nerd Font:size=12;2" font-2 = Font Awesome 6 Brands:size=10;2 font-3 = DejaVu Sans Mono:size=10;2 font-4 = Nerd Font:style=Regular:size=12;0 font-5 = NotoEmoji:scale=10; +font-6 = ttf-arimo-nerd:scale=10 separator = | separator-foreground = #6a0dad @@ -149,15 +151,11 @@ animation-packetloss-1 = 📶 animation-packetloss-1-foreground = #000000 animation-packetloss-framerate = 500 - [module/bluetooth] -type = internal/bluetooth -interval = 5 -format-connected =  %name% -format-disconnected =  Off -format-foreground = #ffffff -format-background = #483d8b -format-padding = 5 +type = custom/script +exec = /home/ion606/.config/polybar/scripts/bluetooth_status.sh +interval = 1 +click-left = blueman-manager & [module/player] diff --git a/lemurs-config.toml b/lemurs-config.toml new file mode 100644 index 0000000..d16a894 --- /dev/null +++ b/lemurs-config.toml @@ -0,0 +1,83 @@ +[colors] +# base colors +background = "black" +foreground = "white" +highlight = "cyan" +error = "red" + +[layout] +padding = 1 +margin = 1 +border_style = "solid" + +[fonts] +regular = "monospace" +bold = "monospace bold" + +[animations] +enable = true + +[username_field] +remember = true + +[username_field.style] +show_title = true +title = "Umsername!" +title_color = "white" +content_color = "white" +title_color_focused = "light cyan" +content_color_focused = "light cyan" +show_border = true +border_color = "white" +border_color_focused = "light cyan" +use_max_width = true +max_width = 48 + +[password_field] +content_replacement_character = "*" + +[password_field.style] +show_title = true +title = "Pamsmword! (shhh, secret :3)" +title_color = "white" +content_color = "white" +title_color_focused = "light magenta" +content_color_focused = "light magenta" +show_border = true +border_color = "white" +border_color_focused = "light magenta" +use_max_width = true +max_width = 48 + +[environment_switcher] +switcher_visibility = "visible" +toggle_hint = "Switcher %key%" +toggle_hint_color = "dark gray" +toggle_hint_modifiers = "" +include_tty_shell = false +remember = true +show_movers = true +mover_color = "dark gray" +mover_modifiers = "" +mover_color_focused = "light yellow" +mover_modifiers_focused = "bold" +left_mover = "<" +right_mover = ">" +mover_margin = 1 +show_neighbours = true +neighbour_color = "dark gray" +neighbour_modifiers = "" +neighbour_color_focused = "light blue" +neighbour_modifiers_focused = "" +neighbour_margin = 1 +selected_color = "gray" +selected_modifiers = "underlined" +selected_color_focused = "light green" +selected_modifiers_focused = "bold" +max_display_length = 8 +no_envs_text = "No environments..." +no_envs_color = "white" +no_envs_modifiers = "" +no_envs_color_focused = "red" +no_envs_modifiers_focused = "" + diff --git a/packages.txt b/packages.txt index a2bfe08..fd6d30e 100644 --- a/packages.txt +++ b/packages.txt @@ -70,6 +70,7 @@ jre-openjdk jre21-openjdk jre8-openjdk krita +lemurs less libreoffice-fresh librewolf-bin diff --git a/setup.sh b/setup.sh index 1605b1e..a468549 100644 --- a/setup.sh +++ b/setup.sh @@ -40,6 +40,7 @@ echo "This script will install and configure the following: - Tailscale (VPN) - Warp (Cloudflare's VPN) - auto-cpufreq (battery optimizer) +- change and configure the default login to lemurs - Remove Thunar and Foot (if present) - Clean up and update the system @@ -107,6 +108,11 @@ LATEST_JDK=$(sudo dnf list available | grep -E 'java-[0-9]+-openjdk' | awk '{pri # General Package Install yay -Sy --needed --noconfirm -