Skip to content

Commit 151391e

Browse files
committed
- Waybar: Make temperature background transparent
- hyde-shell: silent pyinit command
1 parent ca47fd0 commit 151391e

File tree

5 files changed

+84
-284
lines changed

5 files changed

+84
-284
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to `HyDE` will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to _Modified_ [CalVer](https://calver.org/). See [Versioning](https://github.com/HyDE-Project/HyDE/blob/master/RELEASE_POLICY.md#versioning-yymq) For more info
66

7+
## v25.9.1 (Unreleased)
8+
9+
### Changed
10+
11+
- Waybar: Make temperature background transparent
12+
- hyde-shell: silent pyinit command
13+
14+
715
## v25.8.3
816

917
### Fixed

Configs/.local/lib/hyde/pyutils/pip_env.py

Lines changed: 58 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,23 +117,75 @@ def rebuild_venv(venv_path=None, requirements_file=None):
117117
# Recreate venv if missing
118118
if not os.path.exists(pip_executable):
119119
create_venv(venv_path, requirements_file)
120-
# Install/upgrade requirements
120+
# Helper to produce a short summary for informational pip output
121+
def _short_summary(stdout: str, stderr: str) -> str:
122+
if stderr:
123+
for sline in stderr.splitlines():
124+
if sline.strip():
125+
return sline.strip()
126+
req_lines = [line for line in stdout.splitlines() if line.startswith("Requirement already satisfied")]
127+
if req_lines:
128+
return f"{len(req_lines)} requirements already satisfied"
129+
for sline in stdout.splitlines():
130+
if sline.startswith("Successfully installed"):
131+
return sline.strip()
132+
return ""
133+
134+
# Install/upgrade requirements (capture output)
121135
if requirements_file and os.path.exists(requirements_file):
122-
subprocess.run(
136+
result = subprocess.run(
123137
[pip_executable, "install", "--upgrade", "-r", requirements_file],
124-
check=True,
138+
capture_output=True,
139+
text=True,
125140
)
126-
# Upgrade all installed packages
141+
if result.returncode != 0:
142+
notify.send(
143+
"HyDE PIP",
144+
f"Failed to install requirements:\n{result.stderr or result.stdout}",
145+
urgency="critical",
146+
)
147+
# Don't re-raise; stop rebuild early after notifying the user
148+
return
149+
else:
150+
short = _short_summary(result.stdout, result.stderr)
151+
if short:
152+
notify.send("HyDE PIP", short)
153+
154+
# Upgrade all installed packages (list outdated and upgrade)
127155
result = subprocess.run(
128156
[pip_executable, "list", "--outdated", "--format=freeze"],
129157
capture_output=True,
130158
text=True,
131159
)
160+
if result.returncode != 0:
161+
notify.send(
162+
"HyDE PIP",
163+
f"Failed to list outdated packages:\n{result.stderr or result.stdout}",
164+
urgency="critical",
165+
)
166+
# Don't re-raise here; just stop after notifying so caller can continue
167+
return
168+
132169
outdated = [line.split("==")[0] for line in result.stdout.splitlines() if line]
133170
if outdated:
134-
subprocess.run(
135-
[pip_executable, "install", "--upgrade", "-q"] + outdated, check=True
171+
res2 = subprocess.run(
172+
[pip_executable, "install", "--upgrade", "-q"] + outdated,
173+
capture_output=True,
174+
text=True,
136175
)
176+
if res2.returncode != 0:
177+
notify.send(
178+
"HyDE PIP",
179+
f"Failed to upgrade packages:\n{res2.stderr or res2.stdout}",
180+
urgency="critical",
181+
)
182+
# Don't re-raise; notify and exit rebuild
183+
return
184+
else:
185+
short2 = _short_summary(res2.stdout, res2.stderr)
186+
if short2:
187+
notify.send("HyDE PIP", short2)
188+
137189
notify.send("HyDE PIP", "✅ Virtual environment rebuilt and packages updated.")
138190

139191

Configs/.local/share/waybar/modules/temperature.jsonc

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -92,80 +92,62 @@
9292
//
9393
// DOCUMENTATION: https://man.archlinux.org/man/waybar-temperature.5.en
9494
// ===============================================================================
95-
9695
// ? Below are the configurations for my laptop // only use as a reference!
97-
9896
// GPU Temperature Monitor (NVIDIA via thermal zone)
9997
"temperature#2": {
10098
"thermal-zone": 2, // SEN1 - NVIDIA GPU on this system
101-
10299
// Temperature thresholds for GPU
103100
"critical-threshold": 65, // NVIDIA typical max temp
104101
"warning-threshold": 55, // Start warning at 75°C
105-
106102
// Update frequency
107103
"interval": 2,
108-
109104
// Display formats with GPU-specific styling
110-
"format": " {temperatureC}°C",
111-
"format-warning": "<span color='#fab387'></span> {temperatureC}°C",
112-
"format-critical": "<span color='#f38ba8'></span> {temperatureC}°C",
113-
105+
"format": " {temperatureC}°C",
106+
"format-warning": "<span foreground='#fab387'></span> <span foreground='#fab387'>{temperatureC}°C</span>",
107+
"format-critical": "<span foreground='#f38ba8'></span> <span foreground='#f38ba8'>{temperatureC}°C</span>",
114108
// Tooltip
115109
"tooltip": true,
116110
"tooltip-format": "GPU Temperature: {temperatureC}°C\nNVIDIA GeForce MX250",
117-
118111
// Appearance
119112
"max-length": 12,
120113
"min-length": 2
121114
},
122-
123115
// CPU Temperature Monitor
124116
"temperature#27": {
125117
"thermal-zone": 27, // x86_pkg_temp - CPU package temperature
126-
127118
// Temperature thresholds for CPU
128119
"critical-threshold": 85, // CPU critical temp
129120
"warning-threshold": 70, // CPU warning temp
130-
131121
// Update frequency
132122
"interval": 2,
133-
134123
// Display formats with CPU-specific styling
135-
"format": " {temperatureC}°C",
136-
"format-warning": "<span color='#fab387'></span> {temperatureC}°C",
137-
"format-critical": "<span color='#f38ba8'></span> {temperatureC}°C",
138-
124+
"format": " {temperatureC}°C",
125+
"format-warning": "<span foreground='#fab387'></span> <span foreground='#fab387'>{temperatureC}°C</span>",
126+
"format-critical": "<span foreground='#f38ba8'></span> <span foreground='#f38ba8'>{temperatureC}°C</span>",
139127
// Tooltip
140128
"tooltip": true,
141129
"tooltip-format": "CPU Temperature: {temperatureC}°C\nIntel(R) Core(TM) i7-10510U",
142-
143130
// Appearance
144131
"max-length": 12,
145132
"min-length": 2
146133
},
147-
148134
// System/ACPI Temperature Monitor
149135
"temperature#0": {
150136
"thermal-zone": 0, // acpitz - ACPI thermal zone
151-
152137
// Temperature thresholds
153138
"critical-threshold": 50,
154139
"warning-threshold": 40,
155-
156140
// Update frequency
157141
"interval": 5,
158-
159142
// Display formats with system-specific styling
160-
"format-warning": "<span color='#fab387'>󰔏</span> {temperatureC}°C",
161-
"format-critical": "<span color='#f38ba8'>󰔏</span> {temperatureC}°C",
162-
143+
"format": "󰔏 {temperatureC}°C",
144+
"format-warning": "<span foreground='#fab387'>󰔏</span> <span foreground='#fab387'>{temperatureC}°C</span>",
145+
"format-critical": "<span foreground='#f38ba8'>󰔏</span> <span foreground='#f38ba8'>{temperatureC}°C</span>",
163146
// Tooltip
164147
"tooltip": true,
165148
"tooltip-format": "System Temperature: {temperatureC}°C\nACPI Thermal Zone",
166-
167149
// Appearance
168150
"max-length": 12,
169151
"min-length": 2
170152
}
171-
}
153+
}

Configs/.local/share/waybar/styles/defaults.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,4 +251,10 @@ tooltip {
251251

252252
#language {
253253
min-width: 1.11em;
254+
}
255+
256+
#temperature,
257+
#temperature.warning,
258+
#temperature.critical {
259+
background-color: transparent;
254260
}

0 commit comments

Comments
 (0)