Compton doesn't work with pywal


#1

Hi,
After finding a nice community-made wallpaper for Archlabs I noticed that the default gray color scheme doesn’t really fit my new wallpaper so I did what I’ve always done with my Arch installs which is using the python-pywal package to quickly set the color scheme.

The color scheme gets applied succesfully but Compton refused to work.
My windows quickly flash but nothing happens when I try to run Compton.
A text capture from terminal what happens if I try to run Compton:

                     'c'
                    'kKk,                   ===> irets @ archlabs
                   .dKKKx.                  =====================>
                  .oKXKXKd.                 ->   wm:     i3
                 .l0XXXXKKo.                ->   term:   rxvt-256color
                 c0KXXXXKX0l.               ->   shell:  zsh
                :0XKKOxxOKX0l.              ->   uptime: 4h, 7m
               :OXKOc.,.c0XX0l.
              :OK0o, ...'dKKX0l.            ->   packages:  1078
             :OX0c, ;xOx''dKXX0l.           ->   kernel:    4.19.25
            :0KKo..o0XXKd'.lKXX0l.          ->   distro:    archlabs
           c0XKd..oKXXXXKd..oKKX0l.         ->   installed: 2019 02 02
         .c0XKk;.l0K0OO0XKd..oKXXKo.
        .l0XXXk:,dKx,.'l0XKo..kXXXKo.       ->   ram: 3.787gb / 16gb
       .o0XXXX0d,:x;   .oKKx'.dXKXXKd.      ->   cpu: 8 cores @ 14% avg
      .oKXXXXKK0c.;.    :00c'cOXXXXXKd.
     .dKXXXXXXXXk,.     cKx''xKXXXXXXKx'    ->   theme: ArchLabs-dARK
    'xKXXXXK0kdl:.     .ok; .cdk0KKXXXKx'   ->   icons: ArchLabs-Light
   'xKK0koc,..         'c,     ..,cok0KKk,
  ,xko:'.                           .':okx, ████████████████████████████

┌ ~
└> % compton                                                                                                8:25:58
[ 02/25/2019 08:26:01.892 parse_config_libconfig WARN ] Option `no-dock-shadow` is deprecated, and will be removed. Please use the wintype option `shadow` of `dock` instead.
[ 02/25/2019 08:26:01.892 parse_config_libconfig WARN ] Option `no-dnd-shadow` is deprecated, and will be removed. Please use the wintype option `shadow` of `dnd` instead.
[ 02/25/2019 08:26:01.892 parse_config_libconfig WARN ] Option `menu-opacity` is deprecated, and will be removed.Please use the wintype option `opacity` of `popup_menu` and `dropdown_menu` instead.
[ 02/25/2019 08:26:01.892 parse_config_libconfig WARN ] "clear-shadow" is removed as an option, and is always enabled now. Consider removing it from your config file
[ 02/25/2019 08:26:01.892 parse_config_libconfig WARN ] "alpha-step" has been removed, compton now tries to make use of all alpha values

This is my compton.conf:

# Shadow
shadow = true;
no-dnd-shadow = true;
no-dock-shadow = true;
shadow-radius = 7.0;
shadow-offset-x = -7;
shadow-offset-y = -7;
shadow-opacity = 0.60;

# Opacity
menu-opacity = 1.0;
inactive-opacity = 1.0;
active-opacity = 1.0;
inactive-opacity-override = false;

# Fade
fading = true;
fade-delta = 8.0;
fade-in-step = 0.03;
fade-out-step = 0.028;
alpha-step = 0.06;

# Backend
backend = "xrender";
vsync = "none";
mark-wmwin-focused = true;
unredir-if-possible = true;
detect-rounded-corners = true;

opacity-rule = [
    "0:_NET_WM_STATE@:32a * = '_NET_WM_STATE_HIDDEN'"
];

shadow-exclude = [
    "name *?= 'Notification'",
    "class_g *?= 'jgmenu'",
    "class_g *?= 'VirtualBox'",
    "class_g *?= 'Conky'",
    "class_g *?= 'Notify-osd'",
    "class_g *?= 'cairo-dock'",
    "class_g *?= 'trayer'",
    "class_g *?= 'i3-frame'",
    "class_g *?= 'firefox'",
    "class_g *?= 'navigator'",
    "class_g *?= 'Cairo-clock'",
    "class_g *?= 'Cairo-dock'",
    "class_g *?= 'plank'",
    "class_g *?= 'Docky'",
    "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",
    "_GTK_FRAME_EXTENTS@:c"
];

focus-exclude = [
    "class_g *?= 'Cairo-clock'",
    "class_g *?= 'Virtualbox'",
    "class_g *?= 'trayer'",
    "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",
    "name *?= 'Authy'"
];

wintypes:
{
    tooltip = { fade = true; shadow = true; focus = true; };
};
clear-shadow = false;
no-fading-openclose = false;
frame-opacity = 0.0;
shadow-ignore-shaped = false;
blur-background-fixed = false;

The command that I use the set the color scheme is wal -i path/to/image

Anyone know how could I solve this issue and make them both work together?


#2

try changing this to 1.0

to see if it’s a config issue you can load compton like

pkill compton
compton -b --config /dev/null &

#3

Hi there,
I edited the frame-opacity and did your commands in order.
Still no luck so far.
Trying to run Compton still says the following:

┌ 2 ~
└> % pkill compton                                                                            10:13:41
┌ ~
└> % compton                                                                                  10:13:44
[ 02/25/2019 10:13:45.426 parse_config_libconfig WARN ] Option `no-dock-shadow` is deprecated, and will be removed. Please use the wintype option `shadow` of `dock` instead.
[ 02/25/2019 10:13:45.426 parse_config_libconfig WARN ] Option `no-dnd-shadow` is deprecated, and will be removed. Please use the wintype option `shadow` of `dnd` instead.
[ 02/25/2019 10:13:45.426 parse_config_libconfig WARN ] Option `menu-opacity` is deprecated, and will be removed.Please use the wintype option `opacity` of `popup_menu` and `dropdown_menu` instead.
[ 02/25/2019 10:13:45.426 parse_config_libconfig WARN ] "clear-shadow" is removed as an option, and is always enabled now. Consider removing it from your config file
[ 02/25/2019 10:13:45.426 parse_config_libconfig WARN ] "alpha-step" has been removed, compton now tries to make use of all alpha values

Doing

compton -b --config /dev/null & 

loads the config but the transparency doesn’t work.
Also this doesn’t print out any error messages.

┌ ~
└> % pkill compton                                                                                         10:18:04
┌ ~
└> % compton -b --config /dev/null &                                                                       10:20:54
[1] 19345
┌ ~
└> %                                                                                                       10:21:09
[1]  + 19345 done       compton -b --config /dev/null
┌ ~
└> %                                                                                                       10:21:20


Picture of me doing the commands.

There seems to be a visual glitch going on with my right monitor in the screencap but that isn’t important because it is only shown in screencaps.


#4

That’s because it isn’t loading any config but using the builtin defaults. You can set transparency with command line flags as well or let it load the config by not using /dev/null but edit it to remove the values that are causing issues, it would also be worth reading man compton.

This is just a part of xorg, the root window is drawn once and not upadted because it’s outside the viewing area, so you can get visual artifacting, running something like

xsetroot -bg black -cursor_name left_ptr

will set the whole root window black, this also overrides your current background.


We’ll have to see if the issues with pywal+compton continue when using the defaults settings al la --config /dev/null


#5


Do you mean compton al la --config /dev/null with that?
I posted a screencap of the outcome.
There seems to be less errors than last time when I run that Compton command.

I’m so sorry, I’m very drunk right now.
I cant help myself.
Sorry, again.

I know already I fucked up somehow already, like not killing compton before trying to run compton again, sorry.
I tried to run it but it’s not shown in the screenshot.

I understand if you’ll abandon this thread because of me.
I’m sorry, sir.


#6

:rofl:

Don’t feel so bad XD, I was just messing around.

a la (i spelled it wrong before :P) it’s a french term that means: in the style of

I’m not french, it’s one of those sayings used by english speakers, so when I say you’ll have to run compton a la …
It just means run compton in the style of …

When you pass compton the --config option and give it /dev/null this is like having no config, /dev/null is just a black hole, there’s nothing there. See for yourself

cat /dev/null

So when you pass that to compton as it’s config, it will just use the default values. This can help with solving config related issues.


With that out of the way, I’m not just gonna drop your thread :stuck_out_tongue:

Can you do

pkill compton

compton -b --config /dev/null

# change wallpaper...

# use pywal...

# what happened???

#7

Oh, the french part flew straight over my head,
This is the output of your commands:

┌ ~
└> % pkill compton                                                           
┌ ~
└> % compton -b --config /dev/null                                           
┌ ~
└> % wal -i Pictures/Wallpapers_Downloaded/al.jpg                                                          22:06:44
[I] image: Using image al.jpg.
[I] theme: Set theme to _home_irets_Pictures_Wallpapers_Downloaded_al_jpg_dark_None_None_1.1.0.json.
[I] colors: Found cached colorscheme.
[I] wallpaper: Set the new wallpaper.
[I] sequences: Set terminal colors.

                                
                                

[I] export: Exported all files.
[I] export: Exported all user files.
[I] reload: Reloaded environment.
┌ ~
└> %                                                                                                       22:08:30

I used Nitrogen to switch my wallpapers but I’d like to use the one which I have equipped right now.

Screencap of me running the commands.

As you can see, the transparency is still missing.
I’m sorry if I misunderstood your message and commands in any way.


#8

Ok so I think it’s safe to say that the issue between pywal and compton is config related correct?


#9

Do you want all windows to be semi-transparent or just the terminal?

for urxvt you can set transparency in ~/.Xresources like so

URxvt*background: [95]#1C2023

where [95] is the opacity level, 100 being opaque and 0 being transparent.

Then reload the changes

xrdb -load ~/.Xresources

#10

I believe so.
I want my terminal and all terminal programs to be transparent.
I’ve never had this problem before with Arch or any Arch-based distro.

I tried changing URxvt*background: [95]#1C2023 but it didn’t make any difference at all.


#11

try this

pkill compton

echo 'URxvt*background: [80]#1C2023' | xrdb

urxvt &

compton -b --config /dev/null &

wal -i ~/Pictures/Wallpapers_Downloaded/al.jpg    

# still issues?                                                      

I can confirm this works, I don’t use compton or urxvt but I installed them and did some fiddling around.


#12

Have you set

URxvt.depth: 32

Also make sure that URxvt.tintColor and URxvt.inheritPixmap are commented out.

Note that some wallpaper setting programs break transparency with the current version of rxvt-unicode:

https://wiki.archlinux.org/index.php/Rxvt-unicode#Transparency_not_working_after_upgrade_to_v9.09

Looks like that wal command might be one of those…


#13

pywal uses feh by default for most environments, doesn’t mean it isn’t the cause but in theory it should be fine.


#14

This is my .Xresources:


! Base colors
*.foreground:  #E1E1E1
*.background:  #1c2023
*.cursorColor: #778899

*.color0:  #1c2023
*.color1:  #bf616a
*.color2:  #a3be8c
*.color3:  #ebcb8b
*.color4:  #8fa1b3
*.color5:  #b48ead
*.color6:  #96b5b4
*.color7:  #E1E1E1
*.color8:  #919ba0
*.color9:  #bf616a
*.color10: #a3be8c
*.color11: #ebcb8b
*.color12: #8fa1b3
*.color13: #b48ead
*.color14: #96b5b4
*.color15: #c0c5ce

! Rofi
rofi.font: monospace 12
rofi.padding: 20
rofi.line-padding: 2
rofi.color-enabled: true
rofi.hide-scrollbar: true
rofi.separator-style: solid
rofi.color-window: #1c2023, #919ba0, #1c2023
rofi.color-normal: #1c2023, #919ba0, #1c2023, #a4a4a4, #1c2023
rofi.color-urgent: argb:00000000, #f43753, argb:00000000, argb:00000000, #e29a49
rofi.color-active: argb:00000000, #49bbfb, argb:00000000, argb:00000000, #e29a49
rofi.kb-cancel: Escape,Alt+F1

! xterm
xterm*termName: xterm-256color
xterm*font: monospace
xterm*faceName: monospace:size=11
xterm*loginShell: true
xterm*vt100*geometry: 90x34
xterm*saveLines: 2000
xterm*charClass: 33:48,35:48,37:48,43:48,45-47:48,64:48,95:48,126:48
xterm*eightBitInput: false

! URxvt
URxvt*saveline: 15000
URxvt*termName: rxvt-256color
URxvt*iso14755: false
URxvt*depth: 32
URxvt*background: [95]#1C2023
URxvt*scrollBar: false
URxvt*scrollBar_right: false
URxvt*internalBorder: 0
URxvt*externalBorder: 0
URxvt*letterSpace: -1
URxvt.font: xft:monospace:size=11
URxvt.perl-ext-common: default,clipboard,url-select,keyboard-select
URxvt.copyCommand: xclip -i -selection clipboard
URxvt.pasteCommand: xclip -o -selection clipboard
URxvt.keysym.m-c: perl:clipboard:copy
URxvt.keysym.m-v: perl:clipboard:paste
URxvt.urlLauncher: exo-open
URxvt.underlineURLs: true
URxvt.urlButton: 1
URxvt.geometry: 90x34
URxvt.tabbed.tabbar-fg: 4
URxvt.tabbed.tabbar-bg: 16
URxvt.tabbed.tab-fg: 15
URxvt.tabbed.tab-bg: 4
URxvt*buffered: false

! UXTerm
UXTerm*termName: xterm-256color
UXTerm*cursorColor: white
UXTerm*VT100.geometry: 90x34
UXTerm*font: monospace
UXTerm*faceSize: 11
UXTerm*dynamicColors: true
UXTerm*utf8: 2
UXTerm*eightBitInput: true
UXTerm*saveLines: 10000
UXTerm*scrollKey: true
UXTerm*scrollTtyOutput: false
UXTerm*scrollBar: false
UXTerm*rightScrollBar: false
UXTerm*jumpScroll: true
UXTerm*multiScroll: true
UXTerm*toolBar: false

#16

(isn’t related) I do like your wallpaper !


#17

your xresources looks fine, please confirm my above snippet doesn’t work


#18

I can confirm that it doesn’t work.
After urxvt & , I kept typing the commands inside the new terminal that popped up.
Just wanted to point that out if it makes any difference.
As usual, I included a screenshot of me actually doing your commands.

I had a typo the first time I did

al -i ~/Pictures/Wallpapers_Downloaded/al.jpg

So dont mind that :stuck_out_tongue: .

EDIT: I tried running compton with

 compton -b --config /dev/null 

after running wal -i [wallpaper] and I also tried compton without the -b flag.
This doesn’t produce any errors inside the terminal because it doesn’t do anything.
There’s no text output of any kind and the transparency stays off.

Also, pardon my lack of understanding.
This is the VERT first time i’ve had problem with python-pywal.


#19

Was the terminal transparency working before you run wal?

I’m guessing this might be why wal has this flag

  -a "alpha"            Set terminal background transparency. *Only works in
                        URxvt*

The -b flag for compton is needed to fork the process and daemonize it, see man compton or http://manpages.ubuntu.com/manpages/trusty/man1/compton.1.html some examples are at the bottom


#20

Yes, running wal -i [path/to/wallpaper] kills the transparency.


#21

Something is off, because the new terminal that opened doesnt have #1C2023 for the background.

EDIT: nvm I’m dumb, wal is resetting it’s colours