Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add option to hide label when battery is full #350

Merged
merged 6 commits into from
Oct 21, 2024

Conversation

rubiin
Copy link
Contributor

@rubiin rubiin commented Oct 21, 2024

closes #313

Adds an option to toggle the battery label on bar when the charge is full

image

image

@Jas-SinghFSU
Copy link
Owner

👀 On a roll lol.

modules/bar/battery/index.ts Outdated Show resolved Hide resolved
@Jas-SinghFSU
Copy link
Owner

Similarly, if the label is hidden, the split style icon needs to have it border adjusted. We can add the last-child scope at the bottom of this css.

    .bar-button-icon.battery {
        border-top-left-radius: $bar-buttons-radius;
        border-bottom-left-radius: $bar-buttons-radius;
        background: if($bar-buttons-monochrome, $bar-buttons-icon, $bar-buttons-battery-icon_background);
        padding: $bar-buttons-padding_y 0em;
        padding-left: $bar-buttons-padding_x;
        padding-right: $bar-buttons-battery-spacing;
        border-top-left-radius: if(
            $bar-buttons-battery-enableBorder or $bar-buttons-enableBorders,
            $bar-buttons-radius * 0.4,
            $bar-buttons-radius
        );
        border-bottom-left-radius: if(
            $bar-buttons-battery-enableBorder or $bar-buttons-enableBorders,
            $bar-buttons-radius * 0.4,
            $bar-buttons-radius
        );

        &:last-child {
            border-radius: $bar-buttons-radius;
        }
    }

rubiin and others added 2 commits October 21, 2024 13:51
Co-authored-by: Jas Singh <jaskiratpal.singh@outlook.com>
@rubiin
Copy link
Contributor Author

rubiin commented Oct 21, 2024

👀 On a roll lol.

Rick Astley Never Gonna Give You Up GIF – Rick Astley Never Gonna Give You Up Rickroll – discover and share GIFs

@Jas-SinghFSU Jas-SinghFSU merged commit c265697 into Jas-SinghFSU:master Oct 21, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hide battery percentage when full
2 participants