HiDPI and fonts
This commit is contained in:
@@ -16,9 +16,11 @@ case "$(file --mime-type -b "$trueloc")" in
|
||||
*) notify-send "Error" "Not a valid image." ; exit 1;;
|
||||
esac
|
||||
|
||||
[ -z "$trueloc" ] && trueloc="$(readlink -f "$bgloc")"
|
||||
|
||||
# If pywal is installed, use it.
|
||||
command -v wal >/dev/null 2>&1 &&
|
||||
wal -i "$trueloc" -n -o "${XDG_CONFIG_HOME:-$HOME/.config}/wal/postrun" >/dev/null 2>&1 &&
|
||||
pidof dwm >/dev/null && xdotool key super+F12
|
||||
dwmc xrdb
|
||||
|
||||
xwallpaper --zoom "$bgloc"
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Scale up the GUI by 2 times for HiDPI screens
|
||||
sed -i '/\[JavaOptions\]/a -Dsun.java2d.uiScale=2' /opt/maptool/lib/app/MapTool.cfg
|
||||
8
.local/bin/setup/setupmaptool
Executable file
8
.local/bin/setup/setupmaptool
Executable file
@@ -0,0 +1,8 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Scale up the GUI by 2 times for HiDPI screens
|
||||
if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/x11/.DPI" ]; then
|
||||
DPI="$(cat "${XDG_CONFIG_HOME:-$HOME/.config}/x11/.DPI")"
|
||||
SCALE="$(((DPI+48)/96))"
|
||||
sudo -A sed -i "/\[JavaOptions\]/a -Dsun.java2d.uiScale=$SCALE" /opt/maptool/lib/app/MapTool.cfg
|
||||
fi
|
||||
@@ -8,14 +8,14 @@ case "$(readlink -f /sbin/init)" in
|
||||
*openrc*) reb="sudo -A openrc-shutdown -r"; shut="sudo -A openrc-shutdown -p 0" ;;
|
||||
esac
|
||||
|
||||
|
||||
cmds="\
|
||||
🔒 lock slock
|
||||
🚪 leave dwm kill -TERM $(pgrep -u $USER "\bdwm$")
|
||||
♻ renew dwm kill -HUP $(pgrep -u $USER "\bdwm$")
|
||||
🐻 hibernate slock ${hib:-systemctl suspend-then-hibernate -i}
|
||||
🔃 reboot ${reb:-sudo -A reboot}
|
||||
🖥 shutdown ${shut:-sudo -A shutdown -h now}
|
||||
📺 display off xset dpms force off"
|
||||
lock slock
|
||||
leave dwm dwmc quit
|
||||
renew dwm dwmc restart
|
||||
hibernate slock ${hib:-systemctl suspend-then-hibernate -i}
|
||||
reboot ${reb:-sudo -A reboot}
|
||||
shutdown ${shut:-sudo -A shutdown -h now}"
|
||||
|
||||
choice="$(echo "$cmds" | cut -d' ' -f 1 | dmenu)" || exit 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user