full rework / rename to crabbar - #25
Draft
faervan wants to merge 41 commits into
Draft
Conversation
solves #15 Allow for multiple instances of crabbar to be created and controlled through Unix sockets. Removes the need of the previously used bar-rs bash script by leveraging clap.
also fix: crabbar not launching when previous instance exited non-gracefully due to existing socket file and fix: daemonized stderr not getting piped to the log file
- move Window and directories to core to allow usage by ipc - use optfield crate to generate override structs that can override specific configuration settings at runtime
…tion not flushing also configure clippy to deny unused_trait_names
also fix: windows reading the outputs when the flush task is created, not when it's executed
also refactor: generic helpers into `helpers` module and refactor: extract ID WindowRequest handling into extra method
also log to file using fern not daemonize crate and do so even when the daemon is attached to a terminal
also fix: bar background color not affecting full bar area
Got annoying to search for the important error messages in a jungle of rustc and clippy warnings
faervan
force-pushed
the
crabbar_rework
branch
from
September 8, 2025 13:50
0020965 to
f8cd562
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
see #24 for the motivation
Conceptual changes
sourcesmodulesdefine the layout of elements inside view. They may depend onsourcesto get access to variable data.stylesdefine extra attributes of individual modules, such as paddings, margins, fonts and font sizes.themesdefine the colors to use in themodulesand the background of thewindowswindowsare named configurations, defining the variants of the configurations defined above as well as general window settings (e.g. anchor, size, monitor).Configuration
INItoTOMLand from theconfigparsercrate totoml,toml-editandtoml-example, enabling seamless parsing usingserdeinstead of doing things manuallyconfig.toml), "themes" (athemesdirectory where different color themes can be added and then selected and switched without updating/swapping the main configuration) and "styles" (astylesdirectory - likethemesbut storing things like gaps, size, spacing, fonts instead)/usr/share/crabbar, as specified by the Filesystem Hierarchy StandardLogging
Until now,
bar-rsonly logged it's output to stdout and stderr usingprintln!andeprintln!and used thebar-rsbash script to write this output to a log file.logcrate and a fitting logging implementation (fern?) to have a more idiomatic logging approachRunning
crabbar/ Unix socketsCurrently a bash script is used to launch and kill the main rust binary. This made things overly complex in setting things up the right way.
crabbaras a daemon listening to commands send through a socket or as a oneshot app sending commands though that socket.Miscellaneous
faervan/icedfork back topop-os/iced(This has been in thetemplate_enginebranch for months already)this will close #15 , close #17 and close #24