aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--Makefile12
-rwxr-xr-xinstall.sh4
-rw-r--r--linux/sway/autostart.m4 (renamed from linux/sway/autostart)5
-rw-r--r--linux/sway/hid.m4 (renamed from linux/sway/hid)4
5 files changed, 25 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 2c60df3..fc05cd5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -80,3 +80,5 @@ system.m4
Common/zshrc
linux/tmux.conf
linux/qtile/config/config.conf
+linux/sway/autostart
+linux/sway/hid
diff --git a/Makefile b/Makefile
index 71a9ebc..272d55a 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,9 @@ endef
TARGETS := linux/tmux.conf \
Common/zshrc \
- linux/qtile/config/config.py
+ linux/qtile/config/config.py \
+ linux/sway/autostart \
+ linux/sway/hid
all: $(TARGETS)
@@ -27,3 +29,11 @@ linux/qtile/config/config.py: linux/qtile/config/config.py.m4 \
linux/qtile/config/keys.m4.py \
${M4_COMMON_DEPS}
$(call M4_EXEC)
+
+linux/sway/autostart: linux/sway/autostart.m4 \
+ ${M4_COMMON_DEPS}
+ $(call M4_EXEC)
+
+linux/sway/hid: linux/sway/hid.m4 \
+ ${M4_COMMON_DEPS}
+ $(call M4_EXEC)
diff --git a/install.sh b/install.sh
index f2d4b29..9f27f19 100755
--- a/install.sh
+++ b/install.sh
@@ -10,6 +10,8 @@ read -p "Enter git email: " git_email
echo "m4_define(\`GIT_EMAIL', \`${git_email}')m4_dnl" >> ${M4_DEF_FILE}
read -p "Enter default editor: " default_editor
echo "m4_define(\`DEFAULT_EDITOR', \`${default_editor}')m4_dnl" >> ${M4_DEF_FILE}
+read -p "Enter sysid: " sysid
+echo "m4_define(\`SYSID', \`${sysid}')m4_dnl" >> ${M4_DEF_FILE}
if [ "$EUID" -eq 0 ]; then
echo "Please don't run this as root, let sudo handle privilege escalation"
@@ -59,3 +61,5 @@ case "$OSTYPE" in
echo "first run `export INST_PM=\"<sudo package-manager>\"` to indicate the package manager to the install script."
;;
esac
+
+make
diff --git a/linux/sway/autostart b/linux/sway/autostart.m4
index 3e53a79..ae49261 100644
--- a/linux/sway/autostart
+++ b/linux/sway/autostart.m4
@@ -1,12 +1,17 @@
+m4_include(`system.m4')m4_dnl
# Fix GTK+ application slow start
exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
# screen locking
+m4_changequote({, })m4_dnl
+m4_ifelse(SYSID, {2}, {m4_dnl
exec swayidle -w \
timeout 300 'swaymsg "output * dpms off"' \
timeout 3600 physlock \
resume 'swaymsg "output * dpms on"' \
before-sleep physlock
+})m4_dnl
+m4_changequote(`, ')m4_dnl
# notification centre
exec swaync
diff --git a/linux/sway/hid b/linux/sway/hid.m4
index 23ad103..762be21 100644
--- a/linux/sway/hid
+++ b/linux/sway/hid.m4
@@ -1,5 +1,7 @@
+m4_include(`system.m4')m4_dnl
+
output eDP-1 {
- scale 1.4
+ scale m4_ifelse(SYSID, `1', `1.4', `1.0')
}
input "type:keyboard" {