diff --git a/bar/modules/stylix.py b/bar/modules/stylix.py index cf1f32b..a6c3831 100644 --- a/bar/modules/stylix.py +++ b/bar/modules/stylix.py @@ -70,7 +70,7 @@ def generate_stylix_css(): #battery-widget {{ background-color: #{colors["base01"]}; padding: 4px 8px; - border-radius: 4px; + border-radius: 12px; }} #bat-icon {{ @@ -109,6 +109,7 @@ def generate_stylix_css(): #widgets-container {{ background-color: #{colors["base01"]}; padding: 2px; + border-radius: 16px; }} /* NixOS label */ @@ -121,7 +122,7 @@ def generate_stylix_css(): color: #{colors["base05"]}; background-color: #{colors["base01"]}; padding: 4px 8px; - border-radius: 4px; + border-radius: 12px; }} /* Tooltips */ @@ -130,6 +131,7 @@ tooltip {{ border-color: #{colors["base02"]}; background-color: #{colors["base00"]}; color: #{colors["base05"]}; + border-radius: 16px; }} tooltip>* {{ @@ -139,15 +141,23 @@ tooltip>* {{ /* Workspaces */ #workspaces {{ background-color: #{colors["base01"]}; + padding: 6px 6px; + border-radius: 16px; }} #workspaces>button {{ background-color: #{colors["base05"]}; border-radius: 100px; - padding: 0px 8px; + padding: 0px 4px; transition: padding 0.05s steps(8); }} +#workspaces>button.active {{ + background-color: #{colors["base0D"]}; + padding: 0px 12px; + border-radius: 100px; +}} + #workspaces>button>label {{ font-size: 0px; }} @@ -156,20 +166,15 @@ tooltip>* {{ background-color: #{colors["base03"]}; }} -#workspaces>button.active {{ - background-color: #{colors["base0D"]}; - padding: 0px 32px; -}} - #workspaces>button.urgent {{ background-color: #{colors["base08"]}; }} """ # Write to temporary file - temp_fd, temp_path = tempfile.mkstemp(suffix='.css', prefix='stylix_') + temp_fd, temp_path = tempfile.mkstemp(suffix=".css", prefix="stylix_") try: - with os.fdopen(temp_fd, 'w') as f: + with os.fdopen(temp_fd, "w") as f: f.write(css_content) return temp_path except Exception: @@ -179,4 +184,4 @@ tooltip>* {{ def get_stylix_css_path(): """Get the path to the Stylix CSS file""" - return generate_stylix_css() \ No newline at end of file + return generate_stylix_css() diff --git a/bar/services/system_stats.py b/bar/services/system_stats.py index d50662f..368122e 100644 --- a/bar/services/system_stats.py +++ b/bar/services/system_stats.py @@ -31,6 +31,7 @@ class SystemStatsService(Service): """Stop monitoring system stats""" if self._timer_id is not None: from gi.repository import GLib + GLib.source_remove(self._timer_id) self._timer_id = None @@ -62,4 +63,4 @@ class SystemStatsService(Service): @property def memory_percent(self): """Get current memory percentage""" - return self._memory_percent / 100 \ No newline at end of file + return self._memory_percent / 100