Let's Linux #015: polypoison
budlabs
the files used in this video can be found on github: https://github.com/budlabs/youtube/tree/master/letslinux/013-015-colors-are-poison
This is part 3 of 3 about how to set up colors and fonts using .Xresourcess and syncing the settings in multiple applications.
In this video I apply the settings to polybar.
I have more videos about polybar, a good one to start with is:
#010: polybar setup
https://youtu.be/7RNgpvBMua0
I filed an issue regarding fontsetting in polybar here:
https://github.com/jaagr/polybar/issues/954
mondo
These poison videos, inspired me to create my own theme manager called: mondo . By using mondo the processes shown in these videos can be done in a much more sober way, with more control and more flexibility!
You can find mondo on github:
https://github.com/budRich/mondo
https://youtu.be/x3zwquxikEI - mondo demo
video info:
color scheme: gruvbox, by morhertz terminal font: Inconsolata terminal emulator: URxvt figlet font: 3d.flf, by xero filemanager: thunar icon theme: ePapirus gtk theme: numix wallpaper: painted-japanese-owl
videos
https://youtu.be/VynIrBrzUgA - colors are poison
https://youtu.be/m2XUxyTmOkQ - more poison
https://youtu.be/OIjwl0MjfBA - polypoison
.Xresources syntax
include file (OBS! quotes are important):
#include "RELATIVE_PATH"
define variable:
#define VARIABLE VALUE
custom resource:
name.class.resource: value/variable
on startup
shell
load .Xresources in ~/.xinitrc (recommended):
[[ -f ~/.Xresources ]]
&& xrdb -merge -I$HOME ~/.Xresources
#load .Xresources in ~/.config/i3/config:
set $HOME ABSOLUTE_PATH_TO_HOMEFOLDER
exec --no-startup-id
xrdb -merge -I$HOME ~/.Xresources
exec --no-startup-id exec i3-msg -q restart
If you have to load from i3 it's best to use
reloader script instead.
useful commands
shell
merge new changes:
xrdb -merge ~/.Xresources
replace .Xresources
xrdb -load ~/.Xresources
list current settings in .Xresources:
xrdb -query
list installed fonts:
fc-list grep FONTNAME
instant font test:
printf '\e]710;%s\007' "xft:FONT"
try using this font setting
:antialias=false
get resources
shell
use resource in i3:
set_from_resource $VARIABLE XRESOURCE DEFAULT_VALUE
use xresource in polybar:
VARNAME = ${xrdb:XRESOURCE:DEFAULT}
get xresource from script
VAR=$(xrdb -query awk '$1 ~ XRESOURCE":" {print $2}')
links
https://wiki.archlinux.org/index.php/X_resources
https://github.com/jaagr/polybar/wiki/Configuration
https://i3wm.org/docs/userguide.html#xresources
https://www.reddit.com/r/unixp ... https://www.youtube.com/watch?v=OIjwl0MjfBA
83619033 Bytes