Skip to content

Instantly share code, notes, and snippets.

@gabriel-laet
Created June 2, 2015 03:06
Show Gist options
  • Select an option

  • Save gabriel-laet/1372dc07b0c946f7da8c to your computer and use it in GitHub Desktop.

Select an option

Save gabriel-laet/1372dc07b0c946f7da8c to your computer and use it in GitHub Desktop.

Revisions

  1. gabriel-laet created this gist Jun 2, 2015.
    23 changes: 23 additions & 0 deletions idea.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    --- bin/idea.sh 2015-06-02 00:03:02.869607320 -0300
    +++ bin/idea.sh 2015-06-02 00:01:59.867708731 -0300
    @@ -171,6 +171,12 @@
    CLASSPATH="$CLASSPATH:$IDEA_CLASSPATH"
    fi

    +# Define HIDPI flag
    +SCALE_FACTOR=$(gsettings get org.gnome.desktop.interface scaling-factor | sed 's/uint32\ //')
    +if [ "$SCALE_FACTOR" = 2 ]; then
    + HIDPI_PROPERTIES="-Dhidpi=true"
    +fi
    +
    # ---------------------------------------------------------------------
    # Run the IDE.
    # ---------------------------------------------------------------------
    @@ -181,6 +187,7 @@
    $VM_OPTIONS "-Djb.vmOptionsFile=$VM_OPTIONS_FILES_USED" \
    "-XX:ErrorFile=$HOME/java_error_in_IDEA_%p.log" \
    -Djb.restart.code=88 -Didea.paths.selector=IntelliJIdea14 \
    + $HIDPI_PROPERTIES \
    $IDE_PROPERTIES_PROPERTY \
    $IDE_JVM_ARGS \
    $REQUIRED_JVM_ARGS \