sanity fixes
This commit is contained in:
parent
5eae1ef498
commit
a1bb7fe633
@ -48,6 +48,9 @@ map ctrl+j neighboring_window down
|
|||||||
|
|
||||||
map ctrl+shift+space launch --location=hsplit --bias=20 --cwd=current universal_run.sh
|
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).
|
#: Font size (in pts).
|
||||||
|
|
||||||
# force_ltr no
|
# force_ltr no
|
||||||
|
|||||||
@ -85,8 +85,10 @@ PanelWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
property string windowTitle: {
|
property string windowTitle: {
|
||||||
let title = Hyprland.activeToplevel?.title ?? ""
|
const active = Hyprland.activeToplevel
|
||||||
if (!title || title === "~" || title === "kitty" || title === "fish")
|
const currentWs = Hyprland.focusedWorkspace?.id
|
||||||
|
let title = active?.title ?? ""
|
||||||
|
if (!title || title === "~" || title === "kitty" || title === "fish" || active.workspace?.id !== currentWs)
|
||||||
return motd
|
return motd
|
||||||
return title
|
return title
|
||||||
}
|
}
|
||||||
@ -306,7 +308,7 @@ PanelWindow {
|
|||||||
BarPill {
|
BarPill {
|
||||||
id: updatesPill
|
id: updatesPill
|
||||||
fontFamily: bar.fontFamily
|
fontFamily: bar.fontFamily
|
||||||
label: stats.updatesCount + (stats.updatesCount === 0 ? " \udb80\udca2" : " \udb84\udf77")
|
label: stats.updatesCount + (stats.updatesCount === 0 ? " " : " ")
|
||||||
pillColor: bar.accent6Color
|
pillColor: bar.accent6Color
|
||||||
textColor: bar.bgColor
|
textColor: bar.bgColor
|
||||||
tooltipText: stats.updatesList || "Up to date"
|
tooltipText: stats.updatesList || "Up to date"
|
||||||
|
|||||||
@ -86,11 +86,14 @@ QtObject {
|
|||||||
let label = parts[1] || ""
|
let label = parts[1] || ""
|
||||||
let temp = parseInt(parts[2]) || 0
|
let temp = parseInt(parts[2]) || 0
|
||||||
if (temp > 0) {
|
if (temp > 0) {
|
||||||
|
if (temp <= 200)
|
||||||
|
{
|
||||||
let display = label ? label : name
|
let display = label ? label : name
|
||||||
tempLines.push(display + ": " + temp + "°C")
|
tempLines.push(display + ": " + temp + "°C")
|
||||||
if (temp > maxTemp) maxTemp = temp
|
if (temp > maxTemp) maxTemp = temp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
stats.temperature = maxTemp
|
stats.temperature = maxTemp
|
||||||
stats.cpuTemps = tempLines.join("\n")
|
stats.cpuTemps = tempLines.join("\n")
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,26 +1,38 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
SCRIPT="${BASH_SOURCE[0]}"
|
readonly SCRIPT="${BASH_SOURCE[0]}"
|
||||||
|
|
||||||
fail() {
|
fail() {
|
||||||
echo "ERR - $SCRIPT: $1"
|
printf "ERR - %s: %s\n" "$SCRIPT" "$1" >&2
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
DIR="$1"
|
DIR="${1:-$(pwd)}"
|
||||||
if [[ -z $DIR ]]; then
|
|
||||||
DIR=$(pwd)
|
if [[ ! -d "$DIR" ]]; then
|
||||||
fi
|
printf "Usage: %s <Project Directory>\n" "$SCRIPT"
|
||||||
if [[ ! -d $DIR ]]; then
|
|
||||||
echo "Usage: $SCRIPT <Project Directory>"
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pushd "$DIR" || fail "Couldn't enter directory."
|
(
|
||||||
if [[ -x "run.sh" ]]; then
|
cd "$DIR" || fail "Couldn't enter directory: $DIR"
|
||||||
./run.sh
|
|
||||||
|
if [[ -x "./run.sh" ]]; then
|
||||||
|
./run.sh || fail "run.sh failed"
|
||||||
|
|
||||||
elif [[ -f "Cargo.toml" ]]; then
|
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
|
fi
|
||||||
popd >/dev/null || exit 1
|
|
||||||
|
make && ./"$EXEC" || fail "Make build or execution failed"
|
||||||
|
else
|
||||||
|
fail "No recognized entry point (run.sh, Cargo.toml, or Makefile) found."
|
||||||
|
fi
|
||||||
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user