deviantfero / wpgtk

:flower_playing_cards: a colorscheme, wallpaper and template manager for *nix
http://deviantfero.github.io/wpgtk/
GNU General Public License v2.0
2.03k stars 50 forks source link

Values in i3 config nor updated #193

Closed ghost closed 4 years ago

ghost commented 4 years ago

I have wal set up to change my terminal (kitty) colors. I am using the set_fromresource to use $term* values to update my i3 bar colors (see below)

# Color palette used for the kitty ( ~/.Xresources file )
# Colors are gathered based on the documentation:
# https://i3wm.org/docs/userguide.html#xresources
# Change the variable name at the place you want to match the color
# of your kitty like this:
# [example]
# If you want your bar to have the same background color as your 
# kitty background change the line 362 from:
# background #14191D
# to:
# background $term_background
# Same logic applied to everything else.
set_from_resource $term_background background
set_from_resource $term_foreground foreground
set_from_resource $term_color0     color0
set_from_resource $term_color1     color1
set_from_resource $term_color2     color2
set_from_resource $term_color3     color3
set_from_resource $term_color4     color4
set_from_resource $term_color5     color5
set_from_resource $term_color6     color6
set_from_resource $term_color7     color7
set_from_resource $term_color8     color8
set_from_resource $term_color9     color9
set_from_resource $term_color10    color10
set_from_resource $term_color11    color11
set_from_resource $term_color12    color12
set_from_resource $term_color13    color13
set_from_resource $term_color14    color14
set_from_resource $term_color15    color15

# Start i3bar to display a workspace bar (plus the system information i3status if available)
bar {
    i3bar_command i3bar
    status_command i3status
    position bottom

## please set your primary output first. Example: 'xrandr --output eDP1 --primary'
#   tray_output primary
#   tray_output eDP1

    bindsym button4 nop
    bindsym button5 nop
#   font xft:URWGothic-Book 11
    strip_workspace_numbers yes

    colors {

        background $term_background
        statusline $term_foreground
        separator  $term_fore

#                      border  backgr. text
        #focused_workspace  #F9FAF9 #16a085 #292F34
        #active_workspace   #595B5B #353836 #FDF6E3
        #inactive_workspace #595B5B #222D31 #EEE8D5
        #binding_mode       #16a085 #2C2C2C #F9FAF9
        #urgent_workspace   #16a085 #FDF6E3 #E5201D

        focused_workspace  $term_color1 $term_color2 $term_color0
        active_workspace   $term_foreground $term_color9 $term_color8
        inactive_workspace $term_foreground $term_color3 $term_color6
        binding_mode       $term_color2 $term_color5 $term_color1
        urgent_workspace   $term_color2 $term_color8 $term_color7
    }
}

# hide/unhide i3status bar
bindsym $mod+m bar mode toggle

# Theme colors
# class                   border  backgr. text    indic.   child_border
#  client.focused          #556064 #556064 #80FFF9 #FDF6E3
#  client.focused_inactive #2F3D44 #2F3D44 #1ABC9C #454948
#  client.unfocused        #2F3D44 #2F3D44 #1ABC9C #454948
#  client.urgent           #CB4B16 #FDF6E3 #1ABC9C #268BD2
#  client.placeholder      #000000 #0c0c0c #ffffff #000000 

#  client.background       #2B2C2B

# Set colors from Xresources
# Change 'color7' and 'color2' to whatever colors you want i3 to use 
# from the generated scheme.
# NOTE: The '#f0f0f0' in the lines below is the color i3 will use if
# it fails to get colors from Xresources.
set_from_resource $fg i3wm.color7 #f0f0f0
set_from_resource $bg i3wm.color2 #f0f0f0

# class                 border  backgr. text indicator child_border
client.focused          $bg     $bg     $fg  $bg       $bg
client.focused_inactive $bg     $bg     $fg  $bg       $bg
client.unfocused        $bg     $bg     $fg  $bg       $bg
client.urgent           $bg     $bg     $fg  $bg       $bg
client.placeholder      $bg     $bg     $fg  $bg       $bg

client.background       $bg

wal -i directory therefore correctly changes my i3bar background, foreground and text color values.

I believe that on running wpg -m my client. values are updated but the `$term_values arent. this does not happen withwal -i`. However, my active terminal (kitty) colors are updated but these changes do not appear in the i3bar.

i have added include ~/.cache/wal/colors-kitty.conf to my kitty.conf file, and the wal command works as expected.

Could you please help me out here? I'm new to ricing and cannot make heads or tails of why this would happen.

ghost commented 4 years ago

for greater clarity.. running, ❯ wpg -s /home/jaym/Pictures/backgrounds/nick-nazzaro-jungle-red.png gives me

[i] image         Using image nick-nazzaro-jungle-red.png.
[i] colors        Generating a colorscheme.
[i] colors        Using wal backend.
[i] colors        Generation complete.
[i] sequences     Set terminal colors.
[i] export        Exported all files.
[i] export        Exported all user files.
[i] color         wrote: icon-step1
[i] color         wrote: gtk3.0
[i] color         wrote: gtk3.20
[i] color         wrote: gtk2
[i] wallpaper     Set the new wallpaper.

and looks like

image

but running, ❯ wal -i /home/jaym/Pictures/backgrounds/nick-nazzaro-jungle-red.png gives me

[I] image: Using image nick-nazzaro-jungle-red.png.
[I] theme: Set theme to _home_jaym_Pictures_backgrounds_nick-nazzaro-jungle-red_png_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.

and looks like image

deviantfero commented 4 years ago

do you have colors defined in your own personal .Xresources? wpgtk merges those to override anything set by the wal .Xresources files, so that could be what's going on in this particular case

ghost commented 4 years ago

@deviantfero Thanks! I had seen your other issue / post before and had commented out some (not all)of the preset colors.