Comments (29)
Yes, I'll start working on it.
from pywal.
Great, can't wait to see it in action!
from pywal.
This is now handled by oomox.
from pywal.
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.
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.
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.
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.
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.
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.
@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:
from pywal.
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.
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.
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.
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.
from pywal.
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.
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.
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.
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.
Awesome, I'll take a look.
from pywal.
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
from pywal.
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.
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.
@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.
@kotajacob If you are successful in porting the arc theme, do you think you could share it?
from pywal.
@Jab2870 Yea definitely!
from pywal.
So it doesn't require python2 anymore?
from pywal.
Python2 is required to reload GTK2 themes on the fly.
from pywal.
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.
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)
- Created colorscheme is made up of default colors (MacOS) HOT 1
- better pywal? `wallust`
- generating different colors for bright colors (color8-color15) HOT 2
- Rofi templates in /usr/lib/python3.11/site-packages/pywal/templates/ are not up to date HOT 1
- AttributeError: 'Color' object has no attribute 'alpha_dec'. Did you mean: 'alpha_num'? HOT 1
- Can't use oomox with pywal
- Pywal not applying color to new terminals
- Pywal conflicts with polybar and picom?: HOT 2
- Using custom theme file not working in NixOS
- Wallpaper setting stop working in MacOS Sonoma HOT 5
- superpaper
- [Feature] Gives the luminence of the theme as an argument to the -o script HOT 2
- Changing GTK3 colour scheme in Wayland with pywal? HOT 2
- Kitty displays a strange error when running pywal
- Pywal toml colors file for Alacritty
- running `wal` command turns laptop screen on while lid is closed
- Pywal on Mac OS not setting scheme and wall paper correctly HOT 1
- Installation instruction for Gentoo? HOT 3
- deprecated for dwm HOT 1
- wal -R -l doesn't work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pywal.