summaryrefslogtreecommitdiff
path: root/qubes-dwm-6.2/autostart/autostart_blocking.sh
diff options
context:
space:
mode:
authortslil clingman <>2020-10-19 10:33:54 -0400
committertslil clingman <>2020-10-19 10:35:56 -0400
commit24fff7a3ceac1dfaa19518ba806f36a019e9273b (patch)
tree69f619a5ca0b2c98366191c4111520b146fd2c34 /qubes-dwm-6.2/autostart/autostart_blocking.sh
parentae0602777a5739796f4bf7f2f8d47e5dfede7af4 (diff)
Tracking my Qubes DWM configuration
Diffstat (limited to 'qubes-dwm-6.2/autostart/autostart_blocking.sh')
-rwxr-xr-xqubes-dwm-6.2/autostart/autostart_blocking.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/qubes-dwm-6.2/autostart/autostart_blocking.sh b/qubes-dwm-6.2/autostart/autostart_blocking.sh
new file mode 100755
index 0000000..2b723b8
--- /dev/null
+++ b/qubes-dwm-6.2/autostart/autostart_blocking.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+if [ -n "$(qvm-usb | grep tslil_clingman_dactyl_manuform_mini_0)" ]; then
+ # If my USB keyboard is detected, don't mangle the layout
+ setxkbmap -layout us -option caps:ctrl_modifier,terminate:ctrl_alt_bksp
+else
+ # Otherwise set the layout for the built-in keyboard
+ setxkbmap -model pc104curl-z -layout us -variant cmk_ed_dh -option caps:ctrl_modifier,terminate:ctrl_alt_bksp
+fi
+# In a better world we could use something like
+# internal_keyboard=$(xinput -list | grep 'AT Translated' | sed 's/^.*id=\([0-9]*\).*$/\1/')
+# setxkbmap -device $internal_keyboard ...
+# but Qubes only sends one input source to each domU so this wont work.
+
+# I used to have a slightly-too-large Coreboot image in the EEPROM and it
+# would occassionaly cause the RAM to fail. This is fixed, but i might as
+# well keep the following around.
+if [ "$(xl info | awk '/total_memory/ { print $3 }')" -lt "16148" ]; then
+ notify-send -u critical "RAM malfunction"
+fi;
+
+# FHD mod! Thanks nitrocaster for your hard work, and the coreboot community
+# for the patch that disconnects the internal LVDS.
+if [ -n "$(xrandr | grep 'VGA1 connected')" ]; then
+ xrandr --output eDP --auto --output VGA1 --left-of eDP --auto
+fi
+
+exec xdg_autostart