foot: Add theming script

This commit is contained in:
histalek 2022-03-13 11:18:23 +01:00
parent 52271dd504
commit ba925c683c
No known key found for this signature in database
GPG key ID: ED1D6449704FDE03

16
.local/bin/scripts/foot-themer Executable file
View file

@ -0,0 +1,16 @@
#!/bin/bash
## modified version of https://github.com/mtwb47/scripts/blob/master/alchanger.sh, adapted for use with foot included themes
config="$HOME/.config/foot/foot.ini"
theme_dir="/usr/share/foot/themes/"
choice=$(ls -1 $theme_dir | fuzzel --dmenu -R --log-level=none --no-icons -x 10 --lines 20 --prompt='Choose a theme for foot:')
if [[ "$choice" == "" ]]; then
echo "No theme chosen. Not changing foot config."
else
sed -i "s,^include=$theme_dir.*$,include=$theme_dir$choice," $config
fi