Hi @kevinbowen,
I wonder where to ask if there's a commandline-way to switch the https://docs.xfce.org/apps/xfce4-terminal/4.20/preferences#presets for the current and future #xfce #terminal sessions.
I have a script doing
$ xfconf-query -c xsettings -p /Net/ThemeName -s "Greybird$dark"
and would like it to switch the terminal preset solarized dark/light accordingly.
$ man xfce4-terminal
left me clueless about color presets.
Either of these would be a good place to start:
forum.xfce.org
https://old.reddit.com/r/xfce/
Hi @kevinbowen,
I ended up with a shell script on dark/light toggle:
...
xf_set () { #xfce
# https://forum.xfce.org/viewtopic.php?pid=77060#p77060
xfconf-query -c "xfce4-terminal" -p "/$1" -s "$2"
}
if [ "$(basename "$0")" = "mode-dark" ]
then
xf_set "color-foreground" "#839496"
xf_set "color-background" "#002b36"
xf_set "color-cursor" "#93a1a1"
xf_set "color-bold" "#93a1a1"
else
xf_set "color-foreground" "#073642"
xf_set "color-background" "#fdf6e3"
xf_set "color-cursor" "#073642"
xf_set "color-bold" "#073642"
fi
@mro Neat! Glad you found a solution.
Question: Shouldn't this be "$(basename "$1")"? That's what works for me.
Also, if one would want to throw this in their .bashrc or .bash_aliases, you'd just need to wrap another function around it:
Hi @kevinbowen,
#omg, yes, in fact it has to be argument zero:
…
if [ "$(basename "$0")" = "mode-dark" ]
…
Finally that script is for #i3 key bindings in ~/.config/i3/config
…
bindsym Mod4+XF86MonBrightnessDown exec --no-startup-id sh bin/mode-dark
bindsym Mod4+XF86MonBrightnessUp exec --no-startup-id sh bin/mode-light
…