leftwm: Theme is not applied
Describe the bug I have followed the wiki to create a minimal theme, but it is not applied to leftwm.
To Reproduce
- Structure your leftwm config in the following structure:
.
├── config.toml
└── themes
    └── current
        ├── down
        ├── theme.toml
        └── up
- Insert content into the theme/currentdirectorydown
echo "UnloadTheme" > $XDG_RUNTIME_DIR/leftwm/commands.pipe
up
leftwm-command "LoadTheme $HOME/.config/leftwm/themes/current/theme.toml"
config.toml
border_width = 10
margin = 5
- Make downandupexecutable
chmod +x down
chmod +x up
- Restart leftwm
Expected behavior
I expect I am able to apply setting that I have made in config.toml to leftwm. But everything is unchanged.
Environment:
- OS/Distro: [e.g. Manjaro] Nixos
- Output of leftwm-check
:: LeftWM version: 0.2.8
:: LeftWM git hash: NONE
:: Loading configuration . . .
    -> Configuration loaded OK
:: Checking keybinds . . .
    -> All keybinds OK
:: Checking environment . . .
    -> Environment OK
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 26 (15 by maintainers)
Ok this is finally working now! Not the permission issue, but the shebang!!!. Even thought I don’t have anything in my
/usr/bin/, theupscript is only running, if theshebangis either#!/usr/bin/env bashor#!/usr/bin/env shThis is my
/usr/bin:Is this the expected behavior, where it is strictly requiring the shebang of bash or env?
Closing this as it is solved, but I think the discussion can go on.
I’ve tried to create a bare minimum theme my self now:
up script:Note: as a convention unloading a theme should happen with a
downscript, which undos all of the things the upscript launches and that is symlinked or copied to/tmp/leftwm-down-themewith the following snippet:downscript:theme.toml:Important: it appears, that this is the absolute minimum a theme file needs to contain, otherwise parsing will fail. If this does not solve the issue, I don’t know what else could be the culprit.
I’d like to hear some opinions, whether all fields in
theme.tomlshould be optional, or if we want the above to stay the bare minimum.I added those infos to the wiki
I may be mistaken, but I believe the shebang has to be the first line of a document, as the rest of the document basically is just arguments to the command following the shebang.
I would Test
#!/usr/bin/bash,#!/bin/bashand#!/usr/bin/env bashand returnOkas this should suffice to indicate the script should work.#!/for a shebang like#!/usr/fishwillWARNING: Usage of non-standard shebang '#!/usr/bin/fish' in 'up' script. Proper execution cannot be checked.And if the script fails for other reasons, there’s other places then leftwm-check to debug this IMO.I see what the issue is with Soothe in particular. LeftWM-Theme needs to link to Soothe/theme/, not Soothe/. You can manually link in that case; otherwise we’ll need to help LeftWM-Theme with a relative_directory tag.
Could it be something as simple as not declaring #!/usr/bin/env bash at the top of the scripts, other wise I don’t see why there is an issue. Whether it is related or not, it may be good to raise an issue with the devs about user files that are created in the users home tree should be owned be that user. Thanks.