Skip to content

rio terminal's colors not switching after using wallrust #1479

@DeltaCream

Description

@DeltaCream

This is a different issue from this wallust issue, because this one involves wallrust, another wallpaper utility that generates colors based on a provided wallpaper using imagemagick.

The issue this time isn't blur, rather, blur here works successfully. However, what I noticed was that despite changing wallpapers and generating templates with wallrust, the color of the rio terminal wasn't changing.

I have here a side-by-side comparison with alacritty:

Image

I used waypaper with a post_command = wallrust "$wallpaper" -v, which essentially runs wallrust to generate a new color configuration based on the provided wallpaper for use by rio (amongst other applications).

Now, after switching wallpapers, this happens:

Image

Note that alacritty's colors change, while rio's doesn't.

I can confirm that wallrust does generate the new color file that rio uses and that rio does use it.

This is wallrust generating the color file:

Image

This is rio reading the new color configuration generated by wallrust, but only after creating a new terminal session, which is the major issue, being that it doesn't change colors within the same terminal session sort of like hot reloading:

Image

Here's the relevant files:

waypaper's config.ini file:

[Settings]
language = en
backend = awww
folder = ~/Pictures/awww
monitors = All
wallpaper = ~/Pictures/awww/street.gif
show_path_in_tooltip = True
fill = fill
sort = name
color = #ffffff
subfolders = False
all_subfolders = False
show_hidden = False
show_gifs_only = False
zen_mode = True
post_command = wallrust "$wallpaper" -v
number_of_columns = 3
swww_transition_type = any
swww_transition_step = 63
swww_transition_angle = 0
swww_transition_duration = 2
swww_transition_fps = 144
mpvpaper_sound = False
mpvpaper_options = 
use_xdg_state = False
stylesheet = /home/cream/.config/waypaper/style.css
keybindings = ~/.config/waypaper/keybindings.ini
wallpaperengine_folder = ~/.steam/root/steamapps/workshop/content/431960
linux_wallpaperengine_clamp = none
linux_wallpaperengine_volume = 15
linux_wallpaperengine_silent = False
linux_wallpaperengine_noautomute = False
linux_wallpaperengine_no_audio_processing = False
linux_wallpaperengine_fps = 30
linux_wallpaperengine_disable_particles = True
linux_wallpaperengine_disable_mouse = False
linux_wallpaperengine_disable_parallax = False
linux_wallpaperengine_no_fullscreen_pause = False

rio's config.toml file:

# Hide the cursor while typing
#
# Default is `false`
#
# hide-cursor-when-typing = false

# Ignore theme selection foreground color
#
# Default is false
#
# Example:
# ignore-selection-foreground-color = false

# Theme
#
# It makes Rio look for the specified theme in the themes folder
# (macos: ~/.config/rio/themes/dracula.toml)
# (linux: $XDG_HOME_CONFIG/rio/themes/dracula.toml or ~/.config/rio/themes/dracula.toml)
# (windows: C:\Users\USER\AppData\Local\rio\themes\dracula.toml)
#
# Example:
# theme = "dracula"
# theme = "wallust"
theme = "wallrust"

# Margin
#
# Define outer margin around the window/tab area using CSS-like syntax
# [all] - Apply same margin to all sides
# [top/bottom, left/right] - Apply vertical and horizontal margin
# [top, right, bottom, left] - Apply individual margin to each side
# (default is [10])
#
# Examples:
# margin = [10]           # 10px on all sides
# margin = [10, 5]        # 10px top/bottom, 5px left/right
# margin = [10, 5, 15, 20] # 10px top, 5px right, 15px bottom, 20px left

# Panel Configuration
#
# Configure layout for split panels (when using vertical/horizontal splits)
#
# panel.margin - Margin inside each panel (around terminal content)
# panel.row-gap - Vertical spacing between panels when split down
# panel.column-gap - Horizontal spacing between panels when split right
#
# Defaults:
# [panel]
# margin = [5]
# row-gap = 0
# column-gap = 0
#
# Example:
# [panel]
# margin = [5]        # Margin inside panels
# row-gap = 10        # Vertical gap between panels
# column-gap = 15     # Horizontal gap between panels

# Option as Alt
#
# This config only works on MacOS.
# Possible choices: 'both', 'left' and 'right'.
#
# Example:
# option-as-alt = 'left'

# Line height
#
# This option will apply an modifier to line-height
# Default is `1.0`
#
# Example:
# line-height = 1.2

# Startup directory
#
# Directory the shell is started in. If this is unset the working
# directory of the parent process will be used.
#
# This configuration only has effect if use-fork is disabled.
#
# Example:
# working-dir = "/Users/raphael/Documents/"

# Environment variables
#
# Example:
# env-vars = []

# Use fork
#
# Defaults for POSIX-based systems (Windows is not configurable):
# MacOS: spawn processes
# Linux/BSD: fork processes
#
# Example:
# use-fork = false

# Confirm before exiting Rio
# Default is `true`
#
confirm-before-quit = false

# Cursor
#
# shape - Default cursor shape is 'block'
# Other available options are: 'underline', 'beam' or 'hidden'
#
# blinking - Whether the cursor blinks. The default is false
#
# blinking-interval - Cursor update on milliseconds interval
#
[cursor]
shape = "beam"  # alacritty uses underline
blinking = true
blinking-interval = 800

# Editor
#
# Default editor on Linux and MacOS is "vi",
# on Windows it is "notepad".
#
# Whenever the key binding `OpenConfigEditor` is triggered it will
# use the value of the editor along with the rio configuration path.
[editor]
program = "nvim"
args = []

# Window configuration
#
# • width - define the initial window width.
#   Default: 600
#
# • height - define the initial window height.
#   Default: 400
#
# • mode - define how the window will be created
#     - "Windowed" (default) is based on width and height
#     - "Maximized" window is created with maximized
#     - "Fullscreen" window is created with fullscreen
#
# • opacity - Set window opacity
#
# • blur - Set blur on the window background. Changing this config requires restarting Rio to take effect.
#
# • decorations - Set window decorations, options: "Enabled", "Disabled", "Transparent", "Buttonless"
#
# • colorspace - Set the color space for the window
#     - "srgb" (default on non-macOS)
#     - "display-p3" (default on macOS)
#     - "rec2020"
#
# • macos-traffic-light-position-x - Set the x position of the macOS traffic light buttons
#     Position is in points from the left edge of the window
#     Note: This setting is ignored when navigation mode is "Tab"
#     Default: Not set (uses macOS default positioning)
#
# • macos-traffic-light-position-y - Set the y position of the macOS traffic light buttons
#     Position is in points from the top edge of the window
#     Note: This setting is ignored when navigation mode is "Tab"
#     Default: Not set (uses macOS default positioning)
#
# Example:
[window]
# width = 600
# height = 400
# mode = "windowed"
opacity = 0.5  # 1.0
blur = true
decorations = "enabled"
colorspace = "display-p3"
# macos-traffic-light-position-x = 9.0
# macos-traffic-light-position-y = 9.0

# Renderer
#
# • Performance: Set WGPU rendering performance
#   - High: Adapter that has the highest performance. This is often a discrete GPU.
#   - Low: Adapter that uses the least possible power. This is often an integrated GPU.
#
# • Backend: Set WGPU rendering backend
#   - Automatic: Leave Sugarloaf/WGPU to decide
#   - GL: Supported on Linux/Android, and Windows and macOS/iOS via ANGLE
#   - Vulkan: Supported on Windows, Linux/Android
#   - DX12: Supported on Windows 10
#   - Metal: Supported on macOS/iOS
#
# • disable-unfocused-render: This property disable renderer processes while Rio is unfocused.
#
# • level: Configure renderer level
#   - Available options: 0 and 1.
#       Higher the level more rendering features and computations
#       will be done like enable font ligatures or emoji support.
#       For more information please check the docs.
#
# • filters: A list of paths to RetroArch slang shaders. Might not work with OpenGL.
#
# Example:
[renderer]
performance = "high"
backend = "automatic"
disable-unfocused-render = false
level = 1
filters = []

# Keyboard
#
# use-kitty-keyboard-protocol - Enable Kitty Keyboard protocol
#
# disable-ctlseqs-alt - Disable ctlseqs with ALT keys
#   - For example: Terminal.app does not deal with ctlseqs with ALT keys
#
# ime-cursor-positioning - Enable IME cursor positioning
#   - When enabled, the IME input popup will appear at the cursor position
#   - Default is true
#
# Example:
# [keyboard]
# use-kitty-keyboard-protocol = false
# disable-ctlseqs-alt = false
# ime-cursor-positioning = true

# Fonts
#
# Configure fonts used by the terminal
#
# Note: You can set different font families but Rio terminal
# will always look for regular font bounds whene
#
# You can also set family on root to overwrite all fonts.
# [fonts]
# family = "cascadiamono"
#
# You can also specify extra fonts to load
# [fonts]
# extras = [{ family = "Microsoft JhengHei" }]
#
# In case you want to specify any font feature:
# [fonts]
# features = ["ss02", "ss03", "ss05", "ss19"]
#
# Note: Font features do not have support to live reload on configuration,
# so to reflect your changes, you will need to close and reopen Rio.
#
# You can also disable font hinting. Font hinting is enabled by default.
# [fonts]
# hinting = false
#
# You can also map the specified Unicode codepoints to a particular font.
# [fonts]
# symbol-map = [
#   { start = "2297", end = "2299", font-family = "Cascadia Code NF" }
# ]
#
# Simple example:
# [fonts]
# size = 18
#
# [fonts.regular]
# family = "cascadiamono"
# style = "Normal"
# weight = 400
#
# [fonts.bold]
# family = "cascadiamono"
# style = "Normal"
# weight = 800
#
# [fonts.italic]
# family = "cascadiamono"
# style = "Italic"
# weight = 400
#
# [fonts.bold-italic]
# family = "cascadiamono"
# style = "Italic"
# weight = 800

[fonts]
hinting = true
size = 15

# Scroll
#
# You can change how many lines are scrolled each time by setting this option.
#
# Scroll calculation for canonical mode will be based on `lines = (accumulated scroll * multiplier / divider)`,
# If you want a quicker scroll, keep increasing the multiplier.
# If you want to reduce scroll speed you will need to increase the divider.
# You can use both properties also to find the best scroll for you.
#
# Multiplier default is 3.0.
# Divider default is 1.0.
# Example:
[scroll]
multiplier = 3.0
divider = 1.0

# Navigation
#
# "mode" - Define navigation mode
#   • NativeTab (MacOS only)
#   • Tab
#   • Plain
#
# "hide-if-single" - Hide navigation UI if is single.
# "clickable" - Enable click on tabs to switch.
# "current-working-directory" - Show current working directory in navigation.
# "color-automation" - Set a specific color for the tab whenever a specific program is running, or in a specific directory.
#
# Example:
# [navigation]
# mode = "Tab"
# clickable = false
# hide-if-single = true
# current-working-directory = true
# color-automation = []

# Shell
#
# You can set `shell.program` to the path of your favorite shell, e.g. `/bin/fish`.
# Entries in `shell.args` are passed unmodified as arguments to the shell.
#
# Default:
#   - (macOS) user login shell
#   - (Linux/BSD) user login shell
#   - (Windows) powershell
#
# Example 1 using fish shell from bin path:
#
# [shell]
# program = "/bin/fish"
# args = ["--login"]
#
# Example 2 for Windows using powershell
#
# [shell]
# program = "pwsh"
# args = []
#
# Example 3 for Windows using powershell with login
#
# [shell]
# program = "pwsh"
# args = ["-l"]
#
# Example 4 for MacOS with tmux installed by homebrew
#
# [shell]
# program = "/opt/homebrew/bin/tmux"
# args = ["new-session", "-c", "/var/www"]

[shell]
program = "/usr/bin/fish"
args = ["--login"]

# Colors
#
# Colors definition will overwrite any property in theme
# (considering if theme folder does exists and is being used)
#
# Example:
# [colors]
# background = '#0F0D0E'
# foreground = '#F9F4DA'
# cursor = '#F38BA3'
# tabs = '#cccccc'  # Inactive tab text and border color (matches Hyper)
# tabs-active = '#ffffff'  # Active tab text color (matches Hyper)
# green = '#0BA95B'
# red = '#ED203D'
# blue = '#12B5E5'
# yellow = '#FCBA28'

# [colors]
# Regular colors
# background = "#0F0D0E"
# black = "#4C4345"
# blue = "#006EE6"
# cyan = "#88DAF2"
# foreground = "#F9F4DA"
# green = "#0BA95B"
# magenta = "#7B5EA7"
# red = "#ED203D"
# white = "#F1F1F1"
# yellow = "#FCBA28"

# Cursor
# cursor = "#F712FF"
# vi-cursor = "#12d0ff"

# Navigation
# tabs = "#cccccc"  # Inactive tab text and border color
# tabs-active = "#ffffff"  # Active tab text color
# bar = "#1b1a1a"
# split = "#292527"

# Search
# search-match-background = "#44C9F0"
# search-match-foreground = "#FFFFFF"
# search-focused-match-background = "#E6A003"
# search-focused-match-foreground = "#FFFFFF"

# Hints
# hint-foreground = "#181818"
# hint-background = "#f4bf75"

# Selection`
# selection-foreground = "#0F0D0E"
# selection-background = "#44C9F0"

# Dim colors
# dim-black = "#1C191A"
# dim-blue = "#0E91B7"
# dim-cyan = "#93D4E7"
# dim-foreground = "#ECDC8A"
# dim-green = "#098749"
# dim-magenta = "#624A87"
# dim-red = "#C7102A"
# dim-white = "#C1C1C1"
# dim-yellow = "#E6A003"

# Light colors
# light-black = "#ADA8A0"
# light-blue = "#44C9F0"
# light-cyan = "#7BE1FF"
# light-foreground = "#F2EFE2"
# light-green = "#0ED372"
# light-magenta = "#9E88BE"
# light-red = "#F25E73"
# light-white = "#FFFFFF"
# light-yellow = "#FDF170"

# Bindings
#
# Create custom Key bindings for Rio terminal
# Example:
# [bindings]
# keys = [
#   { key = "q", with = "super", action = "Quit" },
#   # Send escape sequence to clear screen
#   { key = "l", with = "control", esc = "\u001b[2J\u001b[H" }
# ]

# Platform
#
# Rio now allows you to have different configurations per OS
# You can write ovewrite properties like `Shell`, `Navigation`
# and `Window`.
#
# Example:
# [shell]
# # default (in this case will be used only on MacOS)
# program = "/bin/fish"
# args = ["--login"]
#
# [platform]
# # Microsoft Windows overwrite
# windows.shell.program = "pwsh"
# windows.shell.args = ["-l"]
#
# # Linux overwrite
# linux.shell.program = "tmux"
# linux.shell.args = ["new-session", "-c", "/var/www"]

# Log level
#
# This property enables log level filter and file. The default level is "OFF" and the logs are not logged to a file as default.
#
# Example:
# [developer]
# log-level = "OFF"
# enable-log-file = false

The generated wallrust theme file (~/.config/rio/themes/wallrust.toml):

# Rio Terminal Theme
# Generated by Wallrust from /home/cream/Pictures/awww/street.gif
# Mode: dark

[colors]
# Regular colors
background = "#0E1022"
foreground = "#FFFFFF"
black =   "#0E1022"
white =   "#FFFFFF"
red =     "#00052E"
green =   "#020A52"
yellow =  "#06127A"
blue =    "#0E1B8C"
magenta = "#2432B3"
cyan =    "#3D4BCC"

# Cursor
cursor =    "#2432B3"
vi-cursor = "#0E1B8C"

# Navigation
tabs =        "#9099F0"
tabs-active = "#FFFFFF"
bar =   "#0E1022"
split = "#9099F0"

# Search
search-match-background =         "#3D4BCC"
search-match-foreground =         "#0E1022"
search-focused-match-background = "#06127A"
search-focused-match-foreground = "#0E1022"

# Hints
hint-foreground = "#0E1022"
hint-background = "#06127A"

# Selection
selection-foreground = "#0E1022"
selection-background = "#3D4BCC"

# Dim colors
dim-black =      "#0E1022"
dim-foreground = "#FFFFFF"

dim-red =     "#1C213B"
dim-green =   "#020A52"
dim-yellow =  "#06127A"
dim-blue =    "#0E1B8C"
dim-magenta = "#00052E"
dim-cyan =    "#3D4BCC"
dim-white =   "#FFFFFF"


# Light colors
light-black =      "#9099F0"
light-foreground = "#FFFFFF"
light-white =      "#FFFFFF"

light-red =     "#00082E"
light-green =   "#020F52"
light-yellow =  "#06197A"
light-blue =    "#0E228C"
light-magenta = "#243BB3"
light-cyan =    "#3D54CC"


# Additional information:
# Generated with Wallrust's Tera templates
# Number of primary colors: 4
# Available accent variations: 9

And wallrust's rio template file (~/.config/wallrust/templates/rio.template):

{# output: ~/.config/rio/themes/wallrust.toml #}
{# backup: true #}
# Rio Terminal Theme
# Generated by Wallrust from {{ wallpaper }}
# Mode: {{ mode }}

[colors]
# Regular colors
background = "#{{ primary[0] }}"
foreground = "#{{ text[0] }}"
black =   "#{{ primary[0] }}"
white =   "#{{ text[0] }}"
red =     "#{{ accents[0][0] }}"
green =   "#{{ accents[0][1] }}"
yellow =  "#{{ accents[0][2] }}"
blue =    "#{{ accents[0][3] }}"
magenta = "#{{ accents[0][4] }}"
cyan =    "#{{ accents[0][5] }}"

# Cursor
cursor =    "#{{ accents[0][4] }}"
vi-cursor = "#{{ accents[0][3] }}"

# Navigation
tabs =        "#{{ accents[0][7] }}"
tabs-active = "#{{ text[0] }}"
bar =   "#{{ primary[0] }}"
split = "#{{ accents[0][7] }}"

# Search
search-match-background =         "#{{ accents[0][5] }}"
search-match-foreground =         "#{{ primary[0] }}"
search-focused-match-background = "#{{ accents[0][2] }}"
search-focused-match-foreground = "#{{ primary[0] }}"

# Hints
hint-foreground = "#{{ primary[0] }}"
hint-background = "#{{ accents[0][2] }}"

# Selection
selection-foreground = "#{{ primary[0] }}"
selection-background = "#{{ accents[0][5] }}"

# Dim colors
dim-black =      "#{{ primary[0] }}"
dim-foreground = "#{{ text[0] }}"
{% if primary|length > 1 %}
dim-red =     "#{{ primary[1] }}"
dim-green =   "#{{ accents[0][1] }}"
dim-yellow =  "#{{ accents[0][2] }}"
dim-blue =    "#{{ accents[0][3] }}"
dim-magenta = "#{{ accents[0][0] }}"
dim-cyan =    "#{{ accents[0][5] }}"
dim-white =   "#{{ text[0] }}"
{% else %}
dim-red =     "#{{ accents[0][0] }}"
dim-green =   "#{{ accents[0][1] }}"
dim-yellow =  "#{{ accents[0][2] }}"
dim-blue =    "#{{ accents[0][3] }}"
dim-magenta = "#{{ accents[0][4] }}"
dim-cyan =    "#{{ accents[0][5] }}"
dim-white =   "#{{ text[0] }}"
{% endif %}

# Light colors
light-black =      "#{{ accents[0][7] }}"
light-foreground = "#{{ text[0] }}"
light-white =      "#{{ text[0] }}"
{% if primary|length > 1 %}
light-red =     "#{{ accents[1][0] }}"
light-green =   "#{{ accents[1][1] }}"
light-yellow =  "#{{ accents[1][2] }}"
light-blue =    "#{{ accents[1][3] }}"
light-magenta = "#{{ accents[1][4] }}"
light-cyan =    "#{{ accents[1][5] }}"
{% else %}
light-red =     "#{{ accents[0][8] }}"
light-green =   "#{{ accents[0][5] }}"
light-yellow =  "#{{ accents[0][6] }}"
light-blue =    "#{{ accents[0][4] }}"
light-magenta = "#{{ accents[0][0] }}"
light-cyan =    "#{{ accents[0][1] }}"
{% endif %}

# Additional information:
# Generated with Wallrust's Tera templates
# Number of primary colors: {{ primary|length }}
# Available accent variations: {{ accents[0]|length }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions