You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

35 lines
670 B

  1. #!/bin/bash
  2. # adjust fontsizes; $0 +|-
  3. # (c) J.Reisenweber 2017, GPLv2
  4. PROPLIST=$(cat <<EndOfList
  5. xsettings /Gtk/FontName
  6. xfwm4 /general/title_font
  7. EndOfList
  8. )
  9. case $1 in
  10. +|up|larger) A=2; B=3 ;;
  11. -|down|smaller) A=3; B=2 ;;
  12. *) echo "wrong parameter $1"; exit 5 ;;
  13. esac;
  14. adjprop(){
  15. echo -n "$1 $2: "
  16. local VAL=$(xfconf-query -c $1 -p $2)
  17. local FONT=${VAL%%[0-9]*}
  18. local SIZE=${VAL##$FONT}
  19. echo -n "\"${FONT}${SIZE}\" -> "
  20. SIZE=$(( SIZE * B / A ))
  21. echo "\"${FONT}${SIZE}\""
  22. xfconf-query -c $1 -p $2 -s "${FONT}${SIZE}"
  23. return $?
  24. }
  25. echo "$PROPLIST" | while read CHANNEL PROPERTY;
  26. do
  27. adjprop $CHANNEL $PROPERTY;
  28. done;
  29. exit