Add Platform check

This commit is contained in:
Stephan Raabe 2023-02-24 15:00:42 +01:00
parent dd5024cbc0
commit 9830b6abc5
2 changed files with 81 additions and 75 deletions

View File

@ -66,8 +66,8 @@ else:
# Check for Desktop/Laptop
# --------------------------------------------------------
# Use output from /sys/class/dmi/id/chassis_type
# 3 = Desktop
platform = int(os.popen("cat /sys/class/dmi/id/chassis_type").read())
# --------------------------------------------------------
# Set default apps
@ -219,7 +219,7 @@ widget_defaults = dict(
extension_defaults = widget_defaults.copy()
# --------------------------------------------------------
# Screens and Widgets
# Widgets
# --------------------------------------------------------
widget_list = [
@ -294,16 +294,22 @@ widget_list = [
fontsize=20,
countdown_start=3,
),
]
if (platform == 3):
del widget_list[9:11]
# --------------------------------------------------------
# Screens
# --------------------------------------------------------
screens = [
Screen(
top=bar.Bar(
widget_list,
24,
opacity=0.7,
border_width=[3, 0, 3, 0], # Draw top and bottom borders
border_width=[3, 0, 3, 0],
),
),
]