diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf index bf2f69e..70bde73 100644 --- a/.config/kitty/kitty.conf +++ b/.config/kitty/kitty.conf @@ -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 diff --git a/.config/quickshell/Bar.qml b/.config/quickshell/Bar.qml index 01aa885..8705484 100644 --- a/.config/quickshell/Bar.qml +++ b/.config/quickshell/Bar.qml @@ -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" diff --git a/.config/quickshell/SystemStats.qml b/.config/quickshell/SystemStats.qml index 2250804..0ffb745 100644 --- a/.config/quickshell/SystemStats.qml +++ b/.config/quickshell/SystemStats.qml @@ -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 diff --git a/.local/bin/universal_run.sh b/.local/bin/universal_run.sh index 7c4e933..f611eb1 100755 --- a/.local/bin/universal_run.sh +++ b/.local/bin/universal_run.sh @@ -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 " +DIR="${1:-$(pwd)}" + +if [[ ! -d "$DIR" ]]; then + printf "Usage: %s \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 +)