Add misc stuff
[misc.git] / bin / gtkfix
index f60632d..911db9e 100755 (executable)
@@ -1,20 +1,26 @@
 #!/bin/bash
 
 export GTK2_RC_FILES=/usr/share/themes/Xfce/gtk-2.0/gtkrc
 #!/bin/bash
 
 export GTK2_RC_FILES=/usr/share/themes/Xfce/gtk-2.0/gtkrc
-
 if [ -L "$0" ]; then
     cmd="$(basename "$0")"
     set -- "$cmd" "$@"
 if [ -L "$0" ]; then
     cmd="$(basename "$0")"
     set -- "$cmd" "$@"
+else
+    cmd=$1
 fi
 
 # Minified path
 fi
 
 # Minified path
-PATH=/sbin:/usr/sbin:/usr/local/bin:/bin:/usr/bin:/usr/bin/X11:/usr/games
-# Special case one thing: iceweasel
-if [[ "$0" =~ iceweasel ]]; then
+PATH=/opt/firefox:/sbin:/usr/sbin:/usr/local/bin:/bin:/usr/bin:/usr/bin/X11:/usr/games
+# Special case one thing: browsers
+if [[ "$0" =~ firefox ]]; then
     _JAVA_AWT_WM_NONREPARENTING=1; export _JAVA_AWT_WM_NONREPARENTING
     AWT_TOOLKIT=MToolkit; export AWT_TOOLKIT
     wmname LG3D
     eatmydata  "$@"
 else
     _JAVA_AWT_WM_NONREPARENTING=1; export _JAVA_AWT_WM_NONREPARENTING
     AWT_TOOLKIT=MToolkit; export AWT_TOOLKIT
     wmname LG3D
     eatmydata  "$@"
 else
-    $@
+    if [[ "$0" =~ chromium ]]; then
+        ARG="--force-device-scale-factor=1.1"
+    else
+        ARG=""
+    fi
+    $cmd ${ARG} "${@:2}"
 fi
 fi