Created
July 25, 2018 01:59
-
-
Save insign/11b099b6512b10adec6d11b4037354e8 to your computer and use it in GitHub Desktop.
XFCE script for adjust for HiDPI (4k) and rollback after
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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