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

[Request] Support bitmap image background #25

Open
mtreca opened this issue Oct 22, 2019 · 6 comments
Open

[Request] Support bitmap image background #25

mtreca opened this issue Oct 22, 2019 · 6 comments

Comments

@mtreca
Copy link

mtreca commented Oct 22, 2019

It would be nice to have bitmap support in hsetroot similarly to xsetroot (which is not compatible with compton).

@himdel
Copy link
Owner

himdel commented Oct 22, 2019

I can certainly look at it @Vxid but could you elaborate what you actually want please?

Are you talking about supporting .bmp files?

@himdel
Copy link
Owner

himdel commented Oct 22, 2019

From xsetroot manpage:

-bitmap filename
Use the bitmap specified in the file to set the window pattern. You can make your own bitmap files (little pictures) using the bitmap(1) program. The entire background will be made up of repeated "tiles" of the bitmap.

@himdel
Copy link
Owner

himdel commented Oct 22, 2019

But.. I think that's already doable .. hsetroot -tile your_bitmap

@mtreca
Copy link
Author

mtreca commented Oct 22, 2019

Wow, that was reactive.

I think xbm files may work, but I am dealing with xbm files, which are not supported with hsetroot. They are text files really. I could convert them to an image format but you lose the ability to change the bitmap colors on-the-fly (doable in xsetroot with the -fg and -bg files).

@himdel
Copy link
Owner

himdel commented Oct 22, 2019

:) Aaah, that helps, thanks :)

So, this is essentially a format support issue + the behaviour of fg and bg.

I'll try to look into the code over the weekend, but it sounds reasonable :).

One question, do you think we should simply add -fg, -bg and -bitmap with the semantics as close to xsetroot as possible? Or would it make sense to reuse the current hsetroot options, use -solid for the background color, -tile for the bitmap, and just add an extra argument to specify the foreground color?

@mtreca
Copy link
Author

mtreca commented Oct 22, 2019

Awesome. I looked over the xsetroot source, it seems like it would not be that hard to set a bitmap background. The source can be found here.

I don't think the options should necessarily be similar to the ones of xsetroot, even though -fg and -bg make sense in this case. Maybe arguments of the form -bitmap file bg fg could work?

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

No branches or pull requests

2 participants