sanity fixes

This commit is contained in:
candle 2026-03-14 17:32:02 -04:00
parent 5eae1ef498
commit a1bb7fe633
4 changed files with 39 additions and 19 deletions

View File

@ -48,6 +48,9 @@ map ctrl+j neighboring_window down
map ctrl+shift+space launch --location=hsplit --bias=20 --cwd=current universal_run.sh
pixel_scroll yes
momentum_scroll 0.96
#: Font size (in pts).
# force_ltr no

View File

@ -85,8 +85,10 @@ PanelWindow {
}
property string windowTitle: {
let title = Hyprland.activeToplevel?.title ?? ""
if (!title || title === "~" || title === "kitty" || title === "fish")
const active = Hyprland.activeToplevel
const currentWs = Hyprland.focusedWorkspace?.id
let title = active?.title ?? ""
if (!title || title === "~" || title === "kitty" || title === "fish" || active.workspace?.id !== currentWs)
return motd
return title
}
@ -306,7 +308,7 @@ PanelWindow {
BarPill {
id: updatesPill
fontFamily: bar.fontFamily
label: stats.updatesCount + (stats.updatesCount === 0 ? " \udb80\udca2" : " \udb84\udf77")
label: stats.updatesCount + (stats.updatesCount === 0 ? " 󰂪" : " 󱍷")
pillColor: bar.accent6Color
textColor: bar.bgColor
tooltipText: stats.updatesList || "Up to date"

View File

@ -86,9 +86,12 @@ QtObject {
let label = parts[1] || ""
let temp = parseInt(parts[2]) || 0
if (temp > 0) {
let display = label ? label : name
tempLines.push(display + ": " + temp + "°C")
if (temp > maxTemp) maxTemp = temp
if (temp <= 200)
{
let display = label ? label : name
tempLines.push(display + ": " + temp + "°C")
if (temp > maxTemp) maxTemp = temp
}
}
}
stats.temperature = maxTemp

View File

@ -1,26 +1,38 @@
#!/usr/bin/env bash
set -eo pipefail
SCRIPT="${BASH_SOURCE[0]}"
readonly SCRIPT="${BASH_SOURCE[0]}"
fail() {
echo "ERR - $SCRIPT: $1"
printf "ERR - %s: %s\n" "$SCRIPT" "$1" >&2
exit 1
}
DIR="$1"
if [[ -z $DIR ]]; then
DIR=$(pwd)
fi
if [[ ! -d $DIR ]]; then
echo "Usage: $SCRIPT <Project Directory>"
DIR="${1:-$(pwd)}"
if [[ ! -d "$DIR" ]]; then
printf "Usage: %s <Project Directory>\n" "$SCRIPT"
exit 1
fi
pushd "$DIR" || fail "Couldn't enter directory."
if [[ -x "run.sh" ]]; then
./run.sh
(
cd "$DIR" || fail "Couldn't enter directory: $DIR"
if [[ -x "./run.sh" ]]; then
./run.sh || fail "run.sh failed"
elif [[ -f "Cargo.toml" ]]; then
cargo run
cargo run || fail "Cargo execution failed"
elif [[ -f "Makefile" ]]; then
EXEC=$(awk -F '=' '/^TARGET[[:space:]]*=/ {print $2}' Makefile | xargs)
if [[ -z "$EXEC" ]]; then
fail "Makefile found, but no 'TARGET' variable defined."
fi
make && ./"$EXEC" || fail "Make build or execution failed"
else
fail "No recognized entry point (run.sh, Cargo.toml, or Makefile) found."
fi
popd >/dev/null || exit 1
)