Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.