digitalcourage.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Diese Instanz wird betrieben von Digitalcourage e.V. für die Allgemeinheit. Damit wir das nachhaltig tun können, erheben wir einen jährlichen Vorausbeitrag von 1€/Monat per SEPA-Lastschrifteinzug.

Server stats:

860
active users

Marcus Rohrmoser 🌻

Hi @kevinbowen,
I wonder where to ask if there's a commandline-way to switch the docs.xfce.org/apps/xfce4-termi for the current and future 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.

docs.xfce.orgapps:xfce4-terminal:4.20:preferences [Xfce Docs]

Hi @kevinbowen,
I ended up with a shell script on dark/light toggle:

...
xf_set () {
# forum.xfce.org/viewtopic.php?p
xfconf-query -c "xfce4-terminal" -p "/$1" -s "$2"
}
if [ "$(basename "$0")" = "mode-dark" ]
then
xf_set "color-foreground" "#839496"
xf_set "color-background" ""
xf_set "color-cursor" ""
xf_set "color-bold" ""
else
xf_set "color-foreground" "#073642"
xf_set "color-background" ""
xf_set "color-cursor" "#073642"
xf_set "color-bold" "#073642"
fi

forum.xfce.orgHow to specify a background color for an xfce4-terminal color preset / Themes & Screenshots / Xfce Forums

@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,
, yes, in fact it has to be argument zero:


if [ "$(basename "$0")" = "mode-dark" ]

Finally that script is for 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