all repos — nixfiles @ 380b4c3f6d2ea9371e3b699b7bf47d1cd952a9cf

System and user configuration, managed by nix and home-manager

autorandr/.config/autorandr/postswitch (view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
DPI=96
case $AUTORANDR_CURRENT_PROFILE in
  ("laptop")
    DPI=144
    ;;
  ("docked")
    DPI=109
    ;;
esac

xrandr --dpi $DPI
emacsclient -e "(setq display-pixels-per-inch $DPI)" > /dev/null
i3-msg restart

notify-send --expire-time=5000 "Display profile: '$AUTORANDR_CURRENT_PROFILE'"