aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaroslav <contact@yaroslavps.com>2020-02-18 10:11:28 +0300
committerYaroslav <contact@yaroslavps.com>2020-02-18 10:11:28 +0300
commitc61ed972172cd77608648cb415d0a4ee0638d9d7 (patch)
treee263ab5b332b6558f0f27539fd4100e7be3e1fad
parentf8caca887f787f52271d9a5d6e06c2bdd6efcb40 (diff)
downloadswayrice-c61ed972172cd77608648cb415d0a4ee0638d9d7.tar.gz
swayrice-c61ed972172cd77608648cb415d0a4ee0638d9d7.zip
pam rules; forgot to add lid close/open script
-rwxr-xr-xinstall.sh1
-rwxr-xr-xlaptop/lid-button.sh7
-rw-r--r--system/pam.d/lightdm9
-rw-r--r--system/pam.d/swaylock7
4 files changed, 22 insertions, 2 deletions
diff --git a/install.sh b/install.sh
index 8799eee..53cf563 100755
--- a/install.sh
+++ b/install.sh
@@ -22,6 +22,7 @@ cp -r system/lightdm/ /etc/lightdm/
cp systemd/hotspot.service /etc/systemd/system/
cp systemd/startupsound.service /etc/systemd/system/
cp system/plymouth/bgrt.plymouth /usr/share/plymouth/themes/bgrt/bgrt.plymouth
+cp system/pam.d/* /etc/pam.d/
plymouth-set-default-theme -R bgrt
diff --git a/laptop/lid-button.sh b/laptop/lid-button.sh
index 601af5a..71f67c6 100755
--- a/laptop/lid-button.sh
+++ b/laptop/lid-button.sh
@@ -1,9 +1,12 @@
#!/bin/sh
+
+export SWAYSOCK=/run/user/1000/sway-ipc.1000.$(pgrep -x sway).sock
+
case "$3" in
close)
logger "LID close on custom";
- if [ "$(ps cax | grep i3)" ]; then
- su yaroslav -c "DISPLAY=:0 i3 exec 'i3session suspend'"
+ if [ "$(ps cax | grep sway)" ]; then
+ su yaroslav -c "swaymsg exec 'swaysession suspend'"
else
systemctl suspend
fi
diff --git a/system/pam.d/lightdm b/system/pam.d/lightdm
new file mode 100644
index 0000000..f383294
--- /dev/null
+++ b/system/pam.d/lightdm
@@ -0,0 +1,9 @@
+#%PAM-1.0
+auth include system-login
+auth optional pam_gnupg.so
+-auth optional pam_gnome_keyring.so
+account include system-login
+password include system-login
+session include system-login
+session optional pam_gnupg.so
+-session optional pam_gnome_keyring.so auto_start
diff --git a/system/pam.d/swaylock b/system/pam.d/swaylock
new file mode 100644
index 0000000..1c190f0
--- /dev/null
+++ b/system/pam.d/swaylock
@@ -0,0 +1,7 @@
+#
+# PAM configuration file for the swaylock screen locker. By default, it includes
+# the 'login' configuration file (see /etc/pam.d/login)
+#
+
+auth include login
+auth optional pam_gnupg.so