Add Platform check
This commit is contained in:
parent
dd5024cbc0
commit
9830b6abc5
Binary file not shown.
156
qtile/config.py
156
qtile/config.py
@ -66,8 +66,8 @@ else:
|
|||||||
# Check for Desktop/Laptop
|
# Check for Desktop/Laptop
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
|
|
||||||
# Use output from /sys/class/dmi/id/chassis_type
|
|
||||||
# 3 = Desktop
|
# 3 = Desktop
|
||||||
|
platform = int(os.popen("cat /sys/class/dmi/id/chassis_type").read())
|
||||||
|
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
# Set default apps
|
# Set default apps
|
||||||
@ -219,91 +219,97 @@ widget_defaults = dict(
|
|||||||
extension_defaults = widget_defaults.copy()
|
extension_defaults = widget_defaults.copy()
|
||||||
|
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
# Screens and Widgets
|
# Widgets
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
|
|
||||||
widget_list = [
|
widget_list = [
|
||||||
widget.GroupBox(
|
widget.GroupBox(
|
||||||
highlight_method='block',
|
highlight_method='block',
|
||||||
highlight='ffffff',
|
highlight='ffffff',
|
||||||
block_border='ffffff',
|
block_border='ffffff',
|
||||||
highlight_color=['ffffff','ffffff'],
|
highlight_color=['ffffff','ffffff'],
|
||||||
block_highlight_text_color='000000',
|
block_highlight_text_color='000000',
|
||||||
foreground='ffffff',
|
foreground='ffffff',
|
||||||
rounded=False,
|
rounded=False,
|
||||||
this_current_screen_border=ColorC,
|
this_current_screen_border=ColorC,
|
||||||
active='ffffff'
|
active='ffffff'
|
||||||
),
|
),
|
||||||
widget.TextBox(
|
widget.TextBox(
|
||||||
text=' ',
|
text=' ',
|
||||||
foreground=ColorC,
|
foreground=ColorC,
|
||||||
),
|
),
|
||||||
widget.WindowName(
|
widget.WindowName(
|
||||||
),
|
),
|
||||||
widget.Systray(),
|
widget.Systray(),
|
||||||
widget.TextBox(
|
widget.TextBox(
|
||||||
text=' ',
|
text=' ',
|
||||||
fontsize=18,
|
fontsize=18,
|
||||||
foreground='ffffff',
|
foreground='ffffff',
|
||||||
desc='Calculator',
|
desc='Calculator',
|
||||||
mouse_callbacks={"Button1": lambda: qtile.cmd_spawn('qalculate-gtk')},
|
mouse_callbacks={"Button1": lambda: qtile.cmd_spawn('qalculate-gtk')},
|
||||||
),
|
),
|
||||||
widget.TextBox(
|
widget.TextBox(
|
||||||
text='',
|
text='',
|
||||||
fontsize=18,
|
fontsize=18,
|
||||||
foreground='ffffff',
|
foreground='ffffff',
|
||||||
desc='Notes',
|
desc='Notes',
|
||||||
mouse_callbacks={"Button1": lambda: qtile.cmd_spawn(terminal + ' -e vim /home/raabe/notes.txt')},
|
mouse_callbacks={"Button1": lambda: qtile.cmd_spawn(terminal + ' -e vim /home/raabe/notes.txt')},
|
||||||
),
|
),
|
||||||
widget.TextBox(
|
widget.TextBox(
|
||||||
text='|',
|
text='|',
|
||||||
foreground=ColorC,
|
foreground=ColorC,
|
||||||
),
|
),
|
||||||
widget.Volume(
|
widget.Volume(
|
||||||
fmt='Vol: {}',
|
fmt='Vol: {}',
|
||||||
),
|
),
|
||||||
widget.TextBox(
|
widget.TextBox(
|
||||||
text='|',
|
text='|',
|
||||||
foreground=ColorC,
|
foreground=ColorC,
|
||||||
),
|
),
|
||||||
widget.Battery(),
|
widget.Battery(),
|
||||||
widget.TextBox(
|
widget.TextBox(
|
||||||
text='|',
|
text='|',
|
||||||
foreground=ColorC,
|
foreground=ColorC,
|
||||||
),
|
),
|
||||||
widget.GenPollText(
|
widget.GenPollText(
|
||||||
name = "checkupdates",
|
name = "checkupdates",
|
||||||
fmt="Updates: {}",
|
fmt="Updates: {}",
|
||||||
update_interval = 3600,
|
update_interval = 3600,
|
||||||
func = lambda: subprocess.check_output("/home/raabe/dotfiles/scripts/checkupdates.sh").decode()[:-1],
|
func = lambda: subprocess.check_output("/home/raabe/dotfiles/scripts/checkupdates.sh").decode()[:-1],
|
||||||
mouse_callbacks={"Button1": lambda: qtile.cmd_spawn(terminal + ' -e yay')},
|
mouse_callbacks={"Button1": lambda: qtile.cmd_spawn(terminal + ' -e yay')},
|
||||||
),
|
),
|
||||||
widget.TextBox(
|
widget.TextBox(
|
||||||
text='|',
|
text='|',
|
||||||
foreground=ColorC,
|
foreground=ColorC,
|
||||||
),
|
),
|
||||||
widget.Clock(
|
widget.Clock(
|
||||||
format="%Y-%m-%d %a %I:%M %p",
|
format="%Y-%m-%d %a %I:%M %p",
|
||||||
),
|
),
|
||||||
widget.TextBox(
|
widget.TextBox(
|
||||||
text='|',
|
text='|',
|
||||||
foreground=ColorC,
|
foreground=ColorC,
|
||||||
),
|
),
|
||||||
widget.QuickExit(
|
widget.QuickExit(
|
||||||
default_text=" ",
|
default_text=" ",
|
||||||
fontsize=20,
|
fontsize=20,
|
||||||
countdown_start=3,
|
countdown_start=3,
|
||||||
),
|
),
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if (platform == 3):
|
||||||
|
del widget_list[9:11]
|
||||||
|
|
||||||
|
# --------------------------------------------------------
|
||||||
|
# Screens
|
||||||
|
# --------------------------------------------------------
|
||||||
|
|
||||||
screens = [
|
screens = [
|
||||||
Screen(
|
Screen(
|
||||||
top=bar.Bar(
|
top=bar.Bar(
|
||||||
widget_list,
|
widget_list,
|
||||||
24,
|
24,
|
||||||
opacity=0.7,
|
opacity=0.7,
|
||||||
border_width=[3, 0, 3, 0], # Draw top and bottom borders
|
border_width=[3, 0, 3, 0],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user