fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

10K
active users

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 #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.

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 () { #xfce
# 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" "#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

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,
#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