Skip to content

Instantly share code, notes, and snippets.

@insign
Created July 25, 2018 01:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save insign/11b099b6512b10adec6d11b4037354e8 to your computer and use it in GitHub Desktop.
Save insign/11b099b6512b10adec6d11b4037354e8 to your computer and use it in GitHub Desktop.
XFCE script for adjust for HiDPI (4k) and rollback after
#!/bin/sh
DPI=$(xfconf-query -c xsettings -p /Xft/DPI)
if [ $DPI -ne 192 ];then
xfconf-query -c xsettings -p /Xft/DPI -s 192
xfconf-query -c xsettings -p /Gtk/CursorThemeName -s capitaine-cursors-hidpi
dconf write /net/launchpad/plank/docks/dock1/icon-size 120
else
xfconf-query -c xsettings -p /Xft/DPI -s 96
xfconf-query -c xsettings -p /Gtk/CursorThemeName -s capitaine-cursors
dconf write /net/launchpad/plank/docks/dock1/icon-size 64
fi
APP=$(which telegram-desktop)
RUNNING="$(pidof -x ${APP})"
if [ ${RUNNING} ]; then
pidof -x ${APP} | xargs kill
(${APP} &> /dev/null &)
fi
RUNNING="$(pgrep -f PhpStorm > /dev/null)"
if $RUNNING ; then
pgrep -f PhpStorm | xargs kill
sleep 2
(pstorm &> /dev/null &)
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment