-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmh
More file actions
executable file
·63 lines (49 loc) · 1.5 KB
/
mh
File metadata and controls
executable file
·63 lines (49 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
# switch between hi/low dpi
# TODO: sed instead of copy?, telegram scaling, kill urxvtd?, setxkbmap/xset not working
files=/home/gms/github/dotfiles
common(){
# kill apps that will be reloaded
for x in chromium firefox spotify weechat dunst; do
pkill $x
done
# i3
cp $files/.config/i3/config-$mode ~/.config/i3/config
i3-msg reload
# gtk
cp $files/.gtkrc-2.0-$mode ~/.gtkrc-2.0
cp $files/.config/gtk-3.0/settings-$mode.ini ~/.config/gtk-3.0/settings.ini
# xresources
cp $files/.Xresources-$mode ~/.Xresources
xrdb -merge ~/.Xresources
# dunst
cp $files/.config/dunst/dunstrc-$mode ~/.config/dunst/dunstrc
dunst &
# chromium
cp $files/.config/chromium-flags-$mode.conf ~/.config/chromium-flags.conf
chromium &
# firefox
cp $files/.mozilla/firefox/prefs-$mode.js ~/.mozilla/firefox/*.default/prefs.js
firefox &
# spotify
if [ $mode == hidpi ]; then
spotify --force-device-scale-factor=1.5 &
else
spotify --force-device-scale-factor=1.0000001 &
fi
# sometimes we lose these settings, so force it
setxkbmap -variant intl
xset r rate 350 35
xset b off
}
export DISPLAY=:0
export XAUTHORITY=~/.Xauthority
home=$(</sys/class/drm/card0/card0-HDMI-A-1/status)
if [[ $home == connected ]]; then
xrandr --output eDP-1 --off --output HDMI-1 --auto
mode=lowdpi
else
xrandr --output eDP-1 --auto --output HDMI-1 --off
mode=hidpi
fi
common &>/dev/null