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

System per-theme libadwaita install way #233

Open
nick87720z opened this issue Nov 19, 2022 · 0 comments
Open

System per-theme libadwaita install way #233

nick87720z opened this issue Nov 19, 2022 · 0 comments

Comments

@nick87720z
Copy link
Contributor

Right now libadwaita theme is installed only to user config dir. This requires to run ./install.sh -l each time to change theme. Instead - them could be just imported, while located in system per-theme dir like /usr/share/themes/Mojave-.../libadwaita (I noticed - gtk4 themes don't apply to libadwaita).

There's code I used in ebuild for such arrangement (of course, I still need tool to quickly change theme - I guess, it could be daemon, waiting for theme change and updating user's gtk.css to match system theme).

./install.sh --dest "${D}/usr/share/themes" --theme all
    (
        export HOME="${S}"
        mkdir -p "${S}/.config/gtk-4.0"
        declare -A _str
        _str=(
            [light]=Light
            [dark]=Dark
            [standard]=
            [solid]=-solid
            [alt]=-alt
        )
        for color in light dark; do
            for opacity in standard solid; do
                for alt in standard alt; do
                    for theme in blue purple pink red orange yellow green grey; do
                        ./install.sh --libadwaita -o ${opacity} -a ${alt} -c ${color} -t ${theme}
                        insinto "/usr/share/themes/Mojave-${_str[${color}]}${_str[${opacity}]}${_str[${alt}]}-${theme}/libadwaita"
                        doins -r '.config/gtk-4.0'/*
                        rm -r "${S}/.config/gtk-4.0"/*
                    done
                    ./install.sh --libadwaita -o ${opacity} -a ${alt} -c ${color}
                    insinto "/usr/share/themes/Mojave-${_str[${color}]}${_str[${opacity}]}${_str[${alt}]}/libadwaita"
                    doins -r '.config/gtk-4.0'/*
                    rm -r "${S}/.config/gtk-4.0"/*
                done
            done
        done
    )
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

1 participant