Changes to Celestia
This commit is contained in:
parent
f4c6430eb4
commit
a033bde573
5 changed files with 101 additions and 103 deletions
|
@ -7,7 +7,7 @@ from libqtile.log_utils import logger
|
|||
|
||||
logger.error("Importing qtile theme requirements...")
|
||||
|
||||
from libqtile.config import Key, Screen, Group, Drag, Click
|
||||
from libqtile.config import Key, Screen, Group, Drag, Click, Match
|
||||
from libqtile.command import lazy
|
||||
from libqtile import layout, bar, widget
|
||||
|
||||
|
@ -75,20 +75,14 @@ class Kuro(BaseTheme):
|
|||
|
||||
# Floating layout override
|
||||
floating_layout = kuro_layouts.KuroFloating(float_rules=[
|
||||
{'wmclass': 'confirm'},
|
||||
{'wmclass': 'dialog'},
|
||||
{'wmclass': 'download'},
|
||||
{'wmclass': 'error'},
|
||||
{'wmclass': 'file_progress'},
|
||||
{'wmclass': 'notification'},
|
||||
{'wmclass': 'splash'},
|
||||
{'wmclass': 'toolbar'},
|
||||
{'wmclass': 'confirmreset'}, # gitk
|
||||
{'wmclass': 'makebranch'}, # gitk
|
||||
{'wmclass': 'maketag'}, # gitk
|
||||
{'wname': 'branchdialog'}, # gitk
|
||||
{'wname': 'pinentry'}, # GPG key password entry
|
||||
{'wmclass': 'ssh-askpass'}, # ssh-askpass
|
||||
# Run the utility of `xprop` to see the wm class and name of an X client.
|
||||
*layout.Floating.default_float_rules,
|
||||
Match(wm_class='confirmreset'), # gitk
|
||||
Match(wm_class='makebranch'), # gitk
|
||||
Match(wm_class='maketag'), # gitk
|
||||
Match(wm_class='ssh-askpass'), # ssh-askpass
|
||||
Match(title='branchdialog'), # gitk
|
||||
Match(title='pinentry'), # GPG key password entry
|
||||
])
|
||||
|
||||
def set_debug_text(self, text):
|
||||
|
@ -245,14 +239,7 @@ class Kuro(BaseTheme):
|
|||
groups.append(Group(""))
|
||||
groups.append(Group(""))
|
||||
groups.append(Group(""))
|
||||
groups.append(Group("", spawn=Config.get('apps_audio', "true"), layout='verticaltile', layouts=[
|
||||
layout.VerticalTile(
|
||||
border_focus=Config.get('colour_border_focus', "#ffffff"),
|
||||
border_normal=Config.get('colour_border_normal', "#777777"),
|
||||
border_width=Config.get('width_border', "1"),
|
||||
margin=Config.get('margin_layout', "0"),
|
||||
)
|
||||
]))
|
||||
groups.append(Group("", spawn=Config.get('apps_audio', "true")))
|
||||
groups.append(Group("", layout='floating', layouts=[
|
||||
layout.Floating(
|
||||
border_focus="#990000",
|
||||
|
@ -360,19 +347,34 @@ class Kuro(BaseTheme):
|
|||
kuro.utils.widgets.CPUInfoWidget(fontsize_left=16, fontsize_right=11),
|
||||
kuro.utils.widgets.MemoryInfoWidget(fontsize_left=18, fontsize_right=11),
|
||||
kuro.utils.widgets.DiskIOInfoWidget(fontsize_left=16, fontsize_right=11),
|
||||
kuro.utils.widgets.BatteryInfoWidget(fontsize_left=16, fontsize_right=11),
|
||||
])
|
||||
if Config.get('show_battery_widget', False):
|
||||
widgets.extend([
|
||||
kuro.utils.widgets.BatteryInfoWidget(fontsize_left=16, fontsize_right=11),
|
||||
])
|
||||
widgets.extend([
|
||||
kuro.utils.widgets.VolumeInfoWidget(
|
||||
pulse_sink=Config.get('volume_pulse_sink', None),
|
||||
fontsize_left=18,
|
||||
fontsize_right=11,
|
||||
),
|
||||
kuro.utils.widgets.VolumeInfoWidget(
|
||||
pulse_sink=Config.get('volume_pulse_sink2', None),
|
||||
fontsize_left=18,
|
||||
fontsize_right=11,
|
||||
),
|
||||
kuro.utils.widgets.TextSpacerWidget(fontsize=14),
|
||||
kuro.utils.widgets.NetworkInfoWidget(fontsize_left=16, fontsize_right=14),
|
||||
kuro.utils.widgets.GPUStatusWidget(
|
||||
theme_path=Config.get('gpu_theme_path', '/home/docs/checkouts/readthedocs.org/user_builds/qtile'
|
||||
'/checkouts/latest/libqtile/resources/battery-icons'),
|
||||
padding=0,
|
||||
),
|
||||
])
|
||||
if Config.get('show_gpu_widget', False):
|
||||
widgets.extend([
|
||||
kuro.utils.widgets.GPUStatusWidget(
|
||||
theme_path=Config.get('gpu_theme_path', '/home/docs/checkouts/readthedocs.org/user_builds/qtile'
|
||||
'/checkouts/latest/libqtile/resources/battery-icons'),
|
||||
padding=0,
|
||||
)
|
||||
])
|
||||
widgets.extend([
|
||||
kuro.utils.widgets.TextSpacerWidget(fontsize=14),
|
||||
])
|
||||
|
||||
|
@ -388,6 +390,7 @@ class Kuro(BaseTheme):
|
|||
colour_have_updates=Config.get('updates_colour_available', '#ff0000'),
|
||||
display_format=Config.get('updates_display_format', 'Updates: {updates}'),
|
||||
execute=Config.get('updates_execute_command', None),
|
||||
update_interval=Config.get('updates_interval', 600),
|
||||
**self.widget_defaults
|
||||
),
|
||||
widget.TextBox("#{}".format(x), name="default", **self.widget_defaults),
|
||||
|
@ -481,7 +484,6 @@ class Kuro(BaseTheme):
|
|||
@staticmethod
|
||||
def update_screens(qtile):
|
||||
out = utils.call_process(["xrandr", "--current"])
|
||||
#mode_out = utils.call_process(["optimus-manager", "--print-mode"])
|
||||
video_mode = "nvidia"
|
||||
#if "nvidia" in mode_out:
|
||||
# video_mode = "nvidia"
|
||||
|
@ -600,11 +602,14 @@ class Kuro(BaseTheme):
|
|||
p.wait()
|
||||
|
||||
self.log_info("Starting compositor...")
|
||||
utils.execute_once("compton -b")
|
||||
utils.execute_once("picom -b")
|
||||
|
||||
self.log_info("Starting clipboard manager...")
|
||||
utils.execute_once("xfce4-clipman")
|
||||
|
||||
self.log_info("Starting notification daemon...")
|
||||
utils.execute_once("dunst")
|
||||
|
||||
# Update color scheme
|
||||
self.initialize_colorscheme()
|
||||
|
||||
|
@ -636,9 +641,9 @@ class Kuro(BaseTheme):
|
|||
for r in dg.rules:
|
||||
pid = -1
|
||||
# noinspection PyProtectedMember
|
||||
for r2 in r.match._rules:
|
||||
if r2[0] == "net_wm_pid":
|
||||
pid = r2[1]
|
||||
for m in r.matchlist:
|
||||
if m._rules.get('net_wm_pid', None) is not None:
|
||||
pid = m._rules.get('net_wm_pid')
|
||||
break
|
||||
if pid != -1:
|
||||
self.initial_windows.append((pid, r.group))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue