Giter Site home page Giter Site logo

Comments (29)

dylanaraps avatar dylanaraps commented on May 22, 2024 3

Yes, I'll start working on it.

from pywal.

ohmree avatar ohmree commented on May 22, 2024 3

Great, can't wait to see it in action!

from pywal.

dylanaraps avatar dylanaraps commented on May 22, 2024 2

This is now handled by oomox.

from pywal.

dylanaraps avatar dylanaraps commented on May 22, 2024 2

It was something like this:

#include <gtk-2.0/gdk/gdk.h>

int main(int argc, char *argv[]) {
    gdk_init(&argc,&argv);
    GdkEventClient event;

    event.type = GDK_CLIENT_EVENT;
    event.send_event = TRUE;
    event.window = NULL;
    event.message_type = gdk_atom_intern("_GTK_READ_RCFILES", FALSE);
    event.data_format = 8;
    gdk_event_send_clientmessage_toall((GdkEvent *)&event);
}

Build command:

gcc -o gtk_reload gtk_reload.c $(pkg-config --cflags --libs gtk+-2.0)

from pywal.

dylanaraps avatar dylanaraps commented on May 22, 2024 1

We should be able to incorporate wpgtk-themes as the theme of choice for pywal. These themes are already in use by wpgtk and incorporating them skips us reinventing the wheel to add theme support.

This will allow us to cover GTK2, GTK3 and Icons. I'm going to start messing around in a local branch to see if I can get this working. :)

from pywal.

dylanaraps avatar dylanaraps commented on May 22, 2024 1

I modified the theme to use special variables exported by pywal. Example:

gtk-color-scheme = "background: #1C1F20"
gtk-color-scheme = "foreground: #E3E4DF"

gtk-color-scheme = "color0: #1C1F20"
gtk-color-scheme = "color1: #907063"
gtk-color-scheme = "color2: #B78C59"
gtk-color-scheme = "color3: #7F7885"
gtk-color-scheme = "color4: #ADA09B"
gtk-color-scheme = "color5: #C9BEB3"
gtk-color-scheme = "color6: #D5D4CF"
gtk-color-scheme = "color7: #E3E4DF"
gtk-color-scheme = "color8: #767879"
gtk-color-scheme = "color9: #907063"
gtk-color-scheme = "color10: #B78C59"
gtk-color-scheme = "color11: #7F7885"
gtk-color-scheme = "color12: #ADA09B"
gtk-color-scheme = "color13: #C9BEB3"
gtk-color-scheme = "color14: #D5D4CF"
gtk-color-scheme = "color15: #E3E4DF"

The only thing that is hard-coded is pywal copying the above variable file to the right directory. If any custom themes are made then support must be added inside pywal.

def gtk():
    """Move gtkrc files to the correct location."""
    theme_path = os.path.join(HOME, ".themes", "Flatabulous-wal")
    gtk2_file = os.path.join(CACHE_DIR, "colors-gtk2.rc")

    if os.path.isdir(theme_path):
        shutil.copy(gtk2_file, os.path.join(theme_path, "gtk-2.0"))

from pywal.

dylanaraps avatar dylanaraps commented on May 22, 2024

GTK2 support has been added.

See the wiki for instructions: https://github.com/dylanaraps/pywal/wiki/Customization#system-themes

Note: You'll need to use the git version of pywal. I'll release a regular version with GTK2 support later this week. Right now I'm looking for feedback on whether or not it works for you guys.

from pywal.

tkamat avatar tkamat commented on May 22, 2024

Seems to work well for me, gtk2 is working fine but requires application restart, and gtk3 is no longer broken. Some of the colors look a bit weird with certain wallpapers, but that is to be expected.

from pywal.

dylanaraps avatar dylanaraps commented on May 22, 2024

Do you have Python 2 installed? The on the fly theme reload requires Python 2.

This is because the Python 3 GTK/Gdk libraries don't support send_clientmessage_toall() which is needed to tell all windows to refresh their themes. The only other solution is shipping a small C file with pywal which I'll look into.

(Sorry, I should've made it clearer. I've updated the Wiki)

from pywal.

dylanaraps avatar dylanaraps commented on May 22, 2024

@tkamat, I just pushed an update to the theme that makes everything more readable. Update both pywal and the GTK theme and let me know if you've got anymore feedback.

Screenshot:

2017-07-25-02-19-21

from pywal.

ohmree avatar ohmree commented on May 22, 2024

I'm on Cinnamon and it doesn't even show me the theme in the theme selection menu.
Is that because it's a gtk2 theme and the Cinnamon theme switcher uses gtk3? Because I can set it in LXAppearance and ~/.gtkrc-2.0 and it even shows in the former (the program uses my wal colors) but it resets after I close LXAppearance.
I know gtk3 uses css for theming so it shouldn't be that hard to theme it but I really don't know where to start

P.S. If there will be a gtk3 theme I think it should live in it's own repository and simply import (or whatever the CSS equivalent is) the css colors that wal already exports

from pywal.

dylanaraps avatar dylanaraps commented on May 22, 2024

I'm on Cinnamon and it doesn't even show me the theme in the theme selection menu.

Did you download and install Flatabulous-wal to ~/.themes? Anyway, I'll push an update to make it show up in the switcher.

P.S. If there will be a gtk3 theme I think it should live in it's own repository and simply import (or whatever the CSS equivalent is) the css colors that wal already exports

That's the plan and it's exactly what the GTK2 theme currently does.

from pywal.

ohmree avatar ohmree commented on May 22, 2024

Did you download and install Flatabulous-wal to ~/.themes? Anyway, I'll push an update to make it show up in the switcher.

Yeah, I did.

That's the plan and it's exactly what the GTK2 theme currently does.

Great!

from pywal.

tkamat avatar tkamat commented on May 22, 2024

Thanks for the update! The on the fly switching is working properly after installing python2, and the colors are much better, but I am still getting some unreadable text. Here is an example from gimp, as you can see some of the menu options at the top are only visible when you mouse over them.
2017-07-26-1501101807_screenshot_1920x1080

from pywal.

dylanaraps avatar dylanaraps commented on May 22, 2024

Do you have gtk-engine-murrine installed? I took a peek in the Flatabulous source and I'm pretty sure it requires it for some styling.

from pywal.

tkamat avatar tkamat commented on May 22, 2024

Never mind, I managed to fix it and it is now working wonderfully! Are you planning GTK3 support in the near future? I might be able to contribute if you are.

from pywal.

dylanaraps avatar dylanaraps commented on May 22, 2024

Yep!

The first step is finding a suitable GTK3 theme to use as a base. I want to skip the GTK theme build process and instead modify the compiled theme directly. The build process does make things easier to edit but it also adds needless dependencies and the compilation takes too long.

Any suggestions for GTK3 themes?

from pywal.

tkamat avatar tkamat commented on May 22, 2024

How about Paper? It seems like a popular, flat, and easy to modify gtk3 theme that fits well for what you are trying to accomplish. I have started tinkering with it and it seems promising, the css files are orderly and it has been pretty easy to import the exported colors from wal. I will let you know if I find a better alternative or if I get it working.

from pywal.

dylanaraps avatar dylanaraps commented on May 22, 2024

Awesome, I'll take a look.

from pywal.

HonorOfDuty avatar HonorOfDuty commented on May 22, 2024

The problem that i'm running into at the moment is that every time i change wallpaper with pywal, the background of the filemanager does not change. i.e. it remains the colour that was assigned when I started i3(see pictures). This changes upon restart of my filemanager.

I've treid this with both thunar and pcmanfm with the same result
before
after

from pywal.

dylanaraps avatar dylanaraps commented on May 22, 2024

This is an issue with the file managers and not pywal, you'll notice it also happens when changing themes with lxappearence and other tools.

Edit: You'll have to restart the file managers to fix this issue.

from pywal.

Jab2870 avatar Jab2870 commented on May 22, 2024

Thanks for all your work on this. If you like, I could open a new ticket but how much extra work would it be to have a qt/plasma theme as well?

from pywal.

kotajacob avatar kotajacob commented on May 22, 2024

@dylanaraps So I'm looking into making a colourable version or the arc gtk theme. When you made the modification to Flatabulous did you do it in a way where it pywal will detect and color any "wal supported" themes or would you have to manually add support into pywal for each new theme?

from pywal.

Jab2870 avatar Jab2870 commented on May 22, 2024

@kotajacob If you are successful in porting the arc theme, do you think you could share it?

from pywal.

kotajacob avatar kotajacob commented on May 22, 2024

@Jab2870 Yea definitely!

from pywal.

Clyybber avatar Clyybber commented on May 22, 2024

So it doesn't require python2 anymore?

from pywal.

dylanaraps avatar dylanaraps commented on May 22, 2024

Python2 is required to reload GTK2 themes on the fly.

from pywal.

Clyybber avatar Clyybber commented on May 22, 2024

Hmm, do you require help with supplying a c file that will be called by pywal to let go of the python2 dependency?

from pywal.

dylanaraps avatar dylanaraps commented on May 22, 2024

I had a C file initially but at the time I couldn't figure out how to package it with pip.

from pywal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.