constantin-net

theme_terminals

Aug 5th, 2021
867
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. #awful.spawn.with_shell("theme_terminals.sh '" .. string.sub(theme_gtk.bg_color,0,7) .. "' '" .. string.sub(theme_gtk.fg_color,0,7) .. "'" )
  3.  
  4. [ -z "$1" ] && bg="#3e3e3e" && fg="#fefefe" || bg="$1"
  5. [ -z "$2" ] && fg="#fefefe" || fg="$2"
  6.  
  7. # lxterminal
  8. sed -i -r  "s/bgcolor=.*$/bgcolor=$bg/" $HOME/.config/lxterminal/lxterminal.conf
  9. sed -i -r  "s/fgcolor=.*$/fgcolor=$fg/" $HOME/.config/lxterminal/lxterminal.conf
  10.  
  11. # Xterm
  12. sed -i -r  "s/XTerm\*background\:.*$/XTerm*background: $bg/" $HOME/.Xdefaults
  13. sed -i -r  "s/XTerm\*foreground\:.*$/XTerm*foreground: $fg/" $HOME/.Xdefaults
  14. xrdb -merge $HOME/.Xdefaults
  15.  
  16. exit 0
  17.  
RAW Paste Data