mirror of
https://github.com/frebib/dotfiles.git
synced 2024-06-14 12:57:23 +00:00
dpi: set cursor size with xsettings
Signed-off-by: Joe Groocock <me@frebib.net>
This commit is contained in:
parent
3b34decb42
commit
69787bd90f
16
scripts/dpi
16
scripts/dpi
@ -13,15 +13,23 @@ fi
|
|||||||
CONF_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/xsettingsd"
|
CONF_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/xsettingsd"
|
||||||
mkdir -p "$CONF_DIR"
|
mkdir -p "$CONF_DIR"
|
||||||
|
|
||||||
|
cursor=$(echo $dpi/6 | bc | cut -d. -f1)
|
||||||
|
|
||||||
# Build xsettingsd.local
|
# Build xsettingsd.local
|
||||||
{
|
{
|
||||||
cat $CONF_DIR/xsettingsd.conf 2>/dev/null || true
|
cat $CONF_DIR/xsettingsd.conf 2>/dev/null || true
|
||||||
echo Xft/DPI $(( $dpi*1024 ))
|
echo Xcursor/size $cursor
|
||||||
echo Gdk/WindowScalingFactor $(( $dpi/96 ))
|
echo Gtk/CursorThemeSize $cursor
|
||||||
echo Gdk/UnscaledDPI $(( $dpi*1024/($dpi/96) ))
|
echo Xft/DPI $(( dpi*1024 ))
|
||||||
|
echo Gdk/WindowScalingFactor $(( dpi/96 ))
|
||||||
|
echo Gdk/UnscaledDPI $(( dpi*1024/(dpi/96) ))
|
||||||
} > $CONF_DIR/xsettingsd.local
|
} > $CONF_DIR/xsettingsd.local
|
||||||
|
|
||||||
echo Xft.dpi: $dpi | xrdb -merge
|
{
|
||||||
|
echo Xft.dpi: $dpi
|
||||||
|
echo Xcursor.size: $cursor
|
||||||
|
} | xrdb -merge
|
||||||
|
|
||||||
xrandr --dpi $dpi
|
xrandr --dpi $dpi
|
||||||
|
|
||||||
systemctl --user reload-or-restart xsettingsd
|
systemctl --user reload-or-restart xsettingsd
|
||||||
|
@ -6,7 +6,7 @@ After=xprofile.service xorg.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/bin/i3
|
ExecStart=/usr/bin/i3
|
||||||
ExecReload=/usr/bin/i3-msg reload
|
ExecReload=/usr/bin/i3-msg restart
|
||||||
Restart=always
|
Restart=always
|
||||||
Slice=session.slice
|
Slice=session.slice
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user